8000 bpo-46744: Support "-Win32" and make platform flags case insensitive … · python/cpython@fa118f0 · GitHub
[go: up one dir, main page]

Skip to content

Commit fa118f0

Browse files
zoobaconioh
andauthored
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>
1 parent 2f88289 commit fa118f0

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

Tools/msi/build.bat

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ set BUILDPACK=
1111
set REBUILD=
1212

1313
:CheckOpts
14-
if "%~1" EQU "-h" goto Help
15-
if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
16-
if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
17-
if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
18-
if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
19-
if "%~1" EQU "--test-marker" (set BUILDTEST=--test-marker) && shift && goto CheckOpts
20-
if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
21-
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
14+
if "%~1" EQU "-h" goto Help
15+
if /I "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
16+
if /I "%~1" EQU "-Win32" (set BUILDX86=1) && shift && goto CheckOpts
17+
if /I "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
18+
if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
19+
if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
20+
if "%~1" EQU "--test-marker" (set BUILDTEST=--test-marker) && shift && goto CheckOpts
21+
if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
22+
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
2223

2324
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
2425

Tools/msi/buildrelease.bat

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,27 @@ set BUILDZIP=1
4343

4444

4545
:CheckOpts
46-
if "%1" EQU "-h" goto Help
47-
if "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
48-
if "%1" EQU "--certificate" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
49-
if "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
50-
if "%1" EQU "--out" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
51-
if "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
52-
if "%1" EQU "--skip-doc" (set SKIPDOC=1) && shift && goto CheckOpts
53-
if "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
54-
if "%1" EQU "--skip-build" (set SKIPBUILD=1) && shift && goto CheckOpts
55-
if "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
56-
if "%1" EQU "--test" (set TESTTARGETDIR=%~2) && shift && shift && goto CheckOpts
57-
if "%1" EQU "-b" (set TARGET=Build) && shift && goto CheckOpts
58-
if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts
59-
if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
60-
if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
61-
if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
62-
if "%1" EQU "--skip-pgo" (set PGO=) && shift && goto CheckOpts
63-
if "%1" EQU "--skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
64-
if "%1" EQU "--skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
65-
if "%1" EQU "--skip-msi" (set BUILDMSI=) && shift && goto CheckOpts
46+
if "%1" EQU "-h" goto Help
47+
if "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
48+
if "%1" EQU "--certificate" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
49+
if "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
50+
if "%1" EQU "--out" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
51+
if "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
52+
if "%1" EQU "--skip-doc" (set SKIPDOC=1) && shift && goto CheckOpts
53+
if "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
54+
if "%1" EQU "--skip-build" (set SKIPBUILD=1) && shift && goto CheckOpts
55+
if "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
56+
if "%1" EQU "--test" (set TESTTARGETDIR=%~2) && shift && shift && goto CheckOpts
57+
if "%1" EQU "-b" (set TARGET=Build) && shift && goto CheckOpts
58+
if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts
59+
if /I "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
60+
if /I "%1" EQU "-Win32" (set BUILDX86=1) && shift && goto CheckOpts
61+
if /I "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
62+
if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
63+
if "%1" EQU "--skip-pgo" (set PGO=) && shift && goto CheckOpts
64+
if "%1" EQU "--skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
65+
if "%1" EQU "--skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
66+
if "%1" EQU "--skip-msi" (set BUILDMSI=) && shift && goto CheckOpts
6667

6768
if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1
6869

0 commit comments

Comments
 (0)
0