forked from WinMerge/winmerge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildInstaller.cmd
44 lines (41 loc) · 1.22 KB
/
BuildInstaller.cmd
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
if "%1" == "" (
call :BuildInstaller
call :BuildInstaller x64
call :BuildInstaller x64NonAdmin
call :BuildInstaller ARM64
) else if "%1" == "x64" (
call :BuildInstaller x64
call :BuildInstaller x64NonAdmin
) else if "%1" == "ARM64" (
call :BuildInstaller ARM64
) else (
call :BuildInstaller %1
)
goto :eof
:BuildInstaller
set PLATFORM=%1
if "%PLATFORM%" == "ARM64" (
for %%i in ("%LOCALAPPDATA%\Programs" "%ProgramFiles(x86)%" "%ProgramFiles%") do (
if exist "%%~i\Inno Setup 6\iscc.exe" (
"%%~i\Inno Setup 6\iscc.exe" "Installer\innosetup\WinMerge%PLATFORM%.is6.iss" || pause
goto :eof
) else (
if exist "%%~i\Inno Setup 5\iscc.exe" (
"%%~i\Inno Setup 5\iscc.exe" "Installer\innosetup\WinMerge%PLATFORM%.iss" || pause
goto :eof
)
)
)
) else (
echo.
echo ============================================================
echo Build WinMerge%PLATFORM%.iss with Inno Setup 5
echo ============================================================
for %%i in ("%ProgramFiles(x86)%" "%ProgramFiles%") do (
if exist "%%~i\Inno Setup 5\iscc.exe" (
"%%~i\Inno Setup 5\iscc.exe" "Installer\innosetup\WinMerge%PLATFORM%.iss" || pause
goto :eof
)
)
)
goto :eof