diff --git a/README.md b/README.md index 2d3521e..81c63ed 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,50 @@ See also You must have a compatible python3 and GTK 3 installed on the system to run D-Rats as listed above. +The MobaXterm package contains a local Cygwin environment that is good +enough to run D-Rats. + +The free MobaXterm can be download from +and then installed on a Microsoft Windows system. + +If you already have a copy of the install script downloaded then you need +to delete it: + +> rm -f d-rats_in_mobaxterm_install.sh + +From the local terminal use the wget command to fetch the install script. + +> wget https://github.com/ham-radio-software/D-Rats/blob/master/d-rats_in_mobaxterm_install.sh + +If you are testing a github Pull Request for a new copy of this script, they you need to look +up the "raw" URL for the script or you will be getting + +The permission of the script may need to be fixed. +> chmod 0755 d-rats_in_mobaxterm_install.sh + +Then run the script. It will run for a bit and install everything needed to run +D-Rats +> ./d-rats_in_mobaxterm_install.sh + +Then to run use: + +> ./d-rats + +The MobaXterm installs or updates d-rats from the master branch of the git repository. +The MobaXterm is a new install and will not use any pre-existing D-Rats configuration. +In MobaXterm, files in your windows drives can be accessed by starting the path with +/drives, as in /drives/c/ instead of c:\. + +Cygwin install has not yet been tested. MobaXterm uses Cygwin for some of its Linux emulation, +with a few changes. MobaXterm uses a program named busybox instead of the separate programs +that Cygwin and Linux use and then creates aliases to make it appear that the separate programs +are installed. Those can not be used in the install script and busybox must be used instead, +and Cygwin does not use an apt installer. + +In theory with Cygwin, you can install all the packages that the MobaXterm script installs +with the Cygwin Gui installer and then use the commands from the script for PIP installs, +D-Rats should install on Cygwin. + For msys2, the script msys2_packages.sh will hopefully install all the needed packages after you have installed msys2. The "dev" parameter is passed to install extra images needed for development, or installing @@ -173,7 +217,6 @@ suffix. You may need to install additional locales on your system. - Debian packages needed for running or development. Below if you are not in a locale that is english, you will probably want the diff --git a/d-rats_in_mobaxerm_install.sh b/d-rats_in_mobaxerm_install.sh new file mode 100755 index 0000000..57cad83 --- /dev/null +++ b/d-rats_in_mobaxerm_install.sh @@ -0,0 +1,86 @@ +#!/usr/bin/bash + +set -uex +# MobaXterm has some of these packages built in. +# curl git wget + +# MobaXterm uses aliases which are needed in a setup script +apt_get='/bin/MobaBox.exe apt-get' +mkdir='/usr/bin/busybox mkdir' + +# This is needed to prevent pop ups that pause the install +DEBIAN_FRONTEND=noninteractive +export DEBIAN_FRONTEND +# Update to current and add packages +# apt-get --assume-yes update +$apt_get -y upgrade +$apt_get -y install \ + aspell aspell-de aspell-en aspell-es aspell-it \ + ffmpeg \ + gedit gettext git gcc-core \ + libgtk3_0 libjpeg-devel libportaudio-devel \ + python39 python39-devel python39-gi python39-lxml \ + python3-pip python39-sphinx \ + zlib-devel + +pypi_dir=/usr/local/lib/pypi +$mkdir -p "$pypi_dir" + + +if [ -e "$pypi_dir/bin/pip3" ]; then + echo 'Pip already updated' +else + # Pip always complains if a newer version is available until + # you upgrade to it. + echo "upgrading pip, this will warn that pip needs upgrading" + pip3 install --upgrade --target="$pypi_dir" pip + ls "$pypi_dir/bin" +fi +# Need to set PYTHONPATH to use the PyPi packages +PYTHONPATH="$pypi_dir" +export PYTHONPATH +ls "$pypi_dir/bin" +# If we do not include pip here, for some reason pip removes the +# binary for it. Why??? +"$pypi_dir/bin"/pip3 install --upgrade --target="$pypi_dir" \ + feedparser \ + geopy \ + pip \ + Pillow \ + pyaudio \ + pydub \ + pycountry \ + pyserial + +if [ ! -e "$HOME/d-rats-git" ]; then + git clone https://github.com/ham-radio-software/D-Rats.git \ + "$HOME/d-rats-git" +else + pushd "$HOME/d-rats-git" + git pull + popd +fi + +# Handle lzhuf +if [ ! -e /usr/bin/lzhuf ]; then + lzexe="/drives/c/Program Files/lzhuf/lzhuf.exe" + if [ -e "$lzexe" ]; then + ln -s "$lzexe" /usr/bin/lzhuf + else + echo "lzhuf is not installed! Install from" + echo "https://groups.io/g/d-rats/files/D-Rats/Windows" + echo "groups.io d-rats free membership required" + echo "Then re-run this script." + fi +fi + + +if [ ! -e "$HOME/d-rats" ]; then + cat << 'EOF' > "$HOME/d-rats" +#!/bin/bash +PYTHONPATH=/usr/local/lib/pypi +export PYTHONPATH +$HOME/d-rats-git/d-rats.py "$@" +EOF +chmod 755 "$HOME/d-rats" +fi