fix drive_c symlink during prefix creation

This commit is contained in:
GloriousEggroll 2024-01-30 14:00:48 -07:00
parent a4a845321a
commit cfb7121a38

View File

@ -1,6 +1,7 @@
#!/bin/bash
set -x
# use for debug only.
# set -x
if [[ -z $1 ]] || [[ -z $WINEPREFIX ]] || [[ -z $GAMEID ]] || [[ -z $PROTONPATH ]]; then
echo 'Usage: WINEPREFIX=<wine-prefix-path> GAMEID=<ulwgl-id> PROTONPATH=<proton-version-path> ./gamelauncher.sh <executable-path> <arguments>'
@ -11,6 +12,7 @@ fi
if [[ $WINEPREFIX ]]; then
if [[ ! -d "$WINEPREFIX" ]]; then
mkdir -p "$WINEPREFIX"
export PROTON_DLL_COPY="*"
fi
if [[ ! -d "$WINEPREFIX"/pfx ]]; then
ln -s "$WINEPREFIX" "$WINEPREFIX"/pfx
@ -18,6 +20,10 @@ if [[ $WINEPREFIX ]]; then
if [[ ! -f "$WINEPREFIX"/tracked_files ]]; then
touch "$WINEPREFIX"/tracked_files
fi
if [[ ! -f "$WINEPREFIX/dosdevices/" ]]; then
mkdir -p "$WINEPREFIX"/dosdevices
ln -s "../drive_c" "$WINEPREFIX/dosdevices/c:"
fi
fi
export PROTONPATH="$PROTONPATH"
export ULWGL_ID="$GAMEID"