mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Add a new target to copy relevant data and build g2.dat if needed
This commit is contained in:
33
openrct2.sln
33
openrct2.sln
@@ -7,16 +7,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenrct2", "src\openrct2
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openrct2-win", "src\openrct2-win\openrct2-win.vcxproj", "{7A9A57D5-7006-4208-A290-5491BA3C8808}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B6808F71-30B4-4499-8FF6-0B1C86391842} = {B6808F71-30B4-4499-8FF6-0B1C86391842}
|
||||
{8DD8AB7D-2EA6-44E3-8265-BAF08E832951} = {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}
|
||||
{B6808F71-30B4-4499-8FF6-0B1C86391842} = {B6808F71-30B4-4499-8FF6-0B1C86391842}
|
||||
{D24D94F6-2A74-480C-B512-629C306CE92F} = {D24D94F6-2A74-480C-B512-629C306CE92F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "test\tests\tests.vcxproj", "{62B020FA-E4FB-4C6E-B32A-DC999470F155}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B6808F71-30B4-4499-8FF6-0B1C86391842} = {B6808F71-30B4-4499-8FF6-0B1C86391842}
|
||||
{8DD8AB7D-2EA6-44E3-8265-BAF08E832951} = {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}
|
||||
{7A9A57D5-7006-4208-A290-5491BA3C8808} = {7A9A57D5-7006-4208-A290-5491BA3C8808}
|
||||
{8DD8AB7D-2EA6-44E3-8265-BAF08E832951} = {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}
|
||||
{B6808F71-30B4-4499-8FF6-0B1C86391842} = {B6808F71-30B4-4499-8FF6-0B1C86391842}
|
||||
{D24D94F6-2A74-480C-B512-629C306CE92F} = {D24D94F6-2A74-480C-B512-629C306CE92F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
@@ -31,6 +31,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openrct2-cli", "src\openrct
|
||||
{D24D94F6-2A74-480C-B512-629C306CE92F} = {D24D94F6-2A74-480C-B512-629C306CE92F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openrct2-data", "src\openrct2-data\openrct2-data.vcxproj", "{70EEED2D-2344-4F28-87B7-3EFC4E78B923}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{7A9A57D5-7006-4208-A290-5491BA3C8808} = {7A9A57D5-7006-4208-A290-5491BA3C8808}
|
||||
{8DD8AB7D-2EA6-44E3-8265-BAF08E832951} = {8DD8AB7D-2EA6-44E3-8265-BAF08E832951}
|
||||
{B6808F71-30B4-4499-8FF6-0B1C86391842} = {B6808F71-30B4-4499-8FF6-0B1C86391842}
|
||||
{D24D94F6-2A74-480C-B512-629C306CE92F} = {D24D94F6-2A74-480C-B512-629C306CE92F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|arm64 = Debug|arm64
|
||||
@@ -134,6 +142,24 @@ Global
|
||||
{B6808F71-30B4-4499-8FF6-0B1C86391842}.ReleaseLTCG|Win32.Build.0 = ReleaseLTCG|Win32
|
||||
{B6808F71-30B4-4499-8FF6-0B1C86391842}.ReleaseLTCG|x64.ActiveCfg = ReleaseLTCG|x64
|
||||
{B6808F71-30B4-4499-8FF6-0B1C86391842}.ReleaseLTCG|x64.Build.0 = ReleaseLTCG|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Debug|arm64.ActiveCfg = Debug|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Debug|arm64.Build.0 = Debug|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Debug|x64.Build.0 = Debug|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Release|arm64.ActiveCfg = Release|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Release|arm64.Build.0 = Release|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Release|Win32.Build.0 = Release|Win32
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Release|x64.ActiveCfg = Release|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.Release|x64.Build.0 = Release|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.ReleaseLTCG|arm64.ActiveCfg = Release|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.ReleaseLTCG|arm64.Build.0 = Release|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.ReleaseLTCG|Win32.ActiveCfg = Release|Win32
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.ReleaseLTCG|Win32.Build.0 = Release|Win32
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.ReleaseLTCG|x64.ActiveCfg = Release|x64
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923}.ReleaseLTCG|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -144,6 +170,7 @@ Global
|
||||
{62B020FA-E4FB-4C6E-B32A-DC999470F155} = {480B577D-4E4A-4757-9A42-28A9AD33E6B0}
|
||||
{8DD8AB7D-2EA6-44E3-8265-BAF08E832951} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB}
|
||||
{B6808F71-30B4-4499-8FF6-0B1C86391842} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB}
|
||||
{70EEED2D-2344-4F28-87B7-3EFC4E78B923} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {AE225595-70B7-4580-92EF-6F2B461EBFC7}
|
||||
|
||||
170
src/openrct2-data/openrct2-data.vcxproj
Normal file
170
src/openrct2-data/openrct2-data.vcxproj
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|arm64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>arm64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseLTCG|arm64">
|
||||
<Configuration>ReleaseLTCG</Configuration>
|
||||
<Platform>arm64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseLTCG|Win32">
|
||||
<Configuration>ReleaseLTCG</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseLTCG|x64">
|
||||
<Configuration>ReleaseLTCG</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|arm64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>arm64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{70eeed2d-2344-4f28-87b7-3efc4e78b923}</ProjectGuid>
|
||||
<RootNamespace>openrct2-data</RootNamespace>
|
||||
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\..\openrct2.common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetName>openrct2-data</TargetName>
|
||||
<LibraryPath>$(SolutionDir)bin;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Asset Definitions -->
|
||||
<ItemGroup>
|
||||
<!-- G2 Input (single file) -->
|
||||
<G2Input Include="$(SolutionDir)resources\g2\sprites.json" />
|
||||
|
||||
<!-- Language Files -->
|
||||
<LanguageFiles Include="$(SolutionDir)data\language\**\*"
|
||||
Exclude="$(SolutionDir)data\language\*.bak;
|
||||
$(SolutionDir)data\language\*.tmp" />
|
||||
|
||||
<!-- Shader Files -->
|
||||
<ShaderFiles Include="$(SolutionDir)data\shaders\**\*"
|
||||
Exclude="$(SolutionDir)data\shaders\*.bak;
|
||||
$(SolutionDir)data\shaders\*.tmp" />
|
||||
|
||||
<!-- Scenario Patches -->
|
||||
<ScenarioPatchFiles Include="$(SolutionDir)data\scenario_patches\**\*"
|
||||
Exclude="$(SolutionDir)data\scenario_patches\*.bak;
|
||||
$(SolutionDir)data\scenario_patches\*.tmp" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Language Files -->
|
||||
<Target Name="CopyLanguageFiles"
|
||||
AfterTargets="Build"
|
||||
BeforeTargets="CopyShaders;CopyScenarioPatches;BuildG2"
|
||||
Inputs="@(LanguageFiles)"
|
||||
Outputs="@(LanguageFiles->'$(OutDir)data\language\%(RecursiveDir)%(Filename)%(Extension)')">
|
||||
|
||||
<MakeDir Directories="@(LanguageFiles->'$(OutDir)data\language\%(RecursiveDir)')" />
|
||||
|
||||
<Copy SourceFiles="@(LanguageFiles)"
|
||||
DestinationFiles="@(LanguageFiles->'$(OutDir)data\language\%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
SkipUnchangedFiles="true"
|
||||
OverwriteReadOnlyFiles="true"
|
||||
Retries="3">
|
||||
<Output TaskParameter="CopiedFiles" ItemName="CopiedLangFiles" />
|
||||
</Copy>
|
||||
|
||||
<Message
|
||||
Text="Copied: %(CopiedLangFiles.RecursiveDir)%(CopiedLangFiles.Filename)%(CopiedLangFiles.Extension)"
|
||||
Importance="high"
|
||||
Condition="'@(CopiedLangFiles)' != ''" />
|
||||
</Target>
|
||||
|
||||
<!-- Shader Files -->
|
||||
<Target Name="CopyShaders"
|
||||
AfterTargets="CopyLanguageFiles"
|
||||
BeforeTargets="CopyScenarioPatches;BuildG2"
|
||||
Inputs="@(ShaderFiles)"
|
||||
Outputs="@(ShaderFiles->'$(OutDir)data\shaders\%(RecursiveDir)%(Filename)%(Extension)')">
|
||||
|
||||
<MakeDir Directories="@(ShaderFiles->'$(OutDir)data\shaders\%(RecursiveDir)')" />
|
||||
|
||||
<Copy SourceFiles="@(ShaderFiles)"
|
||||
DestinationFiles="@(ShaderFiles->'$(OutDir)data\shaders\%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
SkipUnchangedFiles="true"
|
||||
OverwriteReadOnlyFiles="true"
|
||||
Retries="3">
|
||||
<Output TaskParameter="CopiedFiles" ItemName="CopiedShaderFiles" />
|
||||
</Copy>
|
||||
|
||||
<Message
|
||||
Text="Copied: %(CopiedShaderFiles.RecursiveDir)%(CopiedShaderFiles.Filename)%(CopiedShaderFiles.Extension)"
|
||||
Importance="high"
|
||||
Condition="'@(CopiedShaderFiles)' != ''" />
|
||||
</Target>
|
||||
|
||||
<!-- Scenario Patches -->
|
||||
<Target Name="CopyScenarioPatches"
|
||||
AfterTargets="CopyShaders"
|
||||
BeforeTargets="BuildG2"
|
||||
Inputs="@(ScenarioPatchFiles)"
|
||||
Outputs="@(ScenarioPatchFiles->'$(OutDir)data\scenario_patches\%(RecursiveDir)%(Filename)%(Extension)')">
|
||||
|
||||
<MakeDir Directories="@(ScenarioPatchFiles->'$(OutDir)data\scenario_patches\%(RecursiveDir)')" />
|
||||
|
||||
<Copy SourceFiles="@(ScenarioPatchFiles)"
|
||||
DestinationFiles="@(ScenarioPatchFiles->'$(OutDir)data\scenario_patches\%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
SkipUnchangedFiles="true"
|
||||
OverwriteReadOnlyFiles="true"
|
||||
Retries="3">
|
||||
<Output TaskParameter="CopiedFiles" ItemName="CopiedScenarioFiles" />
|
||||
</Copy>
|
||||
|
||||
<Message
|
||||
Text="Copied: %(CopiedScenarioFiles.RecursiveDir)%(CopiedScenarioFiles.Filename)%(CopiedScenarioFiles.Extension)"
|
||||
Importance="high"
|
||||
Condition="'@(CopiedScenarioFiles)' != ''" />
|
||||
</Target>
|
||||
|
||||
<!-- G2 Build -->
|
||||
<Target Name="BuildG2"
|
||||
AfterTargets="CopyScenarioPatches"
|
||||
Inputs="@(G2Input)"
|
||||
Outputs="$(OutDir)data\g2.dat">
|
||||
|
||||
<MakeDir Directories="$(OutDir)data" />
|
||||
|
||||
<Exec
|
||||
Command=""$(OutDir)openrct2-cli.exe" sprite build "$(OutDir)data\g2.dat" "%(G2Input.FullPath)""
|
||||
ConsoleToMSBuild="true"
|
||||
IgnoreExitCode="false">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="G2BuildOutput" />
|
||||
</Exec>
|
||||
|
||||
<Touch Files="$(OutDir)data\g2.dat"
|
||||
ForceTouch="true"
|
||||
AlwaysCreate="true" />
|
||||
</Target>
|
||||
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
</Project>
|
||||
Reference in New Issue
Block a user