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
|
2020-01-19 09:04:59 -05:00
|
|
|
- OPENRCT2_BRANCH
|
|
|
|
- OPENRCT2_SHA1
|
|
|
|
- OPENRCT2_SHA1_SHORT
|
|
|
|
- OPENRCT2_DESCRIBE
|
2016-08-23 13:22:06 -04:00
|
|
|
-->
|
2020-01-19 09:04:59 -05:00
|
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
|
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>
|
2020-01-19 09:04:59 -05:00
|
|
|
<Platform Condition="'$(Platform)'==''">x64</Platform>
|
2016-08-23 13:13:45 -04:00
|
|
|
|
2016-08-23 14:24:07 -04:00
|
|
|
<!-- Set dynamic OpenRCT2 #defines -->
|
2020-01-19 09:04:59 -05:00
|
|
|
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(OPENRCT2_BUILD_SERVER)'!=''">/D "OPENRCT2_BUILD_SERVER=\"$(OPENRCT2_BUILD_SERVER)\"" $(OPENRCT2_CL_ADDITIONALOPTIONS)</OPENRCT2_CL_ADDITIONALOPTIONS>
|
|
|
|
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(OPENRCT2_BRANCH)'!=''">/D "OPENRCT2_BRANCH=\"$(OPENRCT2_BRANCH)\"" $(OPENRCT2_CL_ADDITIONALOPTIONS)</OPENRCT2_CL_ADDITIONALOPTIONS>
|
|
|
|
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(OPENRCT2_SHA1)'!=''">/D "OPENRCT2_COMMIT_SHA1=\"$(OPENRCT2_SHA1)\"" $(OPENRCT2_CL_ADDITIONALOPTIONS)</OPENRCT2_CL_ADDITIONALOPTIONS>
|
|
|
|
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(OPENRCT2_SHA1_SHORT)'!=''">/D "OPENRCT2_COMMIT_SHA1_SHORT=\"$(OPENRCT2_SHA1_SHORT)\"" $(OPENRCT2_CL_ADDITIONALOPTIONS)</OPENRCT2_CL_ADDITIONALOPTIONS>
|
|
|
|
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(OPENRCT2_DESCRIBE)'!=''">/D "OPENRCT2_VERSION_TAG=\"$(OPENRCT2_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>
|
2016-09-09 17:42:35 -04:00
|
|
|
<TargetDir>$(RootDir)bin\</TargetDir>
|
2016-08-22 15:39:06 -04:00
|
|
|
|
2016-10-20 17:45:22 -04:00
|
|
|
<OutputExe>$(TargetDir)openrct2.exe</OutputExe>
|
2016-08-22 15:39:06 -04:00
|
|
|
<g2Output>$(TargetDir)data\g2.dat</g2Output>
|
|
|
|
|
2016-09-18 06:24:46 -04:00
|
|
|
<!-- Set openrct2.sln properties -->
|
|
|
|
<SlnProperties>$(SlnProperties);Platform=$(Platform)</SlnProperties>
|
2020-01-19 09:04:59 -05:00
|
|
|
<SlnProperties Condition="'$(OPENRCT2_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>
|
2020-09-05 17:33:46 -04:00
|
|
|
<LibsUrl Condition="'$(Platform)'=='Win32'">https://github.com/OpenRCT2/Dependencies/releases/download/v26/openrct2-libs-v26-x86-windows-static.zip</LibsUrl>
|
|
|
|
<LibsSha1 Condition="'$(Platform)'=='Win32'">d7445387108b70fb23ccc06b73c8bdd8a44a0706</LibsSha1>
|
|
|
|
<LibsUrl Condition="'$(Platform)'=='x64'">https://github.com/OpenRCT2/Dependencies/releases/download/v26/openrct2-libs-v26-x64-windows-static.zip</LibsUrl>
|
|
|
|
<LibsSha1 Condition="'$(Platform)'=='x64'">6ebb2866211be6458cb4219271a636abc69fa54a</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-08-11 14:03:29 -04:00
|
|
|
<TitleSequencesUrl>https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2c/title-sequences.zip</TitleSequencesUrl>
|
|
|
|
<TitleSequencesSha1>304d13a126c15bf2c86ff13b81a2f2cc1856ac8d</TitleSequencesSha1>
|
2020-12-02 11:16:44 -05:00
|
|
|
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.0.20/objects.zip</ObjectsUrl>
|
|
|
|
<ObjectsSha1>151424d24b1d49a167932b58319bedaa6ec368e9</ObjectsSha1>
|
2021-02-14 03:17:04 -05:00
|
|
|
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.31/replays.zip</ReplaysUrl>
|
|
|
|
<ReplaysSha1>693BDD6F4B7C3B312AABEBCAEA4800FE97B33527</ReplaysSha1>
|
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>
|
|
|
|
|
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
|
|
|
<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>
|
2020-01-19 09:04:59 -05:00
|
|
|
<BuildString Condition="'$(OPENRCT2_SHA1_SHORT)'!=''">$(OPENRCT2_SHA1_SHORT)</BuildString>
|
|
|
|
<BuildString Condition="'$(OPENRCT2_BRANCH)'!=''">$(BuildString) ($(OPENRCT2_BRANCH))</BuildString>
|
|
|
|
<BuildString Condition="'$(OPENRCT2_DESCRIBE)'!=''">$(BuildString) ($(OPENRCT2_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>
|
|
|
|
|
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>
|
|
|
|
|
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)"
|
2020-04-30 12:50:26 -04:00
|
|
|
OutputDirectory="$(TargetDir)data\sequence" />
|
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>
|
|
|
|
|
2019-07-15 13:42:43 -04:00
|
|
|
<!-- Target to download replays -->
|
|
|
|
<Target Name="DownloadReplays" AfterTargets="Build">
|
|
|
|
<DownloadDependency Name="Replays"
|
|
|
|
Url="$(ReplaysUrl)"
|
|
|
|
Sha1="$(ReplaysSha1)"
|
|
|
|
CheckFile="$(DependenciesCheckFile)"
|
|
|
|
OutputDirectory="$(TargetDir)testdata\replays" />
|
|
|
|
</Target>
|
2016-08-21 19:09:45 -04:00
|
|
|
</Project>
|