diff --git a/installer/create_package.bat b/installer/create_package.bat index 63237e384..4b114e168 100644 --- a/installer/create_package.bat +++ b/installer/create_package.bat @@ -32,6 +32,11 @@ if "%RELEASE%" == "1" ( rem ポータブル版をコピーして取っておく(署名に使用する) %CMAKE% -E rm -rf Output/portable/teraterm-%arch% %CMAKE% -E copy_directory Output/build/teraterm-%arch% Output/portable/teraterm-%arch% +if ERRORLEVEL 1 ( + echo ERROR copy_directory Output/build/teraterm-%arch% + endlocal + exit /b 1 +) rem (署名なし)インストーラ作成 @@ -45,21 +50,63 @@ set INNO_SETUP_ARCH="/DArch=x86" if "%arch%" == "x64" (set INNO_SETUP_ARCH=/DArch=%arch%) if "%arch%" == "arm64" (set INNO_SETUP_ARCH=/DArch=%arch%) %INNO_SETUP% %INNO_SETUP_APPVERSION% /OOutput %INNO_SETUP_OUTPUT% /DSrcDir=Output\build\teraterm-%arch% %INNO_SETUP_ARCH% teraterm.iss +if ERRORLEVEL 1 ( + echo ERROR %INNO_SETUP% + endlocal + exit /b 1 +) rem (署名なし)ポータブル版のzipを作成 pushd Output %CMAKE% -E rm -rf %OUTPUT% %CMAKE% -E rm -rf %OUTPUT%_pdb %CMAKE% -E copy_directory build\teraterm-%arch% %OUTPUT% +if ERRORLEVEL 1 ( + echo ERROR copy_directory build\teraterm-%arch% + popd + endlocal + exit /b 1 +) %CMAKE% -E copy_directory build\teraterm-%arch%_pdb %OUTPUT%_pdb +if ERRORLEVEL 1 ( + echo ERROR copy_directory build\teraterm-%arch%_pdb + popd + endlocal + exit /b 1 +) %CMAKE% -E tar cf %OUTPUT%.zip --format=zip %OUTPUT%/ +if ERRORLEVEL 1 ( + echo ERROR tar %OUTPUT%.zip + popd + endlocal + exit /b 1 +) %CMAKE% -E tar cf %OUTPUT%_pdb.zip --format=zip %OUTPUT%_pdb/ +if ERRORLEVEL 1 ( + echo ERROR tar %OUTPUT%_pdb.zip + popd + endlocal + exit /b 1 +) popd rem ハッシュを作成 pushd Output %CMAKE% -E sha256sum %OUTPUT%.exe %OUTPUT%.zip %OUTPUT%_pdb.zip > %OUTPUT%.sha256sum +if ERRORLEVEL 1 ( + echo ERROR sha256sum + popd + endlocal + exit /b 1 +) %CMAKE% -E sha512sum %OUTPUT%.exe %OUTPUT%.zip %OUTPUT%_pdb.zip > %OUTPUT%.sha512sum +if ERRORLEVEL 1 ( + echo ERROR sha512sum + popd + endlocal + exit /b 1 +) popd endlocal +exit /b 0 diff --git a/installer/release.bat b/installer/release.bat index cc5783740..7e5aa0a04 100644 --- a/installer/release.bat +++ b/installer/release.bat @@ -38,35 +38,50 @@ echo %no% if "%no%" == "1" ( call :download_libs force + if errorlevel 1 exit /b 1 call :build_libs + if errorlevel 1 exit /b 1 call :build_teraterm rebuild + if errorlevel 1 exit /b 1 ) if "%no%" == "2" ( call :download_libs + if errorlevel 1 exit /b 1 call :build_libs + if errorlevel 1 exit /b 1 call :build_teraterm rebuild + if errorlevel 1 exit /b 1 ) if "%no%" == "3" ( call :download_libs + if errorlevel 1 exit /b 1 call :build_libs + if errorlevel 1 exit /b 1 call :build_teraterm + if errorlevel 1 exit /b 1 ) if "%no%" == "4" ( call :download_libs + if errorlevel 1 exit /b 1 call :build_libs + if errorlevel 1 exit /b 1 ) if "%no%" == "5" ( call :build_libs + if errorlevel 1 exit /b 1 call :build_teraterm rebuild + if errorlevel 1 exit /b 1 ) if "%no%" == "6" ( call :build_libs + if errorlevel 1 exit /b 1 call :build_teraterm + if errorlevel 1 exit /b 1 ) if "%no%" == "7" ( @@ -83,24 +98,34 @@ if "%no%" == "10" ( if "%no%" == "11" ( call :download_libs + if errorlevel 1 exit /b 1 call :build_teraterm_1 rebuild + if errorlevel 1 exit /b 1 ) if "%no%" == "12" ( call :download_libs + if errorlevel 1 exit /b 1 call :build_libs + if errorlevel 1 exit /b 1 call :build_teraterm_2 rebuild + if errorlevel 1 exit /b 1 ) if "%no%" == "13" ( call :download_libs + if errorlevel 1 exit /b 1 call :build_teraterm_1 + if errorlevel 1 exit /b 1 ) if "%no%" == "14" ( call :download_libs + if errorlevel 1 exit /b 1 call :build_libs + if errorlevel 1 exit /b 1 call :build_teraterm_2 + if errorlevel 1 exit /b 1 ) if not "%NOPAUSE%" == "1" pause @@ -132,6 +157,10 @@ rem #################### setlocal cd /d %CUR%..\libs call buildall.bat +if errorlevel 1 ( + endlocal + exit /b 1 +) endlocal exit /b 0