2016-08-22 13:31:52 -04:00
<?xml version="1.0" encoding="utf-8"?>
2016-08-21 19:09:45 -04:00
<!-- Main msbuild project for OpenRCT2 -->
2016-08-25 19:03:52 -04:00
<!-- Inputs (/p: or environment variables)
- OPENRCT2_BUILD_SERVER
2016-08-23 13:22:06 -04:00
- GIT_TAG
- GIT_BRANCH
- GIT_COMMIT_SHA1
2018-06-14 07:52:01 -04:00
- GIT_DESCRIBE
2016-08-23 13:22:06 -04:00
- SIGN_PASSWORD
- OPENRCT2_ORG_TOKEN
2016-08-25 19:03:52 -04:00
- NO_NSIS: set to true to prevent the NSIS installer building
2016-08-23 13:22:06 -04:00
-->
2016-08-26 13:29:42 -04:00
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="PublishAll">
2016-08-22 13:31:52 -04:00
<!-- Import custom build tasks -->
2016-08-22 16:46:09 -04:00
<Import Project="openrct2.targets" />
2016-08-22 13:31:52 -04:00
2016-08-22 08:11:57 -04:00
<PropertyGroup>
2016-09-09 18:13:12 -04:00
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
2016-10-15 17:44:24 -04:00
<Platform Condition="'$(PLATFORM)'==''">x64</Platform>
2016-08-27 09:08:31 -04:00
<GIT_COMMIT_SHA1_SHORT Condition="'$(GIT_COMMIT_SHA1)'!=''">$(GIT_COMMIT_SHA1.Substring(0, 7))</GIT_COMMIT_SHA1_SHORT>
2018-06-10 16:30:24 -04:00
<Version>0.2.0</Version>
2016-08-27 08:54:19 -04:00
<VersionExtra Condition="'$(GIT_BRANCH)'!=''">-$(GIT_BRANCH)-$(GIT_COMMIT_SHA1_SHORT)</VersionExtra>
2017-01-28 17:27:40 -05:00
<VersionExtra Condition="'$(GIT_TAG)'!=''"></VersionExtra>
2018-03-09 09:47:09 -05:00
<TargetLibsVersion>16</TargetLibsVersion>
2016-08-23 13:13:45 -04:00
2016-08-23 14:24:07 -04:00
<!-- Set dynamic OpenRCT2 #defines -->
2016-09-20 18:57:15 -04:00
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(BUILD_SERVER)'!=''">/D "OPENRCT2_BUILD_SERVER=\"$(BUILD_SERVER)\"" $(OPENRCT2_CL_ADDITIONALOPTIONS)</OPENRCT2_CL_ADDITIONALOPTIONS>
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(GIT_BRANCH)'!=''">/D "OPENRCT2_BRANCH=\"$(GIT_BRANCH)\"" $(OPENRCT2_CL_ADDITIONALOPTIONS)</OPENRCT2_CL_ADDITIONALOPTIONS>
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(GIT_COMMIT_SHA1)'!=''">/D "OPENRCT2_COMMIT_SHA1=\"$(GIT_COMMIT_SHA1)\"" $(OPENRCT2_CL_ADDITIONALOPTIONS)</OPENRCT2_CL_ADDITIONALOPTIONS>
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(GIT_COMMIT_SHA1_SHORT)'!=''">/D "OPENRCT2_COMMIT_SHA1_SHORT=\"$(GIT_COMMIT_SHA1_SHORT)\"" $(OPENRCT2_CL_ADDITIONALOPTIONS)</OPENRCT2_CL_ADDITIONALOPTIONS>
2018-06-14 07:52:01 -04:00
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(GIT_DESCRIBE)'!=''">/D "OPENRCT2_VERSION_TAG=\"$(GIT_DESCRIBE)\"" $(OPENRCT2_CL_ADDITIONALOPTIONS)</OPENRCT2_CL_ADDITIONALOPTIONS>
2016-08-23 14:24:07 -04:00
2016-08-22 08:11:57 -04:00
<RootDir>$(MsBuildThisFileDirectory)</RootDir>
<DistDir>$(RootDir)distribution\</DistDir>
2016-08-22 15:39:06 -04:00
<ArtifactsDir>$(RootDir)artifacts\</ArtifactsDir>
2016-09-09 17:42:35 -04:00
<TargetDir>$(RootDir)bin\</TargetDir>
2016-08-22 15:39:06 -04:00
2016-08-22 17:30:47 -04:00
<NsisScript>$(DistDir)windows\install.nsi</NsisScript>
2016-10-20 17:45:22 -04:00
<OutputExe>$(TargetDir)openrct2.exe</OutputExe>
2017-01-09 15:25:30 -05:00
<OutputCom>$(TargetDir)openrct2.com</OutputCom>
<OutputDll>$(TargetDir)openrct2.dll</OutputDll>
2016-08-22 15:39:06 -04:00
<g2Output>$(TargetDir)data\g2.dat</g2Output>
<SignCertificate Condition="'$(SignCertificate)'==''">$(DistDir)windows\code-sign-key-openrct2.org.pfx</SignCertificate>
<SignTimestampUrl>http://timestamp.comodoca.com/authenticode</SignTimestampUrl>
2016-08-22 16:45:36 -04:00
2016-08-26 13:04:17 -04:00
<PublishPostfix>-$(Configuration)-$(Platform)</PublishPostfix>
<PublishPostfix Condition="'$(GIT_COMMIT_SHA1_SHORT)'!=''">$(PublishPostfix)-$(GIT_COMMIT_SHA1_SHORT)</PublishPostfix>
2016-08-25 18:07:02 -04:00
<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>
2016-08-23 13:13:45 -04:00
2016-08-27 10:14:34 -04:00
<UploadFilename>OpenRCT2-$(Version)$(VersionExtra)-windows-$(Platform.ToLower())</UploadFilename>
2016-09-18 06:24:46 -04:00
<!-- Set openrct2.sln properties -->
<SlnProperties>$(SlnProperties);Platform=$(Platform)</SlnProperties>
2016-10-31 08:41:36 -04:00
<SlnProperties Condition="'$(BUILD_SERVER)'!=''">$(SlnProperties);OPENRCT2_CL_ADDITIONALOPTIONS=$(OPENRCT2_CL_ADDITIONALOPTIONS)</SlnProperties>
2016-08-22 08:11:57 -04:00
</PropertyGroup>
2016-08-25 19:45:57 -04:00
<!-- 3rd party libraries / dependencies -->
<PropertyGroup>
2016-12-16 19:19:44 -05:00
<DependenciesCheckFile>$(RootDir).dependencies</DependenciesCheckFile>
2018-05-12 09:47:23 -04:00
<LibsUrl Condition="'$(Platform)'=='Win32'">https://github.com/OpenRCT2/Dependencies/releases/download/v17/openrct2-libs-v17-x86-windows-static-winssl.zip</LibsUrl>
<LibsSha1 Condition="'$(Platform)'=='Win32'">4f9fb5feebe4a4ed461b2a545b2fd1c91ef6527b</LibsSha1>
<LibsUrl Condition="'$(Platform)'=='x64'">https://github.com/OpenRCT2/Dependencies/releases/download/v17/openrct2-libs-v17-x64-windows-static-winssl.zip</LibsUrl>
<LibsSha1 Condition="'$(Platform)'=='x64'">5aab386f9eeaad102b330fcddea2b4cc9e3c7067</LibsSha1>
2016-12-02 08:36:03 -05:00
<GtestVersion>1.8.0</GtestVersion>
2016-12-16 19:19:44 -05:00
<GtestUrl>https://github.com/google/googletest/archive/release-1.8.0.zip</GtestUrl>
<GtestSha1>667f873ab7a4d246062565fad32fb6d8e203ee73</GtestSha1>
2018-03-18 07:29:17 -04:00
<TitleSequencesUrl>https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2/title-sequence-v0.1.2.zip</TitleSequencesUrl>
<TitleSequencesSha1>1136ef92bfb05cd1cba9831ba6dc4a653d87a246</TitleSequencesSha1>
2018-06-23 11:37:39 -04:00
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.0.3/objects.zip</ObjectsUrl>
<ObjectsSha1>254bf83511282bd2fa5d97ddf00b4823009a78d8</ObjectsSha1>
2016-08-25 19:45:57 -04:00
</PropertyGroup>
2016-08-22 15:39:06 -04:00
<ItemGroup>
<g2Inputs Include="$(RootDir)resources\g2\*" />
2016-08-22 16:45:36 -04:00
<SignItems Include="$(OutputExe)" />
2017-01-09 15:25:30 -05:00
<SignItems Include="$(OutputCom)" />
2017-06-13 07:13:47 -04:00
<SignItems Include="$(OutputDll)" />
2016-08-22 16:45:36 -04:00
</ItemGroup>
<ItemGroup Label="Symbol Items">
<SymbolItems Include="$(OutputExe)" />
2017-01-09 15:25:30 -05:00
<SymbolItems Include="$(OutputCom)" />
<SymbolItems Include="$(OutputDll)" />
2017-01-09 17:06:47 -05:00
<SymbolItems Include="$(TargetDir)openrct2-dll.pdb" />
<SymbolItems Include="$(TargetDir)openrct2-win.pdb" />
2016-08-22 16:45:36 -04:00
</ItemGroup>
<ItemGroup Label="Publish Items">
2016-08-25 13:29:23 -04:00
<PublishItems Include="$(OutputExe)" />
2017-01-09 15:25:30 -05:00
<PublishItems Include="$(OutputCom)" />
<PublishItems Include="$(OutputDll)" />
2016-08-25 15:17:40 -04:00
<PublishItems Include="$(TargetDir)data" />
2016-08-22 16:45:36 -04:00
<PublishItems Include="$(DistDir)changelog.txt" />
<PublishItems Include="$(DistDir)readme.txt" />
<PublishItems Include="$(RootDir)contributors.md" />
<PublishItems Include="$(RootDir)licence.txt" />
2016-08-22 15:39:06 -04:00
</ItemGroup>
2016-08-23 13:13:45 -04:00
<ItemGroup Label="Upload Artifacts">
<UploadArtifacts Include="$(PublishZip)">
<Name>$(UploadFilename).zip</Name>
2016-08-26 13:33:54 -04:00
<FlavourId Condition="'$(Platform)'=='Win32'">1</FlavourId>
<FlavourId Condition="'$(Platform)'=='x64'">6</FlavourId>
2016-08-23 13:13:45 -04:00
</UploadArtifacts>
<UploadArtifacts Include="$(PublishInstallerExe)">
<Name>$(UploadFilename).exe</Name>
2016-08-26 13:33:54 -04:00
<FlavourId Condition="'$(Platform)'=='Win32'">2</FlavourId>
<FlavourId Condition="'$(Platform)'=='x64'">7</FlavourId>
2016-08-23 13:13:45 -04:00
</UploadArtifacts>
<UploadArtifacts Include="$(PublishSymbolsZip)">
<Name>$(UploadFilename)-symbols.zip</Name>
2016-08-26 13:33:54 -04:00
<FlavourId Condition="'$(Platform)'=='Win32'">5</FlavourId>
<FlavourId Condition="'$(Platform)'=='x64'">10</FlavourId>
2016-08-23 13:13:45 -04:00
</UploadArtifacts>
</ItemGroup>
2016-08-25 15:22:09 -04:00
<Target Name="DownloadLibs">
2016-12-16 19:19:44 -05:00
<!-- libs -->
<DownloadDependency Name="Libs"
Url="$(LibsUrl)"
Sha1="$(LibsSha1)"
CheckFile="$(DependenciesCheckFile)"
2018-03-03 06:34:47 -05:00
OutputDirectory="$(RootDir)lib\$(Platform)" />
2016-08-25 19:45:57 -04:00
2016-12-02 08:36:03 -05:00
<!-- googletest -->
2016-12-16 19:19:44 -05:00
<DownloadDependency Name="googletest"
Url="$(GtestUrl)"
Sha1="$(GtestSha1)"
CheckFile="$(DependenciesCheckFile)"
OutputDirectory="$(RootDir)lib" />
<PropertyGroup>
<GtestSrc>$(RootDir)lib\googletest-release-$(GtestVersion)</GtestSrc>
<GtestDst>$(RootDir)lib\googletest</GtestDst>
</PropertyGroup>
<Exec Command="cmd /c "if exist "$(GtestSrc)" ( rmdir /S /Q "$(GtestDst)" 2> nul & move "$(GtestSrc)" "$(GtestDst)" )"" />
2016-08-22 08:11:57 -04:00
</Target>
2016-09-09 17:42:35 -04:00
<Target Name="Clean">
2016-12-02 09:42:40 -05:00
<PropertyGroup>
<SlnProperties>$(SlnProperties);Configuration=$(Configuration)</SlnProperties>
</PropertyGroup>
2016-08-26 13:04:17 -04:00
<ItemGroup>
2017-01-09 15:25:30 -05:00
<CleanItems Include="$(OutputCom)" />
2016-08-26 13:04:17 -04:00
<CleanItems Include="$(g2Output)" />
<CleanItems Include="$(ArtifactsDir)openrct2-installer-$(Configuration)-$(Platform)*.exe" />
<CleanItems Include="$(ArtifactsDir)openrct2-portable-$(Configuration)-$(Platform)*.zip" />
<CleanItems Include="$(ArtifactsDir)openrct2-symbols-$(Configuration)-$(Platform)*.zip" />
</ItemGroup>
<Delete Files="@(CleanItems)" />
2016-08-26 13:57:21 -04:00
<Delete Files="%(SignItems.Identity).signed" />
2016-08-25 18:07:02 -04:00
<RemoveDir Directories="$(TargetDir)data" />
2016-09-18 06:24:46 -04:00
<MSBuild Projects="openrct2.sln" Targets="Clean" Properties="$(SlnProperties)" />
2016-08-22 15:39:06 -04:00
</Target>
2016-12-16 19:19:44 -05:00
<Target Name="BeforeBuild" BeforeTargets="Build;Rebuild" DependsOnTargets="DownloadLibs">
2016-08-25 14:18:45 -04:00
<PropertyGroup>
<BuildString Condition="'$(GIT_COMMIT_SHA1_SHORT)'!=''">$(GIT_COMMIT_SHA1_SHORT)</BuildString>
<BuildString Condition="'$(GIT_BRANCH)'!=''">$(BuildString) ($(GIT_BRANCH))</BuildString>
2018-06-14 07:52:01 -04:00
<BuildString Condition="'$(GIT_DESCRIBE)'!=''">$(BuildString) ($(GIT_DESCRIBE))</BuildString>
2016-08-25 14:18:45 -04:00
</PropertyGroup>
2016-08-25 15:17:40 -04:00
<ItemGroup>
<DataItems Include="$(RootDir)data\**\*" />
</ItemGroup>
2016-08-25 14:18:45 -04:00
<Message Condition="'$(BuildString)'!=''" Text="Building $(BuildString)" Importance="high" />
2016-08-25 15:17:40 -04:00
<Copy SourceFiles="@(CopyItems)" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(DataItems)" DestinationFolder="$(TargetDir)data\%(RecursiveDir)" SkipUnchangedFiles="true" />
2016-09-09 17:42:35 -04:00
</Target>
<Target Name="Build">
2016-12-02 09:42:40 -05:00
<PropertyGroup>
<SlnProperties>$(SlnProperties);Configuration=$(Configuration)</SlnProperties>
</PropertyGroup>
2016-09-20 18:57:15 -04:00
<Message Text="SlnProperties: $(SlnProperties)" />
2016-09-18 06:24:46 -04:00
<MSBuild Projects="openrct2.sln" Targets="Build" Properties="$(SlnProperties)" />
2016-09-09 17:42:35 -04:00
</Target>
<Target Name="Rebuild">
2016-12-02 09:42:40 -05:00
<PropertyGroup>
<SlnProperties>$(SlnProperties);Configuration=$(Configuration)</SlnProperties>
</PropertyGroup>
2016-09-20 18:57:15 -04:00
<Message Text="SlnProperties: $(SlnProperties)" />
2016-09-18 06:24:46 -04:00
<MSBuild Projects="openrct2.sln" Targets="Rebuild" Properties="$(SlnProperties)" />
2016-09-09 17:42:35 -04:00
</Target>
2018-04-19 08:26:31 -04:00
<Target Name="Test">
<!-- Scan repositories prior to running tests as it can take a while -->
<Message Text="Building OpenRCT2 repository indexes..." Importance="high" />
<Exec Command="$(TargetDir)openrct2.exe scan-objects"
2018-04-19 19:23:07 -04:00
WorkingDirectory="$(TargetDir)"
StandardOutputImportance="normal" />
2018-04-19 08:26:31 -04:00
<Message Text="Running tests..." Importance="high" />
2018-04-10 13:00:02 -04:00
<Exec Command="$(TargetDir)tests.exe "--gtest_output=xml:$(ArtifactsDir)test-results.xml""
WorkingDirectory="$(TargetDir)" />
2016-12-02 09:42:40 -05:00
</Target>
2016-08-25 14:18:45 -04:00
2016-08-21 19:09:45 -04:00
<!-- Target to build g2.dat containing OpenRCT2 sprites -->
2016-12-02 18:07:07 -05:00
<Target Name="g2" DependsOnTargets="Build" AfterTargets="Build" Inputs="@(g2Inputs)" Outputs="$(g2Output)"
Condition="'$(TestConfig)'!='true'">
2018-01-23 04:30:07 -05:00
<Message Text="Building g2.dat..." Importance="high" />
2018-01-23 04:40:36 -05:00
<Exec Command=""$(OutputExe)" sprite build "$(g2Output)" "$(RootDir)resources\g2\sprites.json""
2018-01-23 04:30:07 -05:00
StandardOutputImportance="normal" />
2016-08-22 15:39:06 -04:00
</Target>
2017-01-09 15:25:30 -05:00
<!-- Target to create openrct2.exe (windows) and openrct2.com (console) -->
<Target Name="CreateGUI" DependsOnTargets="Build" AfterTargets="Build" Inputs="$(OutputExe)" Outputs="$(OutputCom)">
<Copy SourceFiles="$(OutputExe)" DestinationFiles="$(OutputCom)" />
2017-04-13 18:09:15 -04:00
<Exec Command="editbin /subsystem:console "$(OutputCom)"" />
2017-01-16 12:39:55 -05:00
<Exec Command="editbin /subsystem:windows "$(OutputExe)"" />
2017-01-09 15:25:30 -05:00
</Target>
2016-12-16 12:39:10 -05:00
<!-- Target to download the title sequences -->
2016-12-16 19:19:44 -05:00
<Target Name="DownloadTitleSequences" AfterTargets="Build">
2016-12-16 17:41:11 -05:00
<DownloadDependency Name="TitleSequences"
Url="$(TitleSequencesUrl)"
Sha1="$(TitleSequencesSha1)"
2016-12-16 19:19:44 -05:00
CheckFile="$(DependenciesCheckFile)"
2016-12-16 17:41:11 -05:00
OutputDirectory="$(TargetDir)data\title" />
2016-12-16 12:39:10 -05:00
</Target>
2018-02-10 10:24:20 -05:00
<!-- Target to download the objects -->
<Target Name="DownloadObjects" AfterTargets="Build">
<DownloadDependency Name="Objects"
Url="$(ObjectsUrl)"
Sha1="$(ObjectsSha1)"
CheckFile="$(DependenciesCheckFile)"
OutputDirectory="$(TargetDir)data\object" />
</Target>
2016-10-15 19:06:58 -04:00
<!-- Target to sign OpenRCT2
2016-08-23 13:22:06 -04:00
This requires the project parameter SIGN_PASSWORD to be set -->
2016-12-02 18:07:07 -05:00
<Target Name="Sign" AfterTargets="Build" Inputs="@(SignItems)" Outputs="%(SignItems.Identity).signed"
Condition="'$(TestConfig)'!='true'">
2018-04-23 12:45:00 -04:00
<!-- <Warning Condition="'$(SIGN_PASSWORD)'==''" Text="SIGN_PASSWORD was not set, skipping signing of %(SignItems.Filename)%(SignItems.Extension)." /> -->
2016-08-23 13:22:06 -04:00
<Message Condition="'$(SIGN_PASSWORD)'!=''" Text="Signing %(SignItems.Filename)%(SignItems.Extension)"
2016-08-22 15:39:06 -04:00
Importance="high" />
2016-10-29 08:59:48 -04:00
<Exec EchoOff="true" Condition="'$(SIGN_PASSWORD)'!=''"
2016-08-23 13:22:06 -04:00
Command="signtool.exe sign /f $(SignCertificate) /p $(SIGN_PASSWORD) /t $(SignTimestampUrl) %(SignItems.Identity)"
2016-08-22 15:39:06 -04:00
StandardOutputImportance="low" />
2016-08-26 13:57:21 -04:00
<!-- Create a dummy file so that msbuild can use it to determine if the binary is newer than the last sign time -->
<Touch AlwaysCreate="true" Files="%(SignItems.Identity).signed" />
2016-08-21 19:09:45 -04:00
</Target>
2016-08-22 08:11:57 -04:00
<!-- Target to publish OpenRCT2 as a portable zip -->
2016-12-02 18:07:07 -05:00
<Target Name="PublishPortable" DependsOnTargets="Build;g2" Inputs="@(PublishItems)" Outputs="$(PublishZip)"
Condition="'$(TestConfig)'!='true'">
2016-08-22 08:11:57 -04:00
<MakeDir Directories="$(ArtifactsDir)" />
2016-08-25 18:07:02 -04:00
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishZip)))..." />
2016-08-25 15:17:40 -04:00
<_7z Output="$(PublishZip)" Inputs="@(PublishItems)" />
2016-08-22 08:11:57 -04:00
</Target>
2016-08-22 15:39:06 -04:00
2016-08-22 16:45:36 -04:00
<!-- Target to publish the OpenRCT2 debug symbols -->
2016-12-02 18:07:07 -05:00
<Target Name="PublishSymbols" DependsOnTargets="Build" Inputs="@(SymbolItems)" Outputs="$(PublishSymbolsZip)"
Condition="'$(TestConfig)'!='true'">
2016-08-22 15:39:06 -04:00
<MakeDir Directories="$(ArtifactsDir)" />
2016-08-25 18:07:02 -04:00
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishSymbolsZip)))..." />
2016-08-22 16:45:36 -04:00
<_7z Output="$(PublishSymbolsZip)" Inputs="@(SymbolItems)" />
2016-08-22 15:39:06 -04:00
</Target>
2016-08-22 17:30:47 -04:00
<!-- Target to publish the OpenRCT2 as an NSIS installer -->
<Target Name="PublishInstaller"
2016-08-26 13:57:21 -04:00
DependsOnTargets="Build;g2"
2016-08-22 17:30:47 -04:00
Inputs="@(PublishItems);$(NsisScript)"
2016-08-25 18:38:48 -04:00
Outputs="$(PublishInstallerExe)"
2016-12-02 18:07:07 -05:00
Condition="'$(NO_NSIS)'!='true' AND '$(TestConfig)'!='true'">
2016-08-22 17:30:47 -04:00
<PropertyGroup>
<PublishInstallerExeName>$([System.IO.Path]::GetFilename($(PublishInstallerExe)))</PublishInstallerExeName>
</PropertyGroup>
2016-08-25 18:07:02 -04:00
<MakeDir Directories="$(ArtifactsDir)" />
2016-08-22 17:30:47 -04:00
<!-- Create the installer -->
<Message Text="Building Windows Installer (NSIS script)" Importance="high" />
2016-08-25 17:17:15 -04:00
<Exec Command="makensis /DOUTFILE=$(PublishInstallerExe) ^
2017-02-02 05:53:56 -05:00
/DAPPV_MAIN=$(Version) ^
2016-08-25 17:17:15 -04:00
/DAPPV_EXTRA=$(VersionExtra) ^
/DPLATFORM=$(Platform) ^
$(NsisScript)"
2016-08-22 17:30:47 -04:00
StandardOutputImportance="normal" />
<!-- Sign the installer -->
2018-04-23 12:45:00 -04:00
<!-- <Warning Condition="'$(SIGN_PASSWORD)'==''" Text="SIGN_PASSWORD was not set, skipping signing of $(PublishInstallerExeName)." /> -->
2016-08-23 13:22:06 -04:00
<Message Condition="'$(SIGN_PASSWORD)'!=''" Text="Signing $(PublishInstallerExeName)"
2016-08-22 17:30:47 -04:00
Importance="high" />
2016-10-29 08:59:48 -04:00
<Exec EchoOff="true" Condition="'$(SIGN_PASSWORD)'!=''"
2016-08-23 13:22:06 -04:00
Command="signtool.exe sign /f $(SignCertificate) /p $(SIGN_PASSWORD) /t $(SignTimestampUrl) $(PublishInstallerExe)"
2016-08-22 17:30:47 -04:00
StandardOutputImportance="low" />
</Target>
2016-08-22 16:45:36 -04:00
<Target Name="PublishAll"
2016-08-22 17:30:47 -04:00
DependsOnTargets="PublishSymbols;PublishPortable;PublishInstaller" />
2016-08-22 16:45:36 -04:00
2016-08-23 13:13:45 -04:00
<!-- Target to upload the artifacts to OpenRCT2.org -->
2016-12-02 18:07:07 -05:00
<Target Name="UploadArtifacts" DependsOnTargets="PublishAll"
Condition="'$(TestConfig)'!='true'">
2016-08-23 13:13:45 -04:00
<PropertyGroup>
<UploadLink>https://openrct2.org/altapi/?command=push-build</UploadLink>
<UploadFileNameShort>%(UploadArtifacts.Filename)%(UploadArtifacts.Extension)</UploadFileNameShort>
2017-01-29 16:22:43 -05:00
<UploadGitBranch>master</UploadGitBranch>
<UploadGitBranch Condition="'$(GIT_BRANCH)'!=''">$(GIT_BRANCH)</UploadGitBranch>
2016-08-23 13:13:45 -04:00
</PropertyGroup>
<Message Text="Uploading $(UploadFileNameShort)" Importance="high" />
<Error Condition="'$(OPENRCT2_ORG_TOKEN)'==''" Text="OPENRCT2_ORG_TOKEN not set." />
2016-08-23 13:22:06 -04:00
<Error Condition="'$(GIT_COMMIT_SHA1)'==''" Text="GIT_COMMIT_SHA1 not set." />
2016-10-29 08:59:48 -04:00
<Exec EchoOff="true" Command="curl.exe -s -o - ^
2016-08-23 13:22:06 -04:00
--form "key=$(OPENRCT2_ORG_TOKEN)" ^
--form "fileName=%(UploadArtifacts.Name)" ^
--form "version=$(Version)" ^
--form "gitHash=$(GIT_COMMIT_SHA1)" ^
2017-01-29 16:22:43 -05:00
--form "gitBranch=$(UploadGitBranch)" ^
2016-08-23 13:13:45 -04:00
--form "flavourId=%(UploadArtifacts.FlavourId)" ^
2016-08-23 13:22:06 -04:00
--form "file=@%(UploadArtifacts.Identity)" ^
2016-08-23 13:13:45 -04:00
"$(UploadLink)""
CustomErrorRegularExpression=""error":1" />
</Target>
2016-08-21 19:09:45 -04:00
</Project>