diff --git a/python/build/BUILD.bazel b/python/build/BUILD.bazel index aaaafaad30b9..d256c15845e5 100644 --- a/python/build/BUILD.bazel +++ b/python/build/BUILD.bazel @@ -1,3 +1,17 @@ +load("@rules_java//java:defs.bzl", "java_binary") + +load("//build:intellij_dev.bzl", "INTELLIJ_ADD_OPENS") +load("@jps_dynamic_deps_community//:targets.bzl", "ALL_COMMUNITY_TARGETS") + +# Can't name the target 'installers' since it triggers elevation in Windows +java_binary( + name = "i_build_target", + runtime_deps = [":build"], + main_class = "PyCharmCommunityInstallersBuildTarget", + add_opens = INTELLIJ_ADD_OPENS, + data = ALL_COMMUNITY_TARGETS, +) + ### auto-generated section `build intellij.pycharm.community.build` start load("@rules_jvm//:jvm.bzl", "jvm_library") diff --git a/python/installers.cmd b/python/installers.cmd index f08ecff2ebc4..eacb1681c5aa 100755 --- a/python/installers.cmd +++ b/python/installers.cmd @@ -3,10 +3,25 @@ GOTO :CMDSCRIPT ::CMDLITERAL -set -eux +# installer.cmd builds PyCharm Community installers +# THIS SCRIPTS WORKS FOR ALL SYSTEMS Linux/Windows/macOS +# See README.md for usage scenarios + +# Arguments are passed as JVM options +# and used in org.jetbrains.intellij.build.BuildOptions + +# Pass --debug to suspend and wait for debugger at port 5005 + +set -eu root="$(cd "$(dirname "$0")" && cd .. && pwd)" -exec "$root/platform/jps-bootstrap/jps-bootstrap.sh" "$@" "$root" intellij.pycharm.community.build PyCharmCommunityInstallersBuildTarget + +exec "$root/build/run_build_target.sh" "$root" @community//python/build:i_build_target "$@" + :CMDSCRIPT -call "%~dp0\..\platform\jps-bootstrap\jps-bootstrap.cmd" %* "%~dp0\.." intellij.pycharm.community.build PyCharmCommunityInstallersBuildTarget -EXIT /B %ERRORLEVEL% +"%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe" ^ + -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass ^ + -File "%~dp0..\build\run_build_target.ps1" ^ + "%~dp0.." ^ + "@community//python/build:i_build_target" ^ + %*