CLOSES #2484, CLOSES #2600, CLOSES #2694, CLOSES #2708, CLOSES #2713, CLOSES #2723

This commit is contained in:
bryanthaboi
2026-10-06 19:00:50 -04:00
parent 4ecf6f371f
commit e7d5b86c93
46 changed files with 2280 additions and 251 deletions
+11 -3
View File
@@ -10,14 +10,22 @@ love = {
},
}
package.loaded["src.core.Platform"] = { canSpawnProcess = function() return true end }
local realWinApi = require("src.core.WinApi")
local spawned = nil
package.loaded["src.core.WinApi"] = {
dirOf = realWinApi.dirOf,
spawn = function(exe, args, opts) spawned = { exe = exe, args = args, opts = opts } return true end,
}
local execute = os.execute
os.execute = function(value) command = value return 0 end
local HostShell = require("src.core.HostShell")
assert(HostShell.spawnSelfDetached({ "--display-companion=50000,token" }))
assert(command:find('start "" /b ', 1, true)
and command:find('"C:\\Game\\gen1recomp.exe"', 1, true),
"Windows launches the fused app detached")
assert(command == nil, "Windows never goes through cmd.exe")
assert(spawned and spawned.exe == "C:\\Game\\gen1recomp.exe"
and #spawned.args == 1 and spawned.args[1] == "--display-companion=50000,token"
and spawned.opts.cwd == "C:\\Game",
"Windows launches the fused app through the wide spawner")
osName, fused = "Linux", false
assert(HostShell.spawnSelfDetached({ "--display-companion=50000,token" }))