From 9c894fcff7a0501cbb2d673fbc31a09ad29c74bf Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 14 Aug 2024 08:21:02 +0200 Subject: [PATCH] chore: rename zonecode headers to avoid duplicate paths --- src/ZoneCode.lua | 7 +++++-- src/ZoneCode/Game/IW3/{IW3.h => IW3_ZoneCode.h} | 0 src/ZoneCode/Game/IW4/{IW4.h => IW4_ZoneCode.h} | 0 src/ZoneCode/Game/IW5/{IW5.h => IW5_ZoneCode.h} | 0 src/ZoneCode/Game/T5/{T5.h => T5_ZoneCode.h} | 0 src/ZoneCode/Game/T6/{T6.h => T6_ZoneCode.h} | 0 6 files changed, 5 insertions(+), 2 deletions(-) rename src/ZoneCode/Game/IW3/{IW3.h => IW3_ZoneCode.h} (100%) rename src/ZoneCode/Game/IW4/{IW4.h => IW4_ZoneCode.h} (100%) rename src/ZoneCode/Game/IW5/{IW5.h => IW5_ZoneCode.h} (100%) rename src/ZoneCode/Game/T5/{T5.h => T5_ZoneCode.h} (100%) rename src/ZoneCode/Game/T6/{T6.h => T6_ZoneCode.h} (100%) diff --git a/src/ZoneCode.lua b/src/ZoneCode.lua index dd1e07d6..339a7e9d 100644 --- a/src/ZoneCode.lua +++ b/src/ZoneCode.lua @@ -257,6 +257,7 @@ end function ZoneCode:include(includes) if includes:handle(self:name()) then + Common:include(includes) includedirs { path.join(ProjectFolder(), "ZoneCode"), "%{wks.location}/src/ZoneCode" @@ -278,6 +279,7 @@ end function ZoneCode:project() local folder = ProjectFolder() + local includes = Includes:create() project(self:name()) targetdir(TargetDirectoryLib) @@ -296,13 +298,14 @@ function ZoneCode:project() } } + self:include(includes) ZoneCodeGenerator:use() filter "files:**.gen" buildmessage "Generating ZoneCode for game %{file.basename}" buildcommands { '"' .. TargetDirectoryBuildTools .. '/' .. ExecutableByOs('ZoneCodeGenerator') .. '"' - .. ' -h "' .. path.join(path.getabsolute(ProjectFolder()), 'ZoneCode/Game/%{file.basename}/%{file.basename}.h') .. '"' + .. ' -h "' .. path.join(path.getabsolute(ProjectFolder()), 'ZoneCode/Game/%{file.basename}/%{file.basename}_ZoneCode.h') .. '"' .. ' -c "' .. path.join(path.getabsolute(ProjectFolder()), 'ZoneCode/Game/%{file.basename}/%{file.basename}_Commands.txt') .. '"' .. ' -o "%{wks.location}/src/ZoneCode/Game/%{file.basename}/XAssets"' .. ' -g "*" ZoneLoad' @@ -311,7 +314,7 @@ function ZoneCode:project() .. ' -g "*" AssetStructTests' } buildinputs { - path.join(ProjectFolder(), "ZoneCode/Game/%{file.basename}/%{file.basename}.h"), + path.join(ProjectFolder(), "ZoneCode/Game/%{file.basename}/%{file.basename}_ZoneCode.h"), path.join(ProjectFolder(), "ZoneCode/Game/%{file.basename}/%{file.basename}_Commands.txt"), path.join(ProjectFolder(), "Common/Game/%{file.basename}/%{file.basename}_Assets.h"), TargetDirectoryBuildTools .. "/" .. ExecutableByOs('ZoneCodeGenerator') diff --git a/src/ZoneCode/Game/IW3/IW3.h b/src/ZoneCode/Game/IW3/IW3_ZoneCode.h similarity index 100% rename from src/ZoneCode/Game/IW3/IW3.h rename to src/ZoneCode/Game/IW3/IW3_ZoneCode.h diff --git a/src/ZoneCode/Game/IW4/IW4.h b/src/ZoneCode/Game/IW4/IW4_ZoneCode.h similarity index 100% rename from src/ZoneCode/Game/IW4/IW4.h rename to src/ZoneCode/Game/IW4/IW4_ZoneCode.h diff --git a/src/ZoneCode/Game/IW5/IW5.h b/src/ZoneCode/Game/IW5/IW5_ZoneCode.h similarity index 100% rename from src/ZoneCode/Game/IW5/IW5.h rename to src/ZoneCode/Game/IW5/IW5_ZoneCode.h diff --git a/src/ZoneCode/Game/T5/T5.h b/src/ZoneCode/Game/T5/T5_ZoneCode.h similarity index 100% rename from src/ZoneCode/Game/T5/T5.h rename to src/ZoneCode/Game/T5/T5_ZoneCode.h diff --git a/src/ZoneCode/Game/T6/T6.h b/src/ZoneCode/Game/T6/T6_ZoneCode.h similarity index 100% rename from src/ZoneCode/Game/T6/T6.h rename to src/ZoneCode/Game/T6/T6_ZoneCode.h