diff --git a/compile.conf b/compile.conf index d265de0..fa46f35 100644 --- a/compile.conf +++ b/compile.conf @@ -1,7 +1,7 @@ [QtTermTCP] version=0.1 wget=http://www.cantab.net/users/john.wiseman/Downloads/QtTermSource.zip -install=$HOME/.local/bin +install=$HOME/.local/bin/QtTermTCP steps=qmake, make, mv QtTermTCP $HOME/.local/bin/ [Kiwix-Desktop] @@ -10,14 +10,9 @@ git=https://github.com/kiwix/kiwix-desktop.git install=/usr/local/bin/kiwix-desktop steps=/usr/lib/qt6/bin/qmake, make, sudo make install -#[PotaCAT] -#version=1.1.0 -#git=https://github.com/Waffleslop/POTACAT.git -#install=$HOME/.local/bin -#steps=npm install, $HOME/.local/share/HamPack/patch-potacat.sh, npm run dist:linux, mv /dist/*.AppImage $HOME/.local/bin/ - [potacat] version=1.1.0 git=https://github.com/Waffleslop/POTACAT.git install=$HOME/.local/bin/POTACAT.AppImage +desktop=$HOME/.local/share/HamPack/desktop/potacat.desktop steps=bash $HOME/.local/share/HamPack/patch-potacat.sh, npm install, npm run dist:linux, mv dist/*.AppImage $HOME/.local/bin/ \ No newline at end of file diff --git a/desktop/icons/potacat.png b/desktop/icons/potacat.png new file mode 100644 index 0000000..eaa6dbb Binary files /dev/null and b/desktop/icons/potacat.png differ diff --git a/desktop/potacat.desktop b/desktop/potacat.desktop new file mode 100644 index 0000000..1f8cee2 --- /dev/null +++ b/desktop/potacat.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=POTACAT +Comment=Amateur radio spot aggregator with CAT control, QSO logging, and panadapter integration +Exec=$HOME/.local/bin/POTACAT.AppImage +Icon=$HOME/.local/share/HamPack/desktop/icons/potacat.png +Type=Application +Categories=HamRadio;Utility; +Terminal=false diff --git a/install-compiled.sh b/install-compiled.sh index e57c399..188a209 100755 --- a/install-compiled.sh +++ b/install-compiled.sh @@ -93,6 +93,25 @@ needs_update() { return 0 } +# Install desktop file if specified +install_desktop() { + local desktop="$1" + + if [ -z "$desktop" ]; then + return + fi + + if [ ! -f "$desktop" ]; then + echo " Warning: desktop file $desktop not found, skipping." + return + fi + + echo " Installing desktop file..." + mkdir -p "$HOME/.local/share/applications" + cp "$desktop" "$HOME/.local/share/applications/" + echo " Desktop file installed." +} + # Fetch source via git or wget fetch_source() { local app="$1" @@ -183,10 +202,19 @@ process_app() { local install_path="$4" local steps="$5" local version="$6" + local desktop="$7" echo "" echo "=== $app ===" + # Check if already installed + if command -v "$app" &> /dev/null || [ -f "$install_path" ]; then + if [ -z "$version" ]; then + echo " $app is already installed, skipping." + return + fi + fi + if [ -z "$version" ]; then echo " Warning: no version specified in compile.conf for $app." read -rp " Compile and install $app anyway? [y/N] " response @@ -200,23 +228,24 @@ process_app() { fetch_source "$app" "$git_url" "$wget_url" run_steps "$app" "$steps" + install_desktop "$desktop" save_installed_version "$app" "$version" echo " $app $version installed successfully." } # Parse compile.conf and process each app process_conf() { - local app="" git_url="" wget_url="" install_path="" steps="" version="" + local app="" git_url="" wget_url="" install_path="" steps="" version="" desktop="" while IFS= read -r line || [ -n "$line" ]; do [[ -z "$line" || "$line" == \#* ]] && continue if [[ "$line" =~ ^\[(.+)\]$ ]]; then if [ -n "$app" ]; then - process_app "$app" "$git_url" "$wget_url" "$install_path" "$steps" "$version" + process_app "$app" "$git_url" "$wget_url" "$install_path" "$steps" "$version" "$desktop" fi app="${BASH_REMATCH[1]}" - git_url="" wget_url="" install_path="" steps="" version="" + git_url="" wget_url="" install_path="" steps="" version="" desktop="" continue fi @@ -229,13 +258,14 @@ process_conf() { install) install_path="$value" ;; steps) steps="$value" ;; version) version="$value" ;; + desktop) desktop="$value" ;; esac done < "$CONF_FILE" # Process the last app in the file if [ -n "$app" ]; then - process_app "$app" "$git_url" "$wget_url" "$install_path" "$steps" "$version" + process_app "$app" "$git_url" "$wget_url" "$install_path" "$steps" "$version" "$desktop" fi }