< prev index next >
src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java
Print this page
*** 209,221 ****
throws IOException {
Log.verbose(I18N.getString("message.preparing-scripts"));
Map<String, String> data = new HashMap<>();
! data.put("DEPLOY_DAEMON_IDENTIFIER", getDaemonIdentifier(params));
! data.put("DEPLOY_LAUNCHD_PLIST_FILE",
! IDENTIFIER.fetchFrom(params).toLowerCase() + ".launchd.plist");
Writer w = new BufferedWriter(
new FileWriter(getScripts_PreinstallFile(params)));
String content = preprocessTextResource(
getScripts_PreinstallFile(params).getName(),
--- 209,219 ----
throws IOException {
Log.verbose(I18N.getString("message.preparing-scripts"));
Map<String, String> data = new HashMap<>();
! data.put("INSTALL_LOCATION", MAC_INSTALL_DIR.fetchFrom(params));
Writer w = new BufferedWriter(
new FileWriter(getScripts_PreinstallFile(params)));
String content = preprocessTextResource(
getScripts_PreinstallFile(params).getName(),
*** 376,393 ****
--- 374,395 ----
IOUtils.exec(pb, false);
patchCPLFile(cpl);
+ preparePackageScripts(params);
+
// build application package
pb = new ProcessBuilder("pkgbuild",
"--root",
appLocation.getParent(),
"--install-location",
MAC_INSTALL_DIR.fetchFrom(params),
"--component-plist",
cpl.getAbsolutePath(),
+ "--scripts",
+ SCRIPTS_DIR.fetchFrom(params).getAbsolutePath(),
appPKG.getAbsolutePath());
IOUtils.exec(pb, false);
// build final package
File finalPKG = new File(outdir, INSTALLER_NAME.fetchFrom(params)
< prev index next >