Skip to content

Commit 7604456

Browse files
bpo-46744: Support "-Win32" and make platform flags case insensitive in Windows build scripts. (GH-31803)
(cherry picked from commit 1288097) Co-authored-by: conioh <[email protected]>
1 parent 3d14b4f commit 7604456

File tree

2 files changed

+32
-30
lines changed

2 files changed

+32
-30
lines changed

Tools/msi/build.bat

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ set BUILDPACK=
1212
set REBUILD=
1313

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

2526
if not defined BUILDX86 if not defined BUILDX64 if not defined BUILDARM64 (set BUILDX86=1) && (set BUILDX64=1)
2627

Tools/msi/buildrelease.bat

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,28 @@ set BUILDZIP=1
4444

4545

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

6970
if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1
7071

0 commit comments

Comments
 (0)