Development Packages Required - wb8tyw/D-Rats GitHub Wiki

Development Packages Required

Linux

Debian Package names for Anti-X linux (Debian buster), Raspbian (Debian buster), Ubuntu 20

Todo: Identify the packages for other linux distributions.

Also wondering if d-rats would run in the Cygwin environment.

  • aspell
  • aspell-en possibly other dictionaries. For future, there is a aspell-python-py2 and aspell-python-py3 in pypi. No packages found, and do not know if it will work for Microsoft Windows.
  • gedit Needed to display the chat log (Can we configure the display program?, Why an editor)
  • libc-dev Needed for lzhuf building.
  • Python2
  • Python3 for future. Python3 variants or replacements also installed.
  • pylint
  • pylint3
  • bandit (for python)May need to run in fedora docker container)
  • gtk (Seems to be provided by a desktop linux)
  • glade (for gtk)
  • python-gobject
  • python-gtk2 (Ubuntu 20.04 - python3-gi or python3-wxgtk3.0 ?)
  • python-glade2 (Ubuntu 20.04 - python3-gi or wxglade?)
  • python-serial (Ubuntu 20.04 - python3-serial)
  • python-libxml2 (Ubuntu 20.04 - python3-libxml2 or python3-lxml?)
  • python-libxslt1 (Ubuntu 20.04 - python3-lxml?)
  • python-simplejson
  • python-feedparser
  • python-flask
  • python-gevent (Ubuntu 20.04 - python3-gevent)
  • python-socketio (Anti-x/Raspbian does not have python3-socketio)
  • python-greenlet
  • python-ipykernel
  • python-gi-cairo
  • python-geopy (Plan to replace bundled copy)
  • python-pil (Appears to be optional)
  • python3-sphinx

Also see https://github.com/wb8tyw/D-Rats/wiki/Running-d-rats-in-a-venv-environment-and-PIP

Tools for building Debian packages in a chroot. Eventually tools for building rpm packages in a mock Need to figure out how to build Microsoft OS packages.

Packages on Linux need to be built in a chroot or mock environment to make sure that all the build requirements are actually known for portability.

lzhuf

The lzhuf program needs to be built before running Winlink.

cd libexec
make

Microsoft Windows

Microsoft Windows is more complicated as you need to get package from many places. Not sure how many of these locations signatures that can be verified.

Most of the major packages appear to be recommended to be downloaded from the MSYS2 project.

This also provides a development environment and there are ways to use it from [Visual Studio Code] (https://code.visualstudio.com/docs/editor/integrated-terminal) by adding it as a selectable shell.

I am going to see how many packages that I can get from there and attempt to use that as a build environment.

Visual Studio Code Python2

c:\python27\python.exe -m pip install -U pip

c:\python27\python.exe -m pip install pylint

And that turned out to be a waste of time. Needed to have Visual Studio Code use the python 3.9.11 installed by msys2 below.

Msys2

Installing msys2 done by following the instructions at msys2.org.

It states that only 64 bit windows 7 or later is supported. Google was able to find a 32 bit download.

Apparently the install can be scripted, but not going to try that for now.

I downloaded the 64 bit package per the web site above. This is a tool that is just used to download the pre-built packages and is also an environment for building packages.

The older version I downloaded seemed to have issues.

I wiped it out on October 9th, and installed msys2-x86_64-2021075.exe.

It took a second step of launching the "MSYS2 MSYS" application and running the pacman -Syu command again.

Then run it the pacman -S command to install the packages.

I am creating a msys2_packages.sh script to install the packages that I need as I proceed.

Needed https://github.com/msys2/MINGW-packages/issues/9751 fixed. My other windows system for testing is windows 10, 32 bit so I can not install on it.

Older notes:

Using the mingw packages for python.

Giving up on Visual Studio Code for IDE debuging. Will just use the msys shell to run d-rats.

Stop on python2 for Windows 7. libxml2 for python2 is not available from msys2 or pypi.

Feature/Bug in Visual Studio Code Python plugin - It appears to only use pylint installed by pip for the python interpreter. And it does not know how to run the msys2 pip2 program.

export PYTHONIOENCODING=UTF-8; /mingw64/bin/pip-2 install pylint

export PYTHONPATH=".:/c/msys64/mingw64/lib/python2.7"

created a windows.env file to set the visual code environment and referenced it by .vscode/settings.json Did not appear to work.

Created a env varaible in .vscode/launch.json, but that appears to only affect launching for debug inside of the IDE.

Added the PYTHONPATH as a user environment variable in windows. Did not appear to work.

Discovered Visual studio code was using a UNC path. Switched to a drive letter w:

Now the import gtk in drats.py is no longer being flagged.

Dead-end: libxml2-python2 is no longer available from pypi.

more bugs:

  • if you import gtk on python2.7, the interpreter will not exit
  • pip uninstall hangs.

Older windows information

aspell

Get it from the following location aspell for win32.

This port is old and listed as no longer maintained.

The GNU aspell project recommends using the binaries from the MSYS2 project.

Next you will need to add the Aspell directory to your path. The original instructions were to right click on My Computer, click Properties. Then go to the Advanced tab and click on Environment Variables. In the System Variables group, find the entry for PATH, and click Edit. Tack the path C:\Program Files\Aspell\bin to the end of the string and click on OK.

For standalone running of the application, I am probably going to look at a script that provides all the environment variables needed to be setup instead of changing the global settings if possible. But it looks like Visual studio code will require settings at least for the logged in user.

References:

GTK2 and PYGTK

Need:

  • gtk+-bundle_2.24.10-20120208 or compatible.
  • pygtk-all-in-one-2.24.0 or compatible.
  • gtk glade module.

The GTK project recommends getting the packages from the MSYS2 project.

  • gevent-1.0b4 or compatible
  • libxml2-python-2.7.7 or compatible
  • pyserial-2.7 or compatible
  • ppy2exe-0.6.9 or compatible
  • pywin32-219 or compatible

Additional python packages:

  • BeautifulSoup 3.2.2
  • netifaces 0.10.9
  • feedparser-5.1.3
  • flask-0.10.1
  • itsdangerous-0.24
  • MarkupSafe-0.23
  • simplejson-3.6.5
  • gobject
  • greelet 0.4.5
  • jinja2-master
  • six