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
|
|
|
- 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>
|
|
|
|
|
2019-07-10 16:52:26 -04:00
|
|
|
<Version>0.2.3</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>
|
2018-07-17 13:19:53 -04:00
|
|
|
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(Configuration)'=='Release'">/D "USE_BREAKPAD" $(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>
|
|
|
|
|
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>
|
2019-01-07 15:39:38 -05:00
|
|
|
<LibsUrl Condition="'$(Platform)'=='Win32'">https://github.com/OpenRCT2/Dependencies/releases/download/v19/openrct2-libs-v19-x86-windows-static-winssl.zip</LibsUrl>
|
|
|
|
<LibsSha1 Condition="'$(Platform)'=='Win32'">c0a49dfb7a0b4175c5b5003922f8a5c4b4589132</LibsSha1>
|
|
|
|
<LibsUrl Condition="'$(Platform)'=='x64'">https://github.com/OpenRCT2/Dependencies/releases/download/v19/openrct2-libs-v19-x64-windows-static-winssl.zip</LibsUrl>
|
|
|
|
<LibsSha1 Condition="'$(Platform)'=='x64'">623cb9199da328e55ee9c7f5e1135ceab43cc6b9</LibsSha1>
|
2018-09-18 15:13:23 -04:00
|
|
|
<GtestVersion>2fe3bd994b3189899d93f1d5a881e725e046fdc2</GtestVersion>
|
|
|
|
<GtestUrl>https://github.com/google/googletest/archive/$(GtestVersion).zip</GtestUrl>
|
|
|
|
<GtestSha1>058b9df80244c03f1633cb06e9f70471a29ebb8e</GtestSha1>
|
2019-06-25 16:41:10 -04:00
|
|
|
<TitleSequencesUrl>https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2b/title-sequence-v0.1.2b.zip</TitleSequencesUrl>
|
|
|
|
<TitleSequencesSha1>19263f8ca383345959473e64da4785a60f00f420</TitleSequencesSha1>
|
2019-07-06 10:50:58 -04:00
|
|
|
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.0.11/objects.zip</ObjectsUrl>
|
|
|
|
<ObjectsSha1>8674120086929f9196560d77cada631fb478d7c0</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
|
|
|
</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>
|
2018-08-30 04:10:36 -04:00
|
|
|
<GtestSrc>$(RootDir)lib\googletest-$(GtestVersion)</GtestSrc>
|
2016-12-16 19:19:44 -05:00
|
|
|
<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-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 -->
|
2018-09-08 16:32:05 -04:00
|
|
|
<Target Name="g2" AfterTargets="Build" Inputs="@(g2Inputs)" Outputs="$(g2Output)"
|
2016-12-02 18:07:07 -05:00
|
|
|
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-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" />
|
|
|
|
</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>
|