2022-01-17 19:40:31 +00:00
|
|
|
-- This file serves as pseudo-documentation for json schemas and internal object requirements
|
|
|
|
|
2021-11-13 08:31:32 +00:00
|
|
|
function auEnum(...)
|
|
|
|
return nil
|
|
|
|
end
|
|
|
|
|
2021-11-21 17:23:31 +00:00
|
|
|
function auBuildActionO()
|
|
|
|
return {
|
2022-01-17 19:40:31 +00:00
|
|
|
stage = "post", -- pre, post,
|
2021-11-21 17:23:31 +00:00
|
|
|
-- 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" -- sln, prj
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2021-11-16 12:12:13 +00:00
|
|
|
function auProjectInfoO() -- extends auHeaderProject
|
2021-11-16 13:05:03 +00:00
|
|
|
return auMergeTable(auHeaderProject(), {})
|
2021-11-16 12:12:13 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auBaseProjectO()
|
|
|
|
return {
|
2021-11-16 13:05:03 +00:00
|
|
|
info = auProjectInfoO(),
|
|
|
|
isInitialized = false
|
2021-11-16 12:12:13 +00:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
function auAbstractProjectO() -- extends auBaseProject
|
2021-11-16 13:05:03 +00:00
|
|
|
return auMergeTable(auBaseProject(), {
|
|
|
|
init = function(info, visit) end,
|
2021-11-16 12:12:13 +00:00
|
|
|
process = function(info, visit) end,
|
|
|
|
resolveDependencies = function(this, resolveFunction) end,
|
|
|
|
handleLink = function(this) end,
|
|
|
|
handleReference = function(this) end
|
2021-11-16 13:05:03 +00:00
|
|
|
})
|
2021-11-13 08:31:32 +00:00
|
|
|
end
|
|
|
|
|
2021-11-16 12:12:13 +00:00
|
|
|
function auProjectO() -- extends auAbstractProjectO
|
|
|
|
-- auAbstractProjectO is implemented by either your projects lua script or the json processor
|
|
|
|
end
|
|
|
|
|
|
|
|
function auSolutionO() -- extends auHeaderPartO
|
2021-11-13 08:31:32 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
2021-11-16 12:12:13 +00:00
|
|
|
function auVisitO() -- extends auProjectInfoO
|
2021-11-16 13:05:03 +00:00
|
|
|
return {
|
|
|
|
translations = nil
|
2021-11-21 17:23:31 +00:00
|
|
|
-- TODO: options
|
|
|
|
-- TODO: null import shim
|
2021-11-16 13:05:03 +00:00
|
|
|
}
|
2021-11-13 08:31:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auFilterInO()
|
|
|
|
-- When passed to filter, the following applys:
|
|
|
|
-- in configs (^if not opt), and in platforms (^if not opt), and in archs (^if not opt); and
|
|
|
|
-- notConfigs (^if not opt) does not contain config, and [...]
|
|
|
|
--
|
|
|
|
-- All fields must be string, tables/arrays, or nil
|
|
|
|
|
|
|
|
return
|
|
|
|
{
|
|
|
|
configs = nil,
|
|
|
|
platforms = nil,
|
|
|
|
archs = nil,
|
|
|
|
notConfigs = nil,
|
|
|
|
notPlatforms = nil,
|
2021-11-16 12:12:13 +00:00
|
|
|
notArchs = nil,
|
|
|
|
notOptions = nil,
|
|
|
|
options = nil
|
2021-11-13 08:31:32 +00:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2021-11-16 11:37:04 +00:00
|
|
|
function auStartProjectO()
|
2021-11-13 08:31:32 +00:00
|
|
|
return
|
|
|
|
{
|
|
|
|
name = "Unnamed",
|
|
|
|
projectType = "SharedLibrary",
|
|
|
|
src = nil,
|
|
|
|
inc = nil,
|
|
|
|
dest = "!", -- "!" means default binary export path
|
|
|
|
root = nil
|
|
|
|
}
|
2021-11-16 12:12:13 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
-- Root JSON element
|
|
|
|
function auHeaderProjectO()
|
|
|
|
return {
|
|
|
|
projectType = "ConsoleApp",
|
|
|
|
name = "AuroraProject",
|
2021-11-21 17:23:31 +00:00
|
|
|
namespace = "",
|
|
|
|
require = nil -- := auHeaderProjectKeyRequire(...)
|
2021-11-16 12:12:13 +00:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
--
|
|
|
|
|
2021-11-21 17:23:31 +00:00
|
|
|
local function __pushFilter(obj, key, callback)
|
|
|
|
if (not obj) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local value = obj[key]
|
|
|
|
|
|
|
|
if (not value) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
if (obj.filter) then
|
|
|
|
filter(auFilterOf(obj.filter))
|
|
|
|
end
|
|
|
|
|
|
|
|
callback(value)
|
2021-11-16 12:12:13 +00:00
|
|
|
|
2021-11-21 17:23:31 +00:00
|
|
|
if (obj.filter) then
|
|
|
|
filter {}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
local function __pushFilterString(obj, key, callback)
|
|
|
|
if (type(obj) == "string") then
|
|
|
|
callback(obj)
|
|
|
|
else
|
|
|
|
__pushFilter(obj, key, defines)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function auBlockProjectKeyDefines(obj)
|
|
|
|
__pushFilterString(obj, "value", defines)
|
2021-11-16 12:12:13 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function auBlockProjectKeyIncludes()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
function auBlockProjectKeyFeatures()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
function auBlockProjectKeyExcludes()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
function auBlockProjectKeySources()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2021-11-21 17:23:31 +00:00
|
|
|
function auBlockProjectKeyLinks(obj)
|
|
|
|
__pushFilterString(obj, "value", links)
|
|
|
|
end
|
|
|
|
|
|
|
|
function auHeaderProjectKeyIncludeDepends()
|
2021-11-16 12:12:13 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
2021-11-21 17:23:31 +00:00
|
|
|
function auHeaderProjectKeyIncludeSoftDepends()
|
2021-11-16 12:12:13 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
2021-11-21 17:23:31 +00:00
|
|
|
function auHeaderProjectKeyLinkDepends()
|
2021-11-16 12:12:13 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
2021-11-21 17:23:31 +00:00
|
|
|
function auHeaderProjectKeyLinkSoftDepends()
|
2021-11-16 12:12:13 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2021-11-21 17:23:31 +00:00
|
|
|
function auHeaderProjectKeyRequire(script)
|
|
|
|
auUserRequire(script)
|
2021-11-16 12:12:13 +00:00
|
|
|
end
|
|
|
|
|
2021-11-21 17:23:31 +00:00
|
|
|
|
2021-11-16 12:12:13 +00:00
|
|
|
-- Root JSON element and sub-documents
|
|
|
|
function auBlockProjectO()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Root JSON element
|
|
|
|
function auHeaderPartO()
|
|
|
|
return {
|
|
|
|
type = "part"
|
|
|
|
}
|
|
|
|
end
|