< prev index next >

modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxAppBundler.java

Print this page

        

*** 246,256 **** // Generate launcher .cfg file if (LAUNCHER_CFG_FORMAT.fetchFrom(p).equals(CFG_FORMAT_PROPERTIES)) { writeCfgFile(p, rootDir); } else { ! writeCfgFile(p, new File(rootDir, getLauncherCfgName(p)), "$APPDIR/runtime"); } } private void copyApplication(Map<String, ? super Object> params, File appDirectory) throws IOException { List<RelativeFileSet> appResourcesList = APP_RESOURCES_LIST.fetchFrom(params); --- 246,256 ---- // Generate launcher .cfg file if (LAUNCHER_CFG_FORMAT.fetchFrom(p).equals(CFG_FORMAT_PROPERTIES)) { writeCfgFile(p, rootDir); } else { ! writeCfgFile(p, new File(rootDir, getLauncherCfgName(p)), getRuntimeLocation(p)); } } private void copyApplication(Map<String, ? super Object> params, File appDirectory) throws IOException { List<RelativeFileSet> appResourcesList = APP_RESOURCES_LIST.fetchFrom(params);
*** 267,286 **** new File(srcdir, fname), new File(appDirectory, fname)); } } } private void writeCfgFile(Map<String, ? super Object> params, File rootDir) throws FileNotFoundException { File cfgFile = new File(rootDir, getLauncherCfgName(params)); cfgFile.delete(); PrintStream out = new PrintStream(cfgFile); ! if (LINUX_RUNTIME.fetchFrom(params) == null) { ! out.println("app.runtime="); ! } else { ! out.println("app.runtime=$APPDIR/runtime"); ! } out.println("app.mainjar=" + MAIN_JAR.fetchFrom(params).getIncludedFiles().iterator().next()); out.println("app.version=" + VERSION.fetchFrom(params)); //use '/' in the class name (instead of '.' to simplify native code out.println("app.mainclass=" + --- 267,290 ---- new File(srcdir, fname), new File(appDirectory, fname)); } } } + private String getRuntimeLocation(Map<String, ? super Object> params) { + if (LINUX_RUNTIME.fetchFrom(params) == null) { + return ""; + } else { + return "$APPDIR/runtime"; + } + } + private void writeCfgFile(Map<String, ? super Object> params, File rootDir) throws FileNotFoundException { File cfgFile = new File(rootDir, getLauncherCfgName(params)); cfgFile.delete(); PrintStream out = new PrintStream(cfgFile); ! out.println("app.runtime=" + getRuntimeLocation(params)); out.println("app.mainjar=" + MAIN_JAR.fetchFrom(params).getIncludedFiles().iterator().next()); out.println("app.version=" + VERSION.fetchFrom(params)); //use '/' in the class name (instead of '.' to simplify native code out.println("app.mainclass=" +
< prev index next >