--- old/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java 2019-03-05 14:54:11.625800300 -0500 +++ new/src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java 2019-03-05 14:54:10.611787300 -0500 @@ -42,8 +42,6 @@ public static final BundlerParamInfo APP_BUNDLER = new WindowsBundlerParam<>( - getString("param.exe-bundler.name"), - getString("param.exe-bundler.description"), "win.app.bundler", WinAppBundler.class, params -> new WinAppBundler(), @@ -51,8 +49,6 @@ public static final BundlerParamInfo EXE_IMAGE_DIR = new WindowsBundlerParam<>( - getString("param.image-dir.name"), - getString("param.image-dir.description"), "win.exe.imageDir", File.class, params -> { @@ -64,8 +60,6 @@ public static final BundlerParamInfo WIN_APP_IMAGE = new WindowsBundlerParam<>( - getString("param.app-dir.name"), - getString("param.app-dir.description"), "win.app.image", File.class, null, @@ -73,8 +67,6 @@ public static final BundlerParamInfo UPGRADE_UUID = new WindowsBundlerParam<>( - I18N.getString("param.upgrade-uuid.name"), - I18N.getString("param.upgrade-uuid.description"), Arguments.CLIOptions.WIN_UPGRADE_UUID.getId(), UUID.class, params -> UUID.randomUUID(), @@ -82,8 +74,6 @@ public static final StandardBundlerParam EXE_SYSTEM_WIDE = new StandardBundlerParam<>( - getString("param.system-wide.name"), - getString("param.system-wide.description"), Arguments.CLIOptions.WIN_PER_USER_INSTALLATION.getId(), Boolean.class, params -> true, // default to system wide @@ -92,8 +82,6 @@ ); public static final StandardBundlerParam PRODUCT_VERSION = new StandardBundlerParam<>( - getString("param.product-version.name"), - getString("param.product-version.description"), "win.msi.productVersion", String.class, VERSION::fetchFrom, @@ -102,8 +90,6 @@ public static final StandardBundlerParam MENU_HINT = new WindowsBundlerParam<>( - getString("param.menu-shortcut-hint.name"), - getString("param.menu-shortcut-hint.description"), Arguments.CLIOptions.WIN_MENU_HINT.getId(), Boolean.class, params -> false, @@ -113,8 +99,6 @@ public static final StandardBundlerParam SHORTCUT_HINT = new WindowsBundlerParam<>( - getString("param.desktop-shortcut-hint.name"), - getString("param.desktop-shortcut-hint.description"), Arguments.CLIOptions.WIN_SHORTCUT_HINT.getId(), Boolean.class, params -> false, @@ -128,8 +112,6 @@ public static final BundlerParamInfo TOOL_INNO_SETUP_COMPILER_EXECUTABLE = new WindowsBundlerParam<>( - getString("param.iscc-path.name"), - getString("param.iscc-path.description"), "win.exe.iscc.exe", String.class, params -> { @@ -374,7 +356,7 @@ String tempDirectory = WindowsDefender.getUserTempDirectory(); if (Arguments.CLIOptions.context().userProvidedBuildRoot) { - tempDirectory = BUILD_ROOT.fetchFrom(p).getAbsolutePath(); + tempDirectory = TEMP_ROOT.fetchFrom(p).getAbsolutePath(); } if (WindowsDefender.isThereAPotentialWindowsDefenderIssue( tempDirectory)) { @@ -539,36 +521,36 @@ Log.verbose("setting APPLICATION_IMAGE to " + innosetupEscape(imagePathString) + " for InnoSetup"); - StringBuilder secondaryLaunchersCfg = new StringBuilder(); + StringBuilder addLaunchersCfg = new StringBuilder(); for (Map - launcher : SECONDARY_LAUNCHERS.fetchFrom(p)) { + launcher : ADD_LAUNCHERS.fetchFrom(p)) { String application_name = APP_NAME.fetchFrom(launcher); if (MENU_HINT.fetchFrom(launcher)) { // Name: "{group}\APPLICATION_NAME"; // Filename: "{app}\APPLICATION_NAME.exe"; // IconFilename: "{app}\APPLICATION_NAME.ico" - secondaryLaunchersCfg.append("Name: \"{group}\\"); - secondaryLaunchersCfg.append(application_name); - secondaryLaunchersCfg.append("\"; Filename: \"{app}\\"); - secondaryLaunchersCfg.append(application_name); - secondaryLaunchersCfg.append(".exe\"; IconFilename: \"{app}\\"); - secondaryLaunchersCfg.append(application_name); - secondaryLaunchersCfg.append(".ico\"\r\n"); + addLaunchersCfg.append("Name: \"{group}\\"); + addLaunchersCfg.append(application_name); + addLaunchersCfg.append("\"; Filename: \"{app}\\"); + addLaunchersCfg.append(application_name); + addLaunchersCfg.append(".exe\"; IconFilename: \"{app}\\"); + addLaunchersCfg.append(application_name); + addLaunchersCfg.append(".ico\"\r\n"); } if (SHORTCUT_HINT.fetchFrom(launcher)) { // Name: "{commondesktop}\APPLICATION_NAME"; // Filename: "{app}\APPLICATION_NAME.exe"; // IconFilename: "{app}\APPLICATION_NAME.ico" - secondaryLaunchersCfg.append("Name: \"{commondesktop}\\"); - secondaryLaunchersCfg.append(application_name); - secondaryLaunchersCfg.append("\"; Filename: \"{app}\\"); - secondaryLaunchersCfg.append(application_name); - secondaryLaunchersCfg.append(".exe\"; IconFilename: \"{app}\\"); - secondaryLaunchersCfg.append(application_name); - secondaryLaunchersCfg.append(".ico\"\r\n"); + addLaunchersCfg.append("Name: \"{commondesktop}\\"); + addLaunchersCfg.append(application_name); + addLaunchersCfg.append("\"; Filename: \"{app}\\"); + addLaunchersCfg.append(application_name); + addLaunchersCfg.append(".exe\"; IconFilename: \"{app}\\"); + addLaunchersCfg.append(application_name); + addLaunchersCfg.append(".ico\"\r\n"); } } - data.put("SECONDARY_LAUNCHERS", secondaryLaunchersCfg.toString()); + data.put("ADD_LAUNCHERS", addLaunchersCfg.toString()); StringBuilder registryEntries = new StringBuilder(); String regName = APP_REGISTRY_NAME.fetchFrom(p); @@ -723,8 +705,7 @@ data.put("FILE_ASSOCIATIONS", ""); } - // TODO - alternate template for JRE installer - String iss = RUNTIME_INSTALLER.fetchFrom(p) ? + String iss = StandardBundlerParam.isRuntimeInstaller(p) ? DEFAULT_JRE_EXE_TEMPLATE : DEFAULT_EXE_PROJECT_TEMPLATE; Writer w = new BufferedWriter(new FileWriter(