Fix for CK3/other games with similar directory structure

This commit is contained in:
Toofy
2024-01-12 19:34:36 +00:00
parent 34234f78b9
commit d016cd7200
4 changed files with 37 additions and 8 deletions

4
.gitignore vendored
View File

@@ -2,4 +2,6 @@ build/
.cache
.vscode
lib/
output
output
.idea
cmake-build-debug/

View File

@@ -64,10 +64,15 @@ chmod +x cream.sh
Please collect a log using the instructions below, then post an issue describing your situation [here](https://github.com/anticitizn/creamlinux/issues/new).
## Gathering logs
Install `konsole` and set your game launch options to this:
If using a KDE environment, set your game launch options to this:
```
konsole --hold -e sh ./cream.sh %command%
```
Or if you are using Gnome environment, you can set your launch options to this:
```
gnome-terminal -- sh -c "./cream.sh %command%; exec bash"
```
If using neither, install `konsole` and follow the KDE step.
Then launch the game (skip any launchers like the Paradox launcher if possible, they interfere with the logging). Wait for the game to load if applicable, close it, then copy and paste the contents of the terminal.
# Advanced

View File

@@ -1,10 +1,28 @@
#!/bin/bash
cp "$PWD/lib32Creamlinux.so" /tmp/lib32Creamlinux.so
cp "$PWD/lib64Creamlinux.so" /tmp/lib64Creamlinux.so
cp "$PWD/$(find . -name "libsteam_api.so" -printf "%P\n" | head -n 1)" /tmp/libsteam_api.so
copy_file() {
cp "$1" "$2" || { echo "Error: Failed to copy $1 to $2"; exit 1; }
}
LIBSTEAM_API_DIR=$(find . -name "libsteam_api.so" -printf "%h\n" | head -n 1)
[ -z "$LIBSTEAM_API_DIR" ] && { echo "Error: libsteam_api.so not found."; exit 1; }
if [ ! -z "$CREAM_CONFIG_PATH" ]; then
if [ ! -f "$CREAM_CONFIG_PATH/cream_api.ini" ]; then
echo "Error: cream_api.ini not found in CREAM_CONFIG_PATH."; exit 1;
fi
else
if [ ! -f "$PWD/cream_api.ini" ]; then
echo "Error: cream_api.ini not found in the current working directory."; exit 1;
fi
fi
if [ -z "$CREAM_CONFIG_PATH" ] && [ "$LIBSTEAM_API_DIR" != "$PWD" ]; then
export CREAM_CONFIG_PATH="$PWD/cream_api.ini"
fi
copy_file "$PWD/lib32Creamlinux.so" /tmp/lib32Creamlinux.so
copy_file "$PWD/lib64Creamlinux.so" /tmp/lib64Creamlinux.so
copy_file "$LIBSTEAM_API_DIR/libsteam_api.so" /tmp/libsteam_api.so
LD_PRELOAD="$LD_PRELOAD /tmp/lib64Creamlinux.so /tmp/lib32Creamlinux.so /tmp/libsteam_api.so" "$@"
EXITCODE=$?
rm /tmp/lib32Creamlinux.so
rm /tmp/lib64Creamlinux.so
rm /tmp/libsteam_api.so
rm -f /tmp/lib32Creamlinux.so /tmp/lib64Creamlinux.so /tmp/libsteam_api.so
exit $EXITCODE

View File

@@ -84,6 +84,10 @@ disable_steamapps_issubscribedapp = false
1303182 = Crusader Kings III: Royal Court
1303184 = Crusader Kings III: Fate of Iberia
2114760 = Crusader Kings III: Friends & Foes
2311920 = Crusader Kings III: Tours and Tournaments
2311930 = Crusader Kings III: Elegance of the Empire
2313541 = Crusader Kings III: Wards and Wardens
2313540 = Crusader Kings III: Legacy of Persia
801650 = Surviving Mars - Stellaris Dome Set
801710 = Surviving Mars: Deluxe Edition Upgrade Pack
801690 = Surviving Mars: Mysteries Resupply Pack