2022-03-20 08:01:11 +00:00
|
|
|
premake.path = premake.path .. ";" .. os.realpath(path.translate("..\\"))
|
2021-11-13 08:31:32 +00:00
|
|
|
|
2022-07-18 15:47:59 +00:00
|
|
|
require("../Core/Premake/Premake")
|
|
|
|
|
2021-11-13 08:31:32 +00:00
|
|
|
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
|
2023-12-12 01:39:58 +00:00
|
|
|
local result, err = json.decode(io.readfile("../../AuroraSolution.json"))
|
|
|
|
|
|
|
|
if (not result) then
|
|
|
|
auFatal("AuroraSolution.json parse error", err)
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
auProcessSolutionByJsonDocument(result)
|
2021-11-13 08:31:32 +00:00
|
|
|
else
|
|
|
|
auFatal("No solution file found in the root")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2022-03-20 08:01:11 +00:00
|
|
|
xpcall(start, auFatal)
|