]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46744: Support "-Win32" and make platform flags case insensitive in Windows build...
authorconioh <10606081+conioh@users.noreply.github.com>
Thu, 25 Aug 2022 19:23:42 +0000 (22:23 +0300)
committerGitHub <noreply@github.com>
Thu, 25 Aug 2022 19:23:42 +0000 (20:23 +0100)
Tools/msi/build.bat
Tools/msi/buildrelease.bat

index 425558f99d5910a5f482f95d746eb9e6d55bd56e..8771d004211ea9476d4f402dec33c7bd15ebcf2a 100644 (file)
@@ -12,15 +12,16 @@ 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 "-arm64" (set BUILDARM64=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 /I "%~1" EQU "-arm64" (set BUILDARM64=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 if not defined BUILDARM64 (set BUILDX86=1) && (set BUILDX64=1)
 
index 0373c9f7b836a797194c26ce13d0c2f5d516ad85..ccec4da12c4285c10a654d64f6b0c72c2d0f6773 100644 (file)
@@ -44,27 +44,28 @@ 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 "-arm64" (set BUILDARM64=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 /I "%1" EQU "-arm64" (set BUILDARM64=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