- 1 Building XASTIR on Windows under Cygwin
- 1.1 About this page
- 1.2 Install Cygwin
- 1.3 Options
Building XASTIR on Windows under Cygwin
About this page
This page is a Work in Progress!
Much of this information may also be found in README.CYGWIN , a file in the Xastir source tree.
This document offers a method of running Xastir on Windows using the Cygwin environment. Cygwin is a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows.
Microsoft now offers their own Linux solution, using an Ubuntu Linux framework that runs under Windows. However, you must be running a 64 bit version of Windows 10 to use the Microsoft option. More information about that option may be found in HowTo:Win10.
a) Go to https://cygwin.com/install.html with your web browser. Choose the 64 bit or 32 bit version as appropriate for your Windows operating system.
This will download the Cygwin network installer program onto your computer. Remember where you decide to put this program. I put mine in my user "Downloads" folder.
Note: It will be beneficial to re-run the Cygwin network installer from time to time in order to keep Cygwin up to date. Each time you run it you'll update any packages that have been changed since you last ran it.
b) Find the "setup-x86.exe" program (32 bit) or the "setup-x86_64" (64 bit) program. Make note of which version you are using.
Open a Windows Command Prompt as the Administrator and change directory to the directory where you just saved the setup program.
If you have setup-x86.exe (32 bit), run this command to download and install the needed Cygwin components:
setup-x86.exe --quiet-mode --packages autoconf,automake,binutils,^ db,font-util,gcc-core,git,GraphicsMagick,gv,libcurl-devel,libdb-devel,^ libgdal-devel,libgeotiff,libgeotiff-devel,libjasper-devel,libjbig-devel,^ liblcms2-devel,libpcre-devel,libshp-devel,libtiff-devel,libwebp-devel,^ libwmf-devel,libxml2-devel,libGraphicsMagick-devel,libX11-devel,^ libXext-devel,libXm-devel,make,nano,sox,unzip,wget,xfontsel,xinit,^ xorg-x11-fonts-Type1,xorg-x11-fonts-dpi100,libbz2-devel,libproj-devel
If you have setup-x86_64.exe (64 bit), run this command to download and install the needed Cygwin components:
setup-x86_64.exe --quiet-mode --packages autoconf,automake,binutils,^ db,font-util,gcc-core,git,GraphicsMagick,gv,libcurl-devel,libdb-devel,^ libgdal-devel,libgeotiff,libgeotiff-devel,libjasper-devel,libjbig-devel,^ liblcms2-devel,libpcre-devel,libshp-devel,libtiff-devel,libwebp-devel,^ libwmf-devel,libxml2-devel,libGraphicsMagick-devel,libX11-devel,^ libXext-devel,libXm-devel,make,nano,sox,unzip,wget,xfontsel,xinit,^ xorg-x11-fonts-Type1,xorg-x11-fonts-dpi100,libbz2-devel,libproj-devel
c) Choose a Download Site and then click Next.
d) The Select Packages screen will display. You don't have to actually select any, the right packages have been selected for you. But, if you wish, you can review the selection and make changes if you know what you are doing. Click Next and the Resolving Dependencies screen will display.
e) Click Next and the packages will get downloaded and installed. Repeat the above if you have network difficulties, until the install succeeds completely.
In addition to the base packages, the following packages required to compile and run Xastir, along with their dependencies, will be installed.
autoconf automake binutils db font-util gcc-core git GraphicsMagick gv gzip libbz2-devel libcurl-devel libdb-devel libgdal-devel (optional) libgeotiff libgeotiff-devel libintl-devel libjasper-devel libjbig-devel liblcms2-devel libpcre-devel libproj-devel libshp-devel libtiff-devel libwebp-devel libwmf-devel libxml2-devel libGraphicsMagick-devel libX11-devel libXext-devel libXm-devel make nano (a windows-style text editor, optional) patch sox unzip wget (Optional: Can use libcurl instead) xfontsel xinit xorg-x11-fonts-Type1 xorg-x11-fonts-dpi100
f) You may receive a Postinstall script errors screen. It is not necessarily an issue, but you are advised to check the contents of /cygwin/var/log/setup.log.full or /cygwin64/var/log/setup.log.full. Click Next to proceed.
g) At the end of the install it'll ask you if you wish to create desktop icons and menu entries. Definitely select these! It doesn't mean that Cygwin will start automatically each time you reboot your computer or login (it doesn't start automatically). It _does_ mean that you'll have an icon to click on manually to get things going.
This will create a Black/Green Cygwin icon on the desktop and a menu entry so that you can start Cygwin through the menu system as well.
h) Click "Finish". Cygwin is now installed. One more pop-up informs you Cygwin has been installed. Sometimes this last dialog gets hidden behind other windows, and it does seem to need OK clicked to complete the installation. Click the OK button on that last dialog to _really_ complete the installation. The Command Prompt in the window will not return. When it prints "Ending Cygwin install" it is done. You can press enter and the prompt will reappear.
The Black/Green Cygwin icon will start up a BASH window, without starting up Xwindows. Think of it as being similar to a DOS window, but with a lot more power. It understands Unix commands though, not DOS commands.
Note: I've had the Cygwin network install fail before during the downloading stage without informing me in any recognizable manner. You might want to re-do step 1 to make sure nothing further gets downloaded/installed. Once you get to that point, Step 1 is complete.
Start the X Server
Click on the Windows menu icon or press the Windows button. Look for the Cygwin-X program group and click on the XWin Server. It will create a green "X" icon in the system tray.
Right-click on green "X" icon in the system tray. Select Systems Tools, and then Cygwin Terminal.
Test Cygwin and Create Startup Shortcuts
You should get a shell window that looks very much like a DOS window. It's a BASH shell window and understands Unix commands instead of DOS commands.
Once you've gotten to this stage, you now have Cygwin and Xwindows installed and operational. Next we go after Xastir itself.
Download Xastir Sources
Use the Cygwin Terminal window that you just started. Type the three lines below into the shell exactly as shown.
mkdir git cd git git clone http://github.com/Xastir/Xastir
The end result when it succeeds will be a new directory "~\git\Xastir\" which contains all of the Xastir source code. You can type "ls Xastir" (that's lower-case LS) to see the file listing.
Side Note: Here's the coolest thing about Git: Once you've done this initial source-code download, you'll never have to do the whole Xastir download again. You'll just go into the "git/xastir" directory and type "git pull", which will snag just the _changes_ to the files since you last updated, and is very fast. Compile and install at that point and you'll be running the latest developer's version in just a few minutes! It's very easy to keep up with the developers this way.
Configure/compile/install Xastir. Type these commands into the BASH shell, waiting until each one completes before typing the next command:
cd ~/git/Xastir ./bootstrap.sh mkdir -p build cd build ../configure make make install-strip
NOTE: You'll probably want to run the configure step from an xterm window with the X11 server running of course. If you do this from a non-X11 window then the configure test for "gv" will fail, as "gv" requires an X11 server even when asking it for it's version number. Without "gv" support you won't be able to print from Xastir.
Once you get through the above commands, Xastir is compiled and installed on your system, with minimal map support. Later sections of this document detail adding additional map libraries in order to give you access to the full mapping capability of Xastir.
et's start from scratch to make sure it all works. Close any Cygwin/BASH windows you may have.
Click on the shortcut you created to start Xwindows.
From the resulting BASH window, type "xastir &". Xastir should start up shortly.
As built, using this documentation, the following map types are supported.
Built-in map types:
gnis USGS GNIS Datapoints pop USGS GNIS Datapoints w/population map APRSdos Maps map WinAPRS/MacAPRS/X-APRS Maps pdb PocketAPRS Maps
Support for these additional map types has been compiled in:
geo Image Map (ImageMagick/GraphicsMagick library, many formats allowed) geo URL (Internet maps via libcurl library) geo URL (OpenStreetMaps via libcurl library Copyright OpenStreetMap and contributors, CC-BY-SA) shp ESRI Shapefile Maps (Shapelib library) tif USGS DRG Geotiff Topographic Maps (libgeotiff/libproj) xpm X Pixmap Maps (XPM library) tab MapInfo TAB mid MapInfo MID mif MapInfo MIF ddf Spatial Data Transfer Standard (SDTS) s57 International Hydrographic Organization (IHO) S-57 dgn MicroStation DGN rt1 US Census Bureau TIGER/Line
The README.MAPS file has instructions for where to get maps and where to put them under the Xastir hierarchy.
If you have any WinAPRS, DosAPRS, or PocketAPRS maps, now is a good time to place them in the /cygwin/usr/local/share/xastir/maps folder (or a subdirectory of it). You can also use "*.geo" files and the associated image files with Xastir. You may place them in this directory (or a subdirectory of it) as well.
FILESYSTEM PATHS (WINDOWS VS CYGWIN):
From Windows, just prefix all paths with "/cygwin" or "/cygwin64" as appropriate. For instance, maps go into /cgwin/usr/local/share/xastir/maps instead of /usr/local/share/xastir/maps. Xastir will continue to see them as "/usr/local/share/xastir/maps" though from inside Cygwin. It kind of looks like a miniature Unix box from inside Cygwin.
To set a new language or change the language current choice, use this command line instead from inside an Xterm:
xastir -l <language>
Current choices are:
Dutch English French German Greek Italian Portuguese Spanish ElmerFudd MuppetsChef OldeEnglish PigLatin PirateEnglish
This option will be stored in the users config file for the next time Xastir is run. On new installs Xastir will default to English until you use this command line option once.
YGWIN vs LINUX/UNIX:
Another difference with Cygwin as opposed to Unix-like operating systems: You can't do the make install portion if Xastir is up and running. You have to kill Xastir first before you do "make install" or "make install-strip". Otherwise the newly compiled Xastir won't replace the old one.
Another interesting "feature" of Cygwin/Xwindows is that some of the modifier keys like ScrollLock/CapsLock/NumLock must be pressed while that X-window is the active foreground window. If not, the event can be missed, and Xwindows can get out of sync with the actual state of the key. This doesn't appear to be an Xastir-specific problem, but a Cygwin/Xwindow problem. With just a BASH shell under Cygwin (not involving Xwindows), the problem doesn't appear to happen. Just inside Xwindows on Cygwin.
When specifying serial ports to use with Xastir,
"COM1" is called "/dev/ttyS0" in Cygwin (and Linux) "COM2" is called "/dev/ttyS1" in Cygwin (and Linux)
Note the capital 'S'.
Adding Additional Map Libraries
These additional Xastir libraries have been tested on Cygwin:
ImageMagick (no need to use if using GraphicsMagick) Festival GDAL/OGR
Anyone testing additional libraries is encouraged to share their findings on the Xastir mailing lists (you must be subscribed in order to post messages there). The libraries which have _not_ been made to work yet on Cygwin are:
The AX25 libraries will probably never work, as they are for Linux only. GPSMan/gpsmanshp may work on Cygwin at some point if enough work is done to figure out and document the process.
Note: The most recent version of Festival is 2.4. According to the README for this version, "Do NOT use Windows with Cygwin".
An older procedure that was once used to integrate Festival support is presented for reference.
1) Start BASH shell in Cygwin
2) Make ~/festival download directory and /usr/local/festival installation directory
3) Download festival components from festvox.org into ~/festival, in the Windows environment the corresponding path is:
Get the following files:
speech_tools-1.2.95-beta.tar.gz festival-1.95-beta.tar.gz festlex-CMU.tar.gz festlex-POSLEX.tar.gz festvox-kallpc16k.tar.gz
4) Build festival and company:
cd /usr/local/festival tar xzf ~/festival/speech_tools-1.2.95-beta.tar.gz tar xzf ~/festival/festival-1.95-beta.tar.gz tar xzf ~/festival/festlex_CMU.tar.gz tar xzf ~/festival/festlex_POSLEX.tar.gz tar xzf ~/festival/festvox_kallpc16k.tar.gz
cd speech_tools ./configure && make cd ../festival ./configure && make
These packages are build and used where they are compiled.
5) Test festival:
cd /usr/local/festival/festival/examples sh saytime
Festival should say the time if everything went fine
6) Add /festival/festival/bin to PATH in .profile and .bashrc. For
me both files look like this:
.profile and .bashrc:
7) Configure and build xastir. Configure should report that
festival is found.
8) Start the festival server:
festival --server &
To do this automatically I added the following lines to my .bash_profile:
if [ `ps -ef | grep festival | wc -l` -eq 0 ] then festival --server & sleep 1 fi
9) Run xastir, do File->Configure->Speech, add things to say, and listen.
Sound Alerts Under Cygwin
There is currently (November 2017) a problem using sound alerts under Cygwin. It is recommended that sound alerts are turned off within Cygwin or you may experience lockups.
You'll need to add the .wav files to Xastir.
git clone http://github.com/Xastir/Xastir-sounds cd Xastir-sounds cp -r sounds/* /usr/local/share/xastir/sounds/
Support is provided by the following 2 packages.
If you followed the installation instructions in this README they are already installed.