2021-11-13 08:31:32 +00:00
|
|
|
-- private
|
|
|
|
local buildAction = auRequire("Core/Actions")
|
|
|
|
local target = auRequire("Core/Target")
|
2022-03-20 08:01:11 +00:00
|
|
|
local main = auRequire("Core/main")
|
2022-03-05 19:34:41 +00:00
|
|
|
local resourceCompiler = auRequire("Core/ResourceCompiler")
|
2022-03-06 15:17:50 +00:00
|
|
|
local protobuf = auRequire("Core/Protobuf")
|
2022-03-06 17:28:21 +00:00
|
|
|
local vala = auRequire("Core/Vala")
|
2021-11-13 08:31:32 +00:00
|
|
|
|
|
|
|
-- executes inline under iprocessor::process
|
|
|
|
function auAddBuildAction(...)
|
|
|
|
buildAction(...)
|
|
|
|
end
|
|
|
|
|
2022-03-04 17:05:38 +00:00
|
|
|
function auAddBuildActionO(...)
|
2021-11-21 17:23:31 +00:00
|
|
|
local type = {
|
|
|
|
-- stage: pre, post
|
|
|
|
-- filter: ...
|
|
|
|
-- lua/bin/targetName/command: relative path - lua script; relative path - executable; project name; command line
|
|
|
|
-- args: lua private passthrough; binary or target name command args
|
|
|
|
-- cwd: sln(default),prj
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2021-11-13 08:31:32 +00:00
|
|
|
function auStart()
|
|
|
|
if (_auStart) then return end
|
|
|
|
_auStart = true
|
|
|
|
auRequire("Core/base")
|
|
|
|
end
|
|
|
|
|
|
|
|
function auStartSolution(sln)
|
|
|
|
auRequire("Core").solution.start(sln)
|
|
|
|
end
|
|
|
|
|
|
|
|
function auStartProject(project)
|
2021-11-21 17:23:31 +00:00
|
|
|
auStart()
|
2022-01-17 19:40:31 +00:00
|
|
|
auRequire("Core").project.startProject(project)
|
2021-11-13 08:31:32 +00:00
|
|
|
end
|
|
|
|
|
2022-01-17 22:12:51 +00:00
|
|
|
function auProcessSolution()
|
|
|
|
main.processSolution()
|
|
|
|
end
|
|
|
|
|
2021-11-13 08:31:32 +00:00
|
|
|
function auFilterForPlatforms(callback, ...)
|
|
|
|
target.auFilterForPlatforms(callback, ...)
|
|
|
|
end
|
|
|
|
|
|
|
|
function auFilterForConfigs(callback, ...)
|
|
|
|
target.auFilterForConfigs(callback, ...)
|
|
|
|
end
|
|
|
|
|
|
|
|
function auFilterForConfigPlatforms(callback, ...)
|
|
|
|
target.auFilterForConfigPlatforms(callback, ...)
|
|
|
|
end
|
|
|
|
|
2022-01-17 19:40:31 +00:00
|
|
|
function auAddVisit(...)
|
2022-01-17 22:12:51 +00:00
|
|
|
main.addVisit(...)
|
2022-01-17 19:40:31 +00:00
|
|
|
end
|
|
|
|
|
2021-11-13 08:31:32 +00:00
|
|
|
-- Returns an array of filter tables where each optional table is checked against the current combination of config/platform/arch
|
|
|
|
-- Varargs are logical anded with the final filter table
|
|
|
|
-- in object -> defer to objects.lua
|
|
|
|
function auFilterOf(obj, ...)
|
|
|
|
return target.auFilterOf(obj, ...)
|
|
|
|
end
|
|
|
|
|
|
|
|
function auFilterConfig(configs)
|
|
|
|
return auFilterOf({
|
|
|
|
configs = configs
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
function auFilterArch(arch)
|
|
|
|
return auFilterOf({
|
|
|
|
archs = arch
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
function auFilterPlatform(platform)
|
|
|
|
return auFilterOf({
|
|
|
|
platforms = platform
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2021-11-16 11:37:04 +00:00
|
|
|
function auGetSetting(name)
|
|
|
|
return Aurora.Settings[name]
|
2022-01-17 19:40:31 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
_G.filterStack = {}
|
|
|
|
function auFilter(filter)
|
|
|
|
local tbl = _G.filterStack;
|
2022-01-18 21:06:27 +00:00
|
|
|
|
2022-01-17 19:40:31 +00:00
|
|
|
if (not filter or #filter == 0) then
|
|
|
|
table.remove(tbl, #tbl)
|
|
|
|
else
|
|
|
|
table.insert(tbl, filter)
|
|
|
|
end
|
2022-01-19 11:48:44 +00:00
|
|
|
|
2022-01-18 20:48:06 +00:00
|
|
|
local filterArray = {}
|
|
|
|
auForEach(tbl, function(val)
|
|
|
|
filterArray = auMergeArray(filterArray, val)
|
|
|
|
end)
|
|
|
|
|
|
|
|
--print("FILTERING ", json.encode(filterArray), json.encode(filter))
|
|
|
|
_G.filter(filterArray)
|
2022-01-17 19:40:31 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auLinkProject(...)
|
2022-01-17 22:12:51 +00:00
|
|
|
main.linkAuProject(...)
|
2022-01-17 19:40:31 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auIncludeProject(...)
|
2022-01-17 22:12:51 +00:00
|
|
|
main.includeAuProject(...)
|
2022-01-17 19:40:31 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auLinkAndRefProject(...)
|
2022-01-17 22:12:51 +00:00
|
|
|
main.importAndLinkProject(...)
|
2022-01-17 19:40:31 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auAddFeature(...)
|
2022-01-17 22:12:51 +00:00
|
|
|
main.addFeature(...)
|
2022-01-17 20:19:09 +00:00
|
|
|
end
|
|
|
|
|
2022-01-20 15:53:31 +00:00
|
|
|
function auGetBaseProjectName()
|
|
|
|
return main.getBaseProjectName()
|
|
|
|
end
|
|
|
|
|
2022-01-17 20:19:09 +00:00
|
|
|
function auGetCurrentProject()
|
2022-01-17 22:12:51 +00:00
|
|
|
return main.getCurrentProjectName()
|
|
|
|
end
|
|
|
|
|
|
|
|
function auGetProjectProcessor(name)
|
|
|
|
return main.getProjectProcessor(name)
|
|
|
|
end
|
|
|
|
|
|
|
|
function auGetProjectMeta(name)
|
|
|
|
local processor = auGetProjectProcessor(name)
|
|
|
|
if (not processor) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
return processor:getMeta()
|
2022-01-17 20:19:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auGetCurrentProjectProcessor()
|
2022-01-17 22:12:51 +00:00
|
|
|
return main.getProjectProcessor(auGetCurrentProject())
|
2022-01-17 20:19:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auGetCurrentProjectMeta()
|
2022-02-18 09:08:35 +00:00
|
|
|
local temp = auGetCurrentProjectProcessor()
|
2022-03-05 19:34:41 +00:00
|
|
|
if (not temp) then return end
|
2022-01-17 20:19:09 +00:00
|
|
|
return auGetCurrentProjectProcessor():getMeta()
|
|
|
|
end
|
|
|
|
|
|
|
|
function auIsProjectIntialized(name)
|
2022-01-17 22:12:51 +00:00
|
|
|
return main.isProjectLoaded(name)
|
2022-01-17 20:19:09 +00:00
|
|
|
end
|
2022-03-05 19:34:41 +00:00
|
|
|
|
|
|
|
function auAddResource(...)
|
|
|
|
resourceCompiler(...)
|
2022-03-06 15:17:50 +00:00
|
|
|
end
|
|
|
|
|
2022-06-24 19:12:03 +00:00
|
|
|
function auProtobufFiles(files, extended)
|
|
|
|
protobuf.addProtobufFiles(files, extended)
|
2022-06-23 15:53:39 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auProtobufIncludeProject(projectName)
|
|
|
|
protobuf.linkProject(projectName)
|
2022-03-06 17:28:21 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auAddVala(info)
|
|
|
|
vala(info)
|
2022-03-20 08:01:11 +00:00
|
|
|
end
|