mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 10:21:57 -05:00
161 lines
8.5 KiB
XML
161 lines
8.5 KiB
XML
<?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
|
|
-->
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
|
|
<!-- Import custom build tasks -->
|
|
<Import Project="openrct2.targets" />
|
|
|
|
<PropertyGroup>
|
|
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
|
|
<Platform Condition="'$(Platform)'==''">x64</Platform>
|
|
|
|
<!-- 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>
|
|
|
|
<RootDir>$(MsBuildThisFileDirectory)</RootDir>
|
|
<TargetDir>$(RootDir)bin\</TargetDir>
|
|
|
|
<OutputExe>$(TargetDir)openrct2.exe</OutputExe>
|
|
<g2Output>$(TargetDir)data\g2.dat</g2Output>
|
|
|
|
<!-- Set openrct2.sln properties -->
|
|
<SlnProperties>$(SlnProperties);Platform=$(Platform)</SlnProperties>
|
|
<SlnProperties Condition="'$(OPENRCT2_BUILD_SERVER)'!=''">$(SlnProperties);OPENRCT2_CL_ADDITIONALOPTIONS=$(OPENRCT2_CL_ADDITIONALOPTIONS)</SlnProperties>
|
|
</PropertyGroup>
|
|
|
|
<!-- 3rd party libraries / dependencies -->
|
|
<PropertyGroup>
|
|
<DependenciesCheckFile>$(RootDir).dependencies</DependenciesCheckFile>
|
|
<LibsUrl Condition="'$(Platform)'=='Win32'">https://github.com/OpenRCT2/Dependencies/releases/download/v34/openrct2-libs-v34-x86-windows-static.zip</LibsUrl>
|
|
<LibsSha1 Condition="'$(Platform)'=='Win32'">5173c04611c94da44af0db9e099edca2d6a7b829</LibsSha1>
|
|
<LibsUrl Condition="'$(Platform)'=='x64'">https://github.com/OpenRCT2/Dependencies/releases/download/v34/openrct2-libs-v34-x64-windows-static.zip</LibsUrl>
|
|
<LibsSha1 Condition="'$(Platform)'=='x64'">930df83ef49d91b1ef886f5dbf0a9cb61d704a50</LibsSha1>
|
|
<LibsUrl Condition="'$(Platform)'=='ARM64'">https://github.com/OpenRCT2/Dependencies/releases/download/v34/openrct2-libs-v34-arm64-windows-static.zip</LibsUrl>
|
|
<LibsSha1 Condition="'$(Platform)'=='ARM64'">bd338aa3da9a357fb996dcaa6cea02c4f906718c</LibsSha1>
|
|
<TitleSequencesUrl>https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.0/title-sequences.zip</TitleSequencesUrl>
|
|
<TitleSequencesSha1>4ab0065e5a4d9f9c77d94718bbdfcfcd5a389da0</TitleSequencesSha1>
|
|
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.3.11/objects.zip</ObjectsUrl>
|
|
<ObjectsSha1>02ddf6c685a2da8bac98a57b34be95d63192443d</ObjectsSha1>
|
|
<OpenSFXUrl>https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.3/opensound.zip</OpenSFXUrl>
|
|
<OpenSFXSha1>ffec5a97bd5035860c4c9a43fe32cf51886478e3</OpenSFXSha1>
|
|
<OpenMSXUrl>https://github.com/OpenRCT2/OpenMusic/releases/download/v1.3.0/openmusic.zip</OpenMSXUrl>
|
|
<OpenMSXSha1>b0cec998a3679f1cde17d91f2508ec4923c1a25c</OpenMSXSha1>
|
|
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.78/replays.zip</ReplaysUrl>
|
|
<ReplaysSha1>31C5D07EED8481D5C6D57F9E4FE9443AAEDE7739</ReplaysSha1>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<g2Inputs Include="$(RootDir)resources\g2\*" />
|
|
</ItemGroup>
|
|
|
|
<Target Name="DownloadLibs">
|
|
<!-- libs -->
|
|
<DownloadDependency Name="Libs"
|
|
Url="$(LibsUrl)"
|
|
Sha1="$(LibsSha1)"
|
|
CheckFile="$(DependenciesCheckFile)"
|
|
OutputDirectory="$(RootDir)lib\$(Platform)" />
|
|
</Target>
|
|
|
|
<Target Name="Clean">
|
|
<PropertyGroup>
|
|
<SlnProperties>$(SlnProperties);Configuration=$(Configuration)</SlnProperties>
|
|
</PropertyGroup>
|
|
<Delete Files="@(CleanItems)" />
|
|
<RemoveDir Directories="$(TargetDir)data" />
|
|
<MSBuild Projects="openrct2.sln" Targets="Clean" Properties="$(SlnProperties)" />
|
|
</Target>
|
|
|
|
<Target Name="BeforeBuild" BeforeTargets="Build;Rebuild" DependsOnTargets="DownloadLibs">
|
|
<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>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<DataItems Include="$(RootDir)data\**\*" />
|
|
</ItemGroup>
|
|
<Message Condition="'$(BuildString)'!=''" Text="Building $(BuildString)" Importance="high" />
|
|
<Copy SourceFiles="@(CopyItems)" DestinationFolder="$(TargetDir)" SkipUnchangedFiles="true" />
|
|
<Copy SourceFiles="@(DataItems)" DestinationFolder="$(TargetDir)data\%(RecursiveDir)" SkipUnchangedFiles="true" />
|
|
</Target>
|
|
|
|
<Target Name="Build">
|
|
<PropertyGroup>
|
|
<SlnProperties>$(SlnProperties);Configuration=$(Configuration)</SlnProperties>
|
|
</PropertyGroup>
|
|
<Message Text="SlnProperties: $(SlnProperties)" />
|
|
<MSBuild Projects="openrct2.sln" Targets="Build" Properties="$(SlnProperties)" />
|
|
</Target>
|
|
<Target Name="Rebuild">
|
|
<PropertyGroup>
|
|
<SlnProperties>$(SlnProperties);Configuration=$(Configuration)</SlnProperties>
|
|
</PropertyGroup>
|
|
<Message Text="SlnProperties: $(SlnProperties)" />
|
|
<MSBuild Projects="openrct2.sln" Targets="Rebuild" Properties="$(SlnProperties)" />
|
|
</Target>
|
|
|
|
<!-- Target to build g2.dat containing OpenRCT2 sprites -->
|
|
<Target Name="g2" AfterTargets="Build" Inputs="@(g2Inputs)" Outputs="$(g2Output)"
|
|
Condition="'$(TestConfig)'!='true' and '$(Platform)'!='ARM64'">
|
|
<Message Text="Building g2.dat..." Importance="high" />
|
|
<Exec Command=""$(OutputExe)" sprite build "$(g2Output)" "$(RootDir)resources\g2\sprites.json""
|
|
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>
|
|
|
|
<!-- Target to download the objects -->
|
|
<Target Name="DownloadObjects" AfterTargets="Build">
|
|
<DownloadDependency Name="Objects"
|
|
Url="$(ObjectsUrl)"
|
|
Sha1="$(ObjectsSha1)"
|
|
CheckFile="$(DependenciesCheckFile)"
|
|
OutputDirectory="$(TargetDir)data\object" />
|
|
</Target>
|
|
|
|
<!-- 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>
|
|
|
|
<!-- Target to download replays -->
|
|
<Target Name="DownloadReplays" AfterTargets="Build">
|
|
<DownloadDependency Name="Replays"
|
|
Url="$(ReplaysUrl)"
|
|
Sha1="$(ReplaysSha1)"
|
|
CheckFile="$(DependenciesCheckFile)"
|
|
OutputDirectory="$(TargetDir)testdata\replays" />
|
|
</Target>
|
|
</Project>
|