< prev index next >
src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java
Print this page
@@ -164,22 +164,22 @@
);
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"));
+ + ".app/Contents/runtime/Contents/Home"));
Objects.requireNonNull(imageOutDir);
this.params = config;
this.root = imageOutDir.resolve(APP_NAME.fetchFrom(params) + ".app");
this.contentsDir = root.resolve("Contents");
this.javaDir = contentsDir.resolve("Java");
this.javaModsDir = javaDir.resolve("mods");
this.resourcesDir = contentsDir.resolve("Resources");
this.macOSDir = contentsDir.resolve("MacOS");
- this.runtimeDir = contentsDir.resolve("PlugIns/Java.runtime");
+ this.runtimeDir = contentsDir.resolve("runtime");
this.runtimeRoot = runtimeDir.resolve("Contents/Home");
this.mdir = runtimeRoot.resolve("lib");
Files.createDirectories(javaDir);
Files.createDirectories(resourcesDir);
Files.createDirectories(macOSDir);
@@ -315,11 +315,11 @@
writeEntry(is_lib, macOSDir.resolve(LIBRARY_NAME));
}
executable.toFile().setExecutable(true, false);
// generate main app launcher config file
File cfg = new File(root.toFile(), getLauncherCfgName(params));
- writeCfgFile(params, cfg, "$APPDIR/PlugIns/Java.runtime");
+ writeCfgFile(params, cfg, "$APPDIR/runtime");
// create additional app launcher(s) and config file(s)
List<Map<String, ? super Object>> entryPoints =
StandardBundlerParam.ADD_LAUNCHERS.fetchFrom(params);
for (Map<String, ? super Object> entryPoint : entryPoints) {
@@ -333,11 +333,11 @@
}
addExecutable.toFile().setExecutable(true, false);
// add config file for add launcher
cfg = new File(root.toFile(), getLauncherCfgName(tmp));
- writeCfgFile(tmp, cfg, "$APPDIR/PlugIns/Java.runtime");
+ writeCfgFile(tmp, cfg, "$APPDIR/runtime");
}
// Copy class path entries to Java folder
copyClassPathEntries(javaDir);
@@ -500,11 +500,11 @@
getBundleName(params));
data.put("DEPLOY_BUNDLE_COPYRIGHT",
COPYRIGHT.fetchFrom(params) != null ?
COPYRIGHT.fetchFrom(params) : "Unknown");
data.put("DEPLOY_LAUNCHER_NAME", getLauncherName(params));
- data.put("DEPLOY_JAVA_RUNTIME_NAME", "$APPDIR/PlugIns/Java.runtime");
+ data.put("DEPLOY_JAVA_RUNTIME_NAME", "$APPDIR/runtime");
data.put("DEPLOY_BUNDLE_SHORT_VERSION",
VERSION.fetchFrom(params) != null ?
VERSION.fetchFrom(params) : "1.0.0");
data.put("DEPLOY_BUNDLE_CFBUNDLE_VERSION",
MAC_CF_BUNDLE_VERSION.fetchFrom(params) != null ?
@@ -522,24 +522,21 @@
else if (hasMainModule) {
data.put("DEPLOY_MODULE_NAME",
StandardBundlerParam.MODULE.fetchFrom(params));
}
- data.put("DEPLOY_PREFERENCES_ID",
- PREFERENCES_ID.fetchFrom(params).toLowerCase());
-
StringBuilder sb = new StringBuilder();
- List<String> jvmOptions = JVM_OPTIONS.fetchFrom(params);
+ List<String> jvmOptions = JAVA_OPTIONS.fetchFrom(params);
String newline = ""; //So we don't add extra line after last append
for (String o : jvmOptions) {
sb.append(newline).append(
" <string>").append(o).append("</string>");
newline = "\n";
}
- data.put("DEPLOY_JVM_OPTIONS", sb.toString());
+ data.put("DEPLOY_JAVA_OPTIONS", sb.toString());
sb = new StringBuilder();
List<String> args = ARGUMENTS.fetchFrom(params);
newline = "";
// So we don't add unneccessary extra line after last append
@@ -875,11 +872,11 @@
IOException ioe = toThrow.get();
if (ioe != null) {
throw ioe;
}
- // sign all plugins and frameworks
+ // sign all runtime and frameworks
Consumer<? super Path> signIdentifiedByPList = path -> {
//noinspection ThrowableResultOfMethodCallIgnored
if (toThrow.get() != null) return;
try {
@@ -914,13 +911,13 @@
} catch (IOException e) {
toThrow.set(e);
}
};
- Path pluginsPath = appLocation.resolve("Contents/PlugIns");
- if (Files.isDirectory(pluginsPath)) {
- Files.list(pluginsPath)
+ Path javaPath = appLocation.resolve("Contents/runtime");
+ if (Files.isDirectory(javaPath)) {
+ Files.list(javaPath)
.forEach(signIdentifiedByPList);
ioe = toThrow.get();
if (ioe != null) {
throw ioe;
< prev index next >