61 lines
1.6 KiB
Lua
61 lines
1.6 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
|
|
-- TODO: ...
|
|
else
|
|
auFatal("No solution file found in the root")
|
|
end
|
|
end
|
|
|
|
xpcall(start, auFatal)
|