From 034de70bbc5b8ef46606a86200d588faf3197921 Mon Sep 17 00:00:00 2001 From: Jan Date: Fri, 25 Oct 2019 02:13:37 +0200 Subject: [PATCH] Add code generation on compiling to premake scripts using custom build commands --- premake5.lua | 7 + src/Crypto.lua | 8 +- src/Linker.lua | 4 + src/Unlinker.lua | 4 + src/Utils.lua | 8 +- src/ZoneCode.lua | 168 +++++++++++++ src/ZoneCode/{ => Game}/Common.h | 0 .../T6_Load.gen => ZoneCode/Game/T6/T6.gen} | 0 src/ZoneCode/{ => Game}/T6/T6.h | 2 +- src/ZoneCode/{ => Game}/T6/T6_Commands.txt | 0 src/ZoneCodeGenerator.lua | 17 +- .../Generating/CodeGenerator.cs | 24 +- .../Generating/TemplateGroupResources.cs | 4 +- .../Parsing/C_Header/HeaderReader.cs | 4 +- src/ZoneCommon.lua | 4 + src/ZoneLoading.lua | 17 +- src/ZoneLoading/Game/T6/ContentLoaderT6.cpp | 96 +++---- src/ZoneWriting.lua | 6 + test/ZoneCodeGeneratorTests.lua | 10 +- test/ZoneCommonTests.lua | 18 +- test/ZoneCommonTests/.gitkeep | 0 .../Game/T6/XAssets/T6_AssetStructTests.gen | 1 - test/ZoneCommonTests/ZoneCommonTests.vcxproj | 236 ------------------ thirdparty/libtomcrypt.lua | 8 +- thirdparty/libtommath.lua | 8 +- thirdparty/salsa20.lua | 8 +- thirdparty/zlib.lua | 8 +- 27 files changed, 345 insertions(+), 325 deletions(-) create mode 100644 src/ZoneCode.lua rename src/ZoneCode/{ => Game}/Common.h (100%) rename src/{ZoneLoading/Game/T6/XAssets/T6_Load.gen => ZoneCode/Game/T6/T6.gen} (100%) rename src/ZoneCode/{ => Game}/T6/T6.h (57%) rename src/ZoneCode/{ => Game}/T6/T6_Commands.txt (100%) create mode 100644 test/ZoneCommonTests/.gitkeep delete mode 100644 test/ZoneCommonTests/Game/T6/XAssets/T6_AssetStructTests.gen delete mode 100644 test/ZoneCommonTests/ZoneCommonTests.vcxproj diff --git a/premake5.lua b/premake5.lua index 89902ab3..86d3a032 100644 --- a/premake5.lua +++ b/premake5.lua @@ -1,4 +1,9 @@ -- Functions for locating commonly used folders +local _BuildFolder = path.getabsolute("build") +function BuildFolder() + return path.getrelative(os.getcwd(), _BuildFolder) +end + local _ThirdPartyFolder = path.getabsolute("thirdparty") function ThirdPartyFolder() return path.getrelative(os.getcwd(), _ThirdPartyFolder) @@ -89,6 +94,7 @@ include "src/Crypto.lua" include "src/Linker.lua" include "src/Unlinker.lua" include "src/Utils.lua" +include "src/ZoneCode.lua" include "src/ZoneCodeGenerator.lua" include "src/ZoneCommon.lua" include "src/ZoneLoading.lua" @@ -98,6 +104,7 @@ include "src/ZoneWriting.lua" group "Components" Crypto:project() Utils:project() + ZoneCode:project() ZoneCodeGenerator:project() ZoneCommon:project() ZoneLoading:project() diff --git a/src/Crypto.lua b/src/Crypto.lua index b4985876..78495fef 100644 --- a/src/Crypto.lua +++ b/src/Crypto.lua @@ -10,9 +10,11 @@ function Crypto:link() libtomcrypt:link() libtommath:link() salsa20:link() - links { - "Crypto" - } + links "Crypto" +end + +function Crypto:use() + end function Crypto:project() diff --git a/src/Linker.lua b/src/Linker.lua index 2c65c05b..ab117f46 100644 --- a/src/Linker.lua +++ b/src/Linker.lua @@ -10,6 +10,10 @@ function Linker:link() end +function Linker:use() + dependson "Linker" +end + function Linker:project() local folder = ProjectFolder(); diff --git a/src/Unlinker.lua b/src/Unlinker.lua index 6ad77144..361ba609 100644 --- a/src/Unlinker.lua +++ b/src/Unlinker.lua @@ -10,6 +10,10 @@ function Unlinker:link() end +function Unlinker:use() + dependson "Unlinker" +end + function Unlinker:project() local folder = ProjectFolder(); diff --git a/src/Utils.lua b/src/Utils.lua index 3965f0a9..3000b415 100644 --- a/src/Utils.lua +++ b/src/Utils.lua @@ -7,9 +7,11 @@ function Utils:include() end function Utils:link() - links { - "Utils" - } + links "Utils" +end + +function Utils:use() + end function Utils:project() diff --git a/src/ZoneCode.lua b/src/ZoneCode.lua new file mode 100644 index 00000000..a03e4185 --- /dev/null +++ b/src/ZoneCode.lua @@ -0,0 +1,168 @@ +ZoneCode = {} + +ZoneCode.Assets = { + T6 = { + "PhysPreset", + "PhysConstraints", + "DestructibleDef", + "XAnimParts", + "XModel", + "Material", + "MaterialTechniqueSet", + "GfxImage", + "SndBank", + "SndPatch", + "clipMap_t", + "ComWorld", + "GameWorldSp", + "GameWorldMp", + "MapEnts", + "GfxWorld", + "GfxLightDef", + "Font_s", + "FontIcon", + "MenuList", + "menuDef_t", + "LocalizeEntry", + "WeaponVariantDef", + "WeaponAttachment", + "WeaponAttachmentUnique", + "WeaponCamo", + "SndDriverGlobals", + "FxEffectDef", + "FxImpactTable", + "RawFile", + "StringTable", + "LeaderboardDef", + "XGlobals", + "ddlRoot_t", + "Glasses", + "EmblemSet", + "ScriptParseTree", + "KeyValuePairs", + "VehicleDef", + "MemoryBlock", + "AddonMapEnts", + "TracerDef", + "SkinnedVertsDef", + "Qdb", + "Slug", + "FootstepTableDef", + "FootstepFXTableDef", + "ZBarrierDef" + } +} + +function ZoneCode:outputForAssets(assetList) + for i = 1, #assetList do + local assetNameLower = string.lower(assetList[i]) + buildoutputs { + "%{wks.location}/src/ZoneCode/Game/%{file.basename}/XAssets/" .. assetNameLower .. "/" .. assetNameLower .. "_load_db.cpp", + "%{wks.location}/src/ZoneCode/Game/%{file.basename}/XAssets/" .. assetNameLower .. "/" .. assetNameLower .. "_load_db.h", + "%{wks.location}/src/ZoneCode/Game/%{file.basename}/XAssets/" .. assetNameLower .. "/" .. assetNameLower .. "_write_db.cpp", + "%{wks.location}/src/ZoneCode/Game/%{file.basename}/XAssets/" .. assetNameLower .. "/" .. assetNameLower .. "_write_db.h", + "%{wks.location}/src/ZoneCode/Game/%{file.basename}/XAssets/" .. assetNameLower .. "/" .. assetNameLower .. "_struct_test.cpp", + } + end +end + +function ZoneCode:allTestFiles() + result = {} + + for game, assets in pairs(self.Assets) do + for i, assetName in ipairs(assets) do + local assetNameLower = string.lower(assetName) + table.insert(result, "%{wks.location}/src/ZoneCode/Game/" .. game .. "/XAssets/" .. assetNameLower .. "/" .. assetNameLower .. "_struct_test.cpp") + end + end + + return result +end + +function ZoneCode:allLoadFiles() + result = {} + + for game, assets in pairs(self.Assets) do + for i, assetName in ipairs(assets) do + local assetNameLower = string.lower(assetName) + table.insert(result, "%{wks.location}/src/ZoneCode/Game/" .. game .. "/XAssets/" .. assetNameLower .. "/" .. assetNameLower .. "_load_db.cpp") + table.insert(result, "%{wks.location}/src/ZoneCode/Game/" .. game .. "/XAssets/" .. assetNameLower .. "/" .. assetNameLower .. "_load_db.h") + end + end + + return result +end + +function ZoneCode:allWriteFiles() + result = {} + + for game, assets in pairs(self.Assets) do + for i, assetName in ipairs(assets) do + local assetNameLower = string.lower(assetName) + table.insert(result, "%{wks.location}/src/ZoneCode/Game/" .. game .. "/XAssets/" .. assetNameLower .. "/" .. assetNameLower .. "_write_db.cpp") + table.insert(result, "%{wks.location}/src/ZoneCode/Game/" .. game .. "/XAssets/" .. assetNameLower .. "/" .. assetNameLower .. "_write_db.h") + end + end + + return result +end + +function ZoneCode:include() + includedirs { + path.join(ProjectFolder(), "ZoneCode"), + "%{wks.location}/src/ZoneCode" + } +end + +function ZoneCode:link() + +end + +function ZoneCode:use() + dependson "ZoneCode" +end + +function ZoneCode:project() + local folder = ProjectFolder(); + + project "ZoneCode" + targetdir(TargetDirectoryLib) + location "%{wks.location}/src/%{prj.name}" + kind "Utility" + + files { + path.join(folder, "ZoneCode/**.gen"), + path.join(folder, "ZoneCode/**.h"), + path.join(folder, "ZoneCode/**_Commands.txt") + } + + vpaths { + ["*"] = { + path.join(folder, "ZoneCode") + } + } + + ZoneCodeGenerator:use() + + filter "files:**.gen" + buildmessage "Generating ZoneCode for game %{file.basename}" + buildcommands { + '"' .. TargetDirectoryLib .. '/ZoneCodeGenerator.exe"' + .. ' -h "' .. path.join(path.getabsolute(ProjectFolder()), 'ZoneCode/Game/%{file.basename}/%{file.basename}.h') .. '"' + .. ' -e "' .. path.join(path.getabsolute(ProjectFolder()), 'ZoneCode/Game/%{file.basename}/%{file.basename}_Commands.txt') .. '"' + .. ' -o "%{wks.location}/src/ZoneCode/Game/%{file.basename}/XAssets"' + .. ' -g * ZoneLoad' + .. ' -g * ZoneWrite' + .. ' -g * AssetStructTests' + } + buildinputs { + path.join(ProjectFolder(), "ZoneCode/Game/%{file.basename}/%{file.basename}.h"), + path.join(ProjectFolder(), "ZoneCode/Game/%{file.basename}/%{file.basename}_Commands.txt"), + TargetDirectoryLib .. "/ZoneCodeGenerator.exe" + } + filter {} + + filter "files:**/T6.gen" + self:outputForAssets(self.Assets.T6) + filter {} +end diff --git a/src/ZoneCode/Common.h b/src/ZoneCode/Game/Common.h similarity index 100% rename from src/ZoneCode/Common.h rename to src/ZoneCode/Game/Common.h diff --git a/src/ZoneLoading/Game/T6/XAssets/T6_Load.gen b/src/ZoneCode/Game/T6/T6.gen similarity index 100% rename from src/ZoneLoading/Game/T6/XAssets/T6_Load.gen rename to src/ZoneCode/Game/T6/T6.gen diff --git a/src/ZoneCode/T6/T6.h b/src/ZoneCode/Game/T6/T6.h similarity index 57% rename from src/ZoneCode/T6/T6.h rename to src/ZoneCode/Game/T6/T6.h index eb9c9498..5adc2463 100644 --- a/src/ZoneCode/T6/T6.h +++ b/src/ZoneCode/Game/T6/T6.h @@ -3,6 +3,6 @@ // Entry point for T6 code generation #include "../Common.h" -#include "../../ZoneCommon/Game/T6/T6_Assets.h" +#include "../../../ZoneCommon/Game/T6/T6_Assets.h" // EOF \ No newline at end of file diff --git a/src/ZoneCode/T6/T6_Commands.txt b/src/ZoneCode/Game/T6/T6_Commands.txt similarity index 100% rename from src/ZoneCode/T6/T6_Commands.txt rename to src/ZoneCode/Game/T6/T6_Commands.txt diff --git a/src/ZoneCodeGenerator.lua b/src/ZoneCodeGenerator.lua index bfdb1c12..fd8b7cbf 100644 --- a/src/ZoneCodeGenerator.lua +++ b/src/ZoneCodeGenerator.lua @@ -5,25 +5,32 @@ function ZoneCodeGenerator:include() end function ZoneCodeGenerator:link() - links { - "ZoneCodeGenerator" - } + links "ZoneCodeGenerator" +end + +function ZoneCodeGenerator:use() + dependson "ZoneCodeGenerator" end function ZoneCodeGenerator:project() local folder = ProjectFolder(); project "ZoneCodeGenerator" - targetdir(TargetDirectoryBin) + targetdir(TargetDirectoryLib) location "%{wks.location}/src/%{prj.name}" kind "ConsoleApp" language "C#" namespace "ZoneCodeGenerator" files { - path.join(folder, "ZoneCodeGenerator/**.cs") + path.join(folder, "ZoneCodeGenerator/**.cs"), + path.join(folder, "ZoneCodeGenerator/**.stg") } + filter "files:**.stg" + buildaction "Embed" + filter {} + vpaths { ["*"] = "src/ZoneCodeGenerator" } nuget { diff --git a/src/ZoneCodeGenerator/Generating/CodeGenerator.cs b/src/ZoneCodeGenerator/Generating/CodeGenerator.cs index d1dfb6ce..4e4f68c1 100644 --- a/src/ZoneCodeGenerator/Generating/CodeGenerator.cs +++ b/src/ZoneCodeGenerator/Generating/CodeGenerator.cs @@ -31,7 +31,7 @@ namespace ZoneCodeGenerator.Generating "ZoneWrite", new GeneratorPreset("$asset/$asset_write_db", "ZoneWrite.stg") }, { - "AssetStructTests", new GeneratorPreset("$asset_struct_test", "AssetStructTests.stg") + "AssetStructTests", new GeneratorPreset("$asset/$asset_struct_test", "AssetStructTests.stg") } }; @@ -40,7 +40,10 @@ namespace ZoneCodeGenerator.Generating public static bool GenerateCodeForPreset(string presetName, StructureInformation asset, CUISession session) { if (!presets.ContainsKey(presetName)) + { + Console.WriteLine($"Unknown preset '{presetName}'"); return false; + } var preset = presets[presetName]; @@ -67,12 +70,19 @@ namespace ZoneCodeGenerator.Generating var renderingContext = RenderingContext.BuildContext(session, asset); if (renderingContext == null) + { + Console.WriteLine("Building rendering context failed"); return false; + } + + if (!codeTemplate.HasHeaderTemplate && !codeTemplate.HasSourceTemplate) + { + Console.WriteLine($"Preset '{presetName}' does not have a header or a source! This is weird."); + return false; + } - var generatedCode = false; if (codeTemplate.HasHeaderTemplate) { - generatedCode = true; using (var fileStream = new FileStream(fullPath + ".h", FileMode.Create)) { codeTemplate.RenderHeaderFile(fileStream, renderingContext); @@ -82,7 +92,6 @@ namespace ZoneCodeGenerator.Generating if (codeTemplate.HasSourceTemplate) { - generatedCode = true; using (var fileStream = new FileStream(fullPath + ".cpp", FileMode.Create)) { codeTemplate.RenderSourceFile(fileStream, renderingContext); @@ -90,10 +99,13 @@ namespace ZoneCodeGenerator.Generating } } - return generatedCode; + return true; } - catch (Exception) + catch (Exception e) { + Console.WriteLine("An exception occured while trying to generate code"); + Console.WriteLine(e.GetType().Name); + Console.WriteLine(e.Message); return false; } } diff --git a/src/ZoneCodeGenerator/Generating/TemplateGroupResources.cs b/src/ZoneCodeGenerator/Generating/TemplateGroupResources.cs index 7cf048a8..dd640c87 100644 --- a/src/ZoneCodeGenerator/Generating/TemplateGroupResources.cs +++ b/src/ZoneCodeGenerator/Generating/TemplateGroupResources.cs @@ -82,8 +82,8 @@ namespace ZoneCodeGenerator.Generating { if (resourceStream == null) { - if (Verbose) - Console.WriteLine($"Resource '{fileName}' doesn't exist"); + Console.WriteLine($"Resource '{fileName}' doesn't exist"); + Console.WriteLine("The following files do exist: " + string.Join(", ", Assembly.GetExecutingAssembly().GetManifestResourceNames())); return; } diff --git a/src/ZoneCodeGenerator/Parsing/C_Header/HeaderReader.cs b/src/ZoneCodeGenerator/Parsing/C_Header/HeaderReader.cs index ef865577..23f035f0 100644 --- a/src/ZoneCodeGenerator/Parsing/C_Header/HeaderReader.cs +++ b/src/ZoneCodeGenerator/Parsing/C_Header/HeaderReader.cs @@ -56,8 +56,10 @@ namespace ZoneCodeGenerator.Parsing.C_Header return dataRepository; } } - catch (IOException) + catch (IOException e) { + Console.WriteLine("An exception occured while trying to read header file"); + Console.WriteLine(e.Message); return null; } } diff --git a/src/ZoneCommon.lua b/src/ZoneCommon.lua index 9d9350c5..9df310a4 100644 --- a/src/ZoneCommon.lua +++ b/src/ZoneCommon.lua @@ -12,6 +12,10 @@ function ZoneCommon:link() } end +function ZoneCommon:use() + +end + function ZoneCommon:project() local folder = ProjectFolder(); diff --git a/src/ZoneLoading.lua b/src/ZoneLoading.lua index 6e92281f..e8cea1b1 100644 --- a/src/ZoneLoading.lua +++ b/src/ZoneLoading.lua @@ -17,6 +17,10 @@ function ZoneLoading:link() } end +function ZoneLoading:use() + +end + function ZoneLoading:project() local folder = ProjectFolder(); @@ -28,11 +32,22 @@ function ZoneLoading:project() files { path.join(folder, "ZoneLoading/**.h"), - path.join(folder, "ZoneLoading/**.cpp") + path.join(folder, "ZoneLoading/**.cpp"), + ZoneCode:allLoadFiles() + } + + vpaths { + ["*"] = { + path.join(folder, "ZoneLoading"), + path.join(BuildFolder(), "src/ZoneCode") + } } self:include() Crypto:include() Utils:include() zlib:include() + ZoneCode:include() + + ZoneCode:use() end diff --git a/src/ZoneLoading/Game/T6/ContentLoaderT6.cpp b/src/ZoneLoading/Game/T6/ContentLoaderT6.cpp index 9f66ec8d..47101221 100644 --- a/src/ZoneLoading/Game/T6/ContentLoaderT6.cpp +++ b/src/ZoneLoading/Game/T6/ContentLoaderT6.cpp @@ -4,54 +4,54 @@ #include -#include "XAssets/gen/addonmapents/addonmapents_load_db.h" -#include "XAssets/gen/clipmap_t/clipmap_t_load_db.h" -#include "XAssets/gen/comworld/comworld_load_db.h" -#include "XAssets/gen/ddlroot_t/ddlroot_t_load_db.h" -#include "XAssets/gen/destructibledef/destructibledef_load_db.h" -#include "XAssets/gen/emblemset/emblemset_load_db.h" -#include "XAssets/gen/font_s/font_s_load_db.h" -#include "XAssets/gen/fonticon/fonticon_load_db.h" -#include "XAssets/gen/footstepfxtabledef/footstepfxtabledef_load_db.h" -#include "XAssets/gen/footsteptabledef/footsteptabledef_load_db.h" -#include "XAssets/gen/fxeffectdef/fxeffectdef_load_db.h" -#include "XAssets/gen/fximpacttable/fximpacttable_load_db.h" -#include "XAssets/gen/gameworldmp/gameworldmp_load_db.h" -#include "XAssets/gen/gameworldsp/gameworldsp_load_db.h" -#include "XAssets/gen/gfximage/gfximage_load_db.h" -#include "XAssets/gen/gfxlightdef/gfxlightdef_load_db.h" -#include "XAssets/gen/gfxworld/gfxworld_load_db.h" -#include "XAssets/gen/glasses/glasses_load_db.h" -#include "XAssets/gen/keyvaluepairs/keyvaluepairs_load_db.h" -#include "XAssets/gen/leaderboarddef/leaderboarddef_load_db.h" -#include "XAssets/gen/localizeentry/localizeentry_load_db.h" -#include "XAssets/gen/mapents/mapents_load_db.h" -#include "XAssets/gen/material/material_load_db.h" -#include "XAssets/gen/materialtechniqueset/materialtechniqueset_load_db.h" -#include "XAssets/gen/memoryblock/memoryblock_load_db.h" -#include "XAssets/gen/menudef_t/menudef_t_load_db.h" -#include "XAssets/gen/menulist/menulist_load_db.h" -#include "XAssets/gen/physconstraints/physconstraints_load_db.h" -#include "XAssets/gen/physpreset/physpreset_load_db.h" -#include "XAssets/gen/qdb/qdb_load_db.h" -#include "XAssets/gen/rawfile/rawfile_load_db.h" -#include "XAssets/gen/scriptparsetree/scriptparsetree_load_db.h" -#include "XAssets/gen/skinnedvertsdef/skinnedvertsdef_load_db.h" -#include "XAssets/gen/slug/slug_load_db.h" -#include "XAssets/gen/sndbank/sndbank_load_db.h" -#include "XAssets/gen/snddriverglobals/snddriverglobals_load_db.h" -#include "XAssets/gen/sndpatch/sndpatch_load_db.h" -#include "XAssets/gen/stringtable/stringtable_load_db.h" -#include "XAssets/gen/tracerdef/tracerdef_load_db.h" -#include "XAssets/gen/vehicledef/vehicledef_load_db.h" -#include "XAssets/gen/weaponattachment/weaponattachment_load_db.h" -#include "XAssets/gen/weaponattachmentunique/weaponattachmentunique_load_db.h" -#include "XAssets/gen/weaponcamo/weaponcamo_load_db.h" -#include "XAssets/gen/weaponvariantdef/weaponvariantdef_load_db.h" -#include "XAssets/gen/xanimparts/xanimparts_load_db.h" -#include "XAssets/gen/xglobals/xglobals_load_db.h" -#include "XAssets/gen/xmodel/xmodel_load_db.h" -#include "XAssets/gen/zbarrierdef/zbarrierdef_load_db.h" +#include "Game/T6/XAssets/addonmapents/addonmapents_load_db.h" +#include "Game/T6/XAssets/clipmap_t/clipmap_t_load_db.h" +#include "Game/T6/XAssets/comworld/comworld_load_db.h" +#include "Game/T6/XAssets/ddlroot_t/ddlroot_t_load_db.h" +#include "Game/T6/XAssets/destructibledef/destructibledef_load_db.h" +#include "Game/T6/XAssets/emblemset/emblemset_load_db.h" +#include "Game/T6/XAssets/font_s/font_s_load_db.h" +#include "Game/T6/XAssets/fonticon/fonticon_load_db.h" +#include "Game/T6/XAssets/footstepfxtabledef/footstepfxtabledef_load_db.h" +#include "Game/T6/XAssets/footsteptabledef/footsteptabledef_load_db.h" +#include "Game/T6/XAssets/fxeffectdef/fxeffectdef_load_db.h" +#include "Game/T6/XAssets/fximpacttable/fximpacttable_load_db.h" +#include "Game/T6/XAssets/gameworldmp/gameworldmp_load_db.h" +#include "Game/T6/XAssets/gameworldsp/gameworldsp_load_db.h" +#include "Game/T6/XAssets/gfximage/gfximage_load_db.h" +#include "Game/T6/XAssets/gfxlightdef/gfxlightdef_load_db.h" +#include "Game/T6/XAssets/gfxworld/gfxworld_load_db.h" +#include "Game/T6/XAssets/glasses/glasses_load_db.h" +#include "Game/T6/XAssets/keyvaluepairs/keyvaluepairs_load_db.h" +#include "Game/T6/XAssets/leaderboarddef/leaderboarddef_load_db.h" +#include "Game/T6/XAssets/localizeentry/localizeentry_load_db.h" +#include "Game/T6/XAssets/mapents/mapents_load_db.h" +#include "Game/T6/XAssets/material/material_load_db.h" +#include "Game/T6/XAssets/materialtechniqueset/materialtechniqueset_load_db.h" +#include "Game/T6/XAssets/memoryblock/memoryblock_load_db.h" +#include "Game/T6/XAssets/menudef_t/menudef_t_load_db.h" +#include "Game/T6/XAssets/menulist/menulist_load_db.h" +#include "Game/T6/XAssets/physconstraints/physconstraints_load_db.h" +#include "Game/T6/XAssets/physpreset/physpreset_load_db.h" +#include "Game/T6/XAssets/qdb/qdb_load_db.h" +#include "Game/T6/XAssets/rawfile/rawfile_load_db.h" +#include "Game/T6/XAssets/scriptparsetree/scriptparsetree_load_db.h" +#include "Game/T6/XAssets/skinnedvertsdef/skinnedvertsdef_load_db.h" +#include "Game/T6/XAssets/slug/slug_load_db.h" +#include "Game/T6/XAssets/sndbank/sndbank_load_db.h" +#include "Game/T6/XAssets/snddriverglobals/snddriverglobals_load_db.h" +#include "Game/T6/XAssets/sndpatch/sndpatch_load_db.h" +#include "Game/T6/XAssets/stringtable/stringtable_load_db.h" +#include "Game/T6/XAssets/tracerdef/tracerdef_load_db.h" +#include "Game/T6/XAssets/vehicledef/vehicledef_load_db.h" +#include "Game/T6/XAssets/weaponattachment/weaponattachment_load_db.h" +#include "Game/T6/XAssets/weaponattachmentunique/weaponattachmentunique_load_db.h" +#include "Game/T6/XAssets/weaponcamo/weaponcamo_load_db.h" +#include "Game/T6/XAssets/weaponvariantdef/weaponvariantdef_load_db.h" +#include "Game/T6/XAssets/xanimparts/xanimparts_load_db.h" +#include "Game/T6/XAssets/xglobals/xglobals_load_db.h" +#include "Game/T6/XAssets/xmodel/xmodel_load_db.h" +#include "Game/T6/XAssets/zbarrierdef/zbarrierdef_load_db.h" using namespace T6; diff --git a/src/ZoneWriting.lua b/src/ZoneWriting.lua index bd266ccb..8948f9fc 100644 --- a/src/ZoneWriting.lua +++ b/src/ZoneWriting.lua @@ -17,6 +17,10 @@ function ZoneWriting:link() } end +function ZoneWriting:use() + +end + function ZoneWriting:project() local folder = ProjectFolder(); @@ -35,4 +39,6 @@ function ZoneWriting:project() Crypto:include() Utils:include() zlib:include() + + ZoneCode:use() end diff --git a/test/ZoneCodeGeneratorTests.lua b/test/ZoneCodeGeneratorTests.lua index bd2496ef..839faefc 100644 --- a/test/ZoneCodeGeneratorTests.lua +++ b/test/ZoneCodeGeneratorTests.lua @@ -5,7 +5,11 @@ function ZoneCodeGeneratorTests:include() end function ZoneCodeGeneratorTests:link() - + links "ZoneCommonTests" +end + +function ZoneCodeGeneratorTests:use() + end function ZoneCodeGeneratorTests:project() @@ -32,9 +36,7 @@ function ZoneCodeGeneratorTests:project() links { "System", "System.Core", - "System.Data", - "Moq", - "MSTest.TestFramework" + "System.Data" } ZoneCodeGenerator:link() diff --git a/test/ZoneCommonTests.lua b/test/ZoneCommonTests.lua index 5610d318..7c7eec6e 100644 --- a/test/ZoneCommonTests.lua +++ b/test/ZoneCommonTests.lua @@ -5,7 +5,11 @@ function ZoneCommonTests:include() end function ZoneCommonTests:link() - + links "ZoneCommonTests" +end + +function ZoneCommonTests:use() + end function ZoneCommonTests:project() @@ -19,11 +23,21 @@ function ZoneCommonTests:project() files { path.join(folder, "ZoneCommonTests/**.h"), - path.join(folder, "ZoneCommonTests/**.cpp") + path.join(folder, "ZoneCommonTests/**.cpp"), + ZoneCode:allTestFiles() + } + + vpaths { + ["*"] = { + path.join(folder, "ZoneCommonTests"), + path.join(BuildFolder(), "src/ZoneCode") + } } self:include() ZoneCommon:include() ZoneCommon:link() + + ZoneCode:use() end diff --git a/test/ZoneCommonTests/.gitkeep b/test/ZoneCommonTests/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test/ZoneCommonTests/Game/T6/XAssets/T6_AssetStructTests.gen b/test/ZoneCommonTests/Game/T6/XAssets/T6_AssetStructTests.gen deleted file mode 100644 index ae5e7c26..00000000 --- a/test/ZoneCommonTests/Game/T6/XAssets/T6_AssetStructTests.gen +++ /dev/null @@ -1 +0,0 @@ -# This file exists for automatically generating tests to ensure the asset structs match their intended sizes, alignments and offsets \ No newline at end of file diff --git a/test/ZoneCommonTests/ZoneCommonTests.vcxproj b/test/ZoneCommonTests/ZoneCommonTests.vcxproj deleted file mode 100644 index 06443e82..00000000 --- a/test/ZoneCommonTests/ZoneCommonTests.vcxproj +++ /dev/null @@ -1,236 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {D85EBA7C-442B-4627-AEB9-6B5965DDC449} - Win32Proj - ZoneCommonTests - 10.0 - NativeUnitTestProject - - - - DynamicLibrary - true - v142 - Unicode - false - - - DynamicLibrary - false - v142 - true - Unicode - false - - - DynamicLibrary - true - v142 - Unicode - false - - - DynamicLibrary - false - v142 - true - Unicode - false - - - - - - - - - - - - - - - - - - - - - true - $(SolutionDir)bin\$(Configuration)_$(Platform)\tests\ - $(SolutionDir)obj\$(ProjectName)\$(Configuration)_$(Platform)\ - - - true - $(SolutionDir)bin\$(Configuration)_$(Platform)\tests\ - $(SolutionDir)obj\$(ProjectName)\$(Configuration)_$(Platform)\ - - - true - $(SolutionDir)bin\$(Configuration)_$(Platform)\tests\ - $(SolutionDir)obj\$(ProjectName)\$(Configuration)_$(Platform)\ - - - true - $(SolutionDir)bin\$(Configuration)_$(Platform)\tests\ - $(SolutionDir)obj\$(ProjectName)\$(Configuration)_$(Platform)\ - - - - Level3 - Disabled - $(VCInstallDir)UnitTest\include;$(SolutionDir)src\ZoneCommon;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) - true - - - Windows - $(VCInstallDir)UnitTest\lib;$(SolutionDir)lib\$(Configuration)_$(Platform)\;%(AdditionalLibraryDirectories) - ZoneCommon.lib;%(AdditionalDependencies) - - - - - Level3 - Disabled - $(VCInstallDir)UnitTest\include;$(SolutionDir)src\ZoneCommon;%(AdditionalIncludeDirectories) - _DEBUG;%(PreprocessorDefinitions) - true - - - Windows - $(VCInstallDir)UnitTest\lib;$(SolutionDir)lib\$(Configuration)_$(Platform)\;%(AdditionalLibraryDirectories) - ZoneCommon.lib;%(AdditionalDependencies) - - - - - Level3 - MaxSpeed - true - true - $(VCInstallDir)UnitTest\include;$(SolutionDir)src\ZoneCommon;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;%(PreprocessorDefinitions) - true - - - Windows - true - true - $(VCInstallDir)UnitTest\lib;$(SolutionDir)lib\$(Configuration)_$(Platform)\;%(AdditionalLibraryDirectories) - ZoneCommon.lib;%(AdditionalDependencies) - - - - - Level3 - MaxSpeed - true - true - $(VCInstallDir)UnitTest\include;$(SolutionDir)src\ZoneCommon;%(AdditionalIncludeDirectories) - NDEBUG;%(PreprocessorDefinitions) - true - - - Windows - true - true - $(VCInstallDir)UnitTest\lib;$(SolutionDir)lib\$(Configuration)_$(Platform)\;%(AdditionalLibraryDirectories) - ZoneCommon.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Document - Generating asset struct tests: %(Filename) - Generating asset struct tests: %(Filename) - Generating asset struct tests: %(Filename) - Generating asset struct tests: %(Filename) - "$(SolutionDir)src\ZoneCodeGenerator\bin\$(Configuration)\ZoneCodeGenerator.exe" -h "$(SolutionDir)src\ZoneCode\T6\T6.h" -e "$(SolutionDir)src\ZoneCode\T6\T6_Commands.txt" -o "%(RelativeDir)gen" -g "*" "AssetStructTests" - "$(SolutionDir)src\ZoneCodeGenerator\bin\$(Configuration)\ZoneCodeGenerator.exe" -h "$(SolutionDir)src\ZoneCode\T6\T6.h" -e "$(SolutionDir)src\ZoneCode\T6\T6_Commands.txt" -o "%(RelativeDir)gen" -g "*" "AssetStructTests" - "$(SolutionDir)src\ZoneCodeGenerator\bin\$(Configuration)\ZoneCodeGenerator.exe" -h "$(SolutionDir)src\ZoneCode\T6\T6.h" -e "$(SolutionDir)src\ZoneCode\T6\T6_Commands.txt" -o "%(RelativeDir)gen" -g "*" "AssetStructTests" - "$(SolutionDir)src\ZoneCodeGenerator\bin\$(Configuration)\ZoneCodeGenerator.exe" -h "$(SolutionDir)src\ZoneCode\T6\T6.h" -e "$(SolutionDir)src\ZoneCode\T6\T6_Commands.txt" -o "%(RelativeDir)gen" -g "*" "AssetStructTests" - $(SolutionDir)src\ZoneCodeGenerator\bin\$(Configuration)\ZoneCodeGenerator.exe;$(SolutionDir)src\ZoneCode\T6\T6.h;$(SolutionDir)src\ZoneCommon\Game\T6\T6_Assets.h;$(SolutionDir)src\ZoneCode\Common.h;$(SolutionDir)src\ZoneCode\T6\T6_Commands.txt;%(AdditionalInputs) - $(SolutionDir)src\ZoneCodeGenerator\bin\$(Configuration)\ZoneCodeGenerator.exe;$(SolutionDir)src\ZoneCode\T6\T6.h;$(SolutionDir)src\ZoneCommon\Game\T6\T6_Assets.h;$(SolutionDir)src\ZoneCode\Common.h;$(SolutionDir)src\ZoneCode\T6\T6_Commands.txt;%(AdditionalInputs) - $(SolutionDir)src\ZoneCodeGenerator\bin\$(Configuration)\ZoneCodeGenerator.exe;$(SolutionDir)src\ZoneCode\T6\T6.h;$(SolutionDir)src\ZoneCommon\Game\T6\T6_Assets.h;$(SolutionDir)src\ZoneCode\Common.h;$(SolutionDir)src\ZoneCode\T6\T6_Commands.txt;%(AdditionalInputs) - $(SolutionDir)src\ZoneCodeGenerator\bin\$(Configuration)\ZoneCodeGenerator.exe;$(SolutionDir)src\ZoneCode\T6\T6.h;$(SolutionDir)src\ZoneCommon\Game\T6\T6_Assets.h;$(SolutionDir)src\ZoneCode\Common.h;$(SolutionDir)src\ZoneCode\T6\T6_Commands.txt;%(AdditionalInputs) - %(RelativeDir)gen\addonmapents_struct_test.cpp;%(RelativeDir)gen\clipmap_t_struct_test.cpp;%(RelativeDir)gen\comworld_struct_test.cpp;%(RelativeDir)gen\ddlroot_t_struct_test.cpp;%(RelativeDir)gen\destructibledef_struct_test.cpp;%(RelativeDir)gen\emblemset_struct_test.cpp;%(RelativeDir)gen\font_s_struct_test.cpp;%(RelativeDir)gen\fonticon_struct_test.cpp;%(RelativeDir)gen\footstepfxtabledef_struct_test.cpp;%(RelativeDir)gen\footsteptabledef_struct_test.cpp;%(RelativeDir)gen\fxeffectdef_struct_test.cpp;%(RelativeDir)gen\fximpacttable_struct_test.cpp;%(RelativeDir)gen\gameworldmp_struct_test.cpp;%(RelativeDir)gen\gameworldsp_struct_test.cpp;%(RelativeDir)gen\gfximage_struct_test.cpp;%(RelativeDir)gen\gfxlightdef_struct_test.cpp;%(RelativeDir)gen\gfxworld_struct_test.cpp;%(RelativeDir)gen\glasses_struct_test.cpp;%(RelativeDir)gen\keyvaluepairs_struct_test.cpp;%(RelativeDir)gen\leaderboarddef_struct_test.cpp;%(RelativeDir)gen\localizeentry_struct_test.cpp;%(RelativeDir)gen\mapents_struct_test.cpp;%(RelativeDir)gen\material_struct_test.cpp;%(RelativeDir)gen\materialtechniqueset_struct_test.cpp;%(RelativeDir)gen\memoryblock_struct_test.cpp;%(RelativeDir)gen\menudef_t_struct_test.cpp;%(RelativeDir)gen\menulist_struct_test.cpp;%(RelativeDir)gen\physconstraints_struct_test.cpp;%(RelativeDir)gen\physpreset_struct_test.cpp;%(RelativeDir)gen\qdb_struct_test.cpp;%(RelativeDir)gen\rawfile_struct_test.cpp;%(RelativeDir)gen\scriptparsetree_struct_test.cpp;%(RelativeDir)gen\skinnedvertsdef_struct_test.cpp;%(RelativeDir)gen\slug_struct_test.cpp;%(RelativeDir)gen\sndbank_struct_test.cpp;%(RelativeDir)gen\snddriverglobals_struct_test.cpp;%(RelativeDir)gen\sndpatch_struct_test.cpp;%(RelativeDir)gen\stringtable_struct_test.cpp;%(RelativeDir)gen\tracerdef_struct_test.cpp;%(RelativeDir)gen\vehicledef_struct_test.cpp;%(RelativeDir)gen\weaponattachment_struct_test.cpp;%(RelativeDir)gen\weaponattachmentunique_struct_test.cpp;%(RelativeDir)gen\weaponcamo_struct_test.cpp;%(RelativeDir)gen\weaponvariantdef_struct_test.cpp;%(RelativeDir)gen\xanimparts_struct_test.cpp;%(RelativeDir)gen\xglobals_struct_test.cpp;%(RelativeDir)gen\xmodel_struct_test.cpp;%(RelativeDir)gen\zbarrierdef_struct_test.cpp;%(Outputs) - %(RelativeDir)gen\addonmapents_struct_test.cpp;%(RelativeDir)gen\clipmap_t_struct_test.cpp;%(RelativeDir)gen\comworld_struct_test.cpp;%(RelativeDir)gen\ddlroot_t_struct_test.cpp;%(RelativeDir)gen\destructibledef_struct_test.cpp;%(RelativeDir)gen\emblemset_struct_test.cpp;%(RelativeDir)gen\font_s_struct_test.cpp;%(RelativeDir)gen\fonticon_struct_test.cpp;%(RelativeDir)gen\footstepfxtabledef_struct_test.cpp;%(RelativeDir)gen\footsteptabledef_struct_test.cpp;%(RelativeDir)gen\fxeffectdef_struct_test.cpp;%(RelativeDir)gen\fximpacttable_struct_test.cpp;%(RelativeDir)gen\gameworldmp_struct_test.cpp;%(RelativeDir)gen\gameworldsp_struct_test.cpp;%(RelativeDir)gen\gfximage_struct_test.cpp;%(RelativeDir)gen\gfxlightdef_struct_test.cpp;%(RelativeDir)gen\gfxworld_struct_test.cpp;%(RelativeDir)gen\glasses_struct_test.cpp;%(RelativeDir)gen\keyvaluepairs_struct_test.cpp;%(RelativeDir)gen\leaderboarddef_struct_test.cpp;%(RelativeDir)gen\localizeentry_struct_test.cpp;%(RelativeDir)gen\mapents_struct_test.cpp;%(RelativeDir)gen\material_struct_test.cpp;%(RelativeDir)gen\materialtechniqueset_struct_test.cpp;%(RelativeDir)gen\memoryblock_struct_test.cpp;%(RelativeDir)gen\menudef_t_struct_test.cpp;%(RelativeDir)gen\menulist_struct_test.cpp;%(RelativeDir)gen\physconstraints_struct_test.cpp;%(RelativeDir)gen\physpreset_struct_test.cpp;%(RelativeDir)gen\qdb_struct_test.cpp;%(RelativeDir)gen\rawfile_struct_test.cpp;%(RelativeDir)gen\scriptparsetree_struct_test.cpp;%(RelativeDir)gen\skinnedvertsdef_struct_test.cpp;%(RelativeDir)gen\slug_struct_test.cpp;%(RelativeDir)gen\sndbank_struct_test.cpp;%(RelativeDir)gen\snddriverglobals_struct_test.cpp;%(RelativeDir)gen\sndpatch_struct_test.cpp;%(RelativeDir)gen\stringtable_struct_test.cpp;%(RelativeDir)gen\tracerdef_struct_test.cpp;%(RelativeDir)gen\vehicledef_struct_test.cpp;%(RelativeDir)gen\weaponattachment_struct_test.cpp;%(RelativeDir)gen\weaponattachmentunique_struct_test.cpp;%(RelativeDir)gen\weaponcamo_struct_test.cpp;%(RelativeDir)gen\weaponvariantdef_struct_test.cpp;%(RelativeDir)gen\xanimparts_struct_test.cpp;%(RelativeDir)gen\xglobals_struct_test.cpp;%(RelativeDir)gen\xmodel_struct_test.cpp;%(RelativeDir)gen\zbarrierdef_struct_test.cpp;%(Outputs) - %(RelativeDir)gen\addonmapents_struct_test.cpp;%(RelativeDir)gen\clipmap_t_struct_test.cpp;%(RelativeDir)gen\comworld_struct_test.cpp;%(RelativeDir)gen\ddlroot_t_struct_test.cpp;%(RelativeDir)gen\destructibledef_struct_test.cpp;%(RelativeDir)gen\emblemset_struct_test.cpp;%(RelativeDir)gen\font_s_struct_test.cpp;%(RelativeDir)gen\fonticon_struct_test.cpp;%(RelativeDir)gen\footstepfxtabledef_struct_test.cpp;%(RelativeDir)gen\footsteptabledef_struct_test.cpp;%(RelativeDir)gen\fxeffectdef_struct_test.cpp;%(RelativeDir)gen\fximpacttable_struct_test.cpp;%(RelativeDir)gen\gameworldmp_struct_test.cpp;%(RelativeDir)gen\gameworldsp_struct_test.cpp;%(RelativeDir)gen\gfximage_struct_test.cpp;%(RelativeDir)gen\gfxlightdef_struct_test.cpp;%(RelativeDir)gen\gfxworld_struct_test.cpp;%(RelativeDir)gen\glasses_struct_test.cpp;%(RelativeDir)gen\keyvaluepairs_struct_test.cpp;%(RelativeDir)gen\leaderboarddef_struct_test.cpp;%(RelativeDir)gen\localizeentry_struct_test.cpp;%(RelativeDir)gen\mapents_struct_test.cpp;%(RelativeDir)gen\material_struct_test.cpp;%(RelativeDir)gen\materialtechniqueset_struct_test.cpp;%(RelativeDir)gen\memoryblock_struct_test.cpp;%(RelativeDir)gen\menudef_t_struct_test.cpp;%(RelativeDir)gen\menulist_struct_test.cpp;%(RelativeDir)gen\physconstraints_struct_test.cpp;%(RelativeDir)gen\physpreset_struct_test.cpp;%(RelativeDir)gen\qdb_struct_test.cpp;%(RelativeDir)gen\rawfile_struct_test.cpp;%(RelativeDir)gen\scriptparsetree_struct_test.cpp;%(RelativeDir)gen\skinnedvertsdef_struct_test.cpp;%(RelativeDir)gen\slug_struct_test.cpp;%(RelativeDir)gen\sndbank_struct_test.cpp;%(RelativeDir)gen\snddriverglobals_struct_test.cpp;%(RelativeDir)gen\sndpatch_struct_test.cpp;%(RelativeDir)gen\stringtable_struct_test.cpp;%(RelativeDir)gen\tracerdef_struct_test.cpp;%(RelativeDir)gen\vehicledef_struct_test.cpp;%(RelativeDir)gen\weaponattachment_struct_test.cpp;%(RelativeDir)gen\weaponattachmentunique_struct_test.cpp;%(RelativeDir)gen\weaponcamo_struct_test.cpp;%(RelativeDir)gen\weaponvariantdef_struct_test.cpp;%(RelativeDir)gen\xanimparts_struct_test.cpp;%(RelativeDir)gen\xglobals_struct_test.cpp;%(RelativeDir)gen\xmodel_struct_test.cpp;%(RelativeDir)gen\zbarrierdef_struct_test.cpp;%(Outputs) - %(RelativeDir)gen\addonmapents_struct_test.cpp;%(RelativeDir)gen\clipmap_t_struct_test.cpp;%(RelativeDir)gen\comworld_struct_test.cpp;%(RelativeDir)gen\ddlroot_t_struct_test.cpp;%(RelativeDir)gen\destructibledef_struct_test.cpp;%(RelativeDir)gen\emblemset_struct_test.cpp;%(RelativeDir)gen\font_s_struct_test.cpp;%(RelativeDir)gen\fonticon_struct_test.cpp;%(RelativeDir)gen\footstepfxtabledef_struct_test.cpp;%(RelativeDir)gen\footsteptabledef_struct_test.cpp;%(RelativeDir)gen\fxeffectdef_struct_test.cpp;%(RelativeDir)gen\fximpacttable_struct_test.cpp;%(RelativeDir)gen\gameworldmp_struct_test.cpp;%(RelativeDir)gen\gameworldsp_struct_test.cpp;%(RelativeDir)gen\gfximage_struct_test.cpp;%(RelativeDir)gen\gfxlightdef_struct_test.cpp;%(RelativeDir)gen\gfxworld_struct_test.cpp;%(RelativeDir)gen\glasses_struct_test.cpp;%(RelativeDir)gen\keyvaluepairs_struct_test.cpp;%(RelativeDir)gen\leaderboarddef_struct_test.cpp;%(RelativeDir)gen\localizeentry_struct_test.cpp;%(RelativeDir)gen\mapents_struct_test.cpp;%(RelativeDir)gen\material_struct_test.cpp;%(RelativeDir)gen\materialtechniqueset_struct_test.cpp;%(RelativeDir)gen\memoryblock_struct_test.cpp;%(RelativeDir)gen\menudef_t_struct_test.cpp;%(RelativeDir)gen\menulist_struct_test.cpp;%(RelativeDir)gen\physconstraints_struct_test.cpp;%(RelativeDir)gen\physpreset_struct_test.cpp;%(RelativeDir)gen\qdb_struct_test.cpp;%(RelativeDir)gen\rawfile_struct_test.cpp;%(RelativeDir)gen\scriptparsetree_struct_test.cpp;%(RelativeDir)gen\skinnedvertsdef_struct_test.cpp;%(RelativeDir)gen\slug_struct_test.cpp;%(RelativeDir)gen\sndbank_struct_test.cpp;%(RelativeDir)gen\snddriverglobals_struct_test.cpp;%(RelativeDir)gen\sndpatch_struct_test.cpp;%(RelativeDir)gen\stringtable_struct_test.cpp;%(RelativeDir)gen\tracerdef_struct_test.cpp;%(RelativeDir)gen\vehicledef_struct_test.cpp;%(RelativeDir)gen\weaponattachment_struct_test.cpp;%(RelativeDir)gen\weaponattachmentunique_struct_test.cpp;%(RelativeDir)gen\weaponcamo_struct_test.cpp;%(RelativeDir)gen\weaponvariantdef_struct_test.cpp;%(RelativeDir)gen\xanimparts_struct_test.cpp;%(RelativeDir)gen\xglobals_struct_test.cpp;%(RelativeDir)gen\xmodel_struct_test.cpp;%(RelativeDir)gen\zbarrierdef_struct_test.cpp;%(Outputs) - - - - - - \ No newline at end of file diff --git a/thirdparty/libtomcrypt.lua b/thirdparty/libtomcrypt.lua index 0bba8232..77eac0d3 100644 --- a/thirdparty/libtomcrypt.lua +++ b/thirdparty/libtomcrypt.lua @@ -11,9 +11,11 @@ function libtomcrypt:include() end function libtomcrypt:link() - links { - "libtomcrypt" - } + links "libtomcrypt" +end + +function libtomcrypt:use() + end function libtomcrypt:project() diff --git a/thirdparty/libtommath.lua b/thirdparty/libtommath.lua index f8cdfaa0..3ae0fa88 100644 --- a/thirdparty/libtommath.lua +++ b/thirdparty/libtommath.lua @@ -7,9 +7,11 @@ function libtommath:include() end function libtommath:link() - links { - "libtommath" - } + links "libtommath" +end + +function libtommath:use() + end function libtommath:project() diff --git a/thirdparty/salsa20.lua b/thirdparty/salsa20.lua index e29563ea..d447faa0 100644 --- a/thirdparty/salsa20.lua +++ b/thirdparty/salsa20.lua @@ -7,9 +7,11 @@ function salsa20:include() end function salsa20:link() - links { - "salsa20" - } + links "salsa20" +end + +function salsa20:use() + end function salsa20:project() diff --git a/thirdparty/zlib.lua b/thirdparty/zlib.lua index 7a749a84..64e19896 100644 --- a/thirdparty/zlib.lua +++ b/thirdparty/zlib.lua @@ -12,9 +12,11 @@ function zlib:include() end function zlib:link() - links { - "zlib" - } + links "zlib" +end + +function zlib:use() + end function zlib:project()