From 917fb67448a4d7d73a7678942842fa1998169f7d Mon Sep 17 00:00:00 2001 From: Karel Date: Thu, 30 Apr 2026 15:27:14 +0200 Subject: [PATCH 1/3] Made an install script --- install.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 install.sh diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..e69de29 From 12d14a15800e85a8ff23db5c8fde2ef1a09d152b Mon Sep 17 00:00:00 2001 From: Karel Date: Thu, 30 Apr 2026 15:37:27 +0200 Subject: [PATCH 2/3] Add quickstart section to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ba804bb..295af43 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,10 @@ a lot of time debugging and making all this better. They do, but rf2bridge.exe could still be useful if one wanted to map the shared memory from unix space back into a wine space that had a program such as CrewChief running. +## Quickstart + +To start using this you can just clone this repository and run `./install.sh`. This will install needed files to /opt/simshmbridge and provide you with the needed isntructions to use it. + ## Compilation ### Prerequisits From c9f485c3271c828ec0239da0bc87fb2a2f639e76 Mon Sep 17 00:00:00 2001 From: Karel Date: Thu, 30 Apr 2026 15:52:02 +0200 Subject: [PATCH 3/3] Recommiting missing file contents --- install.sh | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) mode change 100644 => 100755 install.sh diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index e69de29..3769b0e --- a/install.sh +++ b/install.sh @@ -0,0 +1,112 @@ +#!/usr/bin/env bash + +findProtonPath() { + local APPID=$1 + local CONFIG_FILE="$HOME/.local/share/Steam/config/config.vdf" + + if [ ! -f "$CONFIG_FILE" ]; then + echo "Error: Steam config not found." >&2 + return 1 + fi + + local PROTON_NAME + PROTON_NAME=$(awk '/"CompatToolMapping"/ {flag=1} flag && /"'$APPID'"/ {app=1} app && /"name"/ {print $2; exit}' "$CONFIG_FILE" | tr -d '"') + + if [ -z "$PROTON_NAME" ]; then + echo "-1" + return + fi + + local CUSTOM_PATH="$HOME/.local/share/Steam/compatibilitytools.d/$PROTON_NAME" + local OFFICIAL_PATH="$HOME/.local/share/Steam/steamapps/common/$PROTON_NAME" + + if [ -d "$CUSTOM_PATH" ]; then + echo "$CUSTOM_PATH" + elif [ -d "$OFFICIAL_PATH" ]; then + echo "$OFFICIAL_PATH" + else + echo "-1" + fi +} + +echo -n "This script will install simshmbridge by compiling it and moving binaries to /opt/simshmbridge/. Continue [Y/n]? " +read -r continue + +case "$continue" in +[nN]*) exit ;; +*) ;; +esac + +echo 'Select the game for simshmbridge installation:' +echo '1) Assetto Corsa' +echo '2) Automobilista 2' +echo '3) LeMans Ultimate' +echo '4) RaceRoom' +read -r game + +case $game in +1) + ID="244210" + MAKE_FILE="Makefile.ac" + BIN="acbridge.exe" + SHM="acshm" + ;; +2) + ID="1066890" + MAKE_FILE="Makefile.pcars2" + BIN="pcars2bridge.exe" + SHM="pcars2shm" + ;; +3) + ID="2399420" + MAKE_FILE="Makefile.lmu" + BIN="lmubridge.exe" + SHM="lmushm" + ;; +4) + ID="211500" + MAKE_FILE="Makefile.r3e" + BIN="r3ebridge.exe" + SHM="r3eshm" + ;; +*) + echo "Invalid selection. Exiting..." + exit 1 + ;; +esac + +echo -e "\nEnsuring repository is synced...\n" +git submodule sync --recursive >/dev/null +git submodule update --init --recursive >/dev/null || { + echo "Git update failed" + exit 1 +} + +echo -e "Compiling simshmbridge for your game...\n" +if make -f "$MAKE_FILE" >/dev/null 2>&1; then + echo "Compilation successful." +else + echo "Compilation failed! Check your build dependencies." + exit 1 +fi + +echo -e "Moving files to /opt/simshmbridge/...\n" +sudo mkdir -p /opt/simshmbridge/ +sudo mv "./assets/$BIN" /opt/simshmbridge/ +sudo mv "./assets/$SHM" /opt/simshmbridge/ + +protonPath=$(findProtonPath "$ID") + +if [ "$protonPath" == "-1" ] || [ -z "$protonPath" ]; then + echo "Warning: Could not find Proton path. Please locate your Proton 'proton' script manually." + protonPath="[PATH_TO_PROTON]" +fi + +echo "-------------------------------------------------------" +echo "Simshmbridge installed successfully!" +echo -e "\nPlease append the following to your Steam Launch Options:" +echo "&& sleep 5 && \"$protonPath/proton\" run /opt/simshmbridge/$BIN" +echo -e "\nIf you have no existing launch options, use this:" +echo "%%command%% && sleep 5 && \"$protonPath/proton\" run /opt/simshmbridge/$BIN" +echo -e "\nAlso before starting the game make sure to run /opt/simshmbridge/$SHM. You can also just make it run on startup." +echo "-------------------------------------------------------"