diff --git a/apps/Winlink Express/credits b/apps/Winlink Express/credits new file mode 100644 index 0000000000..040c05aa36 --- /dev/null +++ b/apps/Winlink Express/credits @@ -0,0 +1,7 @@ +Winlink Express is developed by the Winlink Development Team (Amateur Radio Safety Foundation, Inc.). + +Special thanks: Sebastien "ptitSeb" Chevalier (box86/box64), the Pi-Apps Wine installer maintainers (Botspot / theofficialgman), and everyone who helps keep ham radio on Linux working. + +See https://winlink.org/ for more information. + +Added to pi-apps by Fredrik Lundhag after using VARA HF from Eric Wiessner (KI7POL) as a template. diff --git a/apps/Winlink Express/description b/apps/Winlink Express/description new file mode 100644 index 0000000000..48fb02e92e --- /dev/null +++ b/apps/Winlink Express/description @@ -0,0 +1,9 @@ +A ham radio messaging client for the Winlink radio email network. + +Winlink Express (formerly RMS Express) is the standard Windows client for sending and receiving email over amateur radio, with or without an internet connection. It works with software modems such as VARA FM, VARA HF, and ARDOP. + +Winlink Express requires a software modem (such as VARA FM or VARA HF), an amateur radio transceiver, and cables to connect audio and PTT control from your Pi to the transceiver. + +Run from Menu: Menu -> Accessories -> Winlink Express + +This app runs with the help of Box86/Box64 and Wine. diff --git a/apps/Winlink Express/icon-24.png b/apps/Winlink Express/icon-24.png new file mode 100644 index 0000000000..530311d0fd Binary files /dev/null and b/apps/Winlink Express/icon-24.png differ diff --git a/apps/Winlink Express/icon-64.png b/apps/Winlink Express/icon-64.png new file mode 100644 index 0000000000..616106f042 Binary files /dev/null and b/apps/Winlink Express/icon-64.png differ diff --git a/apps/Winlink Express/install b/apps/Winlink Express/install new file mode 100755 index 0000000000..404d181d63 --- /dev/null +++ b/apps/Winlink Express/install @@ -0,0 +1,70 @@ +#!/bin/bash + +LATEST=$(wget -qO- "https://downloads.winlink.org/User%20Programs/" \ + | grep -oP 'Winlink_Express_install_[\d-]+\.zip' \ + | sort -V | tail -1) + +APPDIR="${HOME}"/.local/share/applications/Winlink + +#Installing wine +if [ $arch == 32 ]; then + "$DIRECTORY/manage" install-if-not-installed 'Wine (x86)' || error 'Failed to install wine' +elif [ $arch == 64 ]; then + "$DIRECTORY/manage" install-if-not-installed 'Wine (x64)' || error 'Failed to install wine' +fi + +#Installing the dependency used to run the silent installer headlessly +install_packages xvfb || error 'Failed to install xvfb' + +#Configuring wineprefix (skip if a VARA modem already set it up) +_prefix="${WINEPREFIX:-$HOME/.wine}" +if find "$_prefix/drive_c" -iname "VARA*.exe" 2>/dev/null | grep -q .; then + echo "VARA already installed in $_prefix skipping winetricks setup." +else + BOX86_NOBANNER=1 BOX64_NOBANNER=1 winetricks -q vb6run pdh_nt4 sound=alsa +fi + +#Downloading Winlink Express +WINLINKDIR=/tmp/WINLINK +mkdir -p "${WINLINKDIR}" +wget "https://downloads.winlink.org/User%20Programs/$LATEST" -O "${WINLINKDIR}/Winlink-setup.zip" || error 'Failed to download Winlink Express Installer from winlink.org' + +#Extracting Winlink Express installer archive +unzip -o "${WINLINKDIR}/Winlink-setup.zip" -d "${WINLINKDIR}" || error 'Failed to unzip Winlink Express archive' +WINLINKINSTALLEREXE=$(find "${WINLINKDIR}" -type f -iname "*install.exe") + +# finding your default wineprefix directory +if [ -z "${WINEPREFIX}" ]; then + PREFIXDIR="${HOME}"/.wine +else + PREFIXDIR="${WINEPREFIX}" +fi + +# Run the Inno Setup installer directly via wine +BOX86_NOBANNER=1 BOX64_NOBANNER=1 \ + WINEPREFIX="$PREFIXDIR" WINEDEBUG=-all \ + xvfb-run --auto-servernum \ + wine "$WINLINKINSTALLEREXE" /VERYSILENT /NORESTART 2>/dev/null \ + || error 'Failed to install Winlink Express' + +# Removing tmp files +rm -rf "${WINLINKDIR}" + +#Adding the user to the USB dialout group so that they can access radio USB CAT control later if needed +sudo usermod -a -G dialout $USER + +#Creating Desktop Entry +mkdir -p "${APPDIR}" +echo "[Desktop Entry] +Name=Winlink Express +GenericName=Winlink Express +Comment=Winlink Express is a shareware ham radio messaging client for software modems like VARA FM/HF and others +Exec=env WINEPREFIX=\"${PREFIXDIR}\" WINEDEBUG=-all wine \"${PREFIXDIR}/drive_c/RMS Express/RMS Express.exe\" +Icon=$(dirname "$0")/icon-64.png +Terminal=false +StartupNotify=false +Type=Application +StartupWMClass=rms express.exe +Categories=Network;HamRadio;Utility;" > "${APPDIR}"/winlink.desktop || error 'Failed to create menu button!' + +true diff --git a/apps/Winlink Express/uninstall b/apps/Winlink Express/uninstall new file mode 100755 index 0000000000..737b57c950 --- /dev/null +++ b/apps/Winlink Express/uninstall @@ -0,0 +1,22 @@ +#!/bin/bash + +APPDIR="${HOME}"/.local/share/applications/Winlink + +#Finding your default wineprefix directory +if [ -z "${WINEPREFIX}" ]; then + PREFIXDIR="${HOME}"/.wine #if "WINEPREFIX=" envvar is unset or set to empty string, wineprefix location is "~/.wine" +else + PREFIXDIR="${WINEPREFIX}" #if "WINEPREFIX=" envvar was previously set, wineprefix location is "$WINEPREFIX" +fi + +#Removing program files +# NOTE: the shared wineprefix and winetricks components (vb6run, pdh_nt4) are left intact +# because VARA FM/HF and other messaging apps may still depend on them. +rm -rf "${PREFIXDIR}/drive_c/RMS Express" 2>/dev/null || warning 'Could not remove Winlink Express program files. If you moved it within Wine or made a custom wineprefix, you might have to remove it manually.' + +#Removing wine's auto-generated start menu entry +rm -rf "${APPDIR%/Winlink}/wine/Programs/Winlink Express" 2>/dev/null + +#Removing Desktop Entry +rm "${APPDIR}/winlink.desktop" 2>/dev/null || warning 'Could not remove menu button. You might need to do this manually if you moved it.' +rmdir "${APPDIR}" 2>/dev/null || true #delete directory if empty, prevent error code diff --git a/apps/Winlink Express/website b/apps/Winlink Express/website new file mode 100644 index 0000000000..ce88dd97d4 --- /dev/null +++ b/apps/Winlink Express/website @@ -0,0 +1 @@ +https://winlink.org/