OpenRCT2/openrct2.proj

165 lines
8.7 KiB
Text
Raw Normal View History

2016-08-22 13:31:52 -04: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 13:22:06 -04:00
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
2016-08-22 13:31:52 -04:00
<!-- Import custom build tasks -->
<Import Project="openrct2.targets" />
2016-08-22 13:31:52 -04:00
<PropertyGroup>
2016-09-09 18:13:12 -04:00
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
<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 -->
<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 14:24:07 -04:00
<RootDir>$(MsBuildThisFileDirectory)</RootDir>
2016-09-09 17:42:35 -04:00
<TargetDir>$(RootDir)bin\</TargetDir>
<OutputExe>$(TargetDir)openrct2.exe</OutputExe>
<g2Output>$(TargetDir)data\g2.dat</g2Output>
2016-09-18 06:24:46 -04: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-25 19:45:57 -04:00
<!-- 3rd party libraries / dependencies -->
<PropertyGroup>
<DependenciesCheckFile>$(RootDir).dependencies</DependenciesCheckFile>
2024-09-07 18:00:49 -04:00
<LibsUrl Condition="'$(Platform)'=='ARM64'">https://github.com/OpenRCT2/Dependencies/releases/download/v37/openrct2-libs-v37-arm64-windows-static.zip</LibsUrl>
<LibsSha1 Condition="'$(Platform)'=='ARM64'">508bbd39b9be3d746ed8e17b6c0e7a79f6fa13c8</LibsSha1>
<LibsUrl Condition="'$(Platform)'=='x64'">https://github.com/OpenRCT2/Dependencies/releases/download/v37/openrct2-libs-v37-x64-windows-static.zip</LibsUrl>
<LibsSha1 Condition="'$(Platform)'=='x64'">28fabdb3fe8ddb7c73cd1c5e57ec8df5bd6232e5</LibsSha1>
<LibsUrl Condition="'$(Platform)'=='Win32'">https://github.com/OpenRCT2/Dependencies/releases/download/v37/openrct2-libs-v37-x86-windows-static.zip</LibsUrl>
<LibsSha1 Condition="'$(Platform)'=='Win32'">9984c1e317dcfb3aaf8e17f1db2ebb0f771e2373</LibsSha1>
<TitleSequencesUrl>https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.14/title-sequences.zip</TitleSequencesUrl>
<TitleSequencesSha1>6c04781b959b468e1f65ec2d2f21f5aaa5e5724d</TitleSequencesSha1>
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.5.1/objects.zip</ObjectsUrl>
<ObjectsSha1>e922b9fd779e7752176f1d0d8766c2ee6ad1e41b</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.6/openmusic.zip</OpenMSXUrl>
<OpenMSXSha1>ba170fa6d777b309c15420f4b6eb3fa25082a9d1</OpenMSXSha1>
2025-01-10 07:43:14 -05:00
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.86/replays.zip</ReplaysUrl>
<ReplaysSha1>637E73F20C03DCD52ACA36FAEE15DADB31797FE0</ReplaysSha1>
2016-08-25 19:45:57 -04:00
</PropertyGroup>
<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">
<!-- libs -->
<DownloadDependency Name="Libs"
Url="$(LibsUrl)"
Sha1="$(LibsSha1)"
CheckFile="$(DependenciesCheckFile)"
2018-03-03 06:34:47 -05:00
OutputDirectory="$(RootDir)lib\$(Platform)" />
</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)" />
<Delete Files="$(DependenciesCheckFile)" />
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)" />
</Target>
<Target Name="BeforeBuild" BeforeTargets="Build;Rebuild" DependsOnTargets="DownloadLibs">
2016-08-25 14:18:45 -04: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 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>
<!-- 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 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>
2022-10-14 19:34:34 -04: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 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>
</Project>