55APP_DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
66LAUNCHER=" $APP_DIR /AI_Deck_Reconstructor.command"
77DESKTOP_LINK=" $HOME /Desktop/AI Deck Reconstructor.command"
8+ DESKTOP_ALIAS=" $HOME /Desktop/AI Deck Reconstructor"
89
910echo " "
1011echo " AI Deck Reconstructor — Installer"
5455fi
5556
5657chmod +x " $LAUNCHER "
57- ln -sf " $LAUNCHER " " $DESKTOP_LINK "
58+
59+ if [[ " $( uname) " == " Darwin" ]]; then
60+ rm -f " $DESKTOP_LINK "
61+ rm -f " $DESKTOP_ALIAS "
62+
63+ osascript << APPLESCRIPT
64+ tell application " Finder"
65+ set targetFile to POSIX file " $LAUNCHER" as alias
66+ set desktopFolder to POSIX file " $HOME/Desktop" as alias
67+ make new alias file at desktopFolder to targetFile with properties {name :" AI Deck Reconstructor" }
68+ end tell
69+ APPLESCRIPT
70+
71+ DESKTOP_SHORTCUT=" $DESKTOP_ALIAS "
72+ else
73+ ln -sf " $LAUNCHER " " $DESKTOP_LINK "
74+ DESKTOP_SHORTCUT=" $DESKTOP_LINK "
75+ fi
5876
5977echo " "
6078echo " =================================="
6179echo " ✅ Installation complete"
6280echo " =================================="
6381echo " "
6482echo " Desktop shortcut created:"
65- echo " $DESKTOP_LINK "
83+ echo " $DESKTOP_SHORTCUT "
6684echo " "
6785echo " NDLOCR-Lite is required for OCR."
6886echo " Recommended local layout:"
@@ -74,6 +92,6 @@ echo ""
7492echo " If NDLOCR-Lite is placed at ../ndlocr-lite, the launcher will try to install it into the virtual environment automatically."
7593echo " "
7694echo " You can now double-click:"
77- echo " AI Deck Reconstructor.command "
95+ echo " $( basename " $DESKTOP_SHORTCUT " ) "
7896echo " "
7997read -p " Press Enter to close..."
0 commit comments