Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added detection of additional steam libraries #10

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,29 @@ else
APPID=813780 # The most recent App ID when this was written
fi

STEAM_LOCATION="/home/$USER/.local/share"
STEAM_LOCATION="/home/$USER/.steam/steam"

# check if arguments are not empty
if [ ! $# -eq 0 ]; then
# set STEAM_LOCATION to the provided argument
STEAM_LOCATION=$1
fi

SYSTEM32_LOCATION=$STEAM_LOCATION/Steam/steamapps/compatdata/$APPID/pfx/drive_c/windows/system32
libraries=$(grep 'path' $STEAM_LOCATION/steamapps/libraryfolders.vdf | sed -re 's/^(\s)+"path"(\s)+"(.*)"$/\3/g')

echo "Found steam library locations:"
for library in $libraries; do
echo " * $library"
done

for library in $libraries; do
SYSTEM32_LOCATION="$library/steamapps/compatdata/$APPID/pfx/drive_c/windows/system32"

if [ -d "$SYSTEM32_LOCATION" ]; then
echo "Found app in: $SYSTEM32_LOCATION"
break
fi
done;

# Check if the dll already exists and is not a symlink
if [ -f "$SYSTEM32_LOCATION/ucrtbase.dll" ] && [ ! -L "$SYSTEM32_LOCATION/ucrtbase.dll" ]; then
Expand Down