[+] Added alt platform name stylization
[*] Fix 2x crashes and lock when importing au projects from external pipelines
This commit is contained in:
parent
5631e99efd
commit
cf1146839c
@ -1,7 +1,7 @@
|
||||
local kPathPrefix = "!"
|
||||
|
||||
local function normalizeCpyPath(absPath)
|
||||
return "../../" .. path.getrelative(Aurora.Settings.sAbsRoot, absPath)
|
||||
return absPath -- path.getrelative(os.getcwd(), Aurora.Settings.sAbsRoot) .. '/' .. path.getrelative(Aurora.Settings.sAbsRoot, absPath)
|
||||
end
|
||||
|
||||
-- file name, type, directory, extension, is windows, configuration, real name
|
||||
@ -14,8 +14,13 @@ local function formatCpy(name, type, dir, ex, iswin, config, platformName, arch,
|
||||
pathSuffix = "\"";
|
||||
end
|
||||
|
||||
local platform = Aurora.Platforms[platformName]
|
||||
if (platform) then
|
||||
platformName = platform.outputName
|
||||
end
|
||||
|
||||
if (Aurora.Settings.bDefinePartialABIInTargetName) then
|
||||
name = string.format("%s.%s.%s.%s", name, config, platformName:gsub("^%l", string.upper), arch)
|
||||
name = string.format("%s.%s.%s.%s", name, config, platformName, arch)
|
||||
end
|
||||
|
||||
local outputPath = string.format("%s/%s%s", dir, name, ex)
|
||||
@ -103,13 +108,13 @@ local function postBuildCommands(name, type, config, platformName, arch)
|
||||
|
||||
if (type == "SharedLib" or
|
||||
type == "StaticLib") then
|
||||
postbuildcommands(formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sRelLinkLibs), ".lib", true, config, platformName, arch, name))
|
||||
postbuildcommands(formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sAbsLinkLibs), ".lib", true, config, platformName, arch, name))
|
||||
end
|
||||
else
|
||||
if (type == "SharedLib" or
|
||||
type == "StaticLib") then
|
||||
local ext = (auFetchGlobal("Platforms")[platformName][type] or "")
|
||||
postbuildcommands(formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sRelLinkLibs), ext, true, config, platformName, arch, name))
|
||||
postbuildcommands(formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sAbsLinkLibs), ext, true, config, platformName, arch, name))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -27,6 +27,20 @@ local function start()
|
||||
addTarget("target", Aurora.Platforms, _auCurrentPlatforms)
|
||||
addTarget("target", Aurora.Architectures, _auCurrentArchs)
|
||||
addTarget("flag", Aurora.Flags, _auCurrentFlags)
|
||||
|
||||
auForEach(_auCurrentPlatforms, function(platformName)
|
||||
local name = nil
|
||||
local alt = Aurora.Platforms[platformName].stylizedName
|
||||
|
||||
if (alt) then
|
||||
name = alt
|
||||
else
|
||||
name = platformName:gsub("^%l", string.upper)
|
||||
end
|
||||
|
||||
Aurora.Platforms[platformName].outputName = name
|
||||
end)
|
||||
|
||||
_auExtendedArch = #_auCurrentArchs > 1
|
||||
end
|
||||
|
||||
|
@ -11,6 +11,7 @@ local platforms = {
|
||||
freebsd = {
|
||||
targetLocal = true,
|
||||
forceLLVMStl = true,
|
||||
stylizedName = "BSD",
|
||||
devChainRequiresElfStrip = true,
|
||||
devChainSupportsElfStrip = true,
|
||||
devChainCoreUtils = true,
|
||||
@ -44,6 +45,7 @@ local platforms = {
|
||||
},
|
||||
ios = {
|
||||
devChainCoreUtils = true,
|
||||
stylizedName = "iOS",
|
||||
defines = "_APPLE_MOBILE_AURORA_PREPROCESSOR"
|
||||
},
|
||||
android = {
|
||||
|
@ -432,10 +432,14 @@ local function linkAuProject(dep, soft)
|
||||
end
|
||||
end
|
||||
|
||||
if (_auLinkGuard[dep] ) then
|
||||
return
|
||||
if (auGetCurrentProjectMeta()) then
|
||||
if (_auLinkGuard[dep] ) then
|
||||
return
|
||||
end
|
||||
_auLinkGuard[dep] = dep
|
||||
end
|
||||
_auLinkGuard[dep] = dep
|
||||
|
||||
dependson(dep)
|
||||
|
||||
--if (not processor:getMeta().isStatic) then
|
||||
pushProject(a, function()
|
||||
@ -452,8 +456,11 @@ local function importAndLinkProject(dep, soft)
|
||||
|
||||
includeAuProject(dep, soft)
|
||||
|
||||
if (auGetCurrentProjectMeta().isStatic) then
|
||||
return true
|
||||
local this = auGetCurrentProjectMeta()
|
||||
if (this) then
|
||||
if (this.isStatic) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
linkAuProject(dep, soft)
|
||||
|
@ -36,12 +36,13 @@ local function configureProjectForSolution(prj)
|
||||
filter {}
|
||||
|
||||
auFilterForConfigPlatforms(function(config, platformName, arch)
|
||||
local platform = Aurora.Platforms[platformName]
|
||||
|
||||
if (Aurora.Settings.bDefinePartialABIInTargetName) then
|
||||
targetname(string.format("%s.%s.%s.%s", prj.name, config, platformName:gsub("^%l", string.upper), arch))
|
||||
targetname(string.format("%s.%s.%s.%s", prj.name, config, platform.outputName, arch))
|
||||
end
|
||||
|
||||
if (not(config == Aurora.Settings.sNameOfShip)) then return end
|
||||
local platform = Aurora.Platforms[platformName]
|
||||
|
||||
if (platform.requiresElfStrip and not platform.supportsElfStrip) then
|
||||
symbols "Off"
|
||||
|
@ -142,6 +142,8 @@ function auGetCurrentProjectProcessor()
|
||||
end
|
||||
|
||||
function auGetCurrentProjectMeta()
|
||||
local temp = auGetCurrentProjectProcessor()
|
||||
if (not temp) then return end
|
||||
return auGetCurrentProjectProcessor():getMeta()
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user