use distinct env vars for 32-bit and 64-bit IDEA CE launcher; allow passing paths selector to build script

This commit is contained in:
Dmitry Jemerov
2013-04-02 20:04:33 +02:00
parent 3e5f528695
commit 25bd2fd927
3 changed files with 23 additions and 4 deletions
+2
View File
@@ -0,0 +1,2 @@
IDS_JDK_ONLY=true
IDS_JDK_ENV_VAR=IDEA_JDK_64
+4 -3
View File
@@ -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) {
+17 -1
View File
@@ -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()
}
})