-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
121 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@echo off | ||
|
||
REM -------------------------------------------------- | ||
REM 各ビルド環境用の環境変数設定 | ||
REM -------------------------------------------------- | ||
REM https://www.appveyor.com/docs/environment-variables/ | ||
if "%APPVEYOR%"=="True" ( | ||
set EXTRA_CMD=/verbosity:minimal /logger:"%ProgramFiles%\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" | ||
set MSBUILD_PATH=msbuild | ||
set SLN_PATH="%APPVEYOR_BUILD_FOLDER%\CompactMeter.sln" | ||
) else ( | ||
set EXTRA_CMD= | ||
set MSBUILD_PATH="%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" | ||
set SLN_PATH=CompactMeter.sln | ||
) | ||
|
||
REM -------------------------------------------------- | ||
REM 32bit build | ||
REM -------------------------------------------------- | ||
set CMD=%MSBUILD_PATH% %SLN_PATH% /p:Platform=x86 /p:Configuration=Release /t:"Build" %EXTRA_CMD% | ||
echo. | ||
echo %CMD% | ||
echo. | ||
%CMD% | ||
|
||
REM -------------------------------------------------- | ||
REM 64bit build | ||
REM -------------------------------------------------- | ||
set CMD=%MSBUILD_PATH% %SLN_PATH% /p:Platform=x64 /p:Configuration=Release /t:"Build" %EXTRA_CMD% | ||
echo. | ||
echo %CMD% | ||
echo. | ||
%CMD% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
@echo off | ||
|
||
set BASE_DIR=%~dp0 | ||
|
||
REM -------------------------------------------------- | ||
REM 各ビルド環境用の環境変数設定 | ||
REM -------------------------------------------------- | ||
REM https://www.appveyor.com/docs/environment-variables/ | ||
if "%APPVEYOR%"=="True" ( | ||
set ZIP_CMD=7z | ||
REM ARTIFACT_VERSION は appveyor.yml の before_build: で設定済 | ||
) else ( | ||
set ZIP_CMD="C:\Program Files\7-Zip\7z" | ||
set ARTIFACT_VERSION=X_X_X | ||
) | ||
|
||
REM -------------------------------------------------- | ||
REM 作業ディレクトリの準備 | ||
REM -------------------------------------------------- | ||
set WORK_DIR=%BASE_DIR%packaging | ||
rmdir /S /Q %WORK_DIR% | ||
mkdir %WORK_DIR% | ||
if %errorlevel% neq 0 (echo error && exit /b 1) | ||
|
||
REM -------------------------------------------------- | ||
REM ファイル収集 | ||
REM -------------------------------------------------- | ||
echo. | ||
echo collect files | ||
echo. | ||
copy /Y /B Release\CompactMeter.exe %WORK_DIR% | ||
copy /Y /B Release\register.exe %WORK_DIR% | ||
copy /Y /B x64\Release\CompactMeter_64.exe %WORK_DIR% | ||
copy /Y /B README.md %WORK_DIR% | ||
|
||
REM -------------------------------------------------- | ||
REM コード署名 | ||
REM -------------------------------------------------- | ||
if "%APPVEYOR%"=="True" ( | ||
echo. | ||
echo skip sign | ||
echo. | ||
) else ( | ||
echo. | ||
echo sign | ||
echo. | ||
set SIGNTOOL="C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64\signtool" | ||
%SIGNTOOL% sign /a /fd SHA256 /v /tr http://timestamp.comodoca.com/?td=sha256 /td sha256 ^ | ||
%WORK_DIR%\CompactMeter.exe ^ | ||
%WORK_DIR%\CompactMeter_64.exe ^ | ||
%WORK_DIR%\register.exe | ||
) | ||
|
||
REM -------------------------------------------------- | ||
REM ZIP | ||
REM -------------------------------------------------- | ||
echo. | ||
echo ZIP | ||
echo. | ||
cd %WORK_DIR% | ||
%ZIP_CMD% a CompactMeter_v%ARTIFACT_VERSION%.zip CompactMeter.exe CompactMeter_64.exe register.exe README.md | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters