MSN-Patched-Binaries/buildall.bat

56 lines
1.5 KiB
Batchfile
Raw Normal View History

2024-05-28 17:54:17 -04:00
@echo off
setlocal enabledelayedexpansion
mkdir bin 2>nul
REM ; Versions
set msnver=^
7.0.0820;
REM ; Find Inno Setup Compiler
WHERE Compil32.exe >nul 2>nul
IF %ERRORLEVEL% EQU 0 ( set inno="Compil32.exe"
) ELSE IF exist "%PROGRAMFILES%\Inno Setup 5\Compil32.exe" ( set inno="%PROGRAMFILES%\Inno Setup 5\Compil32.exe"
) ELSE IF exist "%PROGRAMFILES(X86)%\Inno Setup 5\Compil32.exe" ( set inno="%PROGRAMFILES(X86)%\Inno Setup 5\Compil32.exe"
) ELSE (
echo ERROR: Could not find Inno Setup Compiler.
echo Please install Inno Setup 5.4.3: https://files.jrsoftware.org/is/5/isetup-5.4.3.exe
goto :exiterror
)
echo Using Inno Setup Compiler at: %inno%
REM ; Find 7-Zip
WHERE 7z.exe >nul 2>nul
IF %ERRORLEVEL% EQU 0 ( set SZ="7z.exe"
) ELSE IF exist "%PROGRAMFILES%\7-Zip\7z.exe" ( set SZ="%PROGRAMFILES%\7-Zip\7z.exe"
) ELSE IF exist "%PROGRAMFILES(X86)%\7-Zip\7z.exe" ( set SZ="%PROGRAMFILES(X86)%\7-Zip\7z.exe"
) ELSE (
echo ERROR: Could not 7z.exe
echo Please install 7-Zip: https://7-zip.org/
goto :exiterror
)
echo Using 7-Zip 7z.exe at: %SZ%
REM ; Compile and pack
echo Compiling setup EXEs
(for %%v in (%msnver%) do (
IF exist "bin\%%v-setup.exe" (
echo %%v setup already compiled, skipping...
) ELSE (
echo Compiling %%v setup...
%inno% /cc %%v.iss
)
IF exist "bin\%%v.zip" (
echo %%v already zipped, skipping...
) else (
echo Packing %%v zip...
%SZ% a -tzip bin\%%v.zip %%v\
)
))
echo All done!
If /I Not "%CMDCMDLINE:"=%" == "%COMSPEC% " Pause
exit /b
:exiterror
exit /b 1