mirror of
https://github.com/LegacyUpdate/LegacyUpdate.git
synced 2025-01-22 14:12:07 -05:00
Fix x86/x64 build
This commit is contained in:
parent
57f6712987
commit
63f5bafd2e
1 changed files with 13 additions and 2 deletions
15
build.cmd
15
build.cmd
|
@ -17,20 +17,31 @@ if not exist "%ProgramFiles32%\NSIS\Bin\makensis.exe" (
|
|||
if exist "%ProgramFiles32%\Microsoft Visual Studio\Installer\vswhere.exe" (
|
||||
:: Get modern Visual Studio install path
|
||||
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set VSPath=%%i
|
||||
call "!VSPath!\VC\Auxiliary\Build\vcvarsall.bat" x86
|
||||
set "vcvarsall=!VSPath!\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
if "%errorlevel%" neq "0" exit /b %errorlevel%
|
||||
) else if exist "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" (
|
||||
:: Visual Studio 2010
|
||||
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
set "vcvarsall=%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
||||
if "%errorlevel%" neq "0" exit /b %errorlevel%
|
||||
) else (
|
||||
echo Visual Studio not found. Refer to README.md. >&2
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Clean
|
||||
call "%vcvarsall%" x86
|
||||
msbuild LegacyUpdate.sln /m /p:Configuration=Release /p:Platform=Win32 /t:clean
|
||||
if "%errorlevel%" neq "0" exit /b %errorlevel%
|
||||
msbuild LegacyUpdate.sln /m /p:Configuration=Release /p:Platform=x64 /t:clean
|
||||
if "%errorlevel%" neq "0" exit /b %errorlevel%
|
||||
|
||||
:: Build DLL
|
||||
msbuild LegacyUpdate.sln /m /p:Configuration=Release /p:Platform=Win32 %*
|
||||
if "%errorlevel%" neq "0" exit /b %errorlevel%
|
||||
call "%vcvarsall%" x64
|
||||
msbuild LegacyUpdate.sln /m /p:Configuration=Release /p:Platform=x64 %*
|
||||
if "%errorlevel%" neq "0" exit /b %errorlevel%
|
||||
|
||||
:: Build NSIS
|
||||
makensis setup\setup.nsi
|
||||
if "%errorlevel%" neq "0" exit /b %errorlevel%
|
||||
|
|
Loading…
Reference in a new issue