2025-08-14 17:15:34 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
USER_HOME="$HOME"
|
|
|
|
|
MAMBA_DIR="$USER_HOME/micromamba"
|
|
|
|
|
CONFIG_DIR="$USER_HOME/.config/OptimaLab35"
|
|
|
|
|
DESKTOP_DIR="$USER_HOME/.local/share/applications"
|
2025-08-14 18:59:08 +02:00
|
|
|
ICON_URL="https://code.boxyfoxy.net/CodeByMrFinchum/OptimaLab35-installer/raw/branch/main/app-icon.png" # change to your actual repo URL
|
2025-08-14 17:15:34 +02:00
|
|
|
ICON_PATH="$CONFIG_DIR/app-icon.png"
|
|
|
|
|
|
|
|
|
|
echo "Checking for micromamba..."
|
|
|
|
|
if [ ! -d "$MAMBA_DIR" ]; then
|
2025-08-14 18:35:27 +02:00
|
|
|
echo "Micromamba is about to be installed."
|
|
|
|
|
echo "When prompted, press ENTER for all options to accept the default settings:"
|
|
|
|
|
echo "- Micromamba binary folder"
|
|
|
|
|
echo "- Initialize shell"
|
|
|
|
|
echo "- Configure conda-forge"
|
|
|
|
|
echo "- Prefix location"
|
|
|
|
|
echo "Using the default installation is required for this script to work correctly."
|
|
|
|
|
sleep 2.0
|
2025-08-14 17:15:34 +02:00
|
|
|
"${SHELL}" <(curl -L micro.mamba.pm/install.sh)
|
|
|
|
|
else
|
2025-08-14 18:35:27 +02:00
|
|
|
echo "Micromamba already installed."
|
2025-08-14 17:15:34 +02:00
|
|
|
fi
|
|
|
|
|
|
2025-08-14 18:35:27 +02:00
|
|
|
echo "Creating micromamba environment 'ol'..."
|
2025-11-03 13:12:56 +01:00
|
|
|
eval "$("$MAMBA_DIR"/etc/profile.d/mamba.sh shell hook -s bash)"
|
2025-08-14 17:31:08 +02:00
|
|
|
micromamba create -y -n ol pip # First creating the mm env.
|
2025-08-14 18:35:27 +02:00
|
|
|
echo "Installing with OptimaLab35..."
|
2025-08-14 17:31:08 +02:00
|
|
|
micromamba run -n ol pip install OptimaLab35 # Then installing OL35, mm dosnt like to create env with OL35
|
2025-08-14 17:15:34 +02:00
|
|
|
|
2025-08-14 18:35:27 +02:00
|
|
|
echo "Creating OptimaLab35 config directory..."
|
2025-08-14 17:15:34 +02:00
|
|
|
mkdir -p "$CONFIG_DIR"
|
|
|
|
|
|
2025-08-14 18:35:27 +02:00
|
|
|
echo "Downloading OptimaLab35 icon..."
|
2025-08-14 17:15:34 +02:00
|
|
|
curl -L "$ICON_URL" -o "$ICON_PATH"
|
|
|
|
|
|
|
|
|
|
echo "Creating desktop entry..."
|
|
|
|
|
mkdir -p "$DESKTOP_DIR"
|
|
|
|
|
|
|
|
|
|
cat > "$DESKTOP_DIR/OptimaLab35.desktop" <<EOL
|
|
|
|
|
[Desktop Entry]
|
|
|
|
|
Type=Application
|
|
|
|
|
Name=OptimaLab35
|
2025-08-14 18:35:27 +02:00
|
|
|
Exec=bash -c 'eval "\$(micromamba shell hook -s bash)"; micromamba activate ol; OptimaLab35'
|
2025-08-14 17:15:34 +02:00
|
|
|
Icon=$ICON_PATH
|
|
|
|
|
Categories=Graphics;Photography;
|
|
|
|
|
Terminal=false
|
|
|
|
|
EOL
|
|
|
|
|
|
|
|
|
|
echo "Creating application shortcut. You may be prompted for your password to finalize permissions."
|
|
|
|
|
chmod +x "$DESKTOP_DIR/OptimaLab35.desktop"
|
|
|
|
|
|
|
|
|
|
echo "Installation complete! You can now launch OptimaLab35 from your application menu."
|
|
|
|
|
echo "Tip: You can update the application at any time from the Settings menu."
|