add support for XLM pre-launch script integration and non-interactive configuration modes
This commit is contained in:
parent
72c301be78
commit
6f7d8c9d7c
4 changed files with 188 additions and 66 deletions
45
installer.sh
45
installer.sh
|
|
@ -191,6 +191,51 @@ else
|
|||
echo "update-desktop-database not found, skipping."
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Checking for XLM compatibility tool..."
|
||||
XLM_PATHS=(
|
||||
"$HOME/.local/share/Steam/compatibilitytools.d/XLCore"
|
||||
"$HOME/.local/share/Steam/compatibilitytools.d/XLM"
|
||||
"$HOME/.local/share/Steam/compatibilitytools.d/xlm"
|
||||
"$HOME/.steam/root/compatibilitytools.d/XLCore"
|
||||
"$HOME/.steam/root/compatibilitytools.d/XLM"
|
||||
"$HOME/.steam/root/compatibilitytools.d/xlm"
|
||||
)
|
||||
|
||||
XLM_FOUND=""
|
||||
for p in "${XLM_PATHS[@]}"; do
|
||||
if [ -d "$p" ]; then
|
||||
XLM_FOUND="$p"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
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/"
|
||||
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."
|
||||
echo "(Leave blank to skip)"
|
||||
read -p "> " CUSTOM_XLM_PATH
|
||||
if [ -n "$CUSTOM_XLM_PATH" ] && [ -d "$CUSTOM_XLM_PATH" ]; then
|
||||
mkdir -p "$CUSTOM_XLM_PATH/prelaunch.d"
|
||||
ln -sf "$BIN_DIR/xivlauncher-wrapper" "$CUSTOM_XLM_PATH/prelaunch.d/xivlauncher-wrapper"
|
||||
echo "Successfully linked wrapper to $CUSTOM_XLM_PATH/prelaunch.d/"
|
||||
else
|
||||
echo "Skipping XLM pre-launch script installation."
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Skipping XLM pre-launch script setup."
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Installation complete!"
|
||||
echo "You may need to add $BIN_DIR to your PATH if it's not already there."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue