mirror of
https://gitlab.com/amrron/setup-scripts.git
synced 2026-10-17 01:54:00 -04:00
Setup script add VARIM
tweak Vara Setup
This commit is contained in:
+51
-9
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
################################################################################
|
||||
######################## AmRRON Setup Script v0.7.4.1 ########################
|
||||
######################## AmRRON Setup Script v0.7.4.3 ########################
|
||||
######################## Created by TB-14 ########################
|
||||
######################## 18 OCT 22 ########################
|
||||
######################## 05 NOV 22 ########################
|
||||
################################################################################
|
||||
################################################################################
|
||||
#
|
||||
@@ -177,6 +177,12 @@ if hash garim 2>/dev/null; then
|
||||
GARIM="NOT INSTALLED"
|
||||
fi
|
||||
|
||||
if hash varim 2>/dev/null; then
|
||||
VARIM=$(varim --version | head -n1 | awk -F ' ' '{print $2}')
|
||||
else
|
||||
VARIM="NOT INSTALLED"
|
||||
fi
|
||||
|
||||
if hash findardop 2>/dev/null; then
|
||||
FINDARDOPVER="INSTALLED"
|
||||
else
|
||||
@@ -402,6 +408,12 @@ if [[ $NEWGARIM == "" ]]; then
|
||||
NEWGARIM="SERVER DOWN"
|
||||
fi
|
||||
|
||||
NEWVARIM=$(curl -s https://www.whitemesa.net/varim/varim.html | grep -m 1 \
|
||||
"armv7l.tar.gz" | awk -F '-' '{print $2}')
|
||||
if [[ $NEWVARIM == "" ]]; then
|
||||
NEWVARIM="SERVER DOWN"
|
||||
fi
|
||||
|
||||
echo "60% Complete"
|
||||
|
||||
NEWPAT=$(curl -s https://github.com/la5nta/pat/releases | grep -m 1 "amd64.deb"\
|
||||
@@ -1211,7 +1223,39 @@ cd garim-${NEWGARIM} ||
|
||||
fi
|
||||
}
|
||||
|
||||
function varim_install() {
|
||||
if [[ $NEWVARIM == "SERVER DOWN" ]]; then
|
||||
echo "VARIM server unresponsive or broken link." >> /tmp/failures
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ${VARIM} == ${NEWVARIM} ]]; then
|
||||
echo "VARIM is already at the most current version"
|
||||
|
||||
else
|
||||
echo "Installing / Updating VARIM to version ${NEWVARIM}"
|
||||
if [[ ${VARIM} == "NOT INSTALLED" ]]; then
|
||||
sudo apt-get -y install build-essential libfltk1.3-dev zlib1g-dev ||
|
||||
{ ERRCODE="Failed to get dependencies for VARIM"; errors; return; }
|
||||
fi
|
||||
cd $USERDIR && wget -N https://www.whitemesa.net/varim/src/\
|
||||
varim-${NEWVARIM}.tar.gz ||
|
||||
{ ERRCODE="Failed to download VARIM"; errors; return; }
|
||||
|
||||
tar xzvf varim-${NEWVARIM}.tar.gz && rm varim-${NEWVARIM}.tar.gz && \
|
||||
cd varim-${NEWVARIM} ||
|
||||
{ ERRCODE="Failed to extract VARIM"; errors; return; }
|
||||
|
||||
./configure && make && sudo make install ||
|
||||
{ ERRCODE="Failed to compile VARIM"; errors; return; }
|
||||
|
||||
#Cleanup space from compiling
|
||||
#if hash garim 2>/dev/null; then
|
||||
# sudo rm -r $USERDIR/garim-${NEWGARIM}
|
||||
#fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
function pat_install() {
|
||||
if [[ $NEWPAT == "SERVER DOWN" ]]; then
|
||||
@@ -1732,12 +1776,6 @@ wget -P $USERDIR/icons/ -N http://www.gencat.cat/llengua/appdelasetmana/img_app/
|
||||
fi
|
||||
|
||||
|
||||
if [[ -f $USERDIR/garim-$NEWGARIM/garim.desktop ]]; then
|
||||
cp $USERDIR/garim-$NEWGARIM/garim.desktop $HOME/Desktop/garim.desktop ||
|
||||
{ ERRCODE="Failed to create desktop icon for GARIM"; errors; }
|
||||
fi
|
||||
|
||||
|
||||
if [[ -f $SECDIR/Paranoia\ Text\ Encryption/pte.jar ]]; then
|
||||
|
||||
echo "[Desktop Entry]
|
||||
@@ -2952,6 +2990,7 @@ yad --image=$DIR/images/corps-icon.png --center --checklist --print-column=2 --s
|
||||
false "ARDOPGUI" "Downloads the newest ARDOP Graphical User Interface" "Unknown" "${NEWARDOPGUI}" \
|
||||
false "ARIM" "Amateur Radio Instant Messanger" "${ARIM}" "${NEWARIM}" \
|
||||
false "GARIM" "Graphical ARIM interface" "${GARIM}" "${NEWGARIM}" \
|
||||
false "VARIM" "VARA Graphical ARIM interface" "${VARIM}" "${NEWVARIM}" \
|
||||
false "PAT" "ARDOP email client / Winlink alternative" "${PAT}" "${NEWPAT}" \
|
||||
false "FINDARDOP" "Program by KM4ACK to find ardop stations" "${FINDARDOPVER}" "Unable to determine" \
|
||||
false "VOACAP" "VOACAP Propagation tool and python GUI." "Unable to determine" "Unable to determine" \
|
||||
@@ -2965,7 +3004,7 @@ yad --image=$DIR/images/corps-icon.png --center --checklist --print-column=2 --s
|
||||
|
||||
rc=$?
|
||||
if [[ $rc == 2 ]]; then
|
||||
radioArray=(HAMLIB FLDIGI FLMSG FLAMP FLRIG FLWRAP ARDOP ARDOPGUI ARIM GARIM PAT FINDARDOP VOACAP CHIRP WSJTX JS8CALL PULSE UBLOX FORMS)
|
||||
radioArray=(HAMLIB FLDIGI FLMSG FLAMP FLRIG FLWRAP ARDOP ARDOPGUI ARIM GARIM VARIM PAT FINDARDOP VOACAP CHIRP WSJTX JS8CALL PULSE UBLOX FORMS)
|
||||
|
||||
for i in "${radioArray[@]}"
|
||||
do
|
||||
@@ -3554,6 +3593,9 @@ cat /tmp/results | yad --text-info --center \
|
||||
GARIM) echo "Updating GARIM"
|
||||
garim_install
|
||||
;;
|
||||
VARIM) echo "Updating VARIM"
|
||||
varim_install
|
||||
;;
|
||||
WSJTX) echo "WSJTX not currently supported"
|
||||
wsjtx_install
|
||||
;;
|
||||
|
||||
+157
-64
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
################################################################################
|
||||
####################### AmRRON Vara Setup #########################
|
||||
####################### AmRRON Vara Setup v.0.1 #########################
|
||||
####################### Created by TB-14 #########################
|
||||
####################### 05 NOV 2022 #########################
|
||||
################################################################################
|
||||
@@ -59,7 +59,7 @@ SOURCE="${BASH_SOURCE[0]}"
|
||||
|
||||
# Create a error function to make life easier later on
|
||||
function errors() {
|
||||
echo "${ERRCODE}" >> /tmp/failures
|
||||
echo "${ERRCODE}" >> /tmp/varafailures
|
||||
}
|
||||
|
||||
#Deterimine computer type.
|
||||
@@ -129,20 +129,9 @@ tested.\n\nThis installer has been tested on Raspberry Pi OS Buster and Bullseye
|
||||
|
||||
#create a finish trap
|
||||
function finish {
|
||||
if [[ -f /tmp/results ]]; then
|
||||
rm /tmp/results
|
||||
fi
|
||||
|
||||
if [[ -f /tmp/mastermenu ]]; then
|
||||
rm /tmp/mastermenu
|
||||
fi
|
||||
|
||||
if [[ -f /tmp/cleanup ]]; then
|
||||
rm /tmp/cleanup
|
||||
fi
|
||||
|
||||
if [[ -f /tmp/failures ]]; then
|
||||
rm /tmp/failures
|
||||
rm /tmp/varafailures
|
||||
fi
|
||||
|
||||
}
|
||||
@@ -151,21 +140,6 @@ trap finish EXIT
|
||||
|
||||
##make sure we dont already have a cleanup, mastermenu, or results text file
|
||||
|
||||
if [[ -f /tmp/results ]]; then
|
||||
echo "Results file previously exists. Moving to /tmp/results.bak"
|
||||
mv /tmp/results /tmp/results.bak
|
||||
fi
|
||||
|
||||
if [[ -f /tmp/mastermenu ]]; then
|
||||
echo "/tmp/mastermenu file previously exists. Moving to /tmp/mastermenu.bak"
|
||||
mv /tmp/mastermenu /tmp/mastermenu.bak
|
||||
fi
|
||||
|
||||
if [[ -f /tmp/cleanup ]]; then
|
||||
echo "/tmp/cleanup file previously exists. Moving to /tmp/cleanup.bak"
|
||||
mv /tmp/cleanup /tmp/cleanup.bak
|
||||
fi
|
||||
|
||||
if [[ -f /tmp/failures ]]; then
|
||||
echo "/tmp/failures file previously exists. Moving to /tmp/failures.bak"
|
||||
mv /tmp/failures /tmp/failures.bak
|
||||
@@ -191,9 +165,40 @@ VARAFMLINK=$(curl -s https://rosmodem.wordpress.com/ | grep -oP '(?=https://mega
|
||||
VARAHFLINK=$(curl -s https://rosmodem.wordpress.com/ | grep -oP '(?=https://mega.nz).*?(?=" target="_blank" rel="noopener noreferrer">VARA HF v)')
|
||||
VARACHATLINK=$(curl -s https://rosmodem.wordpress.com/ | grep -oP '(?=https://mega.nz).*?(?=" target="_blank" rel="noopener noreferrer">VARA Chat v)')
|
||||
|
||||
function primer_menu() {
|
||||
|
||||
echo "This program is designed to assist you with installing VARA HF, VARA FM \
|
||||
VARA Chat, and Winlink RMS Express on your linux machine. The current version has \
|
||||
only been tested on Mint 21. I will continue to expand support for Mint 20 and Rasberry Pi OS \
|
||||
in the future.
|
||||
|
||||
Super User (sudo) priveledges are required to perform the apt-get \
|
||||
commands.
|
||||
|
||||
You will be asked for your password in the terminal to perform some \
|
||||
tasks but you should not run the entire program as Root. \
|
||||
|
||||
You will need to accept agreements and interact with the installers.
|
||||
Wine is set to default to pulseaudio. You can modify the winetricks sound=pulse \
|
||||
line of this script to alsa if you desire to use alsa instead.
|
||||
|
||||
This will: \
|
||||
check and add user to the dialout, audio, and tty usergroups; \
|
||||
Install wine and winetricks; download and install VARA HF, FM, and Chat; \
|
||||
download and install Winlink Express." | yad \
|
||||
--image=$DIR/images/corps-icon.png \
|
||||
--text-info \
|
||||
--wrap \
|
||||
--center \
|
||||
--title "Welcome to the AmRRON Vara Installer." \
|
||||
${r} ${c} ||
|
||||
{ yad --image=$DIR/images/corps-icon.png --center --button="gtk-ok:0" --title "Exit Selected" --text "Exiting installer now" ${r} ${c}; exit 1; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function usergroups() {
|
||||
clear;echo
|
||||
echo "adding user to tty, dialout, & audio groups"
|
||||
sleep 1
|
||||
MYUSER=$(whoami)
|
||||
@@ -203,21 +208,24 @@ CHK_AUDIO=$(id -nG | grep audio)
|
||||
|
||||
if [ -z "$CHK_DIALOUT" ]; then
|
||||
echo "Adding user to dialout group"
|
||||
sudo usermod -a -G dialout $MYUSER
|
||||
sudo usermod -a -G dialout $MYUSER ||
|
||||
{ ERRCODE="Failed to add user to dialout group"; errors; }
|
||||
else
|
||||
echo "User already in dialout group"
|
||||
fi
|
||||
|
||||
if [ -z "$CHK_TTY" ]; then
|
||||
echo "Adding user to tty group"
|
||||
sudo usermod -a -G tty $MYUSER
|
||||
sudo usermod -a -G tty $MYUSER ||
|
||||
{ ERRCODE="Failed to add user to tty group"; errors; }
|
||||
else
|
||||
echo "User already in tty group"
|
||||
fi
|
||||
|
||||
if [ -z "$CHK_AUDIO" ]; then
|
||||
echo "Adding user to audio group"
|
||||
sudo usermod -a -G audio $MYUSER
|
||||
sudo usermod -a -G audio $MYUSER ||
|
||||
{ ERRCODE="Failed to add user to audio group"; errors; }
|
||||
else
|
||||
echo "User already in audio group"
|
||||
fi
|
||||
@@ -227,54 +235,139 @@ function install_wine() {
|
||||
export WINEARCH=win32
|
||||
|
||||
#install dependencies
|
||||
sudo apt install -y wine-stable winetricks
|
||||
sudo apt install -y wine-stable winetricks ||
|
||||
{ ERRCODE="Failed to install wine-stable and winetricks"; errors; }
|
||||
|
||||
#install with wintricks
|
||||
winetricks winxp
|
||||
winetricks sound=pulse
|
||||
winetricks vb6run
|
||||
winetricks -q vcrun2015
|
||||
|
||||
#Install Driver
|
||||
cd $HOME/Downloads
|
||||
wget http://files.k6eta.com/pdh.dll.zip
|
||||
unzip pdh.dll.zip && rm pdh.dll.zip
|
||||
mv pdh.dll $HOME/.wine/drive_c/windows/system32
|
||||
winetricks winxp ||
|
||||
{ ERRCODE="Failed to set winetricks winxp"; errors; }
|
||||
winetricks sound=pulse ||
|
||||
{ ERRCODE="Failed to set winetricks sound=pulse"; errors; }
|
||||
winetricks vb6run ||
|
||||
{ ERRCODE="Failed to set winetricks vb6run"; errors; }
|
||||
winetricks -q vcrun2015 ||
|
||||
{ ERRCODE="Failed to set winetricks -q vcrun2015"; errors; }
|
||||
|
||||
}
|
||||
|
||||
function installvara() {
|
||||
#download/install VARA HF/FM
|
||||
sudo apt install -y megatools curl p7zip-full
|
||||
mkdir -P $USERDIR/VARA && cd $USERDIR/VARA
|
||||
megadl $VARAHFLINK
|
||||
megadl $VARAFMLINK
|
||||
megadl $VARACHATLINK
|
||||
echo "unzipping VARA files"
|
||||
sleep 1
|
||||
unzip VARA\ FM\ $VARAFMVER\ Setup.zip
|
||||
unzip VARA\ HF\ $VARAHFVER\ Setup.zip
|
||||
unzip VARA\ Chat\ $VARACHATVER\ Setup.zip
|
||||
rm VARA\ FM\ $VARAFMVER\ Setup.zip VARA\ HF\ $VARAHFVER\ Setup.zip VARA\ Chat\ $VARACHATVER\ Setup.zip
|
||||
#install VARA FM with wine
|
||||
/usr/bin/wine VARA\ FM\ setup\ \(Run\ as\ Administrator\).exe
|
||||
#install VARA with wine
|
||||
/usr/bin/wine VARA\ setup\ \(Run\ as\ Administrator\).exe
|
||||
sudo apt install -y megatools curl p7zip-full ||
|
||||
{ ERRCODE="Failed to install dependencies for pulling vara installation files"; errors; }
|
||||
cd $HOME/Downloads
|
||||
megadl $VARAHFLINK ||
|
||||
{ ERRCODE="Failed to download VARA HF"; errors; }
|
||||
megadl $VARAFMLINK ||
|
||||
{ ERRCODE="Failed to download VARA FM"; errors; }
|
||||
megadl $VARACHATLINK ||
|
||||
{ ERRCODE="Failed to download VARA Chat"; errors; }
|
||||
|
||||
|
||||
unzip VARA\ FM\ $VARAFMVER\ Setup.zip ||
|
||||
{ ERRCODE="Failed to unzip VARA FM"; errors; }
|
||||
unzip VARA\ HF\ $VARAHFVER\ Setup.zip ||
|
||||
{ ERRCODE="Failed to unzip VARA HF"; errors; }
|
||||
unzip VARA\ Chat\ $VARACHATVER\ Setup.zip ||
|
||||
{ ERRCODE="Failed to unzip VARA Chat"; errors; }
|
||||
|
||||
rm VARA\ FM\ $VARAFMVER\ Setup.zip VARA\ HF\ $VARAHFVER\ Setup.zip VARA\ Chat\ $VARACHATVER\ Setup.zip ||
|
||||
{ ERRCODE="Failed to remove VARA zip files"; errors; }
|
||||
#install VARA FM with wine
|
||||
/usr/bin/wine VARA\ FM\ setup\ \(Run\ as\ Administrator\).exe ||
|
||||
{ ERRCODE="Failed to install VARA FM"; errors; }
|
||||
#install VARA with wine
|
||||
/usr/bin/wine VARA\ setup\ \(Run\ as\ Administrator\).exe ||
|
||||
{ ERRCODE="Failed to install VARA HF"; errors; }
|
||||
#install VARA Chat with wine
|
||||
/usr/bin/wine VARA\ Chat\ \(Run\ as\ Administrator\).exe ||
|
||||
{ ERRCODE="Failed to install VARA Chat"; errors; }
|
||||
|
||||
#Install Driver
|
||||
cd $HOME/Downloads && wget http://files.k6eta.com/pdh.dll.zip ||
|
||||
{ ERRCODE="Failed to download k6eta pdh.dll drivers"; errors; }
|
||||
unzip pdh.dll.zip && rm pdh.dll.zip ||
|
||||
{ ERRCODE="Failed to unzip k6eta drivers"; errors; }
|
||||
mv pdh.dll $HOME/.wine/drive_c/windows/system32
|
||||
{ ERRCODE="Failed to move drivers to $HOME/.wine/drive_c/windows/system32"; errors; }
|
||||
|
||||
}
|
||||
|
||||
function installrmsexpress() {
|
||||
mkdir -P $USERDIR/Winlink && cd $USERDIR/Winlink
|
||||
wget -q -r -l1 -np -nd -A "Winlink_Express_install_*.zip" https://downloads.winlink.org/User%20Programs
|
||||
unzip Winlink_Express_install*.zip
|
||||
/usr/bin/wine Winlink_Express_install.exe
|
||||
cd $HOME/Downloads
|
||||
wget -q -r -l1 -np -nd -A "Winlink_Express_install_*.zip" https://downloads.winlink.org/User%20Programs ||
|
||||
{ ERRCODE="Failed to download Winlink Express"; errors; }
|
||||
unzip Winlink_Express_install*.zip && rm Winlink_Express_install*.zip ||
|
||||
{ ERRCODE="Failed to unzip Winlink Express"; errors; }
|
||||
/usr/bin/wine Winlink_Express_install.exe ||
|
||||
{ ERRCODE="Failed to Install Winlink Express"; errors; }
|
||||
|
||||
}
|
||||
|
||||
function failure_handling() {
|
||||
|
||||
FAIL=$(cat /tmp/varafailures) || echo "No failures recorded"
|
||||
|
||||
|
||||
if [[ -f /tmp/varafailures ]]; then
|
||||
yad --image=$DIR/images/corps-icon.png --center --button="Save Log:2" --button="gtk-ok:0" \
|
||||
--title "Failures" \
|
||||
--text "The following failures occured during installation:\n\n$FAIL" ${r} ${c} exit=$?
|
||||
if [[ $? == 2 ]]; then
|
||||
ERRORLOG=$HOME/AmRRON-Vara-setup-failures
|
||||
if [[ -e $ERRORLOG.log ]]; then
|
||||
i=1
|
||||
while [[ -e $ERRORLOG-$i.log ]] ; do
|
||||
let i++
|
||||
done
|
||||
ERRORLOG=$ERRORLOG-$i
|
||||
fi
|
||||
cp /tmp/varafailures $ERRORLOG.log
|
||||
yad --center --button="gtk-ok:0" \
|
||||
--image=$DIR/images/corps-icon.png \
|
||||
--title "Failure Log Saved" \
|
||||
--text "A copy of the failure log was saved at $ERRORLOG.log" ${r} ${c}
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function complete() {
|
||||
echo "All selected updates have been completed." | yad --image=$DIR/images/donate.png \
|
||||
--text-info --center --wrap --button="gtk-ok:0" \
|
||||
--title "Complete" ${r} ${c}
|
||||
|
||||
echo "You will need to set your sound card usage in each program on first use.
|
||||
|
||||
It is recommended to restart your system before continuing.
|
||||
|
||||
Would you like to restart now?" | yad --center \
|
||||
--text-info --wrap \
|
||||
--image=$DIR/images/corps-icon.png \
|
||||
--title "Restart" --button="No:1" --button="Restart:2" ${r} ${c}
|
||||
rc=$?
|
||||
if [[ $rc -eq 2 ]]; then
|
||||
sudo shutdown -r now
|
||||
elif [[ $rc -eq 1 ]]; then
|
||||
echo "Good luck and 73's" | yad --image=$DIR/images/corps-icon.png \
|
||||
--text-info --wrap \
|
||||
--center --button="gtk-ok:0" \
|
||||
--title "Thank you." ${r} ${c}
|
||||
exit 1
|
||||
else
|
||||
echo "You closed the window without making a selection. Installer exiting."
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
set_screen_size
|
||||
confirm_mint21
|
||||
primer_menu
|
||||
usergroups
|
||||
install_wine
|
||||
installvara
|
||||
installrmsexpress
|
||||
installrmsexpress
|
||||
failure_handling
|
||||
complete
|
||||
@@ -1,6 +1,7 @@
|
||||
# Version 0.7.4.3
|
||||
- Testing g++ dependency for hamlib
|
||||
- Removed auto removal of source directories.
|
||||
- Added VARIM to install
|
||||
|
||||
# Version 0.7.4.2
|
||||
- Pulling ardopc from gitlab folder due to website release version issues.
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# Version 0.1
|
||||
-initial testing for Vara install on Mint 21.
|
||||
Reference in New Issue
Block a user