Windows (MSys2)
Overview#
mwp has, since December 2024, had somewhat functional support for building mwptools using the Windows Msys2 toolchain with the aim of providing a native Windows version of mwp.
- A "portable" Windows Installer is published in the "Snapshot" builds (Github release area).
- May be built locally using the Msys2
Status#
Somewhat experimental, however most things work.
Building#
It is necessary to install the Msys2 toolchain. This is not required for a binary install.
System Build Dependencies#
- Add
export LC_ALL=C.utf8to.profile(.bash_profile) so theblueprintUI definitions will compile. - Set your Msys terminal to UTF-8 as well (Options from the title bar icon)
- It may also be neccesary to set Windows to use UTF-8.
- Add
export LC_ALL=C.utf8to.profile(.bash_profile).
Then install dependencies.
pacman -S --needed mingw-w64-ucrt-x86_64-gtk4 mingw-w64-ucrt-x86_64-gstreamer mingw-w64-ucrt-x86_64-cairo \
mingw-w64-ucrt-x86_64-pango mingw-w64-ucrt-x86_64-mosquitto mingw-w64-ucrt-x86_64-libshumate \
mingw-w64-ucrt-x86_64-libadwaita mingw-w64-ucrt-x86_64-libsecret mingw-w64-ucrt-x86_64-libsoup3 git \
mingw-w64-ucrt-x86_64-vala mingw-w64-ucrt-x86_64-meson mingw-w64-ucrt-x86_64-go \
mingw-w64-ucrt-x86_64-blueprint-compiler mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gtk4-media-gstreamer mingw-w64-ucrt-x86_64-librsvg \
mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-readline
Optional, but recommended:
pacman -S --needed unzip mingw-w64-ucrt-x86_64-ruby
mingw-w64-ucrt- (vice standard Arch Linux).
Then follow the documented build instructions using meson and ninja.
PKGBUILD#
There is also a pacman PKGBUILD file in the docs/windows-pkg directory. You can build your own Msys2 package (currently from the development branch) using this PKGBUILD.
- Create / enter a build directory, any name your like, e.g.
mkdir msys-builds && cd msys-builds - Copy
docs/windows-pkg/PKGBUILDthere:cp <PATHTO>/mwptools/docs/windows-pkg ./ - Now you can build the package:
This will generate a Msys2 package named like (the name includes a git tag and commit id)
MINGW_ARCH=ucrt64 makepkg-mingw -C -fmingw-w64-x86_64-mwptools-24.12.02.r76.c1e34843-1-any.pkg.tar.zstwhich can be installed withpacmanpacman -U mingw-w64-x86_64-mwptools-24.12.02.r76.c1e34843-1-any.pkg.tar.zst - Note that you can build and install in one command:
After you've done this once, subsequently, after the repo has been updated, you can rerun the build / package generation by rerunning
MINGW_ARCH=ucrt64 mmakepkg-mingw -C -f -imakepkg-mingw(andpacmanto install) as required.
Windows Installer#
A Windows Installer may be provided.
Run the installer. Select the option to install a desktop icon if you wish. Options are provided for a System or Portable (user local) installation.
- If you select a portable (user local) installation, the "DejaVu Mono" fonts cannot be installed, resulting in an ugly side panel.
- The portable (user local) installation may be removed by deleting the installation directory.
- The installer may not set the "Start In" directory correctly.
Binary Components and Open Source Licences#
The Windows installer includes components distributed under various Open Source Licences:
The following binary components are from the Msys2 Project.
- Gtk and dependencies: LGPL2 see https://gitlab.gnome.org/GNOME/gtk
- DejuVu Fonts: Bitsream Licence and other see https://dejavu-fonts.github.io/License.html
- miniunzip: Zlib see https://www.winimage.com/zLibDll/minizip.html
- Gstreamer : LGPL2 see https://gstreamer.freedesktop.org
Also included (replay tools):
- INAV
blackbox_decode: GPL3 https://github.com/iNavFlight/blackbox-tools fl2ltmflightlog2kml: GPL3 flightlog2kml
Post Install Tasks#
PKGBuild / Msys 2 local build#
- Install any required GStreamer packages
- Install
blackbox_decodeandfl2ltm - Install the DejuVu
Monofonts as Windows fonts
All installation methods#
Audio#
Voice assistance requires a spawned "audio (text to speech) helper". The following third party tools are suitable.
- voice.exe an open source program by Eli Fulkerson uses the Windows Speech Synthesis engine, and works perfectly. Sounds great (similar to
piper-ttson Linux). The--voice-commandoption may be set permanently in%LOCALAPPDATA%\mwp\cmdopts, for example:# -m option gives a female voice ... (voice -h for other options) --voice-command "voice.exe -m" - The Windows espeak port also works as an external helper via
--voice-command espeak(having set an appropriatePATH). The voice is somewhat robotic. The--voice-commandoption may be set permanently in%LOCALAPPDATA%\mwp\cmdopts, for example:--voice-command espeak.exe
Terrain Plots (Terrain Analysis / Line of sight)#
Requires a third party gnuplot. The gnuplot in Mys2 behaves somewhat strangely and is not suitable. Gnuplot Windows binary. Install the Msys2 version.
PATH#
The above external applications will need to be on the PATH available to the installed mwp.
Known issues#
- Bluetooth in general may be unreliable, in some part due to the difficulty in consistently enumerating BT devices.
- BLE is not available
- Terrain Analysis and Line of Sight Analysis is only available "off-line"
- In the event that mwp should crash, it may leave behind some spawned applications, for example one of more of
fl2ltm,blackbox_decode,espeak,voice,bproxy,gmproxy,gdbus. In particular, mwp may not restart if agdbusorphaned remains. In such cases, the user is advised to clean up using the Windows Task Manager.
Data Locations#
Configuration Files#
%UserProfile%\AppData\Local\mwp/$LOCALAPPDATA/mwp(~/.config/mwpon POSIX systems).
Map caches:#
%UserProfile%\AppData\Local\Microsoft\Windows\INetCache/$LOCALAPPDATA/Microsoft/Windows/INetCache(~/.cacheon POSIX systems).- And sub-directories:
shumate: Tile cachesmwp/DEMs: Digital Elevation Models (aka Terrain data)fl2x: Flight log metadata cache.
None of these locations are cleared by an uninstall.
Settings#
mwp maintains documented settings in a Registry like Gtk component which can be assessed by the command line tool gsettings. If you use Msys2, this will be installed. If you use the installer it is also installed; but it is necessary to establish its path to use it (and enable it to find the settings):
-
The mwp Windows Installer will install
gsettings, this will needC:\Program Files\mwptools\binto be on thePATHorcd "C:\Program Files\mwptools"and invokebin/gsettings. e.g.:PS C:\Users\win11> $env:Path += ";C:\Program Files\mwptools\bin" PS C:\Users\win11> gsettings list-recursively org.stronnag.mwp org.stronnag.mwp adjust-tz true ... ## show current in the voltage box ... PS C:\Users\win11> gsettings set org.stronnag.mwp smartport-fuel-unit 'mAh'
You may also the graphical mwpset application to maintain settings. This is part of mwp.
Other#
Note that mwp creates and consumes IP services. It may be necessary to ensure that mwp.exe is white-listed in the Windows firewall.
Reporting Issues#
Please see the general guidance, in particular:
- Build issues require the full build text, not just some random subset
- Run time issues require the "stderr" log (
mwp_stderr_YYYY-MM_DD.txt) as well as any artefacts that cause an issue (BBL, ETX log, mission files etc.).
Previously, these folders defaulted to GLib's Environment.get_home_dir() which was $HOME / %HOME% everywhere.
Now they default to:
- Normal (POSIX) OS:
Environment.get_home_dir()aka$HOME - Windows:
Environment.get_user_special_dir(UserDirectory.DOCUMENTS)/mwpwhich isDocuments/mwp. This means for Msys2, you now get the same directory regardless of whether you're the Windows user or the Msys2 user (i.e.c:/Users/<NAME>/Documents/mwp.
The user may change the log location via the Environment Variable MWP_LOG_DIR.