Added support in battle-server-manager and launcher to macOS#508
Added support in battle-server-manager and launcher to macOS#508
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the release/build tooling and runtime platform support to include macOS (darwin) for the launcher and battle-server-manager, including new darwin-specific implementations for certificate/hosts/DNS handling and CrossOver/Wine execution paths.
Changes:
- Expand GoReleaser target matrices to include macOS for launcher and battle-server-manager artifacts.
- Add/adjust darwin implementations for certificate trust management, DNS flushing, and executor selection (CrossOver/Wine-first behavior on macOS).
- Refactor several Unix/Linux-only paths to be “unix-like” where appropriate and split Linux vs darwin behaviors.
Reviewed changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/scripts/internal/goreleaser/project.go | Adjusts config-helper Windows build outputs and inclusion into non-Windows archives |
| tools/scripts/internal/goreleaser/constants.go | Removes “except macOS” targets and relies on unified Targets64 |
| tools/scripts/internal/goreleaser/config.go | Switches launcher/battle-server-manager archives/binaries to build for macOS too |
| launcher/resources/config.game.toml | Updates comments to distinguish Unix-like platforms vs Linux-only Steam |
| launcher/internal/server/certStore/certStore_windows.go | Removes Windows-only noop implementation (moved to shared file) |
| launcher/internal/server/certStore/certStore_other.go | Provides windows+darwin noop ReloadSystemCertificates for build compatibility |
| launcher/internal/server/certStore/certStore_linux.go | Moves unsafe system root reload logic to Linux-only |
| launcher/internal/game/executor/executor_windows.go | Removes old launcher-local executor implementation |
| launcher/internal/game/executor/executor_unix.go | Removes old launcher-local executor implementation |
| launcher/internal/game/executor/executor_linux.go | Removes old launcher-local executor implementation |
| launcher/internal/game/executor/executor.go | Removes old launcher-local executor implementation |
| launcher/internal/cmdUtils/isolateUserData_unix.go | Adds shared unix (non-windows) Wine/CrossOver isolation-path logic |
| launcher/internal/cmdUtils/isolateUserData_linux.go | Delegates Wine/CrossOver isolation-path resolution to unix helper |
| launcher/internal/cmdUtils/isolateUserData_darwin.go | Adds darwin IsolationPath implementation |
| launcher/internal/cmd/root.go | Updates CLI help/validation strings and client-executable behavior by OS |
| launcher-config-admin/internal/hosts/hosts_darwin.go | Adds darwin DNS flush implementation (dscacheutil + mDNSResponder) |
| launcher-common/userData/backup_windows.go | Removes Windows-specific backup base path helper |
| launcher-common/userData/backup_unix.go | Removes Unix-specific backup base path helper |
| launcher-common/configRevert.go | Changes RemoveUserCert behavior to apply to non-Linux OSes |
| launcher-common/cert/cert_darwin.go | Adds macOS keychain trust/untrust/enumeration via security tool |
| launcher-common/cert/cert.go | Refactors PEM parsing into ReadFromData helper |
| common/game/wine/steam/steam_unix.go | Switches config-helper path resolution to new arch-aware executable naming |
| common/game/wine/steam/crossover/crossover_unix.go | Adds multi-base-dir probing for CrossOver bottles |
| common/game/wine/steam/crossover/crossover_linux.go | Defines Linux CrossOver bottle baseDirs |
| common/game/wine/steam/crossover/crossover_darwin.go | Defines macOS CrossOver bottle baseDirs |
| common/game/steam/steam_unix.go | Removes generic unix Steam implementation |
| common/game/steam/steam_supported.go | Limits Steam support to windows+linux builds |
| common/game/steam/steam_linux.go | Moves Linux UserProfilePath implementation here |
| common/game/steam/steam.go | Removes Steam.NewGame from always-built file |
| common/game/executor/wine/crossover/crossover_unix.go | Adds shared non-windows CrossOver executor |
| common/game/executor/wine/crossover/crossover_linux.go | Keeps Linux-specific file search paths (logic moved to unix) |
| common/game/executor/wine/crossover/crossover_darwin.go | Adds macOS CrossOver wine binary search paths |
| common/game/executor/steam/wine/crossover/crossover_unix.go | Adds build tag for non-windows |
| common/game/executor/steam/steam_other.go | Adds non-darwin Steam executor implementation |
| common/game/executor/steam/steam_darwin.go | Adds darwin placeholder Steam Do() implementation |
| common/game/executor/steam/steam.go | Moves Do()/NewExec behind platform-specific files |
| common/game/executor/executor_darwin.go | Adds darwin MakeExec that prefers CrossOver/Wine and supports custom path |
| common/game/executor/base/base_unix.go | Removes generic unix StartUri implementation |
| common/game/executor/base/base_linux.go | Adds Linux StartUri implementation (xdg-open) |
| common/game/appx/appx_other.go | Removes non-windows appx stub file |
| common/executor/exec/executor_linux.go | Removes redundant build tag (file name already constrains to linux) |
| common/executor/exec/executor_darwin.go | Adds darwin osascript argument helpers for terminal/admin flows |
| common/executables/executables.go | Changes executable naming to include GOARCH via ArchFileName |
| battle-server-manager/internal/cmdUtils/executor/executor_darwin.go | Adds darwin auto-path resolution preferring CrossOver then Wine |
| Taskfile.debug.yml | Switches debug Taskfile include selection to windows vs unix |
| Taskfile.debug.unix.yml | Adds darwin platforms; splits out Linux-only server capability prep |
Comments suppressed due to low confidence (2)
launcher/internal/cmd/root.go:80
- The
canTrustCertificatehelp text adds the "user" option whenGOOS != linux, implying Windows/macOS support. However, later validation removes "user" from the allowed set onGOOS != linux, so users can be told about an option that is then rejected. Align these conditions so help text and validation match.
common/executables/executables.go:47 NativeFileNamenow always appendsruntime.GOARCH(e.g.server_amd64). That breaksFindPathcallers which expect the on-disk layout produced by the release archives (e.g. goreleaser builds the server binary asserverunder aserver/directory, notserver_amd64/server_amd64). Either update the packaging/layout consistently for all binaries, or keepNativeFileNamereturning the non-arch-suffixed name and introduce a separate helper for the few cases (like config-helper under Wine) that need arch-specific filenames.
func NativeFileName(bin bool, executable string) string {
return ArchFileName(bin, executable, nil)
}
func ArchFileName(bin bool, executable string, transfileName func(name string) string) string {
if transfileName == nil {
transfileName = fileName
}
filename := transfileName(fmt.Sprintf("%s_%s", executable, runtime.GOARCH))
if !bin {
filename = filepath.Join("bin", filename)
}
return filename
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 46 out of 46 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 46 out of 46 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
Taskfile.debug.unix.yml:12
prepare-launchercallsbuild-config-helper-*, but those tasks still buildconfig-helper.exe(no GOARCH suffix). In this PR the runtime lookup switched to an arch-specific helper name (e.g.config-helper_amd64.exe/config-helper_arm64.exe), so the debug build output produced by this workflow will no longer be found at runtime. Update the debug tasks to build/copy the arch-suffixed filename (and adjustgeneratesaccordingly), or add a fallback in the lookup code.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 46 out of 46 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
Taskfile.debug.unix.yml:44
build-config-helpernow buildsbuild/launcher/bin/config-helper_{{.GOARCH}}.exe, but thegeneratespath and the subsequentcpstill referenceconfig-helper.exe. This makes the checksum tracking and copy step incorrect and will likely fail on both linux and darwin. Updategeneratesand thecpsource path to match the arch-suffixed filename (and ensure the destination name matches what runtime code expects).
Taskfile.debug.unix.yml:12prepare-launcheris now enabled fordarwin, but it unconditionally runstask: prepare-servereven thoughprepare-serveris restricted toplatforms: [ linux ]. On macOS this can causetask prepare-launcherto fail due to invoking a linux-only task. Consider gating the call (only run it on linux) or inlining the linux-onlysetcapcommand under a linux condition.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 52 out of 52 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
Taskfile.debug.unix.yml:44
build-config-helpernow produces arch-suffixed outputs (config-helper_{{.GOARCH}}.exe), butgeneratesand the subsequentcpstill referencebuild/launcher/bin/config-helper.exe. This makes the checksum tracking incorrect and will fail to copy the built helper intobuild/battle-server-manager/binon both linux/darwin. Updategeneratesandcpto use the arch-suffixed filename (or copy both arch variants if that’s the intent).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 54 out of 54 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
Taskfile.debug.unix.yml:44
build-config-helpernow buildsbuild/launcher/bin/config-helper_{{.GOARCH}}.exe, but the task still declaresgenerates: build/launcher/bin/config-helper.exeand copiesbuild/launcher/bin/config-helper.exeinto battle-server-manager. This will break the task cache (wrong generated file) and thecpwill fail / copy the wrong helper. Updategenerates(and thecpsource/destination) to use the arch-suffixed filename (and ensure both amd64/arm64 variants are copied when needed).
No description provided.