pycharm community: make community installers/plugin entrypoint accessible via jps-bootstrap

GitOrigin-RevId: e5e5d3dbd989bbdc23c32624e34329f9439636e4
This commit is contained in:
Leonid Shalupov
2022-02-12 17:05:37 +00:00
committed by intellij-monorepo-bot
parent 2ee3ebcd02
commit 749b6be61f
5 changed files with 57 additions and 44 deletions

View File

@@ -1,48 +1,10 @@
<project name="PyCharm Community Edition" default="all">
<property name="project.home" value="${basedir}/.."/>
<property name="python.home" value="${basedir}"/>
<property name="out.dir" value="${project.home}/out"/>
<property name="tmp.dir" value="${project.home}/out/tmp"/>
<property name="idea.build.number" value="SNAPSHOT"/>
<property name="idea.path" value=""/>
<target name="cleanup">
<delete dir="${out.dir}" failonerror="false"/>
<!-- Using ant is obsolete, please call installers.cmd or plugin.cmd directly -->
<project name="PyCharm Community Edition" default="build">
<target name="build">
<exec executable="${basedir}/installers.cmd" failonerror="true" />
</target>
<target name="init">
<mkdir dir="${out.dir}"/>
<mkdir dir="${tmp.dir}"/>
<target name="plugin">
<exec executable="${basedir}/plugin.cmd" failonerror="true" />
</target>
<macrodef name="call_gant">
<attribute name="script" />
<sequential>
<java failonerror="true" jar="${project.home}/lib/ant/lib/ant-launcher.jar" fork="true">
<jvmarg line="-Xmx612m -XX:MaxPermSize=152m -Didea.build.number=${idea.build.number} &quot;-DideaPath=${idea.path}&quot;"/>
<sysproperty key="java.awt.headless" value="true"/>
<arg line="&quot;-Dgant.script=@{script}&quot;"/>
<arg line="&quot;-Dteamcity.build.tempDir=${tmp.dir}&quot;"/>
<arg line="&quot;-Didea.build.number=${idea.build.number}&quot;"/>
<arg line="&quot;-Didea.test.group=ALL_EXCLUDE_DEFINED&quot;"/>
<arg value="-f"/>
<arg value="${project.home}/build/gant.xml"/>
</java>
</sequential>
</macrodef>
<target name="build" depends="init">
<call_gant script="${python.home}/build/pycharm_community_build.gant"/>
</target>
<target name="plugin" depends="init">
<call_gant script="${python.home}/build/python_community_plugin_build.gant"/>
</target>
<!--
<target name="test" depends="init">
<call_gant script="${project.home}/build/scripts/tests_in_community.gant"/>
</target>
-->
<target name="all" depends="cleanup,build"/>
</project>

View File

@@ -0,0 +1,18 @@
import org.jetbrains.intellij.build.*
import org.jetbrains.intellij.build.pycharm.PyCharmCommunityProperties
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
object PyCharmCommunityInstallersBuildTarget {
@JvmStatic
fun main(args: Array<String>) {
val communityHome = IdeaProjectLoaderUtil.guessCommunityHome(javaClass).toString()
val context = BuildContext.createContext(
communityHome,
communityHome,
PyCharmCommunityProperties(communityHome),
ProprietaryBuildTools.DUMMY,
BuildOptions()
)
BuildTasks.create(context).buildDistributions()
}
}

View File

@@ -0,0 +1,11 @@
import org.jetbrains.intellij.build.IdeaProjectLoaderUtil
import org.jetbrains.intellij.build.pycharm.PythonCommunityPluginBuilder
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
object PythonCommunityPluginBuildTarget {
@JvmStatic
fun main(args: Array<String>) {
val communityHome = IdeaProjectLoaderUtil.guessCommunityHome(javaClass).toString()
PythonCommunityPluginBuilder(communityHome).build()
}
}

11
python/installers.cmd Executable file
View File

@@ -0,0 +1,11 @@
:<<"::CMDLITERAL"
@ECHO OFF
GOTO :CMDSCRIPT
::CMDLITERAL
set -eux
exec "$(cd "$(dirname "$0")"; pwd)/../platform/jps-bootstrap/jps-bootstrap.sh" "$@" intellij.pycharm.community.build PyCharmCommunityInstallersBuildTarget
:CMDSCRIPT
call "%~dp0\..\platform\jps-bootstrap\jps-bootstrap.cmd" %* intellij.pycharm.community.build PyCharmCommunityInstallersBuildTarget
EXIT /B %ERRORLEVEL%

11
python/plugin.cmd Executable file
View File

@@ -0,0 +1,11 @@
:<<"::CMDLITERAL"
@ECHO OFF
GOTO :CMDSCRIPT
::CMDLITERAL
set -eux
exec "$(cd "$(dirname "$0")"; pwd)/../platform/jps-bootstrap/jps-bootstrap.sh" "$@" intellij.pycharm.community.build PythonCommunityPluginBuildTarget
:CMDSCRIPT
call "%~dp0\..\platform\jps-bootstrap\jps-bootstrap.cmd" %* intellij.pycharm.community.build PythonCommunityPluginBuildTarget
EXIT /B %ERRORLEVEL%