OpenRCT2/openrct2.proj

164 lines
8.7 KiB
Plaintext
Raw Normal View History

2016-08-22 19:31:52 +02:00
<?xml version="1.0" encoding="utf-8"?>
<!-- Main msbuild project for OpenRCT2 -->
<!-- Inputs (/p: or environment variables)
- OPENRCT2_BUILD_SERVER
- OPENRCT2_BRANCH
- OPENRCT2_SHA1
- OPENRCT2_SHA1_SHORT
- OPENRCT2_DESCRIBE
2016-08-23 19:22:06 +02:00
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
2016-08-22 19:31:52 +02:00
<!-- Import custom build tasks -->
<Import Project="openrct2.targets" />
2016-08-22 19:31:52 +02:00
<PropertyGroup>
2016-09-10 00:13:12 +02:00
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
<Platform Condition="'$(Platform)'==''">x64</Platform>
2016-08-23 19:13:45 +02:00
2016-08-23 20:24:07 +02:00
<!-- Set dynamic OpenRCT2 #defines -->
<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>
<OPENRCT2_CL_ADDITIONALOPTIONS Condition="'$(Breakpad)'=='true' and ('$(Platform)'=='Win32' or '$(Platform)'=='x64')">/D "USE_BREAKPAD" $(OPENRCT2_CL_ADDITIONALOPTIONS)</OPENRCT2_CL_ADDITIONALOPTIONS>
2016-08-23 20:24:07 +02:00
<RootDir>$(MsBuildThisFileDirectory)</RootDir>
2016-09-09 23:42:35 +02:00
<TargetDir>$(RootDir)bin\</TargetDir>
<OutputExe>$(TargetDir)openrct2.exe</OutputExe>
<g2Output>$(TargetDir)data\g2.dat</g2Output>
2016-09-18 12:24:46 +02:00
<!-- Set openrct2.sln properties -->
<SlnProperties>$(SlnProperties);Platform=$(Platform)</SlnProperties>
<SlnProperties Condition="'$(OPENRCT2_BUILD_SERVER)'!=''">$(SlnProperties);OPENRCT2_CL_ADDITIONALOPTIONS=$(OPENRCT2_CL_ADDITIONALOPTIONS)</SlnProperties>
</PropertyGroup>
2016-08-26 01:45:57 +02:00
<!-- 3rd party libraries / dependencies -->
<PropertyGroup>
<DependenciesCheckFile>$(RootDir).dependencies</DependenciesCheckFile>
2024-04-12 14:22:00 +02:00
<LibsUrl Condition="'$(Platform)'=='ARM64'">https://github.com/OpenRCT2/Dependencies/releases/download/v35/openrct2-libs-v35-arm64-windows-static.zip</LibsUrl>
<LibsSha1 Condition="'$(Platform)'=='ARM64'">89f119395c4347f25427990eb47ea8f57bba95d8</LibsSha1>
<LibsUrl Condition="'$(Platform)'=='x64'">https://github.com/OpenRCT2/Dependencies/releases/download/v35/openrct2-libs-v35-x64-windows-static.zip</LibsUrl>
<LibsSha1 Condition="'$(Platform)'=='x64'">1303b2423be26f40bdb75fa2c91f1bc7ef1de1ed</LibsSha1>
<LibsUrl Condition="'$(Platform)'=='Win32'">https://github.com/OpenRCT2/Dependencies/releases/download/v35/openrct2-libs-v35-x86-windows-static.zip</LibsUrl>
<LibsSha1 Condition="'$(Platform)'=='Win32'">f3636b530110c7592deab23ca0d0c1916fc7e44c</LibsSha1>
<TitleSequencesUrl>https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.6/title-sequences.zip</TitleSequencesUrl>
<TitleSequencesSha1>80fefc6ebbabc42a6f4703412daa5c62f661420d</TitleSequencesSha1>
2024-04-27 19:30:39 +02:00
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.4.4/objects.zip</ObjectsUrl>
<ObjectsSha1>4e9b5d7f85a07b90ec57fe37517e04b19ee0395c</ObjectsSha1>
<OpenSFXUrl>https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.5/opensound.zip</OpenSFXUrl>
<OpenSFXSha1>b1b1f1b241d2cbff63a1889c4dc5a09bdf769bfb</OpenSFXSha1>
<OpenMSXUrl>https://github.com/OpenRCT2/OpenMusic/releases/download/v1.5/openmusic.zip</OpenMSXUrl>
<OpenMSXSha1>f3c707e576281758637598ce68880416891fe5f9</OpenMSXSha1>
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.79/replays.zip</ReplaysUrl>
<ReplaysSha1>34457077DBA9448A08FF6AC95E5CB92D65252E0C</ReplaysSha1>
2016-08-26 01:45:57 +02:00
</PropertyGroup>
<ItemGroup>
<g2Inputs Include="$(RootDir)resources\g2\*" />
2016-08-22 22:45:36 +02:00
</ItemGroup>
2016-08-25 21:22:09 +02:00
<Target Name="DownloadLibs">
<!-- libs -->
<DownloadDependency Name="Libs"
Url="$(LibsUrl)"
Sha1="$(LibsSha1)"
CheckFile="$(DependenciesCheckFile)"
2018-03-03 12:34:47 +01:00
OutputDirectory="$(RootDir)lib\$(Platform)" />
</Target>
2016-09-09 23:42:35 +02:00
<Target Name="Clean">
2016-12-02 15:42:40 +01:00
<PropertyGroup>
<SlnProperties>$(SlnProperties);Configuration=$(Configuration)</SlnProperties>
</PropertyGroup>
2016-08-26 19:04:17 +02:00
<Delete Files="@(CleanItems)" />
2016-08-26 00:07:02 +02:00
<RemoveDir Directories="$(TargetDir)data" />
2016-09-18 12:24:46 +02:00
<MSBuild Projects="openrct2.sln" Targets="Clean" Properties="$(SlnProperties)" />
</Target>
<Target Name="BeforeBuild" BeforeTargets="Build;Rebuild" DependsOnTargets="DownloadLibs">
2016-08-25 20:18:45 +02:00
<PropertyGroup>
<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 20:18:45 +02:00
</PropertyGroup>
2016-08-25 21:17:40 +02:00
<ItemGroup>
<DataItems Include="$(RootDir)data\**\*" />
</ItemGroup>
2016-08-25 20:18:45 +02:00
<Message Condition="'$(BuildString)'!=''" Text="Building $(BuildString)" Importance="high" />
2016-08-25 21:17:40 +02:00
<Copy SourceFiles="@(CopyItems)" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(DataItems)" DestinationFolder="$(TargetDir)data\%(RecursiveDir)" SkipUnchangedFiles="true" />
2016-09-09 23:42:35 +02:00
</Target>
<Target Name="Build">
2016-12-02 15:42:40 +01:00
<PropertyGroup>
<SlnProperties>$(SlnProperties);Configuration=$(Configuration)</SlnProperties>
</PropertyGroup>
2016-09-21 00:57:15 +02:00
<Message Text="SlnProperties: $(SlnProperties)" />
2016-09-18 12:24:46 +02:00
<MSBuild Projects="openrct2.sln" Targets="Build" Properties="$(SlnProperties)" />
2016-09-09 23:42:35 +02:00
</Target>
<Target Name="Rebuild">
2016-12-02 15:42:40 +01:00
<PropertyGroup>
<SlnProperties>$(SlnProperties);Configuration=$(Configuration)</SlnProperties>
</PropertyGroup>
2016-09-21 00:57:15 +02:00
<Message Text="SlnProperties: $(SlnProperties)" />
2016-09-18 12:24:46 +02:00
<MSBuild Projects="openrct2.sln" Targets="Rebuild" Properties="$(SlnProperties)" />
2016-09-09 23:42:35 +02:00
</Target>
<!-- Target to build g2.dat containing OpenRCT2 sprites -->
<!-- Only Arm64 machines will build g2.dat for Arm64 -->
<!-- Note: Arm64 machines can build for x86, x64 and Arm64 -->
<Target Name="g2" AfterTargets="Build" Inputs="@(g2Inputs)" Outputs="$(g2Output)"
Condition="'$(TestConfig)'!='true' and ('$(Platform)'!='ARM64' or '$(PROCESSOR_ARCHITECTURE)'=='ARM64')">
<Message Text="Building g2.dat..." Importance="high" />
<Exec Command="&quot;$(OutputExe)&quot; sprite build &quot;$(g2Output)&quot; &quot;$(RootDir)resources\g2\sprites.json&quot;"
StandardOutputImportance="normal" />
</Target>
<!-- Target to download the title sequences -->
<Target Name="DownloadTitleSequences" AfterTargets="Build">
<DownloadDependency Name="TitleSequences"
Url="$(TitleSequencesUrl)"
Sha1="$(TitleSequencesSha1)"
CheckFile="$(DependenciesCheckFile)"
OutputDirectory="$(TargetDir)data\sequence" />
</Target>
2018-02-10 16:24:20 +01: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>
2022-10-15 01:34:34 +02:00
<!-- Target to download OpenSFX -->
<Target Name="DownloadOpenSFX" AfterTargets="Build">
<DownloadDependency Name="OpenSFX"
Url="$(OpenSFXUrl)"
Sha1="$(OpenSFXSha1)"
CheckFile="$(DependenciesCheckFile)"
OutputDirectory="$(TargetDir)data" />
</Target>
<!-- Target to download OpenMSX -->
<Target Name="DownloadOpenMSX" AfterTargets="Build">
<DownloadDependency Name="OpenMSX"
Url="$(OpenMSXUrl)"
Sha1="$(OpenMSXSha1)"
CheckFile="$(DependenciesCheckFile)"
OutputDirectory="$(TargetDir)data" />
</Target>
2019-07-15 19:42:43 +02:00
<!-- Target to download replays -->
<Target Name="DownloadReplays" AfterTargets="Build">
<DownloadDependency Name="Replays"
Url="$(ReplaysUrl)"
Sha1="$(ReplaysSha1)"
CheckFile="$(DependenciesCheckFile)"
OutputDirectory="$(TargetDir)testdata\replays" />
</Target>
</Project>