src/jdk.jpackager/windows/classes/jdk/jpackager/internal/windows/WinMsiBundler.java
branchJDK-8200758-branch
changeset 57020 a828547f7e50
parent 57017 1b08af362a30
child 57030 902f4c4fba42
equal deleted inserted replaced
57019:585939d9f952 57020:a828547f7e50
   543         // validate we have valid tools before continuing
   543         // validate we have valid tools before continuing
   544         String light = TOOL_LIGHT_EXECUTABLE.fetchFrom(p);
   544         String light = TOOL_LIGHT_EXECUTABLE.fetchFrom(p);
   545         String candle = TOOL_CANDLE_EXECUTABLE.fetchFrom(p);
   545         String candle = TOOL_CANDLE_EXECUTABLE.fetchFrom(p);
   546         if (light == null || !new File(light).isFile() ||
   546         if (light == null || !new File(light).isFile() ||
   547             candle == null || !new File(candle).isFile()) {
   547             candle == null || !new File(candle).isFile()) {
   548             Log.info(I18N.getString("error.no-wix-tools"));
   548             Log.error(I18N.getString("error.no-wix-tools"));
   549             Log.info(MessageFormat.format(
   549             Log.verbose(MessageFormat.format(
   550                    I18N.getString("message.light-file-string"), light));
   550                    I18N.getString("message.light-file-string"), light));
   551             Log.info(MessageFormat.format(
   551             Log.verbose(MessageFormat.format(
   552                    I18N.getString("message.candle-file-string"), candle));
   552                    I18N.getString("message.candle-file-string"), candle));
   553             return null;
   553             return null;
   554         }
   554         }
   555 
   555 
   556         File imageDir = MSI_IMAGE_DIR.fetchFrom(p);
   556         File imageDir = MSI_IMAGE_DIR.fetchFrom(p);
   576 
   576 
   577                     // for now we replicate it
   577                     // for now we replicate it
   578                     File configScript =
   578                     File configScript =
   579                         new File(imageDir, configScriptSrc.getName());
   579                         new File(imageDir, configScriptSrc.getName());
   580                     IOUtils.copyFile(configScriptSrc, configScript);
   580                     IOUtils.copyFile(configScriptSrc, configScript);
   581                     Log.info(MessageFormat.format(
   581                     Log.verbose(MessageFormat.format(
   582                             I18N.getString("message.running-wsh-script"),
   582                             I18N.getString("message.running-wsh-script"),
   583                             configScript.getAbsolutePath()));
   583                             configScript.getAbsolutePath()));
   584                     IOUtils.run("wscript",
   584                     IOUtils.run("wscript",
   585                              configScript, false);
   585                              configScript, false);
   586                 }
   586                 }
   597                         (PREDEFINED_RUNTIME_IMAGE.fetchFrom(p) == null ||
   597                         (PREDEFINED_RUNTIME_IMAGE.fetchFrom(p) == null ||
   598                         !Arguments.CREATE_JRE_INSTALLER.fetchFrom(p)) &&
   598                         !Arguments.CREATE_JRE_INSTALLER.fetchFrom(p)) &&
   599                         !Log.isDebug()) {
   599                         !Log.isDebug()) {
   600                     IOUtils.deleteRecursive(imageDir);
   600                     IOUtils.deleteRecursive(imageDir);
   601                 } else if (imageDir != null) {
   601                 } else if (imageDir != null) {
   602                     Log.info(MessageFormat.format(
   602                     Log.verbose(MessageFormat.format(
   603                             I18N.getString("message.debug-working-directory"),
   603                             I18N.getString("message.debug-working-directory"),
   604                             imageDir.getAbsolutePath()));
   604                             imageDir.getAbsolutePath()));
   605                 }
   605                 }
   606 
   606 
   607                 cleanupConfigFiles(p);
   607                 cleanupConfigFiles(p);
   944 
   944 
   945                 String mime = (mimeTypes == null ||
   945                 String mime = (mimeTypes == null ||
   946                     mimeTypes.isEmpty()) ? null : mimeTypes.get(0);
   946                     mimeTypes.isEmpty()) ? null : mimeTypes.get(0);
   947 
   947 
   948                 if (extensions == null) {
   948                 if (extensions == null) {
   949                     Log.info(I18N.getString(
   949                     Log.verbose(I18N.getString(
   950                           "message.creating-association-with-null-extension"));
   950                           "message.creating-association-with-null-extension"));
   951 
   951 
   952                     String entryName = regName + "File";
   952                     String entryName = regName + "File";
   953                     if (count > 0) {
   953                     if (count > 0) {
   954                         entryName += "." + count;
   954                         entryName += "." + count;
   977                                     + "' IconIndex='0'");
   977                                     + "' IconIndex='0'");
   978                         }
   978                         }
   979                         out.println(">");
   979                         out.println(">");
   980 
   980 
   981                         if (extensions == null) {
   981                         if (extensions == null) {
   982                             Log.info(I18N.getString(
   982                             Log.verbose(I18N.getString(
   983                             "message.creating-association-with-null-extension"));
   983                             "message.creating-association-with-null-extension"));
   984                         } else {
   984                         } else {
   985                             out.print(prefix + "    <Extension Id='"
   985                             out.print(prefix + "    <Extension Id='"
   986                                     + ext + "' Advertise='no'");
   986                                     + ext + "' Advertise='no'");
   987                             if (mime == null) {
   987                             if (mime == null) {