diff --git a/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduBuilder.groovy b/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduBuilder.groovy deleted file mode 100644 index 1b3f2f145fdc..000000000000 --- a/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduBuilder.groovy +++ /dev/null @@ -1,28 +0,0 @@ -package org.jetbrains.intellij.build.pycharm.edu - -import org.codehaus.gant.GantBinding -import org.jetbrains.intellij.build.BuildContext -import org.jetbrains.intellij.build.BuildTasks -import org.jetbrains.intellij.build.CommunityRepositoryModules -import org.jetbrains.intellij.build.JetBrainsBuildTools - -/** - * @author nik - */ -class PyCharmEduBuilder { - private final GantBinding binding - private final String home - - PyCharmEduBuilder(String home, GantBinding binding) { - this.home = home - this.binding = binding - } - - def build() { - def buildContext = BuildContext.createContext(binding.ant, binding.projectBuilder, binding.project, binding.global, - "$home/community", home, new PyCharmEduProperties(home), - JetBrainsBuildTools.create("$home/build/lib/jet-sign.jar")) - def buildTasks = BuildTasks.create(buildContext) - buildTasks.compileModulesAndBuildDistributions() - } -} \ No newline at end of file diff --git a/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduProperties.groovy b/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduProperties.groovy index 7072c8a65f54..7fe5b2b273b8 100644 --- a/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduProperties.groovy +++ b/python/educational-python/build/groovy/org/jetbrains/intellij/build/pycharm/edu/PyCharmEduProperties.groovy @@ -9,11 +9,14 @@ import org.jetbrains.intellij.build.pycharm.PyCharmWindowsDistributionCustomizer * @author nik */ class PyCharmEduProperties extends PyCharmPropertiesBase { + private final String pythonCommunityPath + PyCharmEduProperties(String home) { + pythonCommunityPath = new File(home, "community/python").exists() ? "$home/community/python" : "$home/python" productCode = "PE" platformPrefix = "PyCharmEdu" applicationInfoModule = "educational-python" - brandingResourcePaths = ["$home/community/python/educational-python/resources"] + brandingResourcePaths = ["$pythonCommunityPath/educational-python/resources"] productLayout.mainModule = "main_pycharm_edu" productLayout.platformApiModules = CommunityRepositoryModules.PLATFORM_API_MODULES + ["dom-openapi"] @@ -21,7 +24,7 @@ class PyCharmEduProperties extends PyCharmPropertiesBase { "dom-impl", "python-community", "python-community-ide-resources", "python-ide-community", "python-community-configure", "educational-python", "python-openapi", "python-psi-api", "platform-main" ] - productLayout.bundledPluginModules = new File("$home/community/python/educational-python/build/plugin-list.txt").readLines() + productLayout.bundledPluginModules = new File("$pythonCommunityPath/educational-python/build/plugin-list.txt").readLines() } @Override @@ -48,10 +51,10 @@ class PyCharmEduProperties extends PyCharmPropertiesBase { return new PyCharmWindowsDistributionCustomizer() { { buildZipWithBundledOracleJre = true - installerImagesPath = "$projectHome/community/python/educational-python/build/resources" + installerImagesPath = "$pythonCommunityPath/educational-python/build/resources" customNsiConfigurationFiles = [ - "$projectHome/community/python/educational-python/build/desktop.ini", - "$projectHome/community/python/educational-python/build/customInstallActions.nsi" + "$pythonCommunityPath/educational-python/build/desktop.ini", + "$pythonCommunityPath/educational-python/build/customInstallActions.nsi" ] } @@ -63,7 +66,8 @@ class PyCharmEduProperties extends PyCharmPropertiesBase { @Override void copyAdditionalFiles(BuildContext context, String targetDirectory) { super.copyAdditionalFiles(context, targetDirectory) - context.ant.copy(file: "$context.paths.projectHome/python/help/pycharm-eduhelp.jar", todir: "$targetDirectory/help", failonerror: false) + context.ant.copy(file: "$context.paths.projectHome/help/pycharm-eduhelp.jar", todir: "$targetDirectory/help", + failonerror: false, quiet: true) } } } @@ -72,7 +76,7 @@ class PyCharmEduProperties extends PyCharmPropertiesBase { LinuxDistributionCustomizer createLinuxCustomizer(String projectHome) { return new LinuxDistributionCustomizer() { { - iconPngPath = "$projectHome/community/python/resources/PyCharmCore128.png" + iconPngPath = "$pythonCommunityPath/resources/PyCharmCore128.png" } @Override @@ -82,7 +86,8 @@ class PyCharmEduProperties extends PyCharmPropertiesBase { @Override void copyAdditionalFiles(BuildContext context, String targetDirectory) { - context.ant.copy(file: "$context.paths.projectHome/python/help/pycharm-eduhelp.jar", todir: "$targetDirectory/help", failonerror: false) + context.ant.copy(file: "$context.paths.projectHome/help/pycharm-eduhelp.jar", todir: "$targetDirectory/help", + failonerror: false, quiet: true) } } } @@ -91,16 +96,16 @@ class PyCharmEduProperties extends PyCharmPropertiesBase { MacDistributionCustomizer createMacCustomizer(String projectHome) { return new PyCharmMacDistributionCustomizer() { { - icnsPath = "$projectHome/community/python/educational-python/resources/PyCharmEdu.icns" + icnsPath = "$pythonCommunityPath/educational-python/resources/PyCharmEdu.icns" bundleIdentifier = "com.jetbrains.pycharm" helpId = "PE" - dmgImagePath = "$projectHome/community/python/educational-python/build/DMG_background.png" + dmgImagePath = "$pythonCommunityPath/educational-python/build/DMG_background.png" } } } @Override - String environmentVariableBaseName(ApplicationInfoProperties applicationInfo) { + String outputDirectoryName(ApplicationInfoProperties applicationInfo) { "pycharm-edu" } } \ No newline at end of file diff --git a/python/educational-python/build/pycharm_edu_build.gant b/python/educational-python/build/pycharm_edu_build.gant deleted file mode 100644 index 09c69eaf4e30..000000000000 --- a/python/educational-python/build/pycharm_edu_build.gant +++ /dev/null @@ -1,13 +0,0 @@ -import org.jetbrains.intellij.build.impl.BuildUtils -import org.jetbrains.jps.gant.JpsGantTool -import org.jetbrains.jps.idea.IdeaProjectLoader - -includeTool << JpsGantTool - -target("default": "Default") { - String home = new File(IdeaProjectLoader.guessHome(this)).parentFile.absolutePath - BuildUtils.addToClassPath("$home/build/groovy", ant) - BuildUtils.addToClassPath("$home/community/python/build/groovy", ant) - BuildUtils.addToClassPath("$home/community/python/educational-python/build/groovy", ant) - Class.forName("org.jetbrains.intellij.build.pycharm.edu.PyCharmEduBuilder").constructors[0].newInstance(home, binding).build() -} diff --git a/python/educational-python/build/pycharm_edu_community_build.gant b/python/educational-python/build/pycharm_edu_community_build.gant new file mode 100644 index 000000000000..e93cf2eb0e01 --- /dev/null +++ b/python/educational-python/build/pycharm_edu_community_build.gant @@ -0,0 +1,6 @@ +import org.jetbrains.intellij.build.BuildTasks + +target("default": "Default") { + BuildTasks.buildProduct("org.jetbrains.intellij.build.pycharm.edu.PyCharmEduProperties", + ["python/build/groovy", "python/educational-python/build/groovy"], "", this) +}