diff options
| author | SirLynix <[email protected]> | 2023-07-22 20:00:24 +0200 |
|---|---|---|
| committer | SirLynix <[email protected]> | 2023-07-22 20:00:24 +0200 |
| commit | 337e79f761d4131529e60b03e90c4725f8ec4a93 (patch) | |
| tree | 2c6345176a18bb72d1aacaa7db3b70e3135176fa | |
| parent | 7ffdabc0d2a93615ab8ec83b153e7f48854aceea (diff) | |
rename addrunenvs/setrunenvs to addenvs/setenvs
| -rw-r--r-- | xmake/actions/run/main.lua | 6 | ||||
| -rw-r--r-- | xmake/modules/devel/debugger/run.lua | 34 | ||||
| -rw-r--r-- | xmake/modules/private/action/run/runenvs.lua | 8 |
3 files changed, 24 insertions, 24 deletions
diff --git a/xmake/actions/run/main.lua b/xmake/actions/run/main.lua index 25e2d905b..eca4d8e29 100644 --- a/xmake/actions/run/main.lua +++ b/xmake/actions/run/main.lua @@ -45,16 +45,16 @@ function _do_run_target(target) local targetfile = path.absolute(target:targetfile()) -- build run environments - local addrunenvs, setrunenvs = runenvs.make(target) + local addenvs, setenvs = runenvs.make(target) -- get run arguments local args = table.wrap(option.get("arguments") or target:get("runargs")) -- debugging? if option.get("debug") then - debugger.run(targetfile, args, {curdir = rundir, addrunenvs = addrunenvs, setrunenvs = setrunenvs}) + debugger.run(targetfile, args, {curdir = rundir, addenvs = addenvs, setenvs = setenvs}) else - local envs = runenvs.join(addrunenvs, setrunenvs) + local envs = runenvs.join(addenvs, setenvs) os.execv(targetfile, args, {curdir = rundir, detach = option.get("detach"), envs = envs}) end end diff --git a/xmake/modules/devel/debugger/run.lua b/xmake/modules/devel/debugger/run.lua index ea92ede2c..858efae68 100644 --- a/xmake/modules/devel/debugger/run.lua +++ b/xmake/modules/devel/debugger/run.lua @@ -51,7 +51,7 @@ function _run_gdb(program, argv, opt) table.insert(argv, 1, "--args") -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it os.execv(gdb, argv, table.join(opt, {exclusive = true})) @@ -74,7 +74,7 @@ function _run_cudagdb(program, argv, opt) table.insert(argv, 1, "--args") -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it os.execv(gdb, argv, table.join(opt, {exclusive = true})) @@ -104,7 +104,7 @@ function _run_lldb(program, argv, opt) end -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it os.execv(names[1], argv, table.join(opt, {exclusive = true})) @@ -125,7 +125,7 @@ function _run_windbg(program, argv, opt) table.insert(argv, 1, program) -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it opt.detach = true @@ -147,7 +147,7 @@ function _run_cudamemcheck(program, argv, opt) table.insert(argv, 1, program) -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it os.execv(cudamemcheck, argv, opt) @@ -168,7 +168,7 @@ function _run_x64dbg(program, argv, opt) table.insert(argv, 1, program) -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it opt.detach = true @@ -190,7 +190,7 @@ function _run_ollydbg(program, argv, opt) table.insert(argv, 1, program) -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it opt.detach = true @@ -212,7 +212,7 @@ function _run_vsjitdebugger(program, argv, opt) table.insert(argv, 1, program) -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it opt.detach = true @@ -235,7 +235,7 @@ function _run_devenv(program, argv, opt) table.insert(argv, 2, program) -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it opt.detach = true @@ -254,8 +254,8 @@ function _run_renderdoc(program, argv, opt) -- build capture settings local environment = {} - if opt.addrunenvs then - for name, values in pairs(opt.addrunenvs) do + if opt.addenvs then + for name, values in pairs(opt.addenvs) do table.insert(environment, { separator = "Platform style", type = "Append", @@ -265,8 +265,8 @@ function _run_renderdoc(program, argv, opt) end end - if opt.setrunenvs then - for name, values in pairs(opt.setrunenvs) do + if opt.setenvs then + for name, values in pairs(opt.setenvs) do table.insert(environment, { separator = "Platform style", type = "Set", @@ -309,8 +309,8 @@ function _run_renderdoc(program, argv, opt) -- run renderdoc opt.detach = true - opt.addrunenvs = nil - opt.setrunenvs = nil + opt.addenvs = nil + opt.setenvs = nil os.execv(renderdoc, { capturefile }, opt) return true end @@ -333,7 +333,7 @@ function _run_gede(program, argv, opt) table.insert(argv, 1, "--no-show-config") -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it os.execv(gede.program, argv, table.join(opt, {exclusive = true})) @@ -356,7 +356,7 @@ function _run_seergdb(program, argv, opt) table.insert(argv, 1, "--start") -- handle envs - opt.envs = runenvs.join(opt.addrunenvs, opt.setrunenvs) + opt.envs = runenvs.join(opt.addenvs, opt.setenvs) -- run it os.execv(seergdb.program, argv, table.join(opt, {exclusive = true})) diff --git a/xmake/modules/private/action/run/runenvs.lua b/xmake/modules/private/action/run/runenvs.lua index 8fec69f80..e8e420d3d 100644 --- a/xmake/modules/private/action/run/runenvs.lua +++ b/xmake/modules/private/action/run/runenvs.lua @@ -75,10 +75,10 @@ function _flatten_envs(envs) return flatten_envs end -function join(addrunenvs, setrunenvs) - local envs = addrunenvs and _flatten_envs(addrunenvs) or {} - if setrunenvs then - table.join2(envs, _flatten_envs(setrunenvs)) +function join(addenvs, setenvs) + local envs = addenvs and _flatten_envs(addenvs) or {} + if setenvs then + table.join2(envs, _flatten_envs(setenvs)) end return envs end |
