[*] Linux Fixes

[*] Update readme
[*] Fix single arch sln regression
This commit is contained in:
Reece Wilson 2022-03-20 08:01:11 +00:00
parent 69830e2784
commit 431fe2afc5
8 changed files with 33 additions and 17 deletions

View File

@ -67,9 +67,9 @@ local function addUserDestCopy(name, type, config, platformName, arch, dir)
platform.devChainSupportsElfStrip and platform.devChainSupportsElfStrip and
config ~= Aurora.Settings.sNameOfDebug) then config ~= Aurora.Settings.sNameOfDebug) then
local debugSymbolPath = normalizeCpyPath(Aurora.Settings.sAbsSymbols) .. "/" .. name .. ".dwarf" local debugSymbolPath = normalizeCpyPath(Aurora.Settings.sAbsSymbols) .. "/" .. name .. ".dwarf"
postbuildcommands("objcopy --strip-debug " .. file .. " " .. outputPath) postbuildcommands("objcopy --strip-debug \"" .. file .. "\" \"" .. outputPath .. "\\")
if (Aurora.Settings.bUseAuBuildHooks and config ~= Aurora.Settings.sNameOfShip) then if (Aurora.Settings.bUseAuBuildHooks and config ~= Aurora.Settings.sNameOfShip) then
postbuildcommands("objcopy --add-gnu-debuglink=" .. debugSymbolPath .. " " .. outputPath) postbuildcommands("objcopy --add-gnu-debuglink=\"" .. debugSymbolPath .. "\" \"" .. outputPath .. "\"")
end end
else else
postbuildcommands(copy) postbuildcommands(copy)
@ -103,6 +103,8 @@ local function addDest(name, projectType, dest)
end end
local function postBuildCommands(name, type, config, platformName, arch) local function postBuildCommands(name, type, config, platformName, arch)
local compilerDirectOutput = nil
if (platformName == "win32") then if (platformName == "win32") then
postbuildcommands(formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sAbsSymbols), ".pdb", true, config, platformName, arch, name)) postbuildcommands(formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sAbsSymbols), ".pdb", true, config, platformName, arch, name))
@ -111,11 +113,16 @@ local function postBuildCommands(name, type, config, platformName, arch)
postbuildcommands(formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sAbsLinkLibs), ".lib", true, config, platformName, arch, name)) postbuildcommands(formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sAbsLinkLibs), ".lib", true, config, platformName, arch, name))
end end
else else
local ext = (Aurora.Platforms[platformName].exts[type] or "")
if (type == "SharedLib" or if (type == "SharedLib" or
type == "StaticLib") then type == "StaticLib") then
local ext = (auFetchGlobal("Platforms")[platformName][type] or "") local ext = (Aurora.Platforms[platformName].exts[type] or "")
postbuildcommands(formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sAbsLinkLibs), ext, true, config, platformName, arch, name)) local cmd = nil
cmd, compilerDirectOutput = formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sAbsLinkLibs), ext, false, config, platformName, arch, name)
postbuildcommands(cmd)
end end
local idc = nil
idc, idc, compilerDirectOutput = formatCpy(Aurora.Settings.sLibPrefix .. name, type, normalizeCpyPath(Aurora.Settings.sAbsLinkLibs), ext, false, config, platformName, arch, name)
end end
if (config == Aurora.Settings.sNameOfDebug) then if (config == Aurora.Settings.sNameOfDebug) then
@ -134,7 +141,7 @@ local function postBuildCommands(name, type, config, platformName, arch)
platform.devChainSupportsElfStrip) then platform.devChainSupportsElfStrip) then
debugEx = ".dwarf" debugEx = ".dwarf"
debugSymbolPath = normalizeCpyPath(Aurora.Settings.sAbsSymbols) .. "/" .. name .. ".dwarf" debugSymbolPath = normalizeCpyPath(Aurora.Settings.sAbsSymbols) .. "/" .. name .. ".dwarf"
postbuildcommands("objcopy --only-keep-debug " .. debugSymbolPath .. " " .. debugSymbolPath) postbuildcommands("objcopy --only-keep-debug \"" .. compilerDirectOutput .. "\" \"" .. debugSymbolPath .. "\"")
elseif (isWin) then elseif (isWin) then
debugEx = ".pdb" debugEx = ".pdb"
debugSymbolPath = normalizeCpyPath(Aurora.Settings.sAbsSymbols) .. "/" .. name .. ".pdb" debugSymbolPath = normalizeCpyPath(Aurora.Settings.sAbsSymbols) .. "/" .. name .. ".pdb"
@ -163,4 +170,4 @@ end
return { return {
startProject = startProject, startProject = startProject,
addDest = addDest addDest = addDest
} }

