From 96d2926327e1dfedcbc35d3ac1b7b0f1c00a678f Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 23 Sep 2013 12:23:26 +0200 Subject: [PATCH 1/3] correct set of used jars for CE build --- python/build/pycharm_build.gant | 6 +++--- python/build/pycharm_community_build.gant | 26 +++++++++++++++++------ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/python/build/pycharm_build.gant b/python/build/pycharm_build.gant index 1fd9b971b769..d6230e015581 100644 --- a/python/build/pycharm_build.gant +++ b/python/build/pycharm_build.gant @@ -159,14 +159,14 @@ target('default': "Build artifacts") { signMacZip("pycharm") buildDmg("pycharm", "${home}/python/build/DMG_background.png") - communityEdition(usedJars) + communityEdition() } -private communityEdition(Set usedJars) { +private communityEdition() { Script s = groovyShell.parse(new File("$pythonCommunityHome/build/pycharm_community_build.gant")) s.setBinding(binding) - s.layoutCommunity("${paths.sandbox}/classes/production", usedJars) + s.layoutCommunity("${paths.sandbox}/classes/production", null) signExe("${paths.sandboxCE}/win/bin/pycharm.exe") buildNSIS(["${paths.sandboxCE}/layout", "${paths.sandboxCE}/win"], "$pythonCommunityHome/build/strings.nsi", "$pythonCommunityHome/build/paths.nsi", diff --git a/python/build/pycharm_community_build.gant b/python/build/pycharm_community_build.gant index b48dfadc9754..81b3d20bde7a 100644 --- a/python/build/pycharm_community_build.gant +++ b/python/build/pycharm_community_build.gant @@ -33,6 +33,18 @@ private List pycharmImplementationModules() { //modules to put into pycharm.ja "platform-main"].flatten() } +private List modules() { + return [ + "python-pydev", "colorSchemes", pycharmPlatformApiModules(), pycharmImplementationModules(), pluginFilter + ].flatten() +} + +private List approvedJars() { + def normalizedHome = ch.replace('\\', '/') + def normalizedPythonHome = pythonCommunityHome.replace('\\', '/') + return ["$normalizedHome/lib/", "$normalizedPythonHome/lib/", "$normalizedHome/xml/relaxng/lib/"] +} + class Paths { final sandbox final distAll @@ -61,9 +73,6 @@ setProperty("paths", new Paths(home)) setProperty("buildName", "PC-$buildNumber") target('default': "Build artifacts") { - def modules = [ - "python-pydev", "colorSchemes", pycharmPlatformApiModules(), pycharmImplementationModules(), pluginFilter - ].flatten() loadProject() @@ -104,10 +113,7 @@ target('default': "Build artifacts") { zipSources(home, paths.artifacts) - def normalizedHome = ch.replace('\\', '/') - def normalizedPythonHome = pythonCommunityHome.replace('\\', '/') - def approvedJars = ["$normalizedHome/lib/", "$normalizedPythonHome/lib/", "$normalizedHome/xml/relaxng/lib/"] - def usedJars = buildModulesAndCollectUsedJars(modules, approvedJars, ["/ant/"]) + def usedJars = buildModulesAndCollectUsedJars(modules(), approvedJars(), ["/ant/"]) layoutCommunity("${paths.sandbox}/classes/production", usedJars) @@ -126,6 +132,12 @@ target('default': "Build artifacts") { } public layoutCommunity(String classesPath, Set usedJars) { + setProperty("pluginFilter", new File("$pythonCommunityHome/build/plugin-list.txt").readLines()) + + if (usedJars == null) { + usedJars = collectUsedJars(modules(), approvedJars(), ["/ant/"], null) + } + def appInfo = appInfoFile(classesPath) def paths = new Paths(home) buildSearchableOptions("${projectBuilder.moduleOutput(findModule("platform-resources"))}/search", [], { From ae6452760e26da3039bbdf4115ec59c8e34a3911 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 23 Sep 2013 13:16:34 +0200 Subject: [PATCH 2/3] explicitly include java-runtime in classpath for building searchable options --- python/build/pycharm_build.gant | 3 +++ python/build/pycharm_community_build.gant | 3 +++ 2 files changed, 6 insertions(+) diff --git a/python/build/pycharm_build.gant b/python/build/pycharm_build.gant index d6230e015581..80bc6420f3ca 100644 --- a/python/build/pycharm_build.gant +++ b/python/build/pycharm_build.gant @@ -110,6 +110,9 @@ target('default': "Build artifacts") { projectBuilder.moduleRuntimeClasspath(findModule("main_pycharm"), false).each { ant.pathelement(location: it) } + projectBuilder.moduleRuntimeClasspath(findModule("java-runtime"), false).each { + ant.pathelement(location: it) + } }, "-Didea.platform.prefix=Python -Didea.no.jre.check=true") if (!dryRun) { diff --git a/python/build/pycharm_community_build.gant b/python/build/pycharm_community_build.gant index 81b3d20bde7a..50aea7302434 100644 --- a/python/build/pycharm_community_build.gant +++ b/python/build/pycharm_community_build.gant @@ -144,6 +144,9 @@ public layoutCommunity(String classesPath, Set usedJars) { projectBuilder.moduleRuntimeClasspath(findModule("main_pycharm_ce"), false).each { ant.pathelement(location: it) } + projectBuilder.moduleRuntimeClasspath(findModule("java-runtime"), false).each { + ant.pathelement(location: it) + } }, "-Didea.platform.prefix=PyCharmCore -Didea.no.jre.check=true") if (!dryRun) { From 002dbc30b701c7905b0e7ec0f644341f3bee2c6f Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 23 Sep 2013 14:03:20 +0200 Subject: [PATCH 3/3] revert unneeded change --- python/build/pycharm_build.gant | 3 --- python/build/pycharm_community_build.gant | 3 --- 2 files changed, 6 deletions(-) diff --git a/python/build/pycharm_build.gant b/python/build/pycharm_build.gant index 80bc6420f3ca..d6230e015581 100644 --- a/python/build/pycharm_build.gant +++ b/python/build/pycharm_build.gant @@ -110,9 +110,6 @@ target('default': "Build artifacts") { projectBuilder.moduleRuntimeClasspath(findModule("main_pycharm"), false).each { ant.pathelement(location: it) } - projectBuilder.moduleRuntimeClasspath(findModule("java-runtime"), false).each { - ant.pathelement(location: it) - } }, "-Didea.platform.prefix=Python -Didea.no.jre.check=true") if (!dryRun) { diff --git a/python/build/pycharm_community_build.gant b/python/build/pycharm_community_build.gant index 50aea7302434..81b3d20bde7a 100644 --- a/python/build/pycharm_community_build.gant +++ b/python/build/pycharm_community_build.gant @@ -144,9 +144,6 @@ public layoutCommunity(String classesPath, Set usedJars) { projectBuilder.moduleRuntimeClasspath(findModule("main_pycharm_ce"), false).each { ant.pathelement(location: it) } - projectBuilder.moduleRuntimeClasspath(findModule("java-runtime"), false).each { - ant.pathelement(location: it) - } }, "-Didea.platform.prefix=PyCharmCore -Didea.no.jre.check=true") if (!dryRun) {