diff options
| author | ruki <[email protected]> | 2026-02-07 00:08:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-02-07 00:08:09 +0800 |
| commit | 41d6a48953038df041194bafc7cc87a7e6466b3e (patch) | |
| tree | 74f759463c06f8d07dccc601cc43f161f57d4b1e | |
| parent | 1128735f502188ec37dad489420ab3e678599157 (diff) | |
improve run
| -rw-r--r-- | xmake/actions/run/main.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/xmake/actions/run/main.lua b/xmake/actions/run/main.lua index effaa8e45..39cbd4d6a 100644 --- a/xmake/actions/run/main.lua +++ b/xmake/actions/run/main.lua @@ -75,18 +75,19 @@ function _do_run_target(target) -- get run arguments local args = table.wrap(option.get("arguments") or target:get("runargs")) - if not is_host("windows") and target:is_plat("windows") then - local wine = assert(find_tool("wine"), "wine not found!") - table.insert(args, 1, targetfile) - targetfile = wine.program - end - -- run wasm target in browser if target:is_plat("wasm") then _run_wasm_target_in_browser(targetfile, {rundir = rundir, addenvs = addenvs, setenvs = setenvs}) return end + -- run windows target on non-windows host via wine + if not is_host("windows") and target:is_plat("windows") then + local wine = assert(find_tool("wine"), "wine not found!") + table.insert(args, 1, targetfile) + targetfile = wine.program + end + -- debugging? if option.get("debug") then debugger.run(targetfile, args, {curdir = rundir, addenvs = addenvs, setenvs = setenvs}) |
