forked from OpenRCT2/OpenRCT2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
openrct2.proj
164 lines (147 loc) · 8.7 KB
/
openrct2.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?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)'=='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.4.11/objects.zip</ObjectsUrl>
<ObjectsSha1>da04330679de2eff53a94a6505802512bfec6403</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>
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.84/replays.zip</ReplaysUrl>
<ReplaysSha1>90B848AB344E29A2CF1E3E48539F06F5845772C3</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)" />
<Delete Files="$(DependenciesCheckFile)" />
<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 -->
<!-- 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=""$(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>