View File

@ -125,12 +125,19 @@ function JsonProcessor(info)
dest = info.out, dest = info.out,
noLink = result.noLink noLink = result.noLink
} }
if (result.noLink) then if (result.noLink) then
print("noLink is deprecated. Use projectType: none") print("noLink is deprecated. Use projectType: none")
project.projectType = "none" project.projectType = "none"
info.projectType = "none" info.projectType = "none"
end end
if (project.projectType == "none") then
if (os.host() == "linux") then
project.projectType = "utility"
end
end
if (result.type:lower() == "aurora") then if (result.type:lower() == "aurora") then
@ -204,4 +211,4 @@ function JsonProcessor(info)
end end
return JsonProcessor return JsonProcessor

View File

@ -72,8 +72,8 @@ local function startSolution()
_G.platforms(platforms) _G.platforms(platforms)
if (not _auExtendedArch) then if (not _auExtendedArch) then
local arch = _auCurrentArchs[1]
auForEach(_auCurrentPlatforms, function(platform) auForEach(_auCurrentPlatforms, function(platform)
auFilter({"platforms:"..platform}) auFilter({"platforms:"..platform})
system(Aurora.Platforms[platform].system) system(Aurora.Platforms[platform].system)
architecture(Aurora.Architectures[arch].architecture) architecture(Aurora.Architectures[arch].architecture)
@ -263,4 +263,4 @@ return {
auFilterOf = auFilterOf, auFilterOf = auFilterOf,
auFilterForArchs = auFilterForArchs, auFilterForArchs = auFilterForArchs,
defineOutputNames = defineOutputNames defineOutputNames = defineOutputNames
} }

View File

@ -1,7 +1,7 @@
-- private -- private
local buildAction = auRequire("Core/Actions") local buildAction = auRequire("Core/Actions")
local target = auRequire("Core/Target") local target = auRequire("Core/Target")
local main = auRequire("Core/Main") local main = auRequire("Core/main")
local resourceCompiler = auRequire("Core/ResourceCompiler") local resourceCompiler = auRequire("Core/ResourceCompiler")
local protobuf = auRequire("Core/Protobuf") local protobuf = auRequire("Core/Protobuf")
local vala = auRequire("Core/Vala") local vala = auRequire("Core/Vala")
@ -164,4 +164,4 @@ end
function auAddVala(info) function auAddVala(info)
vala(info) vala(info)
end end

View File

@ -1,4 +1,4 @@
premake.path = premake.path .. ";" .. os.realpath("..\\") premake.path = premake.path .. ";" .. os.realpath(path.translate("..\\"))
require("base") require("base")
@ -55,4 +55,4 @@ local function start()
end end
end end
xpcall(start, auFatal) xpcall(start, auFatal)

View File

@ -10,7 +10,7 @@ you may decide to fork them and host them alongside your ./Build_UserScripts awa
# API # API
Defer to the code under Public for information on how to integrate these Aurora scripts into your premake pipeline. Defer to the code under Public for information on how to integrate these Aurora scripts into your premake pipeline.
API -> ./Global/api.lua API -> ./Public/api.lua
Settings -> ./Public/settings.lua Settings -> ./Public/settings.lua
Entry -> ./Public/base.lua Entry -> ./Public/base.lua

View File

@ -28,6 +28,8 @@ function auRequire(relPath, subdir, invalidate)
relPath = "/" .. relPath .. ".lua" relPath = "/" .. relPath .. ".lua"
end end
relPath = _G.path.translate(relPath)
if (not os.isfile(buildScripts .. relPath)) then if (not os.isfile(buildScripts .. relPath)) then
auFatal("Script not found: ", relPath) auFatal("Script not found: ", relPath)
end end
@ -46,4 +48,4 @@ function auRequire(relPath, subdir, invalidate)
local result = require(realPath:sub(1, #realPath - 4)) local result = require(realPath:sub(1, #realPath - 4))
_auRequireTable[realPath] = result _auRequireTable[realPath] = result
return result return result
end end

4
linux_x64 Normal file → Executable file
View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
cd Global cd Public
premake5 gmake2 --target-linux --target-x86_64 "$@" premake5 gmake2 --target-linux --target-x86_64 "$@"
cd .. cd ..