iface #16

Merged
zxq9 merged 7 commits from iface into master 2025-11-20 16:02:09 +09:00
Showing only changes of commit 8ee712e81a - Show all commits

View File

@ -378,17 +378,19 @@ do_gajudesk() ->
GajuDesk = "zx run gajudesk",
Command =
case os:type() of
{unix, _} ->
"setsid sh -c 'exec nohup " ++ GajuDesk ++ " >/dev/null 2>&1' &";
{win32, nt} ->
"wscript //B //Nologo "
"-e:VBScript "
"-c:\"CreateObject(\"WScript.Shell\").Run \"\""
" \"" ++ GajuDesk ++ "\", 0, False\""
{unix, _} -> detach_unix(GajuDesk);
{win32, nt} -> detach_windows(GajuDesk)
end,
Out = os:cmd(Command),
log(info, "os:cmd(~s) -> ~s", [Command, Out]).
detach_unix(Command) ->
"setsid sh -c 'exec nohup " ++ Command ++ " >/dev/null 2>&1' &".
detach_windows(Command) ->
PSCmd = "Start-Process -WindowStyle Hidden -FilePath cmd.exe -ArgumentList '/c " ++ Command ++ "'",
"powershell -NoProfile -Command \"" ++ PSCmd ++ "\"".
run_gmc_conf(State = #s{gmc_conf = none, network = Net, acc = Acc, keys = Keys,
max_cores = MProcs, max_mem = MMem,