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"
|
"$HOME/.steam/root/compatibilitytools.d/xlm"
|
||||||
)
|
)
|
||||||
|
|
||||||
XLM_FOUND=""
|
XLM_FOUND=false
|
||||||
for p in "${XLM_PATHS[@]}"; do
|
for p in "${XLM_PATHS[@]}"; do
|
||||||
if [ -d "$p" ]; then
|
if [ -d "$p" ]; then
|
||||||
XLM_FOUND="$p"
|
XLM_FOUND=true
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
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."
|
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
|
read -p "Install as XLM pre-launch script? [Y/n]: " INSTALL_PRELAUNCH
|
||||||
if [[ ! "$INSTALL_PRELAUNCH" =~ ^[Nn]$ ]]; then
|
if [[ ! "$INSTALL_PRELAUNCH" =~ ^[Nn]$ ]]; then
|
||||||
if [ -n "$XLM_FOUND" ]; then
|
if [ "$XLM_FOUND" = true ]; then
|
||||||
echo "Found XLM at $XLM_FOUND"
|
for p in "${XLM_PATHS[@]}"; do
|
||||||
mkdir -p "$XLM_FOUND/prelaunch.d"
|
if [ -d "$p" ]; then
|
||||||
ln -sf "$BIN_DIR/xivlauncher-wrapper" "$XLM_FOUND/prelaunch.d/xivlauncher-wrapper"
|
echo "Found XLM at $p"
|
||||||
echo "Successfully linked wrapper to $XLM_FOUND/prelaunch.d/"
|
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
|
else
|
||||||
echo "Could not automatically detect XLM installation path."
|
echo "Could not automatically detect XLM installation path."
|
||||||
echo "If you have XLM installed, please enter the path to your XLM compatibility tool folder."
|
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