Skip to content

202.010 Packaging improvements for Microsoft Windows.

John E. Malmberg edited this page Oct 17, 2023 · 3 revisions

Introduction

The end goal is a simpler Microsoft Windows install.

The old method of creating a zip file that contains an embedded python and GTK is no longer a viable options and has always had problems in that in the event of a security fix needed for any of the hundreds of dependencies of D-Rats is needed, the entire zip file needs to be replaced.

While that was a simple design for deployment, it is a configuration that costs too much to maintain and considered bad for getting timely security fixes.

So this WIKI is to explore and track progress on what can be done, and hopefully who can work on the parts.

It is starting out as a quick skeleton, I recommend that people working on the project update it and add actual links where it would be helpful.

How do I get started?

Pretty much all desired packaging solutions for D-Rats will be to use a packaging solution that is supported by the platform.

For Microsoft Windows, that is an MSI file.

So the minimum that you need to do is learn how to build a MSI file on your system.

We have a convenient simple project that you can use to learn how to do this:

Ham Radio Software LZHUF project

This is the minimum that will probably be needed for creating a package.

Native Microsoft Windows solutions

There is a native Python3 binary package available for download.

In theory, you should be able to just install that package and then do a pip install of the d-rats package.

It just does not work.

The native Python3 does not include a library of pre-built binaries for third party libraries that are needed for D-Rats.

What the native Python3 binary package does is it uses the PIP and the PyPi repositories to get those packages.

When the package needs a binary library built, PIP tries to build that binary package on your system. This means that you need a build system the package recognizes to do the build, which is typically Visual Studio, of which Microsoft has a version for free download.

The pip build of GTK-3 currently fails. All internet articles found so far only had resolutions of moving their product to msys2.

But even if that works, that means that Windows users need another big package installed.

Then getting that into a single installable package would be the next battle, which from a system security perspective is a very bad policy as it means that we would have to track security fixes for every embedded dependency, and issue a new package immediately.

Using PyPi is also something to be avoided because criminals are actively attacking the repository either by trying to take over legitimate projects, or by making projects named similar to legitimate packages.

And unexpected PyPi package update may break applications.

MSYS2 Mingw solutions

This is our current solution.

So I would be looking for simpler way to install MSYS2 with current updates.

Several packages now use a private copy of MSYS2. The problem with that is keeping it up to date with all security fixes. The packages I see doing this seem to have large teams of developers and are doing daily builds for users to test, so they can declare a new release anytime a security update is needed.

This may involve setting up an MSI file to install a script to install MSYS2.

Then we would look at creating a MSYS2 compatible package. If we can get that all working, we may be able to get MSYS2 to include d-rats in their package catalog.

It is likely the best that we can hope for maintainability is an install of msys2 and then the simplest way to install d-rats and its dependencies as a second step.

Cygwin Solutions

Powershell are actually available on the internet for installing a Cygwin environment so this may be an alternative to MSYS2.

Note that by default Microsoft disables Powershell from running this type of script, so that is a complexity.

Ideally you would want an MSI file that does something to enable the Power shell install of Cygwin, and also setup a Cygwin installable package that installs D-Rats and all the dependencies.

So far no known testing of D-Rats on Cygwin.

Microsoft WSL solutions

This seems to be frequently brought up.

Only available on 64 bit Windows 10 or later.

No one has actually said that they have successfully implemented this at all.

Based on wb8tyw's past experience with WSL environments, much of the user documentation lags behind what is needed for the actual environment. This looks like it may be one of the more complex solutions.

There is only one WSL version for Windows 10 and it is different from the two versions available for Windows 11.

According to some online articles (need links added), the WSL environment can not access USB serial devices on the host platform. It is not clear which WSL versions that applies to.

There apparently are experimental packages (need links added), to allow access to USB serial devices.

And then you have to setup the Linux Python environment, which we also do not yet have simple to deploy packages.

PODMAN

Podman is an alternative to Docker and is now available for Microsoft Windows 10/11.

Podman uses the Windows WSL environment, and had two modes, rootless and root enabled.

The root enabled mode may or may not have access to USB serial ports.

It appears that the GUI may not be available to podman containers.

Linux VMs.

The Oracle Virtual Box project is active, this can install a linux with a GUI on Microsoft Windows.

Be aware some VMs do not handle the host system going to sleep too well.

WB8TYW will not be testing on any environment that charges if used in a commercial environment.

Clone this wiki locally