OSDN Git Service

Merge remote-tracking branch 'upstream/master' into jp
[winmerge-jp/winmerge-jp.git] / BuildInstaller.cmd
1 if "%1" == "" (
2   call :BuildInstaller x86
3   call :BuildInstaller x64
4   call :BuildInstaller x64NonAdmin
5   call :BuildInstaller ARM64
6 ) else if "%1" == "x64" (
7   call :BuildInstaller x64
8   call :BuildInstaller x64NonAdmin
9 ) else if "%1" == "x86" (
10   call :BuildInstaller x86
11 ) else if "%1" == "ARM64" (
12   call :BuildInstaller ARM64
13 ) else if "%1" == "ARM" (
14   echo platform %1 is not supported
15 ) else (
16   call :BuildInstaller %1
17 )
18 goto :eof
19
20 :BuildInstaller
21 set PLATFORM=%1
22
23 if "%PLATFORM%" == "ARM64" (
24   for %%i in ("%LOCALAPPDATA%\Programs" "%ProgramFiles(x86)%" "%ProgramFiles%") do (
25     if exist "%%~i\Inno Setup 6\iscc.exe" (
26       "%%~i\Inno Setup 6\iscc.exe" "Installer\innosetup\WinMerge%PLATFORM%.is6.iss" || pause
27       goto :eof
28     ) else (
29       if exist "%%~i\Inno Setup 5\iscc.exe" (
30         "%%~i\Inno Setup 5\iscc.exe" "Installer\innosetup\WinMerge%PLATFORM%.iss" || pause
31         goto :eof
32       )
33     )
34   )
35 ) else (
36   echo.
37   echo ============================================================
38   echo Build WinMerge%PLATFORM%.iss with Inno Setup 5
39   echo ============================================================
40   for %%i in ("%ProgramFiles(x86)%" "%ProgramFiles%") do (
41     if exist "%%~i\Inno Setup 5\iscc.exe" (
42       "%%~i\Inno Setup 5\iscc.exe" "Installer\innosetup\WinMerge%PLATFORM%.iss" || pause
43       goto :eof
44     )
45   )
46 )
47
48 goto :eof