2022-03-07 00:32:19 +00:00
|
|
|
local jsonProcessor = auRequire("Core/JSON").projectBase
|
2021-11-13 08:31:32 +00:00
|
|
|
|
|
|
|
-------------------------------------------------------
|
2022-01-17 22:12:51 +00:00
|
|
|
-- globals
|
2021-11-13 08:31:32 +00:00
|
|
|
-------------------------------------------------------
|
2022-01-17 22:12:51 +00:00
|
|
|
_auProjects = {}
|
|
|
|
_auProjectsBlocked = {}
|
|
|
|
_auNamespacesEmitted = {}
|
|
|
|
_auResolvedDep = {}
|
|
|
|
_auCurrentProject = {}
|
2022-03-18 04:56:28 +00:00
|
|
|
_auCurrentBaseProject = nil
|
2024-01-29 12:32:06 +00:00
|
|
|
_auRefGuardStart = false
|
2022-03-04 17:05:38 +00:00
|
|
|
_auFatalMsg = {}
|
2024-01-29 12:32:06 +00:00
|
|
|
_auLinkGuard = {}
|
|
|
|
_auRefGuard = {}
|
2021-11-13 08:31:32 +00:00
|
|
|
|
|
|
|
-------------------------------------------------------
|
2022-01-17 22:12:51 +00:00
|
|
|
-- utils
|
2021-11-13 08:31:32 +00:00
|
|
|
-------------------------------------------------------
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local function normalizeSourceRoot(path)
|
2021-11-13 08:31:32 +00:00
|
|
|
local backup = path
|
|
|
|
path = os.realpath(_G.path.join(os.getcwd(), path));
|
|
|
|
if (not path) then
|
|
|
|
print("path error, not found?", backup)
|
|
|
|
return
|
|
|
|
end
|
|
|
|
return path
|
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local function extendInfo(this)
|
2023-07-02 13:26:33 +00:00
|
|
|
if (not this.projectType) then return end
|
2021-11-13 08:31:32 +00:00
|
|
|
local type = this.projectType:lower()
|
|
|
|
this.isShared = type == "sharedlib"
|
|
|
|
this.isStatic = type == "staticlib"
|
|
|
|
this.isExec = type == "consoleapp" or type == 'windowedapp'
|
|
|
|
this.isConsole = type == "consoleapp"
|
|
|
|
this.isWindowed = type == "windowedapp"
|
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
-------------------------------------------------------
|
|
|
|
-- project loading
|
|
|
|
-------------------------------------------------------
|
|
|
|
|
|
|
|
local function addVisit(ina)
|
2021-11-13 08:31:32 +00:00
|
|
|
local args = {
|
|
|
|
namespace = ina.namespace,
|
|
|
|
name = ina.name, -- OPT: recommended
|
|
|
|
path = ina.path,
|
|
|
|
type = ina.type,
|
|
|
|
out = ina.out,
|
2022-01-17 19:40:31 +00:00
|
|
|
options = ina.options,
|
2021-11-13 08:31:32 +00:00
|
|
|
translations = ina.translations -- OPT: dictionary of dependency maps
|
|
|
|
}
|
|
|
|
|
|
|
|
local path = normalizeSourceRoot(args.path)
|
|
|
|
if (not path) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local info = {
|
|
|
|
namespace = args.namespace,
|
|
|
|
path = path,
|
|
|
|
projectType = args.type,
|
|
|
|
out = args.out,
|
|
|
|
name = args.name,
|
2022-01-17 19:40:31 +00:00
|
|
|
translations = args.translations,
|
|
|
|
options = args.options
|
2021-11-13 08:31:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extendInfo(info)
|
|
|
|
|
|
|
|
local project = {
|
|
|
|
info = info,
|
|
|
|
processor = nil,
|
|
|
|
deps = {}
|
|
|
|
}
|
|
|
|
|
|
|
|
local cwd = auGetRoot()
|
|
|
|
|
|
|
|
local remoteLua = path .. "/Aurora.lua"
|
|
|
|
local remoteJson = path .. "/Aurora.json"
|
2023-12-12 15:39:36 +00:00
|
|
|
local localJson = Aurora.Settings.sAbsRepoScripts .. "/" .. args.name .. ".aurora.json"
|
|
|
|
local localLua = Aurora.Settings.sAbsRepoScripts .. "/" .. args.name .. ".aurora.lua"
|
2021-11-13 08:31:32 +00:00
|
|
|
|
|
|
|
if (os.isfile(localLua)) then
|
|
|
|
project.processor = auRequireAbs(localLua)(info)
|
|
|
|
elseif (os.isfile(localJson)) then
|
|
|
|
info.jpath = localJson
|
|
|
|
project.processor = jsonProcessor(info)
|
|
|
|
elseif (os.isfile(remoteLua)) then
|
|
|
|
project.processor = auRequireAbs(remoteLua)(info)
|
|
|
|
elseif (os.isfile(remoteJson)) then
|
|
|
|
info.jpath = remoteJson
|
|
|
|
project.processor = jsonProcessor(info)
|
|
|
|
else
|
|
|
|
print("Couldnt find Aurora build script for: ", path)
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2022-01-17 19:40:31 +00:00
|
|
|
auRequire("Core").project.expendBaseProcessor(project)
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
_auProjects[info.name] = project
|
2021-11-13 08:31:32 +00:00
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
|
|
|
|
local function addScript(ina)
|
2021-11-13 08:31:32 +00:00
|
|
|
local args = {
|
|
|
|
namespace = ina.namespace,
|
|
|
|
script = ina.script,
|
|
|
|
path = ina.path,
|
|
|
|
type = ina.type,
|
2022-01-17 19:40:31 +00:00
|
|
|
out = ina.out,
|
|
|
|
options = ina.options,
|
|
|
|
translations = ina.translations
|
2021-11-13 08:31:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
local path = normalizeSourceRoot(args.path)
|
|
|
|
if (not path) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local info = {
|
|
|
|
namespace = args.namespace,
|
|
|
|
path = path,
|
|
|
|
projectType = args.type,
|
2022-01-17 19:40:31 +00:00
|
|
|
out = args.out,
|
|
|
|
translations = args.translations,
|
|
|
|
options = args.options
|
2021-11-13 08:31:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extendInfo(info)
|
|
|
|
|
|
|
|
local project = {
|
|
|
|
info = info,
|
|
|
|
processor = nil,
|
|
|
|
deps = {}
|
|
|
|
}
|
|
|
|
|
|
|
|
local procesor = userRequire(args.script)
|
|
|
|
if (not procesor) then
|
|
|
|
processor = auRequireAbs(args.script)
|
|
|
|
if (not procesor) then
|
|
|
|
print("missing project script:", args.script, path)
|
|
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
project.processor = procesor(info)
|
|
|
|
if (not project.processor) then
|
|
|
|
print("script error")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
_auProjects[info.name] = project
|
2021-11-13 08:31:32 +00:00
|
|
|
end
|
|
|
|
|
2022-01-19 11:48:44 +00:00
|
|
|
local function pushProjectState(name, path, callback)
|
|
|
|
local cwd = os.getcwd()
|
|
|
|
local old = _auCurrentProject
|
|
|
|
|
|
|
|
_auCurrentProject = name
|
|
|
|
os.chdir(path)
|
|
|
|
|
|
|
|
callback()
|
|
|
|
|
|
|
|
os.chdir(cwd)
|
|
|
|
_auCurrentProject = old
|
|
|
|
end
|
|
|
|
|
|
|
|
local function pushProject(project, callback)
|
|
|
|
pushProjectState(project.info.name, project.info.path, callback)
|
|
|
|
end
|
|
|
|
|
2021-11-13 08:31:32 +00:00
|
|
|
-- private
|
2022-01-17 22:12:51 +00:00
|
|
|
local function processInit(project)
|
|
|
|
if (project.isInitialized) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
project.isInitialized = true
|
2021-11-13 08:31:32 +00:00
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
if (project.processor.init) then
|
2022-01-19 11:48:44 +00:00
|
|
|
pushProject(project, function()
|
|
|
|
project.processor:init()
|
|
|
|
end)
|
2021-11-13 08:31:32 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
-- private
|
2022-01-17 22:12:51 +00:00
|
|
|
local function initializeDependencyTree(proj, resolveProject)
|
2021-11-13 08:31:32 +00:00
|
|
|
local name = proj.info.name
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
_auResolvedDep[name] = name
|
2021-11-13 08:31:32 +00:00
|
|
|
|
|
|
|
if (not proj.resolvedDeps) then
|
|
|
|
if (proj.processor.resolveDependencies) then
|
2022-01-19 11:48:44 +00:00
|
|
|
pushProject(proj, function()
|
2022-03-18 04:56:28 +00:00
|
|
|
local depRecursive = _auFatalMsg.deps or {}
|
|
|
|
_auFatalMsg.deps = depRecursive
|
|
|
|
|
|
|
|
local strA = "starting resolve dependencies" .. name
|
|
|
|
_auFatalMsg[strA] = nil
|
|
|
|
proj.processor:resolveDependencies(function(name, soft)
|
|
|
|
_auFatalMsg[strA] = nil
|
|
|
|
|
|
|
|
table.insert(proj.deps, name)
|
|
|
|
|
|
|
|
if (_auResolvedDep[name]) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local projRootName = (auGetBaseProjectName() or auGetCurrentProject() or "")
|
|
|
|
local strB = "starting resolve specific " .. name .. " for " .. projRootName
|
|
|
|
local i = #depRecursive + 1
|
|
|
|
depRecursive[i] = strB
|
|
|
|
|
|
|
|
local depProj = _auProjects[name]
|
|
|
|
if (not depProj) then
|
|
|
|
if (not soft) then
|
|
|
|
auFatal("missing dependency: ", name)
|
|
|
|
else
|
|
|
|
return false
|
2021-11-13 08:31:32 +00:00
|
|
|
end
|
2022-03-18 04:56:28 +00:00
|
|
|
end
|
2022-01-19 11:48:44 +00:00
|
|
|
|
2022-03-18 04:56:28 +00:00
|
|
|
initializeDependencyTree(depProj, true)
|
|
|
|
depRecursive[i] = nil
|
2022-01-19 11:48:44 +00:00
|
|
|
end)
|
2021-11-13 08:31:32 +00:00
|
|
|
end)
|
|
|
|
end
|
|
|
|
proj.resolvedDeps = true
|
|
|
|
end
|
|
|
|
|
|
|
|
processInit(proj)
|
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local processProject = {}
|
2021-11-13 08:31:32 +00:00
|
|
|
-- private
|
2022-01-17 22:12:51 +00:00
|
|
|
local function processNS(namespace)
|
2021-11-13 08:31:32 +00:00
|
|
|
local projs = {}
|
|
|
|
local projsIdxs = {}
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
auForEach(_auProjects, function(proj)
|
2021-11-13 08:31:32 +00:00
|
|
|
if (proj.info.namespace ~= namespace) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local name = proj.info.name
|
|
|
|
projs[name] = proj
|
|
|
|
|
|
|
|
table.insert(projsIdxs, name)
|
|
|
|
end)
|
|
|
|
|
|
|
|
table.sort(projsIdxs, function(a, b)
|
|
|
|
return a:upper() < b:upper()
|
|
|
|
end)
|
|
|
|
|
2022-01-19 11:48:44 +00:00
|
|
|
|
|
|
|
_auFatalMsg = {}
|
|
|
|
_auFatalMsg["starting dependency tree"] = namespace
|
|
|
|
|
2021-11-13 08:31:32 +00:00
|
|
|
auForEach(projsIdxs, function(idx)
|
2022-01-17 22:12:51 +00:00
|
|
|
initializeDependencyTree(projs[idx], true)
|
2021-11-13 08:31:32 +00:00
|
|
|
end)
|
|
|
|
|
2022-01-19 11:48:44 +00:00
|
|
|
|
|
|
|
_auFatalMsg = {}
|
|
|
|
_auFatalMsg["starting projects"] = namespace
|
2021-11-13 08:31:32 +00:00
|
|
|
auForEach(projsIdxs, function(idx)
|
2022-01-19 23:19:17 +00:00
|
|
|
_auLinkGuard = {}
|
2024-01-29 12:32:06 +00:00
|
|
|
_auRefGuard = {}
|
|
|
|
_auLinkGuard[projs[idx].info.name] = {}
|
|
|
|
_auRefGuard[projs[idx].info.name] = {}
|
2022-01-17 22:12:51 +00:00
|
|
|
processProject(projs[idx].info.name)
|
2021-11-13 08:31:32 +00:00
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local function processSolution()
|
2021-11-13 08:31:32 +00:00
|
|
|
local hack = {}
|
|
|
|
|
|
|
|
local hackIdx = {}
|
2022-01-17 22:12:51 +00:00
|
|
|
auForEach(_auProjects, function(proj)
|
2021-11-13 08:31:32 +00:00
|
|
|
table.insert(hackIdx, proj.info.namespace)
|
|
|
|
end)
|
|
|
|
|
|
|
|
table.sort(hackIdx, function(a, b)
|
|
|
|
return a:upper() < b:upper()
|
|
|
|
end)
|
|
|
|
|
|
|
|
auForEach(hackIdx, processNS)
|
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local function attemptNS(ns)
|
2021-11-13 08:31:32 +00:00
|
|
|
local attemptLoad = false
|
2022-01-17 22:12:51 +00:00
|
|
|
if (not _auNamespacesEmitted[ns]) then
|
2021-11-13 08:31:32 +00:00
|
|
|
auStartGroup(ns) -- only print the group once
|
|
|
|
|
|
|
|
attemptLoad = true
|
|
|
|
end
|
|
|
|
|
|
|
|
group(ns)
|
|
|
|
return attemptLoad
|
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
processProject = function(name, required, noNs)
|
2022-01-19 11:48:44 +00:00
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local a = _auProjects[name]
|
2021-11-13 08:31:32 +00:00
|
|
|
if (not a) then
|
|
|
|
if (required) then
|
|
|
|
auFatal("missing project: ", name)
|
|
|
|
else
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2022-01-20 15:53:31 +00:00
|
|
|
local oldBaeProjName = _auCurrentBaseProject
|
|
|
|
_auCurrentBaseProject = name;
|
|
|
|
|
2021-11-13 08:31:32 +00:00
|
|
|
-- ensure the project is initializd
|
|
|
|
processInit(a)
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
-- recursion protection
|
|
|
|
if (_auProjectsBlocked[name]) then
|
2022-01-20 15:53:31 +00:00
|
|
|
_auCurrentBaseProject = oldBaeProjName
|
2021-11-13 08:31:32 +00:00
|
|
|
return true
|
|
|
|
end
|
2022-01-17 22:12:51 +00:00
|
|
|
_auProjectsBlocked[name] = name
|
2021-11-13 08:31:32 +00:00
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
-- process all within the namespace before processing the requested project
|
2021-11-13 08:31:32 +00:00
|
|
|
local ns = a.info.namespace
|
|
|
|
local loadOthers = attemptNS(ns)
|
|
|
|
|
2022-01-19 11:48:44 +00:00
|
|
|
pushProject(a, function()
|
|
|
|
_auFatalMsg = {}
|
|
|
|
_auFatalMsg["processing project"] = a.info.name
|
2022-01-17 22:12:51 +00:00
|
|
|
a.processor:process()
|
2022-03-04 17:05:38 +00:00
|
|
|
_auFatalMsg = {}
|
2022-01-19 11:48:44 +00:00
|
|
|
end)
|
2021-11-13 08:31:32 +00:00
|
|
|
|
|
|
|
-- cont
|
|
|
|
if (loadOthers) then
|
2022-01-17 22:12:51 +00:00
|
|
|
_auNamespacesEmitted[ns] = "";
|
2021-11-13 08:31:32 +00:00
|
|
|
processNS(ns)
|
|
|
|
end
|
|
|
|
|
2022-01-20 15:53:31 +00:00
|
|
|
_auCurrentBaseProject = oldBaeProjName
|
|
|
|
|
2021-11-13 08:31:32 +00:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
function isWeakCircularReference(depName)
|
2022-01-17 22:12:51 +00:00
|
|
|
local dep = _auProjects[depName]
|
2021-11-13 08:31:32 +00:00
|
|
|
if (not dep) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
-- TODO: recursion
|
|
|
|
for index, value in ipairs(dep.deps) do
|
2022-01-20 15:53:31 +00:00
|
|
|
if (value == _auCurrentProject or value == _auCurrentBaseProject) then
|
2021-11-13 08:31:32 +00:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local function isProjectLoaded(name)
|
|
|
|
local a = _auProjects[name]
|
2021-11-13 08:31:32 +00:00
|
|
|
if (not a) then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
return a.isInitialized
|
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local function getProjectProcessor(name)
|
2021-11-13 08:31:32 +00:00
|
|
|
if (not name) then
|
|
|
|
return
|
|
|
|
end
|
2022-01-17 22:12:51 +00:00
|
|
|
local scre = _auProjects[name]
|
2021-11-13 08:31:32 +00:00
|
|
|
if (not scre) then
|
|
|
|
return
|
|
|
|
end
|
2022-01-17 22:12:51 +00:00
|
|
|
return scre.processor
|
2021-11-13 08:31:32 +00:00
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local function getCurrentProjectName()
|
|
|
|
return _auCurrentProject
|
2021-11-13 08:31:32 +00:00
|
|
|
end
|
|
|
|
|
2022-01-20 15:53:31 +00:00
|
|
|
local function getBaseProjectName()
|
|
|
|
return _auCurrentBaseProject
|
|
|
|
end
|
|
|
|
|
2022-01-19 23:19:17 +00:00
|
|
|
local function includeAuProject(dep, soft)
|
|
|
|
local processor = getProjectProcessor(dep)
|
|
|
|
if (not processor) then
|
|
|
|
return false
|
|
|
|
end
|
2021-11-13 08:31:32 +00:00
|
|
|
|
2022-01-19 23:19:17 +00:00
|
|
|
local processor = getProjectProcessor(dep)
|
|
|
|
if (not processor) then
|
|
|
|
return false
|
|
|
|
end
|
2021-11-13 08:31:32 +00:00
|
|
|
|
2022-01-19 23:19:17 +00:00
|
|
|
local a = _auProjects[dep]
|
|
|
|
if (not a) then
|
|
|
|
if (not soft) then
|
|
|
|
auFatal("missing project: ", dep)
|
|
|
|
else
|
|
|
|
return false
|
|
|
|
end
|
2022-01-17 19:40:31 +00:00
|
|
|
end
|
2024-01-29 12:32:06 +00:00
|
|
|
|
|
|
|
local linkStart = false
|
2021-11-13 08:31:32 +00:00
|
|
|
|
2024-01-29 12:32:06 +00:00
|
|
|
if (auGetCurrentProjectMeta()) then
|
|
|
|
if (_auRefGuard[dep] ) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
_auRefGuard[dep] = dep
|
|
|
|
end
|
|
|
|
|
|
|
|
if (not _auRefGuardStart) then
|
|
|
|
_auRefGuardStart = true
|
|
|
|
linkStart = true
|
|
|
|
end
|
|
|
|
|
2022-01-19 23:19:17 +00:00
|
|
|
pushProject(a, function()
|
|
|
|
_auFatalMsg["processing project ref"] = a.info.name
|
2022-03-04 17:05:38 +00:00
|
|
|
processor:handleReference(isWeakCircularReference(dep))
|
|
|
|
_auFatalMsg["processing project ref"] = nil
|
2022-01-19 23:19:17 +00:00
|
|
|
end)
|
2024-01-29 12:32:06 +00:00
|
|
|
|
|
|
|
if (linkStart) then
|
|
|
|
_auRefGuard = {}
|
|
|
|
_auRefGuardStart = false
|
|
|
|
end
|
|
|
|
|
2021-11-13 08:31:32 +00:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local function linkAuProject(dep, soft)
|
2022-01-19 23:19:17 +00:00
|
|
|
local processor = getProjectProcessor(dep)
|
|
|
|
if (not processor) then
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
|
|
|
|
local a = _auProjects[dep]
|
|
|
|
if (not a) then
|
|
|
|
if (not soft) then
|
|
|
|
auFatal("missing project: ", dep)
|
|
|
|
else
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2022-03-07 23:49:57 +00:00
|
|
|
local linkStart = false
|
|
|
|
|
2022-02-18 09:08:35 +00:00
|
|
|
if (auGetCurrentProjectMeta()) then
|
|
|
|
if (_auLinkGuard[dep] ) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
_auLinkGuard[dep] = dep
|
2022-01-17 19:40:31 +00:00
|
|
|
end
|
2022-02-18 09:08:35 +00:00
|
|
|
|
2022-03-07 23:49:57 +00:00
|
|
|
if (not _auLinkGuardStart) then
|
|
|
|
_auLinkGuardStart = true
|
|
|
|
linkStart = true
|
|
|
|
end
|
|
|
|
|
2022-03-08 20:46:36 +00:00
|
|
|
if (auGetBaseProjectName() ~= dep) then
|
|
|
|
|
|
|
|
dependson(dep)
|
|
|
|
|
|
|
|
--if (not processor:getMeta().isStatic) then
|
|
|
|
pushProject(a, function()
|
|
|
|
_auFatalMsg["processing project link"] = a.info.name
|
|
|
|
processor:handleLink()
|
|
|
|
_auFatalMsg["processing project link"] = nil
|
|
|
|
end)
|
|
|
|
--end
|
|
|
|
end
|
2022-01-19 23:19:17 +00:00
|
|
|
|
2022-03-07 23:49:57 +00:00
|
|
|
|
|
|
|
if (linkStart) then
|
|
|
|
_auLinkGuard = {}
|
|
|
|
_auLinkGuardStart = false
|
|
|
|
end
|
2021-11-13 08:31:32 +00:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
2022-01-19 23:19:17 +00:00
|
|
|
local function importAndLinkProject(dep, soft)
|
|
|
|
includeAuProject(dep, soft)
|
|
|
|
|
2022-02-18 09:08:35 +00:00
|
|
|
local this = auGetCurrentProjectMeta()
|
|
|
|
if (this) then
|
|
|
|
if (this.isStatic) then
|
|
|
|
return true
|
|
|
|
end
|
2022-01-19 23:19:17 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
linkAuProject(dep, soft)
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
local function addFeature(feature)
|
2022-01-18 20:48:06 +00:00
|
|
|
--print("adding feature ", feature)
|
|
|
|
|
2023-12-12 15:39:36 +00:00
|
|
|
local script = Aurora.Settings.sAbsScripts .. "/Features/" .. feature:lower() .. ".lua"
|
2021-11-13 08:31:32 +00:00
|
|
|
|
|
|
|
if (not os.isfile(script)) then
|
|
|
|
auFatal("missing feature", feature, script)
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
auRequireAbs(script)()
|
2022-01-17 22:12:51 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
|
|
|
addVisit = addVisit,
|
|
|
|
addScript = addScript,
|
|
|
|
addFeature = addFeature,
|
|
|
|
linkAuProject = linkAuProject,
|
|
|
|
includeAuProject = includeAuProject,
|
|
|
|
importAndLinkProject = importAndLinkProject,
|
|
|
|
getProjectProcessor = getProjectProcessor,
|
|
|
|
isProjectLoaded = isProjectLoaded,
|
|
|
|
getCurrentProjectName = getCurrentProjectName,
|
2022-01-20 15:53:31 +00:00
|
|
|
processSolution = processSolution,
|
|
|
|
getBaseProjectName = getBaseProjectName
|
2022-01-17 22:12:51 +00:00
|
|
|
}
|