src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacPkgBundler.java
branchJDK-8200758-branch
changeset 57290 47c2aca6c306
parent 57256 d7c27451f759
child 57331 221a589c52ee
equal deleted inserted replaced
57289:1a93286f0767 57290:47c2aca6c306
   209             throws IOException {
   209             throws IOException {
   210         Log.verbose(I18N.getString("message.preparing-scripts"));
   210         Log.verbose(I18N.getString("message.preparing-scripts"));
   211 
   211 
   212         Map<String, String> data = new HashMap<>();
   212         Map<String, String> data = new HashMap<>();
   213 
   213 
   214         data.put("DEPLOY_DAEMON_IDENTIFIER", getDaemonIdentifier(params));
   214         data.put("INSTALL_LOCATION", MAC_INSTALL_DIR.fetchFrom(params));
   215         data.put("DEPLOY_LAUNCHD_PLIST_FILE",
       
   216                 IDENTIFIER.fetchFrom(params).toLowerCase() + ".launchd.plist");
       
   217 
   215 
   218         Writer w = new BufferedWriter(
   216         Writer w = new BufferedWriter(
   219                 new FileWriter(getScripts_PreinstallFile(params)));
   217                 new FileWriter(getScripts_PreinstallFile(params)));
   220         String content = preprocessTextResource(
   218         String content = preprocessTextResource(
   221                 getScripts_PreinstallFile(params).getName(),
   219                 getScripts_PreinstallFile(params).getName(),
   376 
   374 
   377             IOUtils.exec(pb, false);
   375             IOUtils.exec(pb, false);
   378 
   376 
   379             patchCPLFile(cpl);
   377             patchCPLFile(cpl);
   380 
   378 
       
   379             preparePackageScripts(params);
       
   380 
   381             // build application package
   381             // build application package
   382             pb = new ProcessBuilder("pkgbuild",
   382             pb = new ProcessBuilder("pkgbuild",
   383                     "--root",
   383                     "--root",
   384                     appLocation.getParent(),
   384                     appLocation.getParent(),
   385                     "--install-location",
   385                     "--install-location",
   386                     MAC_INSTALL_DIR.fetchFrom(params),
   386                     MAC_INSTALL_DIR.fetchFrom(params),
   387                     "--component-plist",
   387                     "--component-plist",
   388                     cpl.getAbsolutePath(),
   388                     cpl.getAbsolutePath(),
       
   389                     "--scripts",
       
   390                     SCRIPTS_DIR.fetchFrom(params).getAbsolutePath(),
   389                     appPKG.getAbsolutePath());
   391                     appPKG.getAbsolutePath());
   390             IOUtils.exec(pb, false);
   392             IOUtils.exec(pb, false);
   391 
   393 
   392             // build final package
   394             // build final package
   393             File finalPKG = new File(outdir, INSTALLER_NAME.fetchFrom(params)
   395             File finalPKG = new File(outdir, INSTALLER_NAME.fetchFrom(params)