diff --git a/build/conf/ideaCE64-launcher.properties b/build/conf/ideaCE64-launcher.properties new file mode 100644 index 000000000000..33109899b31e --- /dev/null +++ b/build/conf/ideaCE64-launcher.properties @@ -0,0 +1,2 @@ +IDS_JDK_ONLY=true +IDS_JDK_ENV_VAR=IDEA_JDK_64 diff --git a/build/scripts/dist.gant b/build/scripts/dist.gant index e9b9fce394e5..c6e3d4fe608d 100644 --- a/build/scripts/dist.gant +++ b/build/scripts/dist.gant @@ -151,10 +151,11 @@ private layoutWin(Map args, String home, Paths paths) { winScripts(target, home, "idea.bat", args) winVMOptions(target, null, "idea.exe", "idea64.exe") - String launcherProperties = "$home/build/conf/ideaCE-launcher.properties" List resourcePaths = ["$home/community-resources/src", "$home/platform/icons/src"] - buildWinLauncher(home, "$home/bin/WinLauncher/WinLauncher.exe", "$target/bin/idea.exe", appInfoFile(), launcherProperties, resourcePaths) - buildWinLauncher(home, "$home/bin/WinLauncher/WinLauncher64.exe", "$target/bin/idea64.exe", appInfoFile(), launcherProperties, resourcePaths) + buildWinLauncher(home, "$home/bin/WinLauncher/WinLauncher.exe", "$target/bin/idea.exe", appInfoFile(), + "$home/build/conf/ideaCE-launcher.properties", null, resourcePaths) + buildWinLauncher(home, "$home/bin/WinLauncher/WinLauncher64.exe", "$target/bin/idea64.exe", appInfoFile(), + "$home/build/conf/ideaCE64-launcher.properties", null, resourcePaths) } private layoutMac(Map _args, String home, Paths paths) { diff --git a/build/scripts/utils.gant b/build/scripts/utils.gant index 40bae3a6f6b1..80ce3f3b57fa 100644 --- a/build/scripts/utils.gant +++ b/build/scripts/utils.gant @@ -727,9 +727,21 @@ private void fixIdeaPropertiesEol(List paths, String eol) { } } -binding.setVariable("buildWinLauncher", { String ch, String inputPath, String outputPath, String appInfo, String launcherProperties, List resourcePaths -> +binding.setVariable("buildWinLauncher", { String ch, String inputPath, String outputPath, String appInfo, String launcherProperties, String pathsSelector, List resourcePaths -> projectBuilder.stage("winLauncher") + File launcherPropertiesTempFile = null; + if (pathsSelector != null) { + String propertiesContent = new File(launcherProperties).text + if (propertiesContent.contains("__PRODUCT_PATHS_SELECTOR__")) { + propertiesContent = propertiesContent.replace("__PRODUCT_PATHS_SELECTOR__", pathsSelector) + launcherPropertiesTempFile = File.createTempFile("launcher", ".properties") + launcherPropertiesTempFile.write(propertiesContent) + launcherPropertiesTempFile.close() + launcherProperties = launcherPropertiesTempFile.getAbsolutePath() + } + } + ant.java(classname: "com.pme.launcher.LauncherGeneratorMain", fork: "true") { arg(value: inputPath) arg(value: appInfo) @@ -748,4 +760,8 @@ binding.setVariable("buildWinLauncher", { String ch, String inputPath, String ou } } } + + if (launcherPropertiesTempFile != null) { + launcherPropertiesTempFile.delete() + } })