Using WINE to run PlanePlotter on a Raspberry Pi

These are first notes based on experiments in early 2021, with guidance from many on the PlanePlotter group, including Max France,  Ian Chadwick and Joe Kinane - to whom many thanks.  Some experience with Linux on a Raspberry Pi is assumed.

This is a work in progress - comments and corrections are very welcome!
My terminology is likely not quite Linux standard.

 

Step 1 - Base Image - be sure to check if you already have WINE!

A pre-made OS image for the Raspberry Pi (based on Buster) is available here: https://twisteros.com/  and I suggest you download, burn to a microSD card and install into your RPi.  I used a Raspberry Pi 400 and a 32 GB SD card.  It's ready for WINE to be installed.  

However: It may even be that WINE is already installed (I wish I had known to check this!).  To check, type a command like:

  • wine notepad.exe

from a Linux terminal.  You may save yourself a lot of unnecessary work!  If you already have WINE, proceed to installing PlanePlotter.


Installing WINE

There is a useful video here, from which I extracted the on-screen script.

  • If you don't already have a "downloads" directory - create it:  mkdir ~/downloads
    (I now seem to have both Downloads and downloads directories...).
     
  • Now download two files.  Note that there is a tilde character in the download name, see later in this page if you don't have a tilde on your keyboard, or it's in the wrong place!  Use the wget command for downloading:
    • cd ~/downloads
    • wget https://dl.winehq.org/wine-builds/debian/dists/buster/main/binary-i386/wine-devel-i386_5.21~buster_i386.deb
       
    • wget https://dl.winehq.org/wine-builds/debian/dists/buster/main/binary-i386/wine-devel_5.21~buster_i386.deb
       
  • Next use dkpg-deb to "register" the files you've downloaded with dpkg ready for installing:
     
    • dpkg-deb -xv wine-devel-i386_5.21-buster_i386.deb wine-installer
       
    • dpkg-deb -xv wine-devel_5.21-buster_i386.deb wine-installer
       
  • sudo mv wine-installer/opt/wine-devel ~/wine
     
  • Create links to the WINE executable files:
     
    • sudo ln -s ~/wine/bin/wine /usr/local/bin/wine
       
    • sudo ln -s ~/wine/bin/winecfg /usr/local/bin/winecfg
       
    • sudo ln -s ~/wine/bin/wineserver /usr/local/bin/wineserver
       
  • Now it's time to reboot WINE:  wine reboot
Important

wine reboot must be run from a terminal running on a graphical screen
 
Not from a SSH session

Newer

cd ~/Downloads
wget https://dl.winehq.org/wine-builds/debian/dists/buster/main/binary-i386/wine-devel-i386_6.1~buster-1_i386.deb
wget https://dl.winehq.org/wine-builds/debian/dists/buster/main/binary-i386/wine-devel_6.1~buster-1_i386.deb

dpkg-deb -xv wine-devel-i386_6.1~buster-1_i386.deb wine-installer
dpkg-deb -xv wine-devel_6.1~buster-1_i386.deb wine-installer

sudo mv wine-installer/opt/wine-devel ~/wine
sudo ln -s ~/wine/bin/wine /usr/local/bin/wine
sudo ln -s ~/wine/bin/winecfg /usr/local/bin/winecfg
sudo ln -s ~/wine/bin/wineserver /usr/local/bin/wineserver
wine reboot

Winetricks

This is a very useful part of WINE allowing to you to install some other programs which we may need.  We download it, make it executable, and copy it to the local executable directory.

  • cd ~/downloads
      
  • wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
     
  • sudo chmod +x winetricks
     
  • sudo cp winetricks /usr/local/bin
     

Next steps

We need some other stuff which works under Linux, for example:

  • sudo apt-get install cabextract -y

At this point, a final test was suggested, but it failed for me:

  • BOX86_NOBANNER=1 winetricks dotnet20sp2
     


Step 2 - Installing PlanePlotter

Needs more detail! 

Using a Web browser (does it matter which?) locate and download PlanePlotter.  You can find Internet Explorer in the WINE installation, but I can't recall where it downloads to.  

Alternatively you could wget to download the current executable to a directory of your choice:

  • cd ~/downloads
     
  • wget   https://www.coaa.co.uk/planeplotter6_5_1_9.exe

Please note that the file name of the "setup.exe" will change for every new release, so be sure to check the filename before downloading.  Perhaps the browser download rather than the "wget" method is preferable for that reason. 

 You then have a "setup.exe" (here: planeplotter6_5_1_9.exe)  which you can run from the terminal by:

  • wine planeplotter6_5_1_9.exe

I found issues when trying to use the Linux command-line to navigate to directories with spaces, so when installing I used "LogFiles" rather than "Log files" and so forth.

 

