feat: proper windows support

This commit is contained in:
eric
2026-03-15 11:04:44 +01:00
parent 4f8e27cd74
commit 626a6640f8
70 changed files with 3410 additions and 1689 deletions

View File

@@ -14,6 +14,23 @@ cleanup() {
}
trap cleanup EXIT
start_launcher() {
local launcher="$1"
local log_target="$2"
shift 2
if [[ ${launcher} == *.cmd ]]; then
local command
printf -v command '"%s"' "${launcher}"
for arg in "$@"; do
printf -v command '%s "%s"' "${command}" "${arg}"
done
cmd.exe /c "${command}" >"${log_target}" 2>&1 &
else
"${launcher}" "$@" >"${log_target}" 2>&1 &
fi
server_pid=$!
}
port="$(
python3 - <<'PY'
import socket
@@ -24,8 +41,7 @@ sock.close()
PY
)"
"${binary}" --host 127.0.0.1 --port "${port}" --strictPort >"${log_file}" 2>&1 &
server_pid=$!
start_launcher "${binary}" "${log_file}" --host 127.0.0.1 --port "${port}" --strictPort
for _ in {1..60}; do
if ! kill -0 "${server_pid}" 2>/dev/null; then