summaryrefslogtreecommitdiffstats
path: root/Tools/msi
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2022-08-25 20:16:15 (GMT)
committerGitHub <noreply@github.com>2022-08-25 20:16:15 (GMT)
commitfa118f0cd32e9b6cba68df10a176b502407243c8 (patch)
treeda30d3fba688a0d6fdab74e686208232aa20008a /Tools/msi
parent2f88289cf59d7f0941534e40bdd41a5f26f1c605 (diff)
downloadcpython-fa118f0cd32e9b6cba68df10a176b502407243c8.zip
cpython-fa118f0cd32e9b6cba68df10a176b502407243c8.tar.gz
cpython-fa118f0cd32e9b6cba68df10a176b502407243c8.tar.bz2
bpo-46744: Support "-Win32" and make platform flags case insensitive in Windows build scripts. (GH-31803)
Co-authored-by: conioh <10606081+conioh@users.noreply.github.com>
Diffstat (limited to 'Tools/msi')
-rw-r--r--Tools/msi/build.bat17
-rw-r--r--Tools/msi/buildrelease.bat41
2 files changed, 30 insertions, 28 deletions
diff --git a/Tools/msi/build.bat b/Tools/msi/build.bat
index 2bdaca2..99c0767 100644
--- a/Tools/msi/build.bat
+++ b/Tools/msi/build.bat
@@ -11,14 +11,15 @@ set BUILDPACK=
set REBUILD=
:CheckOpts
-if "%~1" EQU "-h" goto Help
-if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
-if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
-if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
-if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
-if "%~1" EQU "--test-marker" (set BUILDTEST=--test-marker) && shift && goto CheckOpts
-if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
-if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
+if "%~1" EQU "-h" goto Help
+if /I "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
+if /I "%~1" EQU "-Win32" (set BUILDX86=1) && shift && goto CheckOpts
+if /I "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
+if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
+if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
+if "%~1" EQU "--test-marker" (set BUILDTEST=--test-marker) && shift && goto CheckOpts
+if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
+if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
diff --git a/Tools/msi/buildrelease.bat b/Tools/msi/buildrelease.bat
index 69dd145..7def39f 100644
--- a/Tools/msi/buildrelease.bat
+++ b/Tools/msi/buildrelease.bat
@@ -43,26 +43,27 @@ set BUILDZIP=1
:CheckOpts
-if "%1" EQU "-h" goto Help
-if "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
-if "%1" EQU "--certificate" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
-if "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
-if "%1" EQU "--out" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
-if "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
-if "%1" EQU "--skip-doc" (set SKIPDOC=1) && shift && goto CheckOpts
-if "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
-if "%1" EQU "--skip-build" (set SKIPBUILD=1) && shift && goto CheckOpts
-if "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
-if "%1" EQU "--test" (set TESTTARGETDIR=%~2) && shift && shift && goto CheckOpts
-if "%1" EQU "-b" (set TARGET=Build) && shift && goto CheckOpts
-if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts
-if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
-if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
-if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
-if "%1" EQU "--skip-pgo" (set PGO=) && shift && goto CheckOpts
-if "%1" EQU "--skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
-if "%1" EQU "--skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
-if "%1" EQU "--skip-msi" (set BUILDMSI=) && shift && goto CheckOpts
+if "%1" EQU "-h" goto Help
+if "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--certificate" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--out" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
+if "%1" EQU "--skip-doc" (set SKIPDOC=1) && shift && goto CheckOpts
+if "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
+if "%1" EQU "--skip-build" (set SKIPBUILD=1) && shift && goto CheckOpts
+if "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--test" (set TESTTARGETDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-b" (set TARGET=Build) && shift && goto CheckOpts
+if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts
+if /I "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
+if /I "%1" EQU "-Win32" (set BUILDX86=1) && shift && goto CheckOpts
+if /I "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
+if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--skip-pgo" (set PGO=) && shift && goto CheckOpts
+if "%1" EQU "--skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
+if "%1" EQU "--skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
+if "%1" EQU "--skip-msi" (set BUILDMSI=) && shift && goto CheckOpts
if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1