mirror of
https://gitlab.com/amrron/setup-scripts.git
synced 2026-10-17 01:54:00 -04:00
added ocx files locally, changed script to use these. added purge option
This commit is contained in:
+91
-18
@@ -354,7 +354,8 @@ DISPLAY=0 WINEARCH=win32 wine wineboot ||
|
|||||||
winetricks -q dotnet35sp1 win7 sound=pulse ||
|
winetricks -q dotnet35sp1 win7 sound=pulse ||
|
||||||
{ ERRCODE="Failed to set winetricks dotnet35sp1 win7 sound=pulse"; errors; return; }
|
{ ERRCODE="Failed to set winetricks dotnet35sp1 win7 sound=pulse"; errors; return; }
|
||||||
winetricks -q vb6run win7 sound=pulse || # removed pdh_nt4
|
winetricks -q vb6run win7 sound=pulse || # removed pdh_nt4
|
||||||
{ ERRCODE="Failed to set winetricks vb6run win7 sound=pulse"; errors; return; }
|
sudo apt-get install --reinstall ca-certificates ||
|
||||||
|
{ ERRCODE="Failed to run winetricks vb6run win7 sound=pulse"; errors; return; }
|
||||||
|
|
||||||
#cleanup cache from installers
|
#cleanup cache from installers
|
||||||
rm -rf ~/.cache/winetricks/ ||
|
rm -rf ~/.cache/winetricks/ ||
|
||||||
@@ -382,18 +383,46 @@ sudo apt install -y curl p7zip-full winbind||
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Install Driver
|
#Install Drivers
|
||||||
if [[ ! -f $HOME/.wine/drive_c/windows/system32/pdh.dll ]]; then
|
#if [[ ! -f $HOME/.wine/drive_c/windows/system32/pdh.dll ]]; then
|
||||||
cd $HOME/Downloads && wget http://files.k6eta.com/pdh.dll.zip ||
|
#cd $HOME/Downloads && wget http://files.k6eta.com/pdh.dll.zip ||
|
||||||
{ ERRCODE="Failed to download k6eta pdh.dll drivers"; errors; return; }
|
#{ ERRCODE="Failed to download k6eta pdh.dll drivers"; errors; return; }
|
||||||
unzip pdh.dll.zip && rm pdh.dll.zip ||
|
#unzip pdh.dll.zip && rm pdh.dll.zip ||
|
||||||
{ ERRCODE="Failed to unzip k6eta drivers"; errors; return; }
|
#{ ERRCODE="Failed to unzip k6eta drivers"; errors; return; }
|
||||||
mv pdh.dll $HOME/.wine/drive_c/windows/system32 ||
|
#mv pdh.dll $HOME/.wine/drive_c/windows/system32 ||
|
||||||
{ ERRCODE="Failed to move drivers to $HOME/.wine/drive_c/windows/system32"; errors; return; }
|
#{ ERRCODE="Failed to move drivers to $HOME/.wine/drive_c/windows/system32"; errors; return; }
|
||||||
|
#else
|
||||||
|
#echo "PDH.dll Driver already installed"
|
||||||
|
#fi
|
||||||
|
|
||||||
|
# Define the target directory and the source directory
|
||||||
|
TARGET_DIR="$HOME/.wine/drive_c/windows/system32"
|
||||||
|
SOURCE_DIR="$DIR/Files/ocx"
|
||||||
|
|
||||||
|
# Define the files to check
|
||||||
|
FILES=("pdh.dll" "MSCHRT20.OCX" "MSCOMCTL.OCX" "MSCOMM32.OCX" "mswinsck.ocx")
|
||||||
|
|
||||||
|
# Function to register a DLL with wine regsvr32 and avoid user interaction
|
||||||
|
register_dll() {
|
||||||
|
local dll=$1
|
||||||
|
wine regsvr32 /s "$dll"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Loop through each file and perform the check and copy operation
|
||||||
|
for FILE in "${FILES[@]}"; do
|
||||||
|
if [ ! -f "$TARGET_DIR/$FILE" ]; then
|
||||||
|
echo "$FILE not found in $TARGET_DIR. Copying from $SOURCE_DIR."
|
||||||
|
cp "$SOURCE_DIR/$FILE" "$TARGET_DIR/" ||
|
||||||
|
{ ERRCODE="Failed to copy $FILE to $TARGET_DIR"; errors; return; }
|
||||||
else
|
else
|
||||||
echo "Driver already installed"
|
echo "$FILE already exists in $TARGET_DIR."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Register the DLL with wine regsvr32
|
||||||
|
register_dll "$TARGET_DIR/$FILE" ||
|
||||||
|
{ ERRCODE="Failed to register $FILE with wine regsvr32"; errors; return; }
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
cd $HOME/Downloads && if ls VARA* 1> /dev/null 2>&1; then rm VARA* 2>/dev/null; fi && wget ${VARAHFLINK} ||
|
cd $HOME/Downloads && if ls VARA* 1> /dev/null 2>&1; then rm VARA* 2>/dev/null; fi && wget ${VARAHFLINK} ||
|
||||||
{ ERRCODE="Failed to download VARA HF. Visit https://downloads.winlink.org/ to download appropriate file. Unzip this file and install from terminal using the command: wine <filename>"; errors; return; }
|
{ ERRCODE="Failed to download VARA HF. Visit https://downloads.winlink.org/ to download appropriate file. Unzip this file and install from terminal using the command: wine <filename>"; errors; return; }
|
||||||
@@ -421,17 +450,34 @@ sudo apt install -y curl p7zip-full winbind||
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f $HOME/.wine/drive_c/windows/system32/pdh.dll ]]; then
|
# Define the target directory and the source directory
|
||||||
cd $HOME/Downloads && wget http://files.k6eta.com/pdh.dll.zip ||
|
TARGET_DIR="$HOME/.wine/drive_c/windows/system32"
|
||||||
{ ERRCODE="Failed to download k6eta pdh.dll drivers"; errors; return; }
|
SOURCE_DIR="$DIR/Files/ocx"
|
||||||
unzip pdh.dll.zip && rm pdh.dll.zip ||
|
|
||||||
{ ERRCODE="Failed to unzip k6eta drivers"; errors; return; }
|
# Define the files to check
|
||||||
mv pdh.dll $HOME/.wine/drive_c/windows/system32 ||
|
FILES=("pdh.dll" "MSCHRT20.OCX" "MSCOMCTL.OCX" "MSCOMM32.OCX" "mswinsck.ocx")
|
||||||
{ ERRCODE="Failed to move drivers to $HOME/.wine/drive_c/windows/system32"; errors; return; }
|
|
||||||
|
# Function to register a DLL with wine regsvr32 and avoid user interaction
|
||||||
|
register_dll() {
|
||||||
|
local dll=$1
|
||||||
|
wine regsvr32 /s "$dll"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Loop through each file and perform the check and copy operation
|
||||||
|
for FILE in "${FILES[@]}"; do
|
||||||
|
if [ ! -f "$TARGET_DIR/$FILE" ]; then
|
||||||
|
echo "$FILE not found in $TARGET_DIR. Copying from $SOURCE_DIR."
|
||||||
|
cp "$SOURCE_DIR/$FILE" "$TARGET_DIR/" ||
|
||||||
|
{ ERRCODE="Failed to copy $FILE to $TARGET_DIR"; errors; return; }
|
||||||
else
|
else
|
||||||
echo "Driver already installed"
|
echo "$FILE already exists in $TARGET_DIR."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Register the DLL with wine regsvr32
|
||||||
|
register_dll "$TARGET_DIR/$FILE" ||
|
||||||
|
{ ERRCODE="Failed to register $FILE with wine regsvr32"; errors; return; }
|
||||||
|
done
|
||||||
|
|
||||||
cd $HOME/Downloads && if ls VARA* 1> /dev/null 2>&1; then rm VARA* 2>/dev/null; fi && wget ${VARAFMLINK} ||
|
cd $HOME/Downloads && if ls VARA* 1> /dev/null 2>&1; then rm VARA* 2>/dev/null; fi && wget ${VARAFMLINK} ||
|
||||||
{ ERRCODE="Failed to download VARA FM. Visit https://downloads.winlink.org/ to download appropriate file. Unzip this file and install from terminal using the command: wine <filename>"; errors; return; }
|
{ ERRCODE="Failed to download VARA FM. Visit https://downloads.winlink.org/ to download appropriate file. Unzip this file and install from terminal using the command: wine <filename>"; errors; return; }
|
||||||
|
|
||||||
@@ -496,6 +542,32 @@ wget -q -r -l1 -np -nd -A "Winlink_Express_install_*.zip" https://downloads.winl
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function purge() {
|
||||||
|
|
||||||
|
sudo apt purge -y wine ||
|
||||||
|
{ ERRCODE="Failed to purge wine from apt"; errors; return; }
|
||||||
|
|
||||||
|
if [[ -d $HOME/.wine ]]; then
|
||||||
|
sudo rm -rf $HOME/.wine ||
|
||||||
|
{ ERRCODE="Failed to delete $HOME/.wine directory"; errors; return; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Define an array of desktop icon file names to check and remove
|
||||||
|
DESKTOP_ICONS=("VarAC.desktop" "VarAC.lnk" "VARA.desktop" "VARA.lnk" "VARA FM.desktop" "VARA FM.lnk" "Winlink Express.desktop")
|
||||||
|
|
||||||
|
# Loop through each desktop icon file and perform the check and removal operation
|
||||||
|
for ICON in "${DESKTOP_ICONS[@]}"; do
|
||||||
|
if [[ -f $HOME/Desktop/$ICON ]]; then
|
||||||
|
rm "$HOME/Desktop/$ICON" ||
|
||||||
|
{ ERRCODE="Failed to remove desktop icon for $ICON"; errors; return; }
|
||||||
|
echo "Removed desktop icon: $ICON"
|
||||||
|
else
|
||||||
|
echo "Desktop icon not found: $ICON"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|
||||||
function installermenu() {
|
function installermenu() {
|
||||||
@@ -511,6 +583,7 @@ function installermenu() {
|
|||||||
false "VARAFM" "Vara FM modem" "" \
|
false "VARAFM" "Vara FM modem" "" \
|
||||||
false "VARAC" "VarAC keyboard to keyboard chat program" "" \
|
false "VARAC" "VarAC keyboard to keyboard chat program" "" \
|
||||||
false "RMSEXPRESS" "Winlink RMS Express" "" \
|
false "RMSEXPRESS" "Winlink RMS Express" "" \
|
||||||
|
false "PURGE" "Completely remove wine and all programs" "" \
|
||||||
${r} ${c} >>/tmp/results
|
${r} ${c} >>/tmp/results
|
||||||
rc=$?
|
rc=$?
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,6 @@
|
|||||||
|
# Version 1.2.1
|
||||||
|
- in testing, missing .ocx files were discovered. These are not locally hosted in the repo and copied during installation.
|
||||||
|
- Added option to purge installation.
|
||||||
# Version 1.2
|
# Version 1.2
|
||||||
- fix error on fresh install where varafm/varahf will not download
|
- fix error on fresh install where varafm/varahf will not download
|
||||||
# Version 1.1.1
|
# Version 1.1.1
|
||||||
|
|||||||
Reference in New Issue
Block a user