Skip to content

Add practical macOS launcher support#2782

Draft
vvitovec wants to merge 7 commits into
SubnauticaNitrox:masterfrom
vvitovec:macos-launcher-support
Draft

Add practical macOS launcher support#2782
vvitovec wants to merge 7 commits into
SubnauticaNitrox:masterfrom
vvitovec:macos-launcher-support

Conversation

@vvitovec

@vvitovec vvitovec commented Jun 7, 2026

Copy link
Copy Markdown

Summary

  • normalize macOS Subnautica.app, Contents, and Windows/Wine install layouts
  • add native Steam library parsing improvements plus Wine-prefix Steam detection on macOS
  • add a first-class Wine platform path for macOS Windows installs, including wine/wine64 lookup, common Homebrew/Wine Stable fallback paths, WINEPREFIX inference, NITROX_LAUNCHER_PATH propagation, and launch argument handling
  • make native macOS multiplayer injection fail immediately and clearly while allowing native singleplayer path handling
  • add macOS app-bundle packaging fixes, helper script, docs, and path/detection/Wine launch-command tests
  • make build/runtime game-data path checks use detected install layout so a Wine Windows install does not get treated as native macOS Resources/Data

Verification

  • dotnet restore Nitrox.Launcher/Nitrox.Launcher.csproj -r osx-arm64
  • SUBNAUTICA_INSTALLATION_PATH=~/Games/NitroxWine/drive_c/Program Files (x86)/Steam/steamapps/common/Subnautica dotnet build Nitrox.Launcher/Nitrox.Launcher.csproj -c Debug
  • SUBNAUTICA_INSTALLATION_PATH=~/Games/NitroxWine/drive_c/Program Files (x86)/Steam/steamapps/common/Subnautica dotnet build Nitrox.Launcher/Nitrox.Launcher.csproj -c Release -r osx-arm64 -p:CreateAppBundle=true --no-restore
  • SUBNAUTICA_INSTALLATION_PATH=~/Games/NitroxWine/drive_c/Program Files (x86)/Steam/steamapps/common/Subnautica dotnet test Nitrox.Test/Nitrox.Test.csproj --filter "GameInstallationHelperTest|WineTest"
  • git diff --check
  • bash -n scripts/macos-launcher.sh

Local macOS/Wine result

  • Native macOS Steam Subnautica detection and explicit multiplayer block were verified earlier against ~/Library/Application Support/Steam/steamapps/common/Subnautica/Subnautica.app/Contents.
  • Windows Subnautica was downloaded through SteamCMD into ~/Games/NitroxWine/drive_c/Program Files (x86)/Steam/steamapps/common/Subnautica.
  • The launcher config accepted that Windows install as the preferred game path.
  • Debug instant launch copied NitroxPatcher.dll, patched Assembly-CSharp.dll, detected the existing patch on a second run, and started the embedded Nitrox server with the Wine game path.
  • Direct Wine launch reached graphics initialization. Plain Wine failed D3D11 feature-level creation on this Apple GPU. Installing DXVK moved the failure to MoltenVK/DXVK: DXVK found the Apple M4 through MoltenVK but rejected it because required Vulkan features such as geometryShader were unavailable. No full Wine-launched multiplayer claim is made.

Still unsupported

  • Native macOS client injection/runtime remains out of scope and unsupported.
  • Wine gameplay on Apple Silicon still depends on a working D3D/Vulkan translation stack. The launcher now gets far enough to detect, patch, and attempt launch, but this local machine is blocked by Wine graphics compatibility.

@vvitovec vvitovec force-pushed the macos-launcher-support branch from 751da59 to 9bc0c96 Compare June 7, 2026 19:52

@Measurity Measurity left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

We're trying to have native macOS support without the need for Wine because Subnautica is natively supported on macOS. Would you mind explaining why Wine support should be added?

This PR contains many unrelated code changes to core systems that would have been nice as a separate PR. Otherwise we might forget to test something or merge code that introduce unexpected behavior changes.

Especially so because it looks like you used AI which is known to hallucinate unnecessary code changes.

Can you split your work up into bespoke chunks, please? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants