2022-03-20 08:01:11 +00:00
|
|
|
premake.path = premake.path .. ";" .. os.realpath(path.translate("..\\"))
|
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
|
|
|
|
-- TODO: ...
|
|
|
|
else
|
|
|
|
auFatal("No solution file found in the root")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2022-03-20 08:01:11 +00:00
|
|
|
xpcall(start, auFatal)
|