Skip to content

Conversation

@astiob
Copy link
Contributor

@astiob astiob commented Oct 30, 2023

Same as #692 but branched from v5-lts.

Description

This modifies run_bepinex.sh to support both old and new versions of Steam, as well as to support
additional arguments beyond $5/$7 (which were supported in master but not in v5-lts).

An additional, simple fix for a generic shell-script issue is also included.

Motivation and Context

Recently, Steam apparently changed the way it executes the game, inserting -- arguments where they didn’t exist before. So #562 and #563 modified run_bepinex*.sh to match this change by hardcoding the two added arguments. As noted in #562 (review), this presumably made it impossible to run BepInEx in older versions of Steam.

This pull request teaches the code in run_bepinex.sh to handle the -- arguments in a special way, achieving the desired effect both in old Steam where they’re absent and in new Steam where they’re present.

Further, the shell script now uses exec instead of call; exit (thus allowing, for example, killed-by-signal status to be passed through to the invoker in case it matters, not to mention a minor efficiency improvement).

How Has This Been Tested?

I’ve tested the new code in an isolated shell script (in openSUSE’s bash 4.4.23 and Ubuntu’s dash 0.5.11, both invoked as sh), but I have not tested an actual Steam setup.

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. (This is probably irrelevant for the shell scripts? But I tried to make it consistent with the other code in the same files.)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@astiob astiob force-pushed the SteamLaunch/v5-lts branch from 900cbb2 to 9b2c38a Compare November 7, 2023 21:49
@estebananot
Copy link

Excelent work

@ManlyMarco ManlyMarco merged commit 618089c into BepInEx:v5-lts Feb 9, 2024
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.

3 participants