Skip to content

Add mod loader auto-detection mechanism to LinuxBootstrap.sh#23

Merged
art0007i merged 5 commits intoResoniteModding:masterfrom
Baplar:bl/AdaptiveLinuxBootstrap
Sep 24, 2025
Merged

Add mod loader auto-detection mechanism to LinuxBootstrap.sh#23
art0007i merged 5 commits intoResoniteModding:masterfrom
Baplar:bl/AdaptiveLinuxBootstrap

Conversation

@Baplar
Copy link

@Baplar Baplar commented Sep 24, 2025

Description

This change adds an automatic detection mechanism to only launch the mod loader if requested.
It checks the hookfxr parameters of the current running command, and launches the requested mod loader appropriately.

Motivation and Context

The current version of BepisLoader replaces the official LinuxBootstrap.sh script in order to start with the correct entry point.
However, this is done in a destructive manner: the new script always tries to launch BepisLoader, even if the user meant to launch the vanilla game. To do so, the user would have to delete the new script and validate files with Steam to restore the original.
This change makes it so that the vanilla game will be launched by default, and the mod loader will only be launched if requested through the configuration or command line arguments.

How Has This Been Tested?

I have tested the script on my PC and checked as many use cases as I could think of:

  • The game runs vanilla if launched through Steam with a default environment
  • The game runs with BepisLoader if launched through Gale
  • The game runs vanilla if launched through Gale with Gale launch option --hookfxr-disable
  • The game runs with BepisLoader if launched through Steam with launch option --hookfxr-enable
  • The game runs with BepisLoader if launched through Steam with enable=true set in hookfxr.ini
  • The game runs with MonkeyLoader if launched through Steam with launch option --hookfxr-enable --hookfxr-target=MonkeyLoaderWrapper.Linux.dll
  • The game runs with Monkeyloader if launched through Steam with enable=true and target_assembly=MonkeyLoaderWrapper.Linux.dll set in hookfxr.ini

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link

@art0007i art0007i left a comment

Choose a reason for hiding this comment

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

few nitpicks but looks good overall. thanks for the help!

Copy link

@art0007i art0007i left a comment

Choose a reason for hiding this comment

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

LGTM

@hazre hazre self-requested a review September 24, 2025 22:34
Copy link
Member

@hazre hazre left a comment

Choose a reason for hiding this comment

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

Haven't tested it but it looks good, thanks!

Copy link

@NepuShiro NepuShiro left a comment

Choose a reason for hiding this comment

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

lgtm

@art0007i art0007i merged commit 08888d8 into ResoniteModding:master Sep 24, 2025
1 check passed
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.

4 participants