Improve artifact building

This commit is contained in:
Ted John 2016-08-25 23:07:02 +01:00
parent ff9e249a85
commit 0b2341ab8e
2 changed files with 16 additions and 13 deletions

View File

@ -25,9 +25,9 @@ configuration: Release
build:
project: openrct2.proj
artifacts:
- path: .\artifacts\openrct2.zip
- path: .\artifacts\openrct2-portable*.zip
name: OpenRCT2-portable
- path: .\artifacts\*.exe
- path: .\artifacts\openrct2-installer*.exe
name: OpenRCT2-installer
- path: .\artifacts\openrct2-symbols-*.zip
- path: .\artifacts\openrct2-symbols*.zip
name: OpenRCT2 debug symbols

View File

@ -41,10 +41,12 @@
<SignCertificate Condition="'$(SignCertificate)'==''">$(DistDir)windows\code-sign-key-openrct2.org.pfx</SignCertificate>
<SignTimestampUrl>http://timestamp.comodoca.com/authenticode</SignTimestampUrl>
<PublishZip>$(ArtifactsDir)openrct2.zip</PublishZip>
<PublishSymbolsZip Condition="'$(GIT_COMMIT_SHA1_SHORT)'==''">$(ArtifactsDir)openrct2-symbols.zip</PublishSymbolsZip>
<PublishSymbolsZip Condition="'$(GIT_COMMIT_SHA1_SHORT)'!=''">$(ArtifactsDir)openrct2-symbols-$(GIT_COMMIT_SHA1_SHORT).zip</PublishSymbolsZip>
<PublishInstallerExe>$(ArtifactsDir)openrct2-install.exe</PublishInstallerExe>
<PublishPostfix>-$(Configuration)-$(Platform)-$(GIT_COMMIT_SHA1_SHORT)</PublishPostfix>
<PublishPostfix>$(PublishPostfix.ToLower())</PublishPostfix>
<PublishZip>$(ArtifactsDir)openrct2-portable$(PublishPostfix).zip</PublishZip>
<PublishSymbolsZip Condition="'$(GIT_COMMIT_SHA1_SHORT)'==''">$(ArtifactsDir)openrct2-symbols$(PublishPostfix).zip</PublishSymbolsZip>
<PublishSymbolsZip Condition="'$(GIT_COMMIT_SHA1_SHORT)'!=''">$(ArtifactsDir)openrct2-symbols$(PublishPostfix).zip</PublishSymbolsZip>
<PublishInstallerExe>$(ArtifactsDir)openrct2-installer$(PublishPostfix).exe</PublishInstallerExe>
<UploadFilename>OpenRCT2-$(Version)$(VersionExtension)-windows</UploadFilename>
</PropertyGroup>
@ -94,10 +96,13 @@
</Target>
<Target Name="BeforeClean">
<Delete Condition="'$(Platform)'=='Win32'" Files="$(TargetDir)openrct2.exe" />
<Delete Files="$(TargetDir)curl-ca-bundle.crt" />
<Delete Files="$(g2Output)" />
<Delete Files="$(PublishZip)" />
<Delete Files="$(PublishSymbolsZip)" />
<Delete Files="$(PublishInstallerExe)" />
<RemoveDir Directories="$(TargetDir)data" />
</Target>
<Target Name="BeforeBuild" BeforeTargets="InitializeBuildStatus" DependsOnTargets="DownloadLibs">
@ -135,19 +140,15 @@
<!-- Target to publish OpenRCT2 as a portable zip -->
<Target Name="PublishPortable" DependsOnTargets="Build;g2;Sign" Inputs="@(PublishItems)" Outputs="$(PublishZip)">
<!-- Copy publish files -->
<Message Importance="high" Text="Copying publish files..." />
<MakeDir Directories="$(ArtifactsDir)" />
<!-- Create zip -->
<Message Importance="high" Text="Creating openrct2.zip..." />
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishZip)))..." />
<_7z Output="$(PublishZip)" Inputs="@(PublishItems)" />
</Target>
<!-- Target to publish the OpenRCT2 debug symbols -->
<Target Name="PublishSymbols" DependsOnTargets="Build;Sign" Inputs="@(SymbolItems)" Outputs="$(PublishSymbolsZip)">
<MakeDir Directories="$(ArtifactsDir)" />
<Message Importance="high" Text="Creating openrct2-symbols.zip..." />
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishSymbolsZip)))..." />
<_7z Output="$(PublishSymbolsZip)" Inputs="@(SymbolItems)" />
</Target>
@ -163,6 +164,8 @@
<PublishInstallerExeName>$([System.IO.Path]::GetFilename($(PublishInstallerExe)))</PublishInstallerExeName>
</PropertyGroup>
<MakeDir Directories="$(ArtifactsDir)" />
<!-- Create the installer -->
<Message Text="Building Windows Installer (NSIS script)" Importance="high" />
<Exec Command="makensis /DOUTFILE=$(PublishInstallerExe) ^