installing direwolf fixes
This commit is contained in:
39
binaries.conf
Normal file
39
binaries.conf
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# binaries.conf - Pre-built binaries to download and install
|
||||||
|
#
|
||||||
|
# Fields:
|
||||||
|
# version= - version string for update checking
|
||||||
|
# url= - direct download URL for the binary
|
||||||
|
# install= - destination path (e.g. $HOME/.local/bin/appname)
|
||||||
|
# exec= - command for the .desktop Exec= field (defaults to install path if omitted)
|
||||||
|
# gui=true - set if a .desktop file should be generated. No .desktop file is created if false
|
||||||
|
# comment= - description for the .desktop file
|
||||||
|
# icon= - icon theme name (e.g. wsjtx) or path to icon file (e.g. $HOME/.local/share/HamPack/icons/wsjtx.png)
|
||||||
|
# categories= - desktop categories (default: HamRadio;)
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# [wsjtx]
|
||||||
|
# version=2.7.0
|
||||||
|
# url=https://example.com/wsjtx-2.7.0-x86_64.AppImage
|
||||||
|
# install=$HOME/.local/bin/wsjtx
|
||||||
|
# gui=true
|
||||||
|
# comment=Weak signal digital modes for amateur radio
|
||||||
|
# exec=$HOME/.local/bin/wsjtx
|
||||||
|
# icon=wsjtx
|
||||||
|
# categories=HamRadio;
|
||||||
|
|
||||||
|
[ardop]
|
||||||
|
version=1.0.4.1.3
|
||||||
|
url=https://github.com/pflarue/ardop/releases/download/1.0.4.1.3/ardopcf_amd64_Linux_64
|
||||||
|
install=$HOME/.local/bin/ardopcf_amd64_Linux_64
|
||||||
|
gui=false
|
||||||
|
|
||||||
|
[paracon]
|
||||||
|
version=1.30
|
||||||
|
url=https://github.com/mfncooper/paracon/releases/download/v1.3.0/paracon_1.3.0.pyz
|
||||||
|
install=$HOME/.local/bin/paracon_1.3.0.pyz
|
||||||
|
gui=true
|
||||||
|
comment=Weak signal digital modes for amateur radio
|
||||||
|
exec=python $HOME/.local/bin/paracon_1.3.0.pyz
|
||||||
|
icon=$HOME/.local/share/HamPack/desktop/icons/paracon.png
|
||||||
|
categories=HamRadio;
|
||||||
|
|
||||||
@@ -2,22 +2,22 @@
|
|||||||
version=1.8.1
|
version=1.8.1
|
||||||
git=https://github.com/wb2osz/direwolf.git
|
git=https://github.com/wb2osz/direwolf.git
|
||||||
install=$HOME/.local/bin/direwolf
|
install=$HOME/.local/bin/direwolf
|
||||||
steps=mkdir build, cd build, mkdir -p /tmp/hampack-build/direwolf-udev, cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DUDEV_RULES_DIR=/tmp/hampack-build/direwolf-udev, make -j4, make install, sudo cp /tmp/hampack-build/direwolf-udev/99-direwolf-cmedia.rules /etc/udev/rules.d/, sudo udevadm control --reload-rules
|
steps=mkdir build, cd build, mkdir -p /tmp/hampack-build/direwolf-udev, cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DUDEV_RULES_DIR=/tmp/hampack-build/direwolf-udev, make -j4, make install, sudo cp /tmp/hampack-build/direwolf-udev/99-direwolf-cmedia.rules /etc/udev/rules.d/, sudo udevadm control --reload-rules, mv $HOME/.local/share/HamPack/conf.d/direwolf.conf $HOME/.local/state/HamPack/
|
||||||
|
|
||||||
[QtTermTCP]
|
[QtTermTCP]
|
||||||
version=0.39
|
version=0.39
|
||||||
wget=http://www.cantab.net/users/john.wiseman/Downloads/QtTermSource.zip
|
wget=http://www.cantab.net/users/john.wiseman/Downloads/QtTermSource.zip
|
||||||
install=$HOME/.local/bin/QtTermTCP
|
install=$HOME/.local/bin/QtTermTCP
|
||||||
gui=true
|
gui=false
|
||||||
steps=qmake, make, mv QtTermTCP $HOME/.local/bin/
|
steps=qmake, make, mv QtTermTCP $HOME/.local/bin/
|
||||||
|
|
||||||
[Kiwix-Desktop]
|
[kiwix-desktop]
|
||||||
version=2.75.1
|
version=2.75.1
|
||||||
git=https://github.com/kiwix/kiwix-desktop.git
|
git=https://github.com/kiwix/kiwix-desktop.git
|
||||||
install=$HOME/.local/bin/kiwix-desktop
|
install=$HOME/.local/bin/kiwix-desktop
|
||||||
steps=/usr/lib/qt6/bin/qmake PREFIX=$HOME/.local, make, make install
|
steps=/usr/lib/qt6/bin/qmake PREFIX=$HOME/.local, make, make install
|
||||||
|
|
||||||
[Kiwix-Tools]
|
[kiwix-tools]
|
||||||
version=3.8.2
|
version=3.8.2
|
||||||
git=https://github.com/kiwix/kiwix-tools.git
|
git=https://github.com/kiwix/kiwix-tools.git
|
||||||
install=$HOME/.local/bin/kiwix-lib
|
install=$HOME/.local/bin/kiwix-lib
|
||||||
|
|||||||
280
conf.d/direwolf.conf
Normal file
280
conf.d/direwolf.conf
Normal file
@@ -0,0 +1,280 @@
|
|||||||
|
#############################################################
|
||||||
|
# #
|
||||||
|
# Sample configuration file for Dire Wolf #
|
||||||
|
# #
|
||||||
|
# Linux version #
|
||||||
|
# #
|
||||||
|
#############################################################
|
||||||
|
#
|
||||||
|
# Extensive documentation can be found here:
|
||||||
|
# Stable release - https://github.com/wb2osz/direwolf/tree/master/doc
|
||||||
|
# Latest development - https://github.com/wb2osz/direwolf/tree/dev/doc
|
||||||
|
# Additional topics - https://github.com/wb2osz/direwolf-doc
|
||||||
|
#
|
||||||
|
# The basic documentation set can also be found in
|
||||||
|
# /usr/local/share/doc/direwolf/ or /usr/share/doc/direwolf/
|
||||||
|
# Concise "man" pages are also available for Linux.
|
||||||
|
#
|
||||||
|
#########################################################################
|
||||||
|
# #
|
||||||
|
# Recommended Reading for everyone: #
|
||||||
|
# "Understanding APRS Packets" in https://github.com/wb2osz/aprsspec #
|
||||||
|
# #
|
||||||
|
#########################################################################
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Questions??? Join the discussion forum: https://groups.io/g/direwolf
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# This sample file does not have examples for all of the possibilities.
|
||||||
|
# Consult the User Guide for more details on configuration options
|
||||||
|
# and other documents for more details for different uses.
|
||||||
|
#
|
||||||
|
# These are the most likely settings you might change:
|
||||||
|
#
|
||||||
|
# (1) MYCALL - call sign and SSID for your station.
|
||||||
|
#
|
||||||
|
# Look for lines starting with MYCALL and
|
||||||
|
# change NOCALL to your own callsign and optional SSID.
|
||||||
|
#
|
||||||
|
# (2) PBEACON - enable position beaconing.
|
||||||
|
#
|
||||||
|
# Look for lines starting with PBEACON and
|
||||||
|
# modify for your location, symbol, comment, etc.
|
||||||
|
#
|
||||||
|
# (3) DIGIPEATER - configure digipeating rules.
|
||||||
|
#
|
||||||
|
# Look for lines starting with DIGIPEATER.
|
||||||
|
# Most people will probably use of of the two examples.
|
||||||
|
#
|
||||||
|
# (4) IGSERVER, IGLOGIN - IGate server and login
|
||||||
|
#
|
||||||
|
# Configure an IGate client to relay messages between
|
||||||
|
# radio and internet servers.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# The default location is "direwolf.conf" in the current working directory.
|
||||||
|
# On Linux, the user's home directory will also be searched.
|
||||||
|
# An alternate configuration file location can be specified with the "-c" command line option.
|
||||||
|
#
|
||||||
|
# As you probably guessed by now, # indicates a comment line.
|
||||||
|
#
|
||||||
|
# Remove the # at the beginning of a line if you want to use a sample
|
||||||
|
# configuration that is currently commented out.
|
||||||
|
#
|
||||||
|
# Commands are a keyword followed by parameters.
|
||||||
|
#
|
||||||
|
# Command key words are case insensitive. i.e. upper and lower case are equivalent.
|
||||||
|
#
|
||||||
|
# Command parameters are generally case sensitive. i.e. upper and lower case are different.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# #
|
||||||
|
# FIRST AUDIO DEVICE PROPERTIES #
|
||||||
|
# (Channel 0 or 0 + 1 if in stereo) #
|
||||||
|
# #
|
||||||
|
#############################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Many people will simply use the default sound device.
|
||||||
|
# Some might want to use an alternative device by choosing it here.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Many examples of radio interfaces and PTT options can be found in:
|
||||||
|
# https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/Radio-Interface-Guide.pdf
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Linux ALSA is complicated. See User Guide for discussion.
|
||||||
|
# To use something other than the default, generally use plughw
|
||||||
|
# and a card number reported by "arecord -l" command. Example:
|
||||||
|
|
||||||
|
ADEVICE plughw:0,0
|
||||||
|
|
||||||
|
# Many more details and examples can be found in:
|
||||||
|
# https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/Radio-Interface-Guide.pdf
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# #
|
||||||
|
# CHANNEL 0 PROPERTIES #
|
||||||
|
# #
|
||||||
|
#############################################################
|
||||||
|
|
||||||
|
CHANNEL 0
|
||||||
|
|
||||||
|
#
|
||||||
|
# Station identifier for this channel.
|
||||||
|
# Multiple channels can have the same or different names.
|
||||||
|
#
|
||||||
|
# It can be up to 6 letters and digits with an optional ssid in range of 1 to 15.
|
||||||
|
# The APRS specification requires that it be upper case.
|
||||||
|
#
|
||||||
|
# Example (don't use this unless you are me): MYCALL WB2OSZ-5
|
||||||
|
#
|
||||||
|
|
||||||
|
MYCALL NOCALL
|
||||||
|
|
||||||
|
#
|
||||||
|
# Pick a suitable modem speed based on your situation.
|
||||||
|
# 1200 Most common for VHF/UHF. This is the default if not specified.
|
||||||
|
# 2400 QPSK compatible with MFJ-2400, and probably PK232-2400 & KPC-2400.
|
||||||
|
# 300 Low speed for HF SSB. Default tones 1600 & 1800.
|
||||||
|
# EAS Emergency Alert System (EAS) Specific Area Message Encoding (SAME).
|
||||||
|
# 9600 G3RUH style - Can't use Microphone and Speaker connections.
|
||||||
|
# AIS International system for tracking ships on VHF.
|
||||||
|
# Also uses 9600 bps so Speaker connection won't work.
|
||||||
|
#
|
||||||
|
# In most cases you can just specify the speed. Examples:
|
||||||
|
#
|
||||||
|
|
||||||
|
#MODEM 300
|
||||||
|
#MODEM 9600
|
||||||
|
MODEM 1200
|
||||||
|
|
||||||
|
#
|
||||||
|
# Many options are available for great flexibility.
|
||||||
|
# See User Guide for details.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Push to Talk (PTT) can be confusing because there are so many different cases.
|
||||||
|
# https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/Radio-Interface-Guide.pdf
|
||||||
|
# goes into detail about the various options.
|
||||||
|
|
||||||
|
# If using a C-Media CM108/CM119 or similar USB Audio Adapter,
|
||||||
|
# you can use a GPIO pin for PTT control. This is very convenient
|
||||||
|
# because a single USB connection is used for both audio and PTT.
|
||||||
|
# Example:
|
||||||
|
|
||||||
|
PTT CM108
|
||||||
|
|
||||||
|
|
||||||
|
# There are other possibilities such as serial port RTS, Raspberry Pi GPIO pins,
|
||||||
|
# and hamlib for CAT control. For more details see:
|
||||||
|
# https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/Radio-Interface-Guide.pdf
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# #
|
||||||
|
# VIRTUAL TNC SERVER PROPERTIES #
|
||||||
|
# #
|
||||||
|
#############################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Dire Wolf acts as a virtual TNC and can communicate with
|
||||||
|
# client applications by different protocols:
|
||||||
|
#
|
||||||
|
# - the "AGW TCPIP Socket Interface" - default port 8000
|
||||||
|
# - KISS protocol over TCP socket - default port 8001
|
||||||
|
# - KISS TNC via pseudo terminal (-p command line option)
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#############################################################
|
||||||
|
# #
|
||||||
|
# FIXED POSIION BEACONING PROPERTIES #
|
||||||
|
# #
|
||||||
|
#############################################################
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Beaconing is configured with these two commands:
|
||||||
|
#
|
||||||
|
# PBEACON - for a position report (usually yourself)
|
||||||
|
# OBEACON - for an object report (usually some other entity)
|
||||||
|
#
|
||||||
|
# Each has a series of keywords and values for options.
|
||||||
|
# See User Guide for details.
|
||||||
|
#
|
||||||
|
# Example: Change the latitude and longitude or your location
|
||||||
|
# will show you about to go over Niagara Falls.
|
||||||
|
|
||||||
|
# PBEACON delay=1 every=1 overlay=S symbol="digi" lat=38.857108 long=-104.811041 power=5 gain=4 comment="Packet Radio Test" via=WIDE1-1
|
||||||
|
|
||||||
|
# Run "direwolf -S" (upper case S) to get a list of symbols that can
|
||||||
|
# be used rather than "canoe." Specify a unique substring of description.
|
||||||
|
#
|
||||||
|
# Did you know that APRS comments and messages can contain UTF-8 characters, not only plain ASCII?
|
||||||
|
#
|
||||||
|
#PBEACON delay=1 every=30 overlay=S symbol="digi" lat=43.077104 long=-79.075674 comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xe0\xb8\xa7\xe0\xb8\xb4\xe0\xb8\x97\xe0\xb8\xa2\xe0\xb8\xb8\xe0\xb8\xaa\xe0\xb8\xa1\xe0\xb8\xb1\xe0\xb8\x84\xe0\xb8\xa3\xe0\xb9\x80\xe0\xb8\xa5\xe0\xb9\x88\xe0\xb8\x99"
|
||||||
|
#PBEACON delay=11 every=30 overlay=S symbol="digi" lat=43.077104 long=-79.075674 comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xce\xa1\xce\xb1\xce\xb4\xce\xb9\xce\xbf\xce\xb5\xcf\x81\xce\xb1\xcf\x83\xce\xb9\xcf\x84\xce\xb5\xcf\x87\xce\xbd\xce\xb9\xcf\x83\xce\xbc\xcf\x8c\xcf\x82"
|
||||||
|
#PBEACON delay=21 every=30 overlay=S symbol="digi" lat=43.077104 long=-79.075674 comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xe3\x82\xa2\xe3\x83\x9e\xe3\x83\x81\xe3\x83\xa5\xe3\x82\xa2\xe7\x84\xa1\xe7\xb7\x9a"
|
||||||
|
#
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# #
|
||||||
|
# APRS DIGIPEATER PROPERTIES #
|
||||||
|
# #
|
||||||
|
#############################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Remove the "#" from the beginning of the first digipeat below for short range fill-in digi
|
||||||
|
# or remove the "#" from the beginning of the second digipeat below for wide area digi.
|
||||||
|
|
||||||
|
#DIGIPEAT 0 0 ^TEST$ ^WIDE1-1$
|
||||||
|
#DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$
|
||||||
|
|
||||||
|
# See https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/APRS-Digipeaters.pdf
|
||||||
|
# and User Guide for more explanation of what this means and
|
||||||
|
# how it can be customized for your particular needs.
|
||||||
|
|
||||||
|
|
||||||
|
# Traditional connected mode packet radio uses a different
|
||||||
|
# type of digipeating. See User Guide for details.
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# #
|
||||||
|
# INTERNET GATEWAY #
|
||||||
|
# #
|
||||||
|
#############################################################
|
||||||
|
|
||||||
|
# First you need to specify the name of a Tier 2 server.
|
||||||
|
# The current preferred way is to use one of these regional rotate addresses:
|
||||||
|
|
||||||
|
# noam.aprs2.net - for North America
|
||||||
|
# soam.aprs2.net - for South America
|
||||||
|
# euro.aprs2.net - for Europe and Africa
|
||||||
|
# asia.aprs2.net - for Asia
|
||||||
|
# aunz.aprs2.net - for Oceania
|
||||||
|
|
||||||
|
#IGSERVER noam.aprs2.net
|
||||||
|
|
||||||
|
# You also need to specify your login name and passcode.
|
||||||
|
# Contact the author if you can't figure out how to generate the passcode.
|
||||||
|
|
||||||
|
#IGLOGIN WB2OSZ-5 123456
|
||||||
|
|
||||||
|
# That's all you need for a receive only IGate which relays
|
||||||
|
# messages from the local radio channel to the global servers.
|
||||||
|
|
||||||
|
# To relay APRS "messages" from the Internet to radio, you need to add
|
||||||
|
# one more option with the transmit channel number and a VIA path.
|
||||||
|
|
||||||
|
#IGTXVIA 0 WIDE1-1,WIDE2-1
|
||||||
|
|
||||||
|
# For more information see
|
||||||
|
# https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/Successful-APRS-IGate-Operation.pdf
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################
|
||||||
|
# #
|
||||||
|
# APRStt GATEWAY #
|
||||||
|
# #
|
||||||
|
#############################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Dire Wolf can receive DTMF (commonly known as Touch Tone)
|
||||||
|
# messages and convert them to packet objects. Details in:
|
||||||
|
#
|
||||||
|
# https://raw.githubusercontent.com/wb2osz/direwolf/master/doc/APRStt-Implementation-Notes.pdf
|
||||||
|
#
|
||||||
|
|
||||||
|
FX25TX 1
|
||||||
|
PERSIST 63
|
||||||
|
SLOTTIME 12
|
||||||
|
RETRY 5
|
||||||
|
FRACK 3
|
||||||
|
MAXFRAME 4
|
||||||
|
PACLEN 128
|
||||||
|
DWAIT 0
|
||||||
|
TXDELAY 30
|
||||||
|
TXTAIL 15
|
||||||
BIN
desktop/icons/paracon.png
Normal file
BIN
desktop/icons/paracon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -1,10 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Name=VARA FM
|
|
||||||
Comment=Vara Modem for HF
|
|
||||||
Exec=wine $HOME/.wine/drive_c/'VARA FM'/VARAFM.exe
|
|
||||||
Icon=$HOME/.local/share/HamPack/desktop/icons/varafm.png
|
|
||||||
Type=Application
|
|
||||||
Categories=HamRadio;Utility;
|
|
||||||
Terminal=false
|
|
||||||
StartupNotify=true
|
|
||||||
Path=$HOME/.wine/drive_c/'VARA FM'/
|
|
||||||
237
install-binaries.sh
Executable file
237
install-binaries.sh
Executable file
@@ -0,0 +1,237 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Purpose: Download and install pre-built binaries from binaries.conf
|
||||||
|
|
||||||
|
CONF_FILE="$HOME/.local/share/HamPack/binaries.conf"
|
||||||
|
TMP_DIR="/tmp/hampack-build"
|
||||||
|
VERSION_FILE="$HOME/.local/state/HamPack/.installed_versions"
|
||||||
|
|
||||||
|
# Get the installed version of an app
|
||||||
|
get_installed_version() {
|
||||||
|
local app="$1"
|
||||||
|
|
||||||
|
if [ -f "$VERSION_FILE" ]; then
|
||||||
|
local stored
|
||||||
|
stored=$(grep "^$app=" "$VERSION_FILE" | cut -d'=' -f2)
|
||||||
|
if [ -n "$stored" ]; then
|
||||||
|
echo "$stored"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "unknown"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Save installed version to version file
|
||||||
|
save_installed_version() {
|
||||||
|
local app="$1"
|
||||||
|
local version="$2"
|
||||||
|
|
||||||
|
touch "$VERSION_FILE"
|
||||||
|
|
||||||
|
if grep -q "^$app=" "$VERSION_FILE"; then
|
||||||
|
sed -i "s/^$app=.*/$app=$version/" "$VERSION_FILE"
|
||||||
|
else
|
||||||
|
echo "$app=$version" >> "$VERSION_FILE"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check if an update is needed
|
||||||
|
needs_update() {
|
||||||
|
local app="$1"
|
||||||
|
local install_path="$2"
|
||||||
|
local latest="$3"
|
||||||
|
|
||||||
|
if [ ! -f "$install_path" ]; then
|
||||||
|
echo " $app is not installed."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
local installed
|
||||||
|
installed=$(get_installed_version "$app")
|
||||||
|
|
||||||
|
if [ "$installed" = "unknown" ]; then
|
||||||
|
echo " Warning: could not determine installed version of $app."
|
||||||
|
echo " binaries.conf specifies version $latest."
|
||||||
|
read -rp " Download and install $app anyway? [y/N] " response
|
||||||
|
if [[ "$response" =~ ^[yY] ]]; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo " Installed version : $installed"
|
||||||
|
echo " Latest version : $latest"
|
||||||
|
|
||||||
|
if [ "$installed" = "$latest" ]; then
|
||||||
|
echo " $app is up to date, skipping."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo " Update available for $app."
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Download binary and place it at the install path
|
||||||
|
download_binary() {
|
||||||
|
local app="$1"
|
||||||
|
local url="$2"
|
||||||
|
local install_path="$3"
|
||||||
|
|
||||||
|
local filename="${url##*/}"
|
||||||
|
local tmp_file="$TMP_DIR/$filename"
|
||||||
|
|
||||||
|
echo " Downloading $url..."
|
||||||
|
wget -q "$url" -O "$tmp_file"
|
||||||
|
|
||||||
|
mkdir -p "$(dirname "$install_path")"
|
||||||
|
mv "$tmp_file" "$install_path"
|
||||||
|
chmod +x "$install_path"
|
||||||
|
echo " Installed to $install_path"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Generate and install a .desktop file
|
||||||
|
install_desktop() {
|
||||||
|
local app="$1"
|
||||||
|
local install_path="$2"
|
||||||
|
local exec_cmd="$3"
|
||||||
|
local comment="$4"
|
||||||
|
local icon="$5"
|
||||||
|
local categories="$6"
|
||||||
|
|
||||||
|
[ -z "$categories" ] && categories="HamRadio;"
|
||||||
|
[ -z "$exec_cmd" ] && exec_cmd="$install_path"
|
||||||
|
|
||||||
|
local desktop_dir="$HOME/.local/share/applications"
|
||||||
|
mkdir -p "$desktop_dir"
|
||||||
|
|
||||||
|
local desktop_file="$desktop_dir/$app.desktop"
|
||||||
|
|
||||||
|
echo " Generating desktop file $desktop_file..."
|
||||||
|
cat > "$desktop_file" <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=$app
|
||||||
|
Exec=$exec_cmd
|
||||||
|
Comment=$comment
|
||||||
|
Icon=$icon
|
||||||
|
Categories=$categories
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x "$desktop_file"
|
||||||
|
echo " Desktop file installed."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Process a single app
|
||||||
|
process_app() {
|
||||||
|
local app="$1"
|
||||||
|
local url="$2"
|
||||||
|
local install_path="$3"
|
||||||
|
local version="$4"
|
||||||
|
local gui="$5"
|
||||||
|
local exec_cmd="$6"
|
||||||
|
local comment="$7"
|
||||||
|
local icon="$8"
|
||||||
|
local categories="$9"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "=== $app ==="
|
||||||
|
|
||||||
|
if [ -z "$url" ]; then
|
||||||
|
echo " Error: no url specified for $app, skipping."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$install_path" ]; then
|
||||||
|
echo " Error: no install path specified for $app, skipping."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$install_path" ]; then
|
||||||
|
if [ -z "$version" ]; then
|
||||||
|
echo " $app is already installed, skipping."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
if ! needs_update "$app" "$install_path" "$version"; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo " $app is not installed."
|
||||||
|
fi
|
||||||
|
|
||||||
|
download_binary "$app" "$url" "$install_path"
|
||||||
|
|
||||||
|
if [ "$gui" = "true" ]; then
|
||||||
|
install_desktop "$app" "$install_path" "$exec_cmd" "$comment" "$icon" "$categories"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$version" ]; then
|
||||||
|
save_installed_version "$app" "$version"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo " $app installed successfully."
|
||||||
|
}
|
||||||
|
|
||||||
|
# Parse binaries.conf and process each app
|
||||||
|
process_conf() {
|
||||||
|
local app="" url="" install_path="" version="" gui="" exec_cmd="" comment="" icon="" categories=""
|
||||||
|
|
||||||
|
while IFS= read -r line || [ -n "$line" ]; do
|
||||||
|
[[ -z "$line" || "$line" == \#* ]] && continue
|
||||||
|
|
||||||
|
if [[ "$line" =~ ^\[(.+)\]$ ]]; then
|
||||||
|
if [ -n "$app" ]; then
|
||||||
|
process_app "$app" "$url" "$install_path" "$version" "$gui" "$exec_cmd" "$comment" "$icon" "$categories"
|
||||||
|
fi
|
||||||
|
app="${BASH_REMATCH[1]}"
|
||||||
|
url="" install_path="" version="" gui="" exec_cmd="" comment="" icon="" categories=""
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
local key="${line%%=*}"
|
||||||
|
local value="${line#*=}"
|
||||||
|
value=$(eval echo "$value")
|
||||||
|
|
||||||
|
case "$key" in
|
||||||
|
url) url="$value" ;;
|
||||||
|
install) install_path="$value" ;;
|
||||||
|
version) version="$value" ;;
|
||||||
|
gui) gui="$value" ;;
|
||||||
|
exec) exec_cmd="$value" ;;
|
||||||
|
comment) comment="$value" ;;
|
||||||
|
icon) icon="$value" ;;
|
||||||
|
categories) categories="$value" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
done < "$CONF_FILE"
|
||||||
|
|
||||||
|
# Process the last app in the file
|
||||||
|
if [ -n "$app" ]; then
|
||||||
|
process_app "$app" "$url" "$install_path" "$version" "$gui" "$exec_cmd" "$comment" "$icon" "$categories"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- Main ---
|
||||||
|
|
||||||
|
if [ ! -f "$CONF_FILE" ]; then
|
||||||
|
echo "Error: $CONF_FILE not found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$TMP_DIR"
|
||||||
|
mkdir -p "$HOME/.local/state/HamPack"
|
||||||
|
mkdir -p "$HOME/.local/bin"
|
||||||
|
|
||||||
|
echo "Starting HamPack binary installs..."
|
||||||
|
process_conf
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Updating desktop database..."
|
||||||
|
update-desktop-database "$HOME/.local/share/applications/"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Cleaning up..."
|
||||||
|
rm -rf "$TMP_DIR"
|
||||||
|
|
||||||
|
echo "All done."
|
||||||
@@ -73,6 +73,10 @@ echo "Installing Windows-only applications..."
|
|||||||
echo "Installing not1mm..."
|
echo "Installing not1mm..."
|
||||||
curl -LsSf uvx.sh/not1mm/install.sh | sh
|
curl -LsSf uvx.sh/not1mm/install.sh | sh
|
||||||
|
|
||||||
|
echo "Installing dx.py..."
|
||||||
|
wget -q https://raw.githubusercontent.com/HB9VQQ/dx.py/main/dx.py -O "$HOME/.local/bin/dx.py"
|
||||||
|
chmod +x "$HOME/.local/bin/dx.py"
|
||||||
|
|
||||||
sudo rm /etc/sudoers.d/hampack
|
sudo rm /etc/sudoers.d/hampack
|
||||||
|
|
||||||
echo "HamPack is installed. You may want to restart existing applications when convenient."
|
echo "HamPack is installed. You may want to restart existing applications when convenient."
|
||||||
Reference in New Issue
Block a user