diff --git a/install_mp.bash b/install_mp.bash index e6a2f852c5821a7466879b0bddc3c5e10b67cbfe..bced99687413f63172e0fc03f3f62991b008ce87 100755 --- a/install_mp.bash +++ b/install_mp.bash @@ -5,14 +5,25 @@ set -e mp_gryphon_path=${HOME}/mp_gryphon cat <<EOF ******************************************************************************** - Configure Linux/Mac to support Monterey Phoenix + Configure Linux/Mac to support Monterey Phoenix - Gryphon ******************************************************************************** -Usage: ./install_mp.bash <your OS name> -This script installs packages required by MP Gryphon and installs -MP Gryphon packages under ${mp_gryphon_path}: - * Trace generator - * Gryphon - * Preloaded examples +Usage: ./install_mp.bash <configuration> +Configuration options are: + + * ubuntu - Installs: + trace-generator and required system packages, + Gryphon and required pip packages, + preloaded examples + + * ubuntu_server - Installs: + trace-generator and required system packages, + Gryphon and required pip packages, + + * macos - Installs: + Gryphon and required pip packages, + preloaded examples + +The trace generator, Gryphon, and preloaded examples are installed under ${mp_gryphon_path}. EOF @@ -20,7 +31,7 @@ EOF if [ "$1" != "" ]; then target_os=$1 else - echo An OS name is required. Aborting. + echo A configuration option is required. Aborting. exit fi echo "Press enter to continue..." @@ -69,13 +80,24 @@ install_preloaded_examples() { fi } -install_mp_gryphon() { - install_trace_generator - install_gryphon - install_preloaded_examples +install_ubuntu_gryphon_launcher() { + echo "Adding Gryphon launcher to desktop..." + launcher_path="${HOME}/Desktop/Gryphon.desktop" + cat <<EOF > ${launcher_path} +[Desktop Entry] +Version=1.0 +Type=Application +Name=Gryphon +Comment= +Exec=python3 mp.py +Icon=${mp_gryphon_path}/gryphon/python/resources/icons/MP-logo-small-blue.png +Path=${mp_gryphon_path}/gryphon/python +Terminal=false +EOF + chmod a+x ${launcher_path} } -# install +# install a configuration on a target OS case $target_os in ubuntu_server) echo "Updating existing packages..." @@ -101,7 +123,10 @@ ubuntu) pip3 install PySide6 pip3 install pyqtdarktheme pip3 install pyspellchecker - install_mp_gryphon + install_trace_generator + install_gryphon + install_preloaded_examples + install_ubuntu_gryphon_launcher ;; macos) @@ -114,17 +139,10 @@ macos) install_preloaded_examples ;; -gryphon_only) - echo "Installing Gryphon only..." - install_gryphon - install_preloaded_examples - ;; - *) - echo Installer for ${target_os} not detected. Packages not installed. + echo Error: Configuration ${target_os} is not recognized. Aborting. exit 1 esac -echo "Installation complete." -echo "Monterey Phoenix is now installed and current." +echo "Monterey Phoenix - Gryphon ${target_os} Installation complete."