IDEA-141023 Bundle JRE with minor IDEs

This commit is contained in:
Vladimir.Orlov
2016-01-28 11:09:31 +03:00
parent d3d348faa8
commit 7f5319ae55
9 changed files with 17 additions and 22 deletions
+1 -1
View File
@@ -5,4 +5,4 @@ IDC_WINLAUNCHER=__IDE-NAME___LAUNCHER
IDS_PROPS_ENV_VAR=__IDE-NAME___PROPERTIES
IDS_VM_OPTIONS_ENV_VAR=__IDE-NAME___VM_OPTIONS
IDS_ERROR_LAUNCHING_APP=Error launching __IDE-NAME__
IDS_VM_OPTIONS=-Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__
IDS_VM_OPTIONS=-Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__ -Didea.jre.check=true
+1 -1
View File
@@ -6,4 +6,4 @@ IDC_WINLAUNCHER=__IDE-NAME___LAUNCHER
IDS_PROPS_ENV_VAR=__IDE-NAME___PROPERTIES
IDS_VM_OPTIONS_ENV_VAR=__IDE-NAME__64_VM_OPTIONS
IDS_ERROR_LAUNCHING_APP=Error launching __IDE-NAME__
IDS_VM_OPTIONS=-Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__
IDS_VM_OPTIONS=-Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__ -Didea.jre.check=true
+2
View File
@@ -70,6 +70,7 @@ def loadProductProperties(String home, String buildNumber) {
throw new BuildException("No product specific properties file found at: " + productPropertiesPath)
}
setProperty("productProperties", includeFile(productPropertiesPath).getProperties(home, buildNumber))
productProperties.ideJvmArgs = productProperties.ideJvmArgs + " -Didea.jre.check=true"
}
target(compile: "Compile project") {
@@ -265,6 +266,7 @@ private layoutMac(Map _args, String home, Paths paths) {
</dict>
"""
args."idea.properties.path" = "${paths.distAll}/bin/idea.properties"
args."idea.properties" = ["idea.jre.check": true];
args.urlSchemes = ["idea"]
args.mac_no_yjp = true
args.executable = prefix
+3 -11
View File
@@ -22,12 +22,9 @@ def nsis_installer(pathsToInclude, stringsFile, pathsFile, outNamePrefix, includ
ant.mkdir(dir: "$box/nsiconf")
if (!hasBundledJRE) {
ant.mkdir(dir: "$box/jre")
ant.unzip(dest: "$box/jre", src: winJDK)
ant.copy(todir: "$box/bin") {
fileset(dir: "$box/jre/jre/bin") {
include(name: "msvcr71.dll")
fileset(dir: "${box}/jdk.win/jre") {
include(name: "**/msvcr71.dll")
}
}
}
@@ -60,12 +57,7 @@ def nsis_installer(pathsToInclude, stringsFile, pathsFile, outNamePrefix, includ
}
fileset(dir: box, includes: "bin/msvcr71.dll")
if (!hasBundledJRE) {
fileset(dir: box, includes: "jre/**/*")
if (includeToolsJar) {
fileset(dir: box) {
include(name: "jre/lib/tools.jar")
}
}
fileset(dir: "${box}/jdk.win", includes: "jre/**/*")
}
}
@@ -145,7 +145,8 @@ public class StartupUtil {
* Checks if the program can run under the JDK it was started with.
*/
private static boolean checkJdkVersion() {
if (!"true".equals(System.getProperty("idea.no.jre.check"))) {
String jreCheck = System.getProperty("idea.jre.check");
if (jreCheck != null && "true".equals(jreCheck)) {
try {
// try to find a class from tools.jar
Class.forName("com.sun.jdi.Field", false, StartupUtil.class.getClassLoader());
@@ -169,8 +170,8 @@ public class StartupUtil {
return false;
}
}
if (!"true".equals(System.getProperty("idea.no.64bit.check"))) {
jreCheck = System.getProperty("idea.64bit.check");
if (jreCheck != null && "true".equals(jreCheck)) {
if (PlatformUtils.isCidr() && !SystemInfo.is64Bit) {
String message = "32-bit JVM is not supported. Please install 64-bit version.";
Main.showMessage("Unsupported JVM", message, true);
@@ -6,4 +6,4 @@ IDC_WINLAUNCHER=__IDE-NAME___LAUNCHER
IDS_PROPS_ENV_VAR=__IDE-NAME___PROPERTIES
IDS_VM_OPTIONS_ENV_VAR=__IDE-NAME__64_VM_OPTIONS
IDS_ERROR_LAUNCHING_APP=Error launching __IDE-NAME__
IDS_VM_OPTIONS=-Didea.platform.prefix=PyCharmCore -Didea.no.jre.check=true -Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__
IDS_VM_OPTIONS=-Didea.platform.prefix=PyCharmCore -Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__
@@ -6,4 +6,4 @@ IDC_WINLAUNCHER=__IDE-NAME___LAUNCHER
IDS_PROPS_ENV_VAR=__IDE-NAME___PROPERTIES
IDS_VM_OPTIONS_ENV_VAR=__IDE-NAME___VM_OPTIONS
IDS_ERROR_LAUNCHING_APP=Error launching __IDE-NAME__
IDS_VM_OPTIONS=-Didea.platform.prefix=PyCharmCore -Didea.no.jre.check=true -Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__
IDS_VM_OPTIONS=-Didea.platform.prefix=PyCharmCore -Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__
@@ -171,7 +171,7 @@ public layoutEducational(String classesPath, Set usedJars) {
projectBuilder.moduleRuntimeClasspath(findModule("main_pycharm_edu"), false).each {
ant.pathelement(location: it)
}
}, "-Didea.platform.prefix=PyCharmEdu -Didea.no.jre.check=true")
}, "-Didea.platform.prefix=PyCharmEdu")
def appInfo = appInfoFile()
if (!dryRun) {
@@ -181,7 +181,7 @@ public layoutEducational(String classesPath, Set usedJars) {
Map args = [
buildNumber: "PE-${buildNumber}",
system_selector: system_selector,
ide_jvm_args: "-Didea.platform.prefix=PyCharmEdu -Didea.no.jre.check=true"]
ide_jvm_args: "-Didea.platform.prefix=PyCharmEdu"]
LayoutInfo layoutInfo = layoutFull(args, paths.distAll, usedJars)
generateLicensesTable("$paths.artifacts/third-party-libraries.txt", layoutInfo.usedModules);
@@ -439,7 +439,7 @@ private layoutMac(Map _args, String target) {
args.platform_prefix = "PyCharmEdu"
args.help_id = "PE"
args."idea.properties.path" = "${paths.distAll}/bin/idea.properties"
args."idea.properties" = ["idea.no.jre.check": true, "ide.mac.useNativeClipboard": "false"];
args."idea.properties" = ["ide.mac.useNativeClipboard": "false"];
args.executable = "pycharm"
layoutMacApp(target, ch, args)
}
@@ -6,4 +6,4 @@ IDC_WINLAUNCHER=__IDE-NAME___LAUNCHER
IDS_PROPS_ENV_VAR=__IDE-NAME___PROPERTIES
IDS_VM_OPTIONS_ENV_VAR=__IDE-NAME___VM_OPTIONS
IDS_ERROR_LAUNCHING_APP=Error launching __IDE-NAME__
IDS_VM_OPTIONS=-Didea.platform.prefix=PyCharmEdu -Didea.no.jre.check=true -Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__
IDS_VM_OPTIONS=-Didea.platform.prefix=PyCharmEdu -Didea.paths.selector=__PRODUCT_PATHS_SELECTOR__