Add statemap raw files for iw4

This commit is contained in:
Jan
2022-08-13 12:24:07 +02:00
parent 364d801d3f
commit 403d7f2c44
24 changed files with 1374 additions and 0 deletions

View File

@ -19,6 +19,11 @@ function TestFolder()
return path.getrelative(os.getcwd(), _TestFolder)
end
local _RawFolder = path.getabsolute("../../raw")
function RawFolder()
return path.getrelative(os.getcwd(), _RawFolder)
end
-- Target Directories
TargetDirectoryBin = "%{wks.location}/bin/%{cfg.buildcfg}_%{cfg.platform}"
TargetDirectoryLib = "%{wks.location}/lib/%{cfg.buildcfg}_%{cfg.platform}"

52
tools/scripts/raw.lua Normal file
View File

@ -0,0 +1,52 @@
Raw = {}
function Raw:include(includes)
if includes:handle(self:name()) then
Utils:include(includes)
includedirs {
RawFolder()
}
end
end
function Raw:link(links)
end
function Raw:use()
end
function Raw:name()
return "Raw"
end
function Raw:project()
local folder = RawFolder()
project(self:name())
targetdir(TargetDirectoryBin)
location "%{wks.location}/raw"
kind "Utility"
files {
path.join(folder, "*/**"),
path.join(folder, "*/**")
}
vpaths {
["*"] = {
folder
}
}
filter "files:**"
buildmessage 'Copying rawfile %{file.relpath}'
buildcommands {
-- Relpath contains two .. so build/raw is getting reverted in the target path
"cp \"%{file.relpath}\" \"%{cfg.targetdir}/build/raw/%{file.relpath}\""
}
buildoutputs {
"%{cfg.targetdir}/build/raw/%{file.relpath}"
}
filter {}
end