< prev index next >

src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinExeBundler.java

Print this page

        

*** 40,60 **** private static final ResourceBundle I18N = ResourceBundle.getBundle( "jdk.jpackage.internal.resources.WinResources"); public static final BundlerParamInfo<WinAppBundler> APP_BUNDLER = new WindowsBundlerParam<>( - getString("param.exe-bundler.name"), - getString("param.exe-bundler.description"), "win.app.bundler", WinAppBundler.class, params -> new WinAppBundler(), null); public static final BundlerParamInfo<File> EXE_IMAGE_DIR = new WindowsBundlerParam<>( - getString("param.image-dir.name"), - getString("param.image-dir.description"), "win.exe.imageDir", File.class, params -> { File imagesRoot = IMAGES_ROOT.fetchFrom(params); if (!imagesRoot.exists()) imagesRoot.mkdirs(); --- 40,56 ----
*** 62,122 **** }, (s, p) -> null); public static final BundlerParamInfo<File> WIN_APP_IMAGE = new WindowsBundlerParam<>( - getString("param.app-dir.name"), - getString("param.app-dir.description"), "win.app.image", File.class, null, (s, p) -> null); public static final BundlerParamInfo<UUID> 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(), (s, p) -> UUID.fromString(s)); public static final StandardBundlerParam<Boolean> 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 (s, p) -> (s == null || "null".equalsIgnoreCase(s))? null : Boolean.valueOf(s) ); public static final StandardBundlerParam<String> PRODUCT_VERSION = new StandardBundlerParam<>( - getString("param.product-version.name"), - getString("param.product-version.description"), "win.msi.productVersion", String.class, VERSION::fetchFrom, (s, p) -> s ); public static final StandardBundlerParam<Boolean> 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, (s, p) -> (s == null || "null".equalsIgnoreCase(s))? true : Boolean.valueOf(s) ); public static final StandardBundlerParam<Boolean> 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, (s, p) -> (s == null || "null".equalsIgnoreCase(s))? false : Boolean.valueOf(s) --- 58,106 ----
*** 126,137 **** private final static String DEFAULT_JRE_EXE_TEMPLATE = "template.jre.iss"; private static final String TOOL_INNO_SETUP_COMPILER = "iscc.exe"; public static final BundlerParamInfo<String> TOOL_INNO_SETUP_COMPILER_EXECUTABLE = new WindowsBundlerParam<>( - getString("param.iscc-path.name"), - getString("param.iscc-path.description"), "win.exe.iscc.exe", String.class, params -> { for (String dirString : (System.getenv("PATH") + ";C:\\Program Files (x86)\\Inno Setup 5;" --- 110,119 ----
*** 372,382 **** outdir.getAbsolutePath()); } String tempDirectory = WindowsDefender.getUserTempDirectory(); if (Arguments.CLIOptions.context().userProvidedBuildRoot) { ! tempDirectory = BUILD_ROOT.fetchFrom(p).getAbsolutePath(); } if (WindowsDefender.isThereAPotentialWindowsDefenderIssue( tempDirectory)) { Log.error(MessageFormat.format( getString("message.potential.windows.defender.issue"), --- 354,364 ---- outdir.getAbsolutePath()); } String tempDirectory = WindowsDefender.getUserTempDirectory(); if (Arguments.CLIOptions.context().userProvidedBuildRoot) { ! tempDirectory = TEMP_ROOT.fetchFrom(p).getAbsolutePath(); } if (WindowsDefender.isThereAPotentialWindowsDefenderIssue( tempDirectory)) { Log.error(MessageFormat.format( getString("message.potential.windows.defender.issue"),
*** 537,576 **** WIN_APP_IMAGE.fetchFrom(p).toPath().toAbsolutePath().toString(); data.put("APPLICATION_IMAGE", innosetupEscape(imagePathString)); Log.verbose("setting APPLICATION_IMAGE to " + innosetupEscape(imagePathString) + " for InnoSetup"); ! StringBuilder secondaryLaunchersCfg = new StringBuilder(); for (Map<String, ? super Object> ! launcher : SECONDARY_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"); } 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"); } } ! data.put("SECONDARY_LAUNCHERS", secondaryLaunchersCfg.toString()); StringBuilder registryEntries = new StringBuilder(); String regName = APP_REGISTRY_NAME.fetchFrom(p); List<Map<String, ? super Object>> fetchFrom = FILE_ASSOCIATIONS.fetchFrom(p); --- 519,558 ---- WIN_APP_IMAGE.fetchFrom(p).toPath().toAbsolutePath().toString(); data.put("APPLICATION_IMAGE", innosetupEscape(imagePathString)); Log.verbose("setting APPLICATION_IMAGE to " + innosetupEscape(imagePathString) + " for InnoSetup"); ! StringBuilder addLaunchersCfg = new StringBuilder(); for (Map<String, ? super Object> ! 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" ! 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" ! 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("ADD_LAUNCHERS", addLaunchersCfg.toString()); StringBuilder registryEntries = new StringBuilder(); String regName = APP_REGISTRY_NAME.fetchFrom(p); List<Map<String, ? super Object>> fetchFrom = FILE_ASSOCIATIONS.fetchFrom(p);
*** 721,732 **** registryEntries.toString()); } else { data.put("FILE_ASSOCIATIONS", ""); } ! // TODO - alternate template for JRE installer ! String iss = RUNTIME_INSTALLER.fetchFrom(p) ? DEFAULT_JRE_EXE_TEMPLATE : DEFAULT_EXE_PROJECT_TEMPLATE; Writer w = new BufferedWriter(new FileWriter( getConfig_ExeProjectFile(p))); --- 703,713 ---- registryEntries.toString()); } else { data.put("FILE_ASSOCIATIONS", ""); } ! String iss = StandardBundlerParam.isRuntimeInstaller(p) ? DEFAULT_JRE_EXE_TEMPLATE : DEFAULT_EXE_PROJECT_TEMPLATE; Writer w = new BufferedWriter(new FileWriter( getConfig_ExeProjectFile(p)));
< prev index next >