-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathcompile.bat
More file actions
79 lines (61 loc) · 2.08 KB
/
Copy pathcompile.bat
File metadata and controls
79 lines (61 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@echo off
rem Inno Setup
rem Copyright (C) 1997-2025 Jordan Russell
rem Portions by Martijn Laan
rem For conditions of distribution and use, see LICENSE.TXT.
rem
rem Batch file to compile isbz2, iszlib, and iszstd
setlocal
if "%1"=="x86" goto archfound
if "%1"=="x64" goto archfound
if "%1"=="arm64" goto archfound
if "%1"=="arm64ec" goto archfound
echo Architecture parameter is missing or invalid. Must be "x86", "x64", "arm64" or "arm64ec"
goto failed2
:archfound
if exist compilesettings.bat goto compilesettingsfound
:compilesettingserror
echo compilesettings.bat is missing or incomplete. It needs to be created
echo with the following line, adjusted for your system:
echo.
echo set VSBUILDROOT=c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build
goto failed2
:compilesettingsfound
set VSBUILDROOT=
call .\compilesettings.bat
if "%VSBUILDROOT%"=="" goto compilesettingserror
rem -------------------------------------------------------------------------
set vsarch=%1
if "%1"=="x86" set vsarch=amd64_x86
if "%1"=="arm64" set vsarch=amd64_arm64
if "%1"=="arm64ec" set vsarch=amd64_arm64
set __VSCMD_ARG_NO_LOGO=1
set VSCMD_SKIP_SENDTELEMETRY=1
echo - Calling vcvarsall.bat %vsarch%
call "%VSBUILDROOT%\vcvarsall.bat" %vsarch%
if errorlevel 1 goto failed
echo.
set platform=%1
if "%1"=="x86" set platform=Win32
if "%1"=="arm64" set platform=ARM64
if "%1"=="arm64ec" set platform=ARM64EC
if "%1"=="arm64ec" goto compilezstd
echo - Compiling isbz2
msbuild.exe bzlib\isbz2.sln /t:Clean;Build /p:Configuration=Release;Platform=%platform% /nologo
if errorlevel 1 goto failed
echo - Compiling iszlib
msbuild.exe zlib\iszlib.sln /t:Clean;Build /p:Configuration=Release;Platform=%platform% /nologo
if errorlevel 1 goto failed
if "%1"=="arm64" goto success
:compilezstd
echo - Compiling iszstd
msbuild.exe zstd\iszstd.sln /t:Clean;Build /p:Configuration=Release;Platform=%platform% /nologo
if errorlevel 1 goto failed
:success
echo Success!
goto exit
:failed
echo *** FAILED ***
:failed2
exit /b 1
:exit