diff options
| author | SirLynix <[email protected]> | 2023-07-21 17:24:04 +0200 |
|---|---|---|
| committer | SirLynix <[email protected]> | 2023-07-21 17:24:04 +0200 |
| commit | 30f29b8dd316cfee6404b1fa4ca9815a4f02c9a8 (patch) | |
| tree | 25b49be91e2d220c627618a69e92e77aae5bd5ef /xmake/rules/xcode/application/run.lua | |
| parent | 56bc58325b10e39b8278e81e1852997334716efb (diff) | |
Refactor runenvs so renderdoc can store envs
Diffstat (limited to 'xmake/rules/xcode/application/run.lua')
| -rw-r--r-- | xmake/rules/xcode/application/run.lua | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/xmake/rules/xcode/application/run.lua b/xmake/rules/xcode/application/run.lua index 0e0663207..5f7d1585d 100644 --- a/xmake/rules/xcode/application/run.lua +++ b/xmake/rules/xcode/application/run.lua @@ -21,7 +21,7 @@ -- imports import("core.base.option") import("devel.debugger") -import("private.action.run.make_runenvs") +import("private.action.run.runenvs") -- run on macosx function _run_on_macosx(target, opt) @@ -38,19 +38,13 @@ function _run_on_macosx(target, opt) local oldir = os.cd(rundir) -- add run environments - local addrunenvs, setrunenvs = make_runenvs(target) - for name, values in pairs(addrunenvs) do - os.addenv(name, table.unpack(table.wrap(values))) - end - for name, value in pairs(setrunenvs) do - os.setenv(name, table.unpack(table.wrap(value))) - end + local addrunenvs, setrunenvs = runenvs.make(target) -- debugging? if option.get("debug") then - debugger.run(targetfile, option.get("arguments")) + debugger.run(targetfile, option.get("arguments"), {addrunenvs = addrunenvs, setrunenvs = setrunenvs}) else - os.execv(targetfile, option.get("arguments")) + os.execv(targetfile, option.get("arguments"), {envs = runenvs.join()}) end -- restore the previous directory |
