< prev index next >

modules/fxpackager/src/main/java/com/oracle/tools/packager/mac/MacAppBundler.java

Print this page

        

@@ -495,11 +495,11 @@
             // maybe generate launcher config
             if (!MAC_CONFIGURE_LAUNCHER_IN_PLIST.fetchFrom(p)) {
                 if (LAUNCHER_CFG_FORMAT.fetchFrom(p).equals(CFG_FORMAT_PROPERTIES)) {
                     writeCfgFile(p, rootDirectory);
                 } else {
-                    writeCfgFile(p, new File(rootDirectory, getLauncherCfgName(p)), "$APPDIR/PlugIns/Java.runtime");
+                    writeCfgFile(p, new File(rootDirectory, getLauncherCfgName(p)), getRuntimeLocation(p));
                 }
             }
 
             executableFile.setExecutable(true, false);
 

@@ -660,10 +660,18 @@
             }
             return nm;
         }
     }
 
+    private String getRuntimeLocation(Map<String, ? super Object> params) {
+        if (MAC_RUNTIME.fetchFrom(params) == null) {
+            return "";
+        } else {
+            return "$APPDIR/PlugIns/Java.runtime";
+        }
+    }
+
     private void writeInfoPlist(File file, Map<String, ? super Object> params) throws IOException {
         Log.verbose(MessageFormat.format(I18N.getString("message.preparing-info-plist"), file.getAbsolutePath()));
 
         //prepare config for exe
         //Note: do not need CFBundleDisplayName if we do not support localization

@@ -1122,15 +1130,11 @@
         File pkgInfoFile = new File(rootDir, getLauncherCfgName(params));
 
         pkgInfoFile.delete();
 
         PrintStream out = new PrintStream(pkgInfoFile);
-        if (MAC_RUNTIME.fetchFrom(params) == null) {
-            out.println("app.runtime=");
-        } else {
-            out.println("app.runtime=$APPDIR/PlugIns/Java.runtime");
-        }
+        out.println("app.runtime=" + getRuntimeLocation(params));
         out.println("app.mainjar=" + MAIN_JAR.fetchFrom(params).getIncludedFiles().iterator().next());
         out.println("app.version=" + VERSION.fetchFrom(params));
         //for future AU support (to be able to find app in the registry)
         out.println("app.id=" + IDENTIFIER.fetchFrom(params));
         out.println("app.preferences.id=" + PREFERENCES_ID.fetchFrom(params));
< prev index next >