mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
d46e4a9bb1
* Start a network serialiser for entities will be used only for checksums and replay diffs * Continue work * Use the new serailser for checksums * Use new serialiser for replays * keep compilers happy * Try create checksum stream * Fix compiling * Split off class into seperate file * Update Xcode project * Increment network version * Fix pragma mistake * Fix none network builds * Update replays * Improve ChecksumStream and use FNV internally * Small cleanups * satisfy compilers * Revert change of checksum size to simplfy rerecording * Zero initialise data * Fix serialiser * Update replays again Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com> Co-authored-by: Matt <m.moninger.h@gmail.com>
152 lines
7.9 KiB
XML
152 lines
7.9 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="'$(Configuration)'=='Release'">/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/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>
|
|
<GtestVersion>2fe3bd994b3189899d93f1d5a881e725e046fdc2</GtestVersion>
|
|
<GtestUrl>https://github.com/google/googletest/archive/$(GtestVersion).zip</GtestUrl>
|
|
<GtestSha1>058b9df80244c03f1633cb06e9f70471a29ebb8e</GtestSha1>
|
|
<TitleSequencesUrl>https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2c/title-sequences.zip</TitleSequencesUrl>
|
|
<TitleSequencesSha1>304d13a126c15bf2c86ff13b81a2f2cc1856ac8d</TitleSequencesSha1>
|
|
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.0.21/objects.zip</ObjectsUrl>
|
|
<ObjectsSha1>c38af45d51a6e440386180feacf76c64720b6ac5</ObjectsSha1>
|
|
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.42/replays.zip</ReplaysUrl>
|
|
<ReplaysSha1>C60FC1D6526DB8EDDF4AFBB0EE52A4A0D561646E</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)" />
|
|
|
|
<!-- googletest -->
|
|
<DownloadDependency Name="googletest"
|
|
Url="$(GtestUrl)"
|
|
Sha1="$(GtestSha1)"
|
|
CheckFile="$(DependenciesCheckFile)"
|
|
OutputDirectory="$(RootDir)lib" />
|
|
<PropertyGroup>
|
|
<GtestSrc>$(RootDir)lib\googletest-$(GtestVersion)</GtestSrc>
|
|
<GtestDst>$(RootDir)lib\googletest</GtestDst>
|
|
</PropertyGroup>
|
|
<Exec Command="cmd /c "if exist "$(GtestSrc)" ( rmdir /S /Q "$(GtestDst)" 2> nul & move "$(GtestSrc)" "$(GtestDst)" )"" />
|
|
</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'">
|
|
<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 replays -->
|
|
<Target Name="DownloadReplays" AfterTargets="Build">
|
|
<DownloadDependency Name="Replays"
|
|
Url="$(ReplaysUrl)"
|
|
Sha1="$(ReplaysSha1)"
|
|
CheckFile="$(DependenciesCheckFile)"
|
|
OutputDirectory="$(TargetDir)testdata\replays" />
|
|
</Target>
|
|
</Project>
|