Preserve Doorstop injection for Valheim macOS Rosetta launches - #22
Closed
No898 wants to merge 1 commit into
Closed
Conversation
Contributor
|
Changes to the shell script should be submitted upstream to https://github.com/neighTools/UnityDoorstop/ where they can propagate to upstream BepInEx and then eventually all game specific repacks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #21.
This is a small macOS workaround for current Valheim/BepInExPack users on Apple Silicon.
When the Valheim start script runs the x86_64 game slice through Rosetta, Doorstop can fail to inject because the
DYLD_*variables used forlibdoorstop_x64.dylibare not present in the final Valheim process. The result is confusing for users: Valheim launches normally, but BepInEx never createsBepInEx/LogOutput.logand no plugins load.This patch keeps the change limited to
scripts/Start scripts/start_game_bepinex.sh:doorstop_pathDYLD_LIBRARY_PATHandDYLD_INSERT_LIBRARIESinside that shellexecs the Valheim executableThis is intentionally narrower than #20. It does not attempt native arm64 support or broader runtime changes; it is just a compatibility workaround for the current packaged Valheim launch path.
Local validation
Validated on:
26.3.1(25D2128)0.221.12(network version36)BepInExPack_Valheim 5.4.2333Before the workaround:
BepInEx/LogOutput.logwas not created.After the workaround:
Notes
I opened this as a small PR because the broader Apple Silicon work in #20 is still draft. If you would rather fold this into that PR, I am fine with closing this.
This patch was prepared with AI assistance from Codex and validated locally on the machine above.