Running PlanePlotter

You will find PlanePlotter here: /home/pi/.wine/drive_c/pi/PlanePlotter.exe

I made a desktop shortcut to run PlanePlotter, but I would think there is a better way.  You register and authenticate PlanePlotter in the usual way.

 

Step 3 - Issues

Sharing

Works exactly as expected.
 

Registration & Authentication

The Registration process didn't work as the browser wasn't brought up, so I did the process manually.

Authentication didn't bring up the appropriate dialog, so I asked for Bev's help with that.

Tilde key difficult to access - fixed.
 

Directories with spaces

Resolved - see above.

Ian Chadwick notes: To my surprise, when I used the command line to view the directories within cd /home/pi/.wine/drive_c/COAA/PlanePlotter/ it showed the Log files folder as Log\ files. Ditto the Chart files and Image files.

But, by then typing cd /home/pi/.wine/drive_c/COAA/PlanePlotter/Log\ files/ into the command line, it put me straight into the Log files folder.

Kenneth Guida notes: The \ in the file name Log\ File is a Linux indicator that the space in the name is not a delimiter but part of the file/path name.  Another way to perform that is to say 'Log File'
 

Scripts

You may find support for scripting is already installed.  To check:

  • nano hello.vbs
     
  • Containing one line: "PlanePlotter for me!"
     
  • wine wscript hello.vbs

You should get a dialog box with the message you wrote.  If scripting isn't installed:

  • Run winetricks
     
  • Add these two Libraries:  wsh57  vcrun6
      

Aspect ratio

Outline view appears expanded horizontally.
  

Networking issues

Neither Help, Home page nor Help, Online Help work, so something's not triggering the URL for those programs.
  

Downloads

Neither the BaseStation.sqb nor the FlightRoutes.sqb work (the files aren't unzipped or renamed).
However, you can Right-click Extract within the File Manager, and rename the routes database.
  

Missing Tilde "~"

Navigate from the Menu icon at the top left of the screen:

  • Menu => Settings => Keyboard => Layout
      
  • Uncheck Use system defaults
      
  • Model: leave as Generic 104-key PC
      
  • Keyboard layout:
      
  • add English (UK)
      
  • select English (US)
      
  • Delete

Marc Delince kindly pointed to: https://superuser.com/questions/290115/how-to-change-console-keymap-in-linux
  

Shortcuts

Creating a desktop shortcut

You can create a desktop shortcut with a specially named file in your Desktop directory.
You don't have a "desktop" directory?  It has to start with a Capital D!

cd Desktop
nano PlanePlotter.desktop

Contents of the file:

[Desktop Entry]
Name=PlanePlotter
Exec=env WINEPREFIX="/home/pi/.wine" wine "C:\Tools\COAA\PlanePlotter\PlanePlotter.exe"
Type=Application
StartupNotify=true
Path=/home/pi/.wine/dosdevices/c:/Tools/COAA/PlanePlotter/
Icon=/home/pi/.wine/dosdevices/c:/Tools/COAA/PlanePlotter/PlanePlotter.ico

Now make it executable:

chmod +x PlanePlotter.desktop

and double-click to run.  If you don't have a suitable icon, omit the  Icon=...  line.  I extracted one from PlanePlotter.exe using IconsExtract v1.47.

Unwanted messages

After creating a desktop shortcut, and double-clicking it, you may get the message:

This text file "seems to be an executable script..."

Here's the fix:

File manager
Edit
Preferences
General
Do not ask option on executable launch

Take out the tick

From: https://www.raspberrypi.org/forums/viewtopic.php?t=248380
  

Fonts

Some of the fonts seem OK, but others are rather spindly - looking like the font smoothing is either absent or incorrectly applied.  Please let me know if there is a proper fix for this, but in the meantime I used the winecfg command (from a Linux terminal session) to reset at least some of the fonts.  Not being a fan of "themes" I haven't yet tried that.

  • Applications
    • I happen to have Windows version: Windows 7
       
  • Graphics
    • Automatically capture mouse: unchecked
    • Allow Window Manager to decorate the windows: checked
    • Allow Window Manager to control the windows: checked
    • Emulate a virtual desktop: unchecked
    • Desktop size 800 x600 (greyed out)
    • Screen resolution 96 dpi
       
  • Desktop Integration
    • No theme
    • Item
      • Active Title Text: Segoe UI, bold, 9
      • Menu text: Segoe UI Semibold, regular 9
      • Message Box Text: Segoe UI, regular, 9
      • Tooltip Text: Segoe UI, regular, 9

 

 
Copyright © David Taylor, Edinburgh   Last modified: 2021 Feb 19 at 11:44