From 3b4d6cccf2cef95a24396b77ca91392d05caa428 Mon Sep 17 00:00:00 2001 From: Reece Date: Sun, 6 Mar 2022 19:07:32 +0000 Subject: [PATCH] [*] Stupid shid --- Core/Actions/Actions.lua | 71 ++-------------------------------------- 1 file changed, 2 insertions(+), 69 deletions(-) diff --git a/Core/Actions/Actions.lua b/Core/Actions/Actions.lua index 0e73ebb..d24054f 100644 --- a/Core/Actions/Actions.lua +++ b/Core/Actions/Actions.lua @@ -1,77 +1,12 @@ local isUnixPremake = os.host() == "linux" or os.host() == "mac" -local isWin32 = os.host() == "windows" local isCmakeToolChain = false -local function getExeFileExt() - if isWin32 then - return ".exe" - end - - return "" -end - -local function testPath(cwd, exe, ext) - local path = cwd .. "/" .. exe .. ext - if (not os.isfile(path)) then - return nil - end - return os.realpath(path) -end - -local function getAuBinsForPlatform() - local cwd = auGetAuroraRoot() - - if (isUnixPremake) then - cwd = cwd .. auGetSetting("sRelUnixBins") - end - - if (isWin32) then - cwd = cwd .. auGetSetting("sRelWin32") - end - - return cwd -end - local getPremakeExec = function() - local exec = premake_exe; - if (exec) then - return exec - end - if (isCmakeToolChain) then - premake_exe = auGetSetting("sDefaultCmakePremakeBin") - return premake_exe + return Aurora.Settings.sDefaultCmakePremakeBin end - if (isUnixPremake or isWin32) then - local cwd = getAuBinsForPlatform() - local ext = getExeFileExt() - - local mods = {auGetSetting("sDefaultCmakePremakeBin"), "auroramake", "aumake", "premake5", "genie"} - for k, v in pairs(mods) do - local abs = testPath(cwd, v, ext) - - if (abs and isUnixPremake) then - premake_exe = v .. ext - else - premake_exe = abs - end - - if (premake_exe) then - return premake_exe - end - end - end - - if (isWin32) then - if (_PREMAKE_COMMAND) then - premake_exe = _PREMAKE_COMMAND - return premake_exe - end - end - - premake_exe = "premake5" - return premake_exe + return _PREMAKE_COMMAND end local addBuildCommand = function(when, scriptType, path, cwdRelToProject, args) @@ -86,8 +21,6 @@ local addBuildCommand = function(when, scriptType, path, cwdRelToProject, args) if (isCmakeToolChain) then command = "" - elseif (cdAware and scriptType == "lua") then - command = "cd \"" .. getAuBinsForPlatform() .. "\" && " elseif (cdAware) then command = "cd \"" .. cwd .. "\" && " elseif (host == "windows") then