refactor: improve XLM detection and enable multi-path pre-launch script installation
This commit is contained in:
parent
940217d95d
commit
16719f7400
1 changed files with 11 additions and 7 deletions
18
installer.sh
18
installer.sh
|
|
@ -202,10 +202,10 @@ XLM_PATHS=(
|
|||
"$HOME/.steam/root/compatibilitytools.d/xlm"
|
||||
)
|
||||
|
||||
XLM_FOUND=""
|
||||
XLM_FOUND=false
|
||||
for p in "${XLM_PATHS[@]}"; do
|
||||
if [ -d "$p" ]; then
|
||||
XLM_FOUND="$p"
|
||||
XLM_FOUND=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
|
@ -214,11 +214,15 @@ echo "Would you like to install the wrapper as a pre-launch script for XLM?"
|
|||
echo "This allows the OTP injector to run automatically when launching FFXIV via Steam with XLM."
|
||||
read -p "Install as XLM pre-launch script? [Y/n]: " INSTALL_PRELAUNCH
|
||||
if [[ ! "$INSTALL_PRELAUNCH" =~ ^[Nn]$ ]]; then
|
||||
if [ -n "$XLM_FOUND" ]; then
|
||||
echo "Found XLM at $XLM_FOUND"
|
||||
mkdir -p "$XLM_FOUND/prelaunch.d"
|
||||
ln -sf "$BIN_DIR/xivlauncher-wrapper" "$XLM_FOUND/prelaunch.d/xivlauncher-wrapper"
|
||||
echo "Successfully linked wrapper to $XLM_FOUND/prelaunch.d/"
|
||||
if [ "$XLM_FOUND" = true ]; then
|
||||
for p in "${XLM_PATHS[@]}"; do
|
||||
if [ -d "$p" ]; then
|
||||
echo "Found XLM at $p"
|
||||
mkdir -p "$p/prelaunch.d"
|
||||
ln -sf "$BIN_DIR/xivlauncher-wrapper" "$p/prelaunch.d/xivlauncher-wrapper"
|
||||
echo "Successfully linked wrapper to $p/prelaunch.d/"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Could not automatically detect XLM installation path."
|
||||
echo "If you have XLM installed, please enter the path to your XLM compatibility tool folder."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue