From 9f5fa6d8e4b4bf18a77c046b43704a27df34391c Mon Sep 17 00:00:00 2001 From: Reece Date: Fri, 2 Jul 2021 06:27:32 +0100 Subject: [PATCH] [+] Linkable libraries can now ask for the dependent to compile a script -> Consider libraries that require some kind of static initialization -> Used for AuroraRuntime c++ allocator overloads [*] Fix copy by abs --- Boilerplate/jsonProcessor.lua | 6 ++++++ Boilerplate/project.lua | 6 +++--- aurora.lua | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Boilerplate/jsonProcessor.lua b/Boilerplate/jsonProcessor.lua index 51b8d52..a7341e7 100644 --- a/Boilerplate/jsonProcessor.lua +++ b/Boilerplate/jsonProcessor.lua @@ -170,9 +170,15 @@ function JsonProcessor(info) forEach(result.actions, handleActionsForLinks, this) end + local handleSourcesRel = function(source, path) + files(path .. "/" .. source) + end + local handleLink = function(this) dependson (this.info.name) + forEach(result.linkSources, handleSourcesRel, info.path) + local erase = false; if (not _G["_linkingcur"]) then erase = true diff --git a/Boilerplate/project.lua b/Boilerplate/project.lua index c79fb58..f21ad60 100644 --- a/Boilerplate/project.lua +++ b/Boilerplate/project.lua @@ -19,13 +19,13 @@ local addDest = function(name, projectType, dest) filter {} else filter "configurations:Debug" - projectCopyCmds(name, projectType, "debug", path) + projectCopyCmds(name, projectType, "debug", dest) filter "configurations:Release" - projectCopyCmds(name, projectType, "release", path) + projectCopyCmds(name, projectType, "release", dest) filter "configurations:Ship" - projectCopyCmds(name, projectType, "ship", path) + projectCopyCmds(name, projectType, "ship", dest) filter {} end diff --git a/aurora.lua b/aurora.lua index d33fca6..2780eb2 100644 --- a/aurora.lua +++ b/aurora.lua @@ -334,6 +334,7 @@ function isWeakCircularReference(depName) return end + -- TODO: recursion for index, value in ipairs(dep.deps) do if value == curName then return true