< prev index next >

modules/fxpackager/src/main/java/jdk/packager/builders/mac/MacAppImageBuilder.java

Print this page

        

@@ -78,10 +78,21 @@
     private static final String TEMPLATE_BUNDLE_ICON = "GenericApp.icns";
     private static final String OS_TYPE_CODE = "APPL";
     private static final String TEMPLATE_INFO_PLIST_LITE = "Info-lite.plist.template";
     private static final String TEMPLATE_RUNTIME_INFO_PLIST = "Runtime-Info.plist.template";
 
+    private final Path root;
+    private final Path contentsDir;
+    private final Path javaDir;
+    private final Path resourcesDir;
+    private final Path macOSDir;
+    private final Path runtimeDir;
+    private final Path runtimeRoot;
+    private final Path mdir;
+
+    private final Map<String, ? super Object> params;
+
     private static Map<String, String> getMacCategories() {
         Map<String, String> map = new HashMap<>();
         map.put("Business", "public.app-category.business");
         map.put("Developer Tools", "public.app-category.developer-tools");
         map.put("Education", "public.app-category.education");

@@ -229,35 +240,21 @@
                 }
                 return f;
             },
             (s, p) -> new File(s));
 
-
-    private final Path root;
-    private final Path contentsDir;
-    private final Path javaDir;
-    private final Path resourcesDir;
-    private final Path macOSDir;
-    private final Path runtimeDir;
-    private final Path runtimeRoot;
-    private final Path mdir;
-    private final String jimage;
-
-    private final Map<String, ? super Object> params;
-
     private static String extractAppName() {
         return "";
     }
 
     public MacAppImageBuilder(Map<String, Object> config, Path imageOutDir) throws IOException {
         super(config, imageOutDir.resolve(APP_NAME.fetchFrom(config) + ".app/Contents/PlugIns/Java.runtime/Contents/Home"));
 
         Objects.requireNonNull(imageOutDir);
 
-        @SuppressWarnings("unchecked")
-        String img = (String) config.get("jimage.name"); // FIXME constant
-        this.jimage = img == null ? "bootmodules.jimage" : img; //FIXME constant
+        //@SuppressWarnings("unchecked")
+        //String img = (String) config.get("jimage.name"); // FIXME constant
 
         this.params = config;
 
         this.root = imageOutDir.resolve(APP_NAME.fetchFrom(params) + ".app");
 

@@ -265,12 +262,11 @@
         this.javaDir = contentsDir.resolve("Java");
         this.resourcesDir = contentsDir.resolve("Resources");
         this.macOSDir = contentsDir.resolve("MacOS");
         this.runtimeDir = contentsDir.resolve("PlugIns/Java.runtime");
         this.runtimeRoot = runtimeDir.resolve("Contents/Home");
-        this.mdir = runtimeRoot.resolve("lib/modules");
-        Files.createDirectories(mdir);
+        this.mdir = runtimeRoot.resolve("lib");
         Files.createDirectories(javaDir);
         Files.createDirectories(resourcesDir);
         Files.createDirectories(macOSDir);
     }
 

@@ -551,11 +547,10 @@
         if (preloader != null) {
             sb.append(newline)
                     .append("    <string>-Djavafx.preloader=")
                     .append(preloader)
                     .append("</string>");
-            //newline = "\n";
         }
 
         data.put("DEPLOY_JVM_OPTIONS", sb.toString());
 
         sb = new StringBuilder();
< prev index next >