Build/Public/premake5.lua
Jamie Reece Wilson 85a130e167 [+] auProcessSolutionByJsonDocument
[+] auProcessSolutionByPath
[+] Core/JSON/jsonSolution
2023-12-12 01:39:58 +00:00

68 lines
1.8 KiB
Lua

premake.path = premake.path .. ";" .. os.realpath(path.translate("..\\"))
require("../Core/Premake/Premake")
require("base")
-------------------------------------------------------
-- run a user script that should be able to directly access
-- the global aurora variable with the util apis available
-------------------------------------------------------
if (os.isfile("../../preconfig.lua")) then
require("../../preconfig")
end
-------------------------------------------------------
-- print build platform
-------------------------------------------------------
local isWin = os.host() == "windows"
local isToolChain = false
local isUnix = false
local toolPlatforms = {"win32", "linux", "mac"}
local unixPlatforms = {"linux", "mac"}
for k in pairs(toolPlatforms) do
if (os.host() == k) then
isToolChain = true
end
end
for k in pairs(unixPlatforms) do
if (os.host() == k) then
isUnix = true
end
end
auPrintHeader("configuration", "platforms")
print("isWin", isWin)
print("isUnix", isUnix)
print("isDevelopmentPlatform", isToolChain)
print()
-------------------------------------------------------
-- start
-------------------------------------------------------
local function start()
auStart()
if (os.isfile("../../premake5.lua")) then
require("../../premake5")
elseif (os.isfile("../../AuroraSolution.lua")) then
require("../../AuroraSolution")
elseif (os.isfile("../../AuroraSolution.json")) then
local result, err = json.decode(io.readfile("../../AuroraSolution.json"))
if (not result) then
auFatal("AuroraSolution.json parse error", err)
return
end
auProcessSolutionByJsonDocument(result)
else
auFatal("No solution file found in the root")
end
end
xpcall(start, auFatal)