< prev index next >
src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacAppImageBuilder.java
Print this page
*** 74,84 ****
private final Path root;
private final Path contentsDir;
private final Path javaDir;
private final Path javaModsDir;
- private final String relativeModsDir;
private final Path resourcesDir;
private final Path macOSDir;
private final Path runtimeDir;
private final Path runtimeRoot;
private final Path mdir;
--- 74,83 ----
*** 174,184 ****
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.relativeModsDir = "Java/mods";
this.resourcesDir = contentsDir.resolve("Resources");
this.macOSDir = contentsDir.resolve("MacOS");
this.runtimeDir = contentsDir.resolve("runtime");
this.runtimeRoot = runtimeDir.resolve("Contents/Home");
this.mdir = runtimeRoot.resolve("lib");
--- 173,182 ----
*** 197,207 ****
this.params = config;
this.root = imageOutDir.resolve(jreName );
this.contentsDir = root.resolve("Contents");
this.javaDir = null;
this.javaModsDir = null;
- this.relativeModsDir = null;
this.resourcesDir = null;
this.macOSDir = null;
this.runtimeDir = this.root;
this.runtimeRoot = runtimeDir.resolve("Contents/Home");
this.mdir = runtimeRoot.resolve("lib");
--- 195,204 ----
*** 276,290 ****
public Path getAppModsDir() {
return javaModsDir;
}
@Override
- public String getRelativeModsDir() {
- return relativeModsDir;
- }
-
- @Override
public void prepareApplicationFiles() throws IOException {
Map<String, ? super Object> originalParams = new HashMap<>(params);
// Generate PkgInfo
File pkgInfoFile = new File(contentsDir.toFile(), "PkgInfo");
pkgInfoFile.createNewFile();
--- 273,282 ----
*** 301,311 ****
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/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) {
--- 293,303 ----
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);
// 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) {
*** 319,329 ****
}
addExecutable.toFile().setExecutable(true, false);
// add config file for add launcher
cfg = new File(root.toFile(), getLauncherCfgName(tmp));
! writeCfgFile(tmp, cfg, "$APPDIR/runtime");
}
// Copy class path entries to Java folder
copyClassPathEntries(javaDir);
--- 311,321 ----
}
addExecutable.toFile().setExecutable(true, false);
// add config file for add launcher
cfg = new File(root.toFile(), getLauncherCfgName(tmp));
! writeCfgFile(tmp, cfg);
}
// Copy class path entries to Java folder
copyClassPathEntries(javaDir);
*** 487,497 ****
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/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 ?
--- 479,489 ----
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", getCfgRuntimeDir());
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 ?
*** 537,554 ****
newline = "";
data.put("DEPLOY_LAUNCHER_CLASS", MAIN_CLASS.fetchFrom(params));
! StringBuilder macroedPath = new StringBuilder();
! for (String s : CLASSPATH.fetchFrom(params).split("[ ;:]+")) {
! macroedPath.append(s);
! macroedPath.append(":");
! }
! macroedPath.deleteCharAt(macroedPath.length() - 1);
!
! data.put("DEPLOY_APP_CLASSPATH", macroedPath.toString());
StringBuilder bundleDocumentTypes = new StringBuilder();
StringBuilder exportedTypes = new StringBuilder();
for (Map<String, ? super Object>
fileAssociation : FILE_ASSOCIATIONS.fetchFrom(params)) {
--- 529,540 ----
newline = "";
data.put("DEPLOY_LAUNCHER_CLASS", MAIN_CLASS.fetchFrom(params));
! data.put("DEPLOY_APP_CLASSPATH",
! getCfgClassPath(CLASSPATH.fetchFrom(params)));
StringBuilder bundleDocumentTypes = new StringBuilder();
StringBuilder exportedTypes = new StringBuilder();
for (Map<String, ? super Object>
fileAssociation : FILE_ASSOCIATIONS.fetchFrom(params)) {
< prev index next >