fix(cream.sh): work from any CWD, MangoHud support, bitness-aware preload, CREAM_CONFIG_PATH as file or dir - #75
Open
gongarn wants to merge 1 commit into
Conversation
…load, CREAM_CONFIG_PATH as file or dir - cd to the script's own directory: Steam may launch games from a different working directory, which broke 'sh ./cream.sh %command%' launch options while terminal runs worked (issue anticitizn#62) - detect 'mangohud' as the first argument and set MANGOHUD=1 and MANGOHUD_DLSYM=1 so MangoHud and creamlinux preloads coexist (anticitizn#51) - read the ELF class of libsteam_api.so (byte at offset 4: 01 = 32-bit, 02 = 64-bit) and preload only the matching creamlinux library; unknown files fall back to both. Removes the 'wrong ELF class' noise from ld.so seen in CK3 logs (anticitizn#71) - CREAM_CONFIG_PATH now accepts both a file path and a directory containing cream_api.ini (previously the script checked it as a directory while the C++ loader read it as a file path)
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
Four small, self-contained fixes for
package/cream.shthat address open issues:sh ./cream.sh %command%launch options while terminal runs worked. The script nowcds to its own directory first.sh ./cream.sh mangohud %command%setsMANGOHUD=1andMANGOHUD_DLSYM=1so both preloads coexist (previously only one took effect).LD_PRELOADon CK3 #71) — reads the ELF class oflibsteam_api.so(byte at offset 4:01= 32-bit,02= 64-bit) and preloads only the matching creamlinux library, removing thewrong ELF classnoise from ld.so visible in CK3 logs. Unknown files fall back to preloading both.cream_api.ini(the script checked it as a directory while the C++ loader reads it as a file path).Testing
bash -nclean; behavior of the non-modified parts unchanged.