Merge pull request #1658 from oddMLan/appveyor

Add AppVeyor buildbot
This commit is contained in:
zilmar 2019-09-30 16:13:21 +09:30 committed by GitHub
commit 04cafeea52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 50 additions and 23 deletions

View File

@ -47,7 +47,7 @@
<AdditionalDependencies>dsound.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\Project64-audio\Version.h.in" "$(SolutionDir)Source\Project64-audio\Version.h"</Command>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\Project64-audio\Version.h.in" "$(SolutionDir)Source\Project64-audio\Version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -33,7 +33,7 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ItemDefinitionGroup>
<PreBuildEvent>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\Project64-core\Version.h.in" "$(SolutionDir)Source\Project64-core\Version.h"</Command>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\Project64-core\Version.h.in" "$(SolutionDir)Source\Project64-core\Version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -46,7 +46,7 @@
<PrecompiledHeader />
</ClCompile>
<PreBuildEvent>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\Project64-video\Version.h.in" "$(SolutionDir)Source\Project64-video\Version.h"</Command>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\Project64-video\Version.h.in" "$(SolutionDir)Source\Project64-video\Version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -46,7 +46,7 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
</Bscmake>
<PreBuildEvent>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\RSP\Version.h.in" "$(SolutionDir)Source\RSP\Version.h"</Command>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\RSP\Version.h.in" "$(SolutionDir)Source\RSP\Version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -6,17 +6,19 @@ cd /d %~dp0..\..
set base_dir=%cd%
cd /d %origdir%
if "%~3"=="" (
echo Usage: UpdateVersion.cmd [BuildMode] [InFile] [OutFile]
if "%~4"=="" (
echo Usage: UpdateVersion.cmd [BuildMode] [Platform] [InFile] [OutFile]
goto :eof
)
if not "%1" == "" set BuildMode=%~1
if not "%~2" == "" set InFile="%~2"
if not "%~3" == "" set OutFile="%~3"
if not "%~2" == "" set Platform=%~2
if not "%~2" == "" set InFile="%~3"
if not "%~3" == "" set OutFile="%~4"
FOR /F "tokens=1 delims=" %%A in ('git describe --tags --long --dirty') do SET current_tag=%%A
if %Platform%==x64 set BuildMode=%BuildMode%64
echo "%base_dir%\Bin\%BuildMode%\UpdateVersion.exe" %InFile% %OutFile% "%current_tag%"
"%base_dir%\Bin\%BuildMode%\UpdateVersion.exe" %InFile% %OutFile% "%current_tag%"

View File

@ -1,16 +1,21 @@
@ECHO OFF
SETLOCAL
if exist "C:\Program Files\7-Zip\7z.exe" ( set zip="C:\Program Files\7-Zip\7z.exe")
for /f "delims=" %%a in ('WHERE 7z 2^>nul') do set "zip=%%a"
if %zip% == "" (
echo can not find 7z.exe
goto :EndErr
if "%zip%" == "" (
if exist "C:\Program Files\7-Zip\7z.exe" (
set "zip=C:\Program Files\7-Zip\7z.exe"
) else (
echo can not find 7z.exe
goto :EndErr
)
)
set ZipFileName=project64
if not "%1" == "" set ZipFileName=%1
if "%~2" == "x64" set VSPlatform=64
SET current_dir=%cd%
cd /d %~dp0..\..\
@ -33,7 +38,7 @@ md "%base_dir%\Bin\Package\Plugin\GFX"
md "%base_dir%\Bin\Package\Plugin\Input"
md "%base_dir%\Bin\Package\Plugin\RSP"
copy "%base_dir%\Bin\Release\Project64.exe" "%base_dir%\Bin\Package"
copy "%base_dir%\Bin\Release%VSPlatform%\Project64.exe" "%base_dir%\Bin\Package"
copy "%base_dir%\Config\Video.rdb" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Config\Audio.rdb" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Config\Project64.cht" "%base_dir%\Bin\Package\Config"
@ -41,15 +46,15 @@ copy "%base_dir%\Config\Project64.enh" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Config\Project64.rdb" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Config\Project64.rdx" "%base_dir%\Bin\Package\Config"
copy "%base_dir%\Lang\*.pj.Lang" "%base_dir%\Bin\Package\Lang"
copy "%base_dir%\Plugin\Audio\Jabo_Dsound.dll" "%base_dir%\Bin\Package\Plugin\Audio"
copy "%base_dir%\Plugin\Audio\Project64-Audio.dll" "%base_dir%\Bin\Package\Plugin\Audio"
copy "%base_dir%\Plugin\GFX\Jabo_Direct3D8.dll" "%base_dir%\Bin\Package\Plugin\GFX"
copy "%base_dir%\Plugin\GFX\Project64-Video.dll" "%base_dir%\Bin\Package\Plugin\GFX"
copy "%base_dir%\Plugin\Input\PJ64_NRage.dll" "%base_dir%\Bin\Package\Plugin\Input"
copy "%base_dir%\Plugin\RSP\RSP 1.7.dll" "%base_dir%\Bin\Package\Plugin\RSP"
copy "%base_dir%\Plugin%VSPlatform%\Audio\Jabo_Dsound.dll" "%base_dir%\Bin\Package\Plugin\Audio"
copy "%base_dir%\Plugin%VSPlatform%\Audio\Project64-Audio.dll" "%base_dir%\Bin\Package\Plugin\Audio"
copy "%base_dir%\Plugin%VSPlatform%\GFX\Jabo_Direct3D8.dll" "%base_dir%\Bin\Package\Plugin\GFX"
copy "%base_dir%\Plugin%VSPlatform%\GFX\Project64-Video.dll" "%base_dir%\Bin\Package\Plugin\GFX"
copy "%base_dir%\Plugin%VSPlatform%\Input\PJ64_NRage.dll" "%base_dir%\Bin\Package\Plugin\Input"
copy "%base_dir%\Plugin%VSPlatform%\RSP\RSP 1.7.dll" "%base_dir%\Bin\Package\Plugin\RSP"
cd %base_dir%\Bin\Package
%zip% a -tzip -r "%base_dir%\Package\%ZipFileName%" *
"%zip%" a -tzip -r "%base_dir%\Package\%ZipFileName%" *
cd /d %current_dir%
echo Package %ZipFileName% created

View File

@ -51,7 +51,7 @@
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
<PreBuildEvent>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(SolutionDir)Source\nragev20\Version.h.in" "$(SolutionDir)Source\nragev20\Version.h"</Command>
<Command>"$(SolutionDir)Source\Script\UpdateVersion.cmd" "$(Configuration)" "$(Platform)" "$(SolutionDir)Source\nragev20\Version.h.in" "$(SolutionDir)Source\nragev20\Version.h"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>

20
appveyor.yml Normal file
View File

@ -0,0 +1,20 @@
image: Visual Studio 2015
build:
project: Project64.sln
parallel: true
verbosity: minimal
platform:
- Win32
- x64
configuration:
- Release
before_build:
- for /f "tokens=1 delims=" %%a in ('git describe --tags --long --dirty') do set current_tag=%%a
- appveyor UpdateBuild -Version %current_tag%
after_build:
- Source/Script/package_zip.cmd %current_tag%-%platform%.zip %platform%
artifacts:
- path: Package/*.zip