-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.win32
1283 lines (947 loc) · 46.5 KB
/
README.win32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---------------------------------------------------------------------
Note that there are other options to get Xastir running on Win32.
The method described below in this document is for getting Xastir
running under Cygwin which can be problematic. Other methods exist
on the Xastir Wiki pages which are typically easier and more robust:
http://xastir.org/index.php/Installation_Notes
---------------------------------------------------------------------
Two companies have created simpler installs of Cygwin/Xastir than
described in this document. Contact one of these folks for more
info. Remember to replace the "at" below with the "@" symbol to
arrive at the correct e-mail addresses. We have to do that to
prevent large amounts of spam from going to addresses harvested
from web pages:
Lintronix:
Internet install of Xastir available for free, CD-ROM available
for a nominal fee. Everything needed to install Cygwin/Xastir
online (Internet install) or off-line (CD-ROM). Walks you
through an automated install:
http://www.lintronix.com/winxastir/
E-mail: winxastir at lintronix.com
Inuit Nunaani Wireless Inc:
CD-ROM available for a nominal fee. Everything needed to
install Cygwin/Xastir off-line. Walks you through an
automated install. This install is verified to work on WinXP
and Win98 (known _not_ to work on Win95/WinME). Contact:
E-mail: Tom Tessier <ttessier at trtdigital.ca>
------------------------------------
Installing Xastir on Windows/Cygwin:
------------------------------------
Please Note: It's beneficial to actually log in to your Windows
computer rather than skipping that step of the Windows login process
(Don't hit escape just to get rid of the dialog!). If you log into
Windows properly, Cygwin will be able to figure out where to put your
home directory. If you don't do this, you'll be referred to as
"unknown" and you won't have a home directory in Cygwin. This means
there won't be a good place to put your Xastir startup files. Of
course, log in as the same user each time in order for Cygwin to use
the proper home directory for you.
CAN'T REPLACE FILES: Every once in a while Windows will refuse to
allow you to delete/rename one of the files. The only way I've
found to get around this problem is to reboot. Also, Windows
typically won't allow you to replace a file that Windows currently
has open. If you're going to be recompiling/reinstalling Xastir, or
updating Cygwin, make sure that these applications are shut down
before doing so. You can get VERY strange results if only some
files get updated.
SPACES IN USERNAMES: Cygwin specifically, and Unix boxes in
general, don't much like spaces in filenames, directories, or login
names. Any of these may cause you headaches while playing with
Cygwin. Create a new login that doesn't have spaces and log in as
that user before installing Cygwin, and whenever you intend to run
Cygwin/Xastir. It's very likely that Xastir won't work for you if
you use a login that has spaces embedded in it. For additional
info, see this link:
http://cygwin.com/faq/faq_2.html#SEC17
Explanation of this login box for those that don't see it: If you
have the option of running networking, you'll have a login box show
up when you first start up Windows. It'll ask for you user name and
password, then let you in. If you escape out of that dialog, Windows
may start right up but networking will be disabled.
If you don't see that box, there are two options that I know about,
either you or someone else set it up to auto-login with your user/
password combo, or you don't have networking installed at all.
The following steps direct you through installing Cygwin, Xastir, and
a few optional map libraries that Xastir can use. Note that in most
of the places below where the directions state to type commands, this
must be done from within a Cygwin BASH shell, not a DOS window.
Where you are asked to edit files, it's best to use Wordpad instead
of Notepad, as Notepad doesn't do nice things to Unix-format files.
Cygwin now allows you to have Xwindows apps and Windows apps all on
the screen and visible at the same time! The instructions here set
it up in that manner, so you can have Xastir as just another app on
your Windows desktop.
Please subscribe to the "xastir" mailing list at
"http://xastir.org". There are lots of helpful people there
that can aid you in installing/running Xastir. You must be subscribed
in order to post messages there.
[ ] Step 1) Install Cygwin, a free download.
[ ] Step 1a) Go to http://www.cygwin.com with your web browser.
Look for the black and green Cygwin icon, then click on "Install
now!".
This will load the Cygwin network installer program onto your
computer. Remember where you decide to put this program. I put
mine in "c:\<login>\cygwin\setup.exe", (for instance
"c:\hacker\cygwin\setup.exe"). This program will allow you to do a
network install of Cygwin. After you install Cygwin (see the steps
below for details) you'll have a package directory (in my case
"c:\hacker\cygwin\") and a Cygwin directory (in my case
"c:\cygwin"). The un-installed packages go into the package
directory as they are downloaded from the 'net.
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.
[ ] Step 1b) Find the "setup.exe" program and execute it either by:
a) Clicking on it with File Explorer, or
b) Start->Run->path to executable, or
c) Opening a DOS window and typing the name.
This will start installing Cygwin over the network. Answers to
provide to the program:
Install from Internet (*)
"C:\cygwin"
Install For All Users
Default Text File Type Unix (*)
Local Package Directory "C:\hacker\cygwin"
Select Your Internet Connection (choose one)
Choose A Download Site (choose one nearby if you can determine that)
Note: Responses above listed with a "(*)" are required. Others are
up to the individual user to answer as they wish. You'll get to a
"Progress" page where "setup.bz2" is downloaded from the 'net. If
it hangs at this step, you may wish to "Cancel" and try another
server until you obtain this file and are presented with a list of
packages to install.
[ ] Step 1c) Select Packages: Leave the packages selected that
were selected by default, plus select the additional packages listed
below. Note that enabling some of these packages causes others to
be selected as well, that's OK and necessary.
[ ] Press the "View" button until it says "Full" next to it. All
packages are now in alphanumeric sorted order.
Selecting a package involves clicking on the little circle symbol
until the option you want is displayed. You can choose older
versions of a package, choose to keep the package you have installed
already, or choose to remove or install a package in this manner.
If you're running Cygwin install again and see "Keep" as an option,
that means you've already installed that package. We're only
concerned with the "bin" packages here (stands for "binary") and not
the "src" packages (source code).
It's suggested that you keep whatever was selected by default, and
just add the below packages to the selection. As you select
packages, other packages may be selected for you that are also
required:
[ ] autoconf
[ ] automake
[ ] binutils
[ ] bzip2
[ ] curl
[ ] curl-devel
[ ] cvs
[ ] db4.2
[ ] diffutils
[ ] gcc
[ ] git
[ ] gv
[ ] gzip
[ ] ImageMagick (See notes under "Adding ImageMagick" below
--- there are problems with the Cygwin package)
[ ] lcms
[ ] less
[ ] lesstif
[ ] libdb4.2
[ ] libdb4.2-devel
[ ] libgeotiff
[ ] libgeotiff-devel
[ ] libgeotiff1
[ ] libMagick-devel
[ ] libMagick6
[ ] libproj-devel
[ ] libproj0
[ ] libtool
[ ] libxml2-devel
[ ] m4
[ ] make
[ ] nano (a windows-style text editor, optional)
[ ] patch
[ ] pcre
[ ] pcre-devel
[ ] perl
[ ] proj
[ ] python
[ ] rcs
[ ] tcltk
[ ] tiff (install sources for this one too? TBD)
[ ] unzip
[ ] vim (a Unix-style text editor, optional)
[ ] wget (Optional: Can use libcurl instead)
[ ] X-start-menu-icons
[ ] X-startup-scripts
[ ] xfree86-lib-compat
[ ] xorg-x11-bin
[ ] xorg-x11-devel: Headers
[ ] xorg-x11-f100: 100 dpi fonts
[ ] zip
Clicking on the small circle with the two arrows will run you
through the various select/de-select options for each package.
Note regarding Perl: On some Windows systems, Perl 5.8 can cause
page faults when compiling Xastir. If this happens to you, start up
the Cygwin install program again and install Perl 5.6.1 instead.
Retry the compile. If this works for you, every time you update
Cygwin you'll have to check the Perl version to make sure that it
doesn't update you to 5.8.
Note regarding KDE: One user reported that the KDE package on
Cygwin messes up XmStrings in Lesstif. It caused a bunch of
headaches. You've been warned. Note that KDE is not one of the
packages listed above (I didn't load it).
[ ] Step 1d) Click Next and the packages will get downloaded and
installed. Repeat the above if you have network difficulties, until
the install succeeds completely.
Some servers fail to download some files and require the user to
press enter between downloads when it fails on these files. If this
happens, back up and select another server.
[ ] Step 1e) 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.
[ ] Step 1f) 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 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 which to re-do step 1 to make sure nothing
further gets downloaded/installed. Once you get to that point, Step
1 is complete.
[ ] Step 2) Create shortcut for starting X:
Create a shortcut to C:\cygwin\usr\X11r6\bin\startxwin.bat from your
desktop. This shortcut is the method you'll use to start up
Xwindows. The usual method is to use File Explorer to find the
file, the right click and drag it to your desktop, at which point
you let go of the right mouse button and you'll be presented with a
small menu. Select "Create Shortcut(s) Here". You can then rename
the shortcut if you wish. I named mine "Xwindows".
Change the properties on the shortcut so that it runs it from your
home directory on Cygwin, something like "c:\cygwin\home\<user>\".
Right-click on the new shortcut, then go to the Properties menu to
change this. You may need to create the home and the user directory
before you can change the properties on the shortcut.
[ ] Step 3) Test Cygwin and create startup shortcuts:
Note: With Win2000, I had to do a reboot before I could proceed
further.
Double-click on the shortcut you just made. 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.
When running this shortcut for the first time from WinXP, several
errors may occur. Repeat as necessary until the BASH window appears
without incident.
Type "exit" and then press <Enter> to make the BASH window
disappear.
You should still see an 'X' in your system tray. That's the
X-server running. You can right-click on that and then select the
menu entry to cause it to exit.
Once you've gotten to this stage, you now have Cygwin and Xwindows
installed and operational. Next we go after Xastir itself.
[ ] Edit or create your .profile file in your home directory.
NOTE: Your "home" directory would be at "C:\cygwin\<user>\" if you
installed Cygwin in the default location. From inside a BASH shell
you can get to your home directory just by typing "cd" and then
pressing <Enter>. When you see things like "~/.profile" it is
really referring to the file ".profile" in your home directory (~).
This is a different file than the ".bash_profile" file.
It appears that Cygwin uses the PATH variable to look for both
binaries and libraries. Add this line to the file (create the
"~/.profile" file if the file doesn't exist):
export PATH=$PATH:/lib:/usr/lib:/usr/X11R6/lib:/usr/local/lib:/bin:/usr/local/bin:.
If the line already exists in your .profile, add any missing pieces
to it from the line above. Directories should be separated by a ':'
character. Edit it with "nano" or "vim" (again, the more
user-friendly editor is "nano").
Once you have saved the file, execute the following commands to copy
file to where it will be automatically executed when you open a
shell and then read it for this session so you don't have to close
and then reopen the shell.
cp .profile .bashrc
source .bashrc
[ ] Step 4) Download Xastir sources. Start up Xwindows using your
shortcut. Type the four lines below into the shell exactly as shown.
Hit <ENTER> when asked for a password after typing line four (the
"login" command):
cd ~
mkdir src
cd src
git clone http://github.com/Xastir/Xastir
The end result when it succeeds will be a new directory
"C:\cygwin\home\<user>\src\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 "src/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.
[ ] Step 6) Configure/compile/install Xastir. Type these commands
into the BASH shell, waiting until each one completes before typing
the next command:
cd ~/src/xastir
./bootstrap.sh
mkdir -p build
cd build
../configure
make
make install
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.
NOTE: The "make" step can be extremely memory hungry. If you don't
have much free memory, that step might take a long time to run. One
Win2k machine with only 20MB of free RAM (128MB total RAM) couldn't
complete this step, but adding another 128MB of RAM to that machine
caused it to succeed. Another machine running Win2k with 64MB free
(128MB total RAM) took six hours (but keep reading!). Free up
memory if you're having trouble completing that step. This behavior
is only seen on Windows/Cygwin, not on the Unix-based systems. On a
typical Linux box that step takes under two seconds. Hopefully
Cygwin linking will improve over time to alleviate this issue.
We've added a new link-stage parameter to reduce the memory usage
for that step, but it doesn't totally resolve the problem. The
machine that took six hours originally now takes 60 seconds to
complete that step.
Ignore the "PACKAGE_* redefined" warnings. They won't break
anything and are just an annoyance.
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.
NOTE: If you get the below errors during the compile it means that
Cygwin has changed one of their packages to be incompatible with the
rest (and needs to change a lot more of their packages to
correspond):
---------------------------------------------------------------------
/usr/include/Xm/Print.h:28:34: X11/extensions/Print.h: No such file or directory
In file included from /usr/include/Xm/XmAll.h:79,
from alert.c:308:
/usr/include/Xm/Print.h:40: error: parse error before "XPContext"
/usr/include/Xm/Print.h:43: error: parse error before '}' token
/usr/include/Xm/Print.h:61: error: parse error before "XPFinishProc"
make[3]: *** [alert.o] Error 1
---------------------------------------------------------------------
A temporary fix for the above errors (until Cygwin gets their act
together) is to do the following:
---------------------------------------------------------------------
Launch the Cygwin setup program
When you get to the list of packages change the list to FULL mode
Uncheck "Hide Obsolete Packages"
Scroll down the list until you find xorg-x11-devel
Click on the word "keep" until it changes to a 6.x version of the file
Click Next and finish the setup
Unfortunately you'll have to perform the same fix each time you
use the Cygwin setup program or it will "upgrade" to the
broken package again.
---------------------------------------------------------------------
[ ] Step 7) Create a link to the Xastir executable. Type the
following commands into the BASH shell:
cd ~
ln -s /usr/local/bin/xastir xastir
That will create a symbolic link from your home directory to the
Xastir executable, to make it easier to run Xastir without typing
the long path each time.
[ ] Step 8) Actually run the darn thing:
Let'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.
Note: Xastir has support for PocketAPRS, DosAPRS, WinAPRS, MacAPRS
and GNIS maps by default. For additional types of maps, you'll need
to install some libraries, then recompile Xastir so that it knows to
use them. See the instructions below.
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, though most of the .geo
files won't work for you until you install the ImageMagick library.
What Xastir paths look like from within Windows (in case you're
moving maps around with Explorer): Just prefix them all with
"cygwin/". For instance, maps go into
/cygwin/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.
Run Windows in 15-bit color or better (32768 colors or more) or
you'll get lots of warnings about Xastir not being able to allocate
colors when it starts up, and the display will be rather stark
looking.
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 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.
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.
Note that one user running Cygwin on XP had it crash every time his
screen-saver kicked in. Disabling the screen-server fixed that
problem.
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.
Some users have experienced problems with their Windows box running
the NTFS "convert.exe" program instead of the ImageMagick
"convert.exe" program, usually when enabling snapshots in Xastir.
If you experience this, check your path settings and make sure that
ImageMagick's path is first.
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'.
[ ] Step 9) Document & Back Up the Configuration
One user had a problem where after Cygwin/Xastir was installed, he
installed another program, in this case Java, and it wiped out some
of the environment variables that Cygwin set. $HOME was one
variable that got changed.
To guard against such changes, go to My Computer and right-click on
properties. Write down the Advanced System Variables and keep the
note in a safe place.
Optional
To shorten the Xastir sequence or to automate the startup process of
Xastir in Windows environment, the following may prove useful.
1. Locate startwin.bat, it will be located at: Cygwin install
drive, eg; C:\cygwin\usr\X11r6\bin\ Please make a backup copy
in case something goes wrong! Save it as a new name such as
startwin.bak or startwin.orig.
2. Open startwin.bat with notepad or another ASCII text editor.
3. Find the line:
run xterm -sl 1000 -sb -rightbar -ms red -fg yellow -bg black -e /usr/bin/bash
4. Copy and paste the line into the startwin.bat file directly
under the line you just copied.
5. Cut /usr/bin/bash -l from the end of the line then enter
/usr/local/bin/xastir where you just cut. You will end up with
entries such as this:
run xterm -sl 1000 -sb -rightbar -ms red -fg yellow -bg black -e /usr/bin/bash -l
run xterm -sl 1000 -sb -rightbar -ms red -fg yellow -bg black -e /usr/local/bin/xastir
6. Save startwin.bat
Now when you click the XWindow shortcut, Xastir will start without
the need to wait for the BASH shell and typing Xastir &. In
addition, a BASH shell window will open to allow you to monitor any
error messages or other information generated by Xastir put out to
STDERR and shown in the shell.
In addition, you can add a shortcut to the startup directory to
automatically start Xastir when you start Windows..
Please see the INSTALL file and the Help menu in Xastir itself
for additional information not mentioned in this document.
Additional info can be found on the cygwin web-site:
http://www.cygwin.com
or the Cygwin/XFree86 web-site:
http://cygwin.com/xfree/
[ ] Step 10) Keeping up-to-date:
Once a week or once a month, run the Cygwin network installer
program (step 1b above). After it finishes, open a Cygwin window
and type these commands to update the Xastir source code:
cd ~/src/xastir
git pull
Every once in a while Windows will refuse to allow you to
delete/rename one of the files. The only way I've found to get
around this problem is to reboot. I sometimes see this when trying
to do a "git pull", and Windows won't allow one or more files to get
updated.
Repeat step 6) above to recompile/reinstall the latest Xastir.
A very good option is to read the SUDO instructions in the
README.sudo file, setting up the /etc/sudoers file and creating an
update-xastir script as shown. Then you can type "./update-xastir"
at any time to snag down the latest Xastir changes, compile, and
install it. We've just included an update-xastir script with
Xastir, so you don't have to create it anymore. You may however
need to remove the "sudo" keyword from each line for it to work
properly on Cygwin.
-----
Notes from Henk de Groot:
1) On Windows ME I had to configure the shortcut to start Xwindows,
it ran out of environment memory. Selecting an "Initial Environment"
of 4096 bytes in tab "Memory" (I hope that is correct, I have a
Dutch language version...) fixed it.
2) My keyboard layout was a mess in the xterm, I had to add
"setxkbmap us" to c:\cygwin\usr\X11R6\bin\startxwin.bat (just below
"run XWin....").
-------------------------------------------
OPTIONAL: ADDING ADDITIONAL MAP LIBRARIES:
-------------------------------------------
These additional Xastir libraries have been tested on Cygwin:
ImageMagick
Shapelib
libtiff
libproj
libgeotiff
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:
AX25
GPSMan/gpsmanshp
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.
RECOMMENDED: Adding Shapelib (tested with shapelib-1.2.10):
------------------------------------------------------------
*******************************NOTE**************************************
As of 10 November 2006, xastir's source tree contains a copy of shapelib
1.2.10, and automatically builds shapelib if you don't have it installed.
At this point, the only reason to follow the "Adding Shapelib" instructions
below is if you need the shapelib shared libraries to work in other cygwin
software. So unless you do, just skip this section and xastir's build process
will automatically build and use its own "internal" shapelib support. Since
the instructions below contain some "gotchas" that you have to work around,
just using internal support is far easier if you don't need shapelib for
other projects.
************************************************************************
Allows using many sources of online polygon, polyline, and point
maps, including ones from NOAA. This is the only format used for
weather alert maps.
NOTE: A private copy of the Shapelib library is now included with
Xastir. If you need Shapelib only for use with the Xastir program
you can rely on this private copy to be installed and statically
linked with Xastir. If you need Shapelib for any other program,
it's recommended that you install it as shown below instead, so that
Xastir and the other programs will use a shared library.
[ ] From a BASH shell, type:
cd ~/src
mkdir shapelib
[ ] Fetch "shapelib-1.2.10.tar.gz" from one of these sites:
http://shapelib.maptools.org/
or http://we7u.wetnet.net/xastir/shapelib/
[ ] Put it in the C:\cygwin\home\<user>\src\shapelib directory.
[ ] Untar it from the BASH shell:
cd ~/src/shapelib
tar xzvf shapelib-1.2.10.tar.gz
[ ] Essential: Edit Shapelib's Makefile to remove the space after the "-h" on
the line that looks like this:
/usr/bin/ld -G -h libshp.so.1 -o .libs/libshp.so.$(LIBSHP_VERSION) shpopen.lo shptree.lo dbfopen.lo -lc
Change it to this (one space missing and 'c' changed to "cygwin"):
/usr/bin/ld -G -hlibshp.so.1 -o .libs/libshp.so.$(LIBSHP_VERSION) shpopen.lo shptree.lo dbfopen.lo -lcygwin
I've had another report that says having the space is OK now. The
"-lcygwin" is important to bypass the "__getreent" bug below.
Here are the commands to bring up an editor on the file:
cd ~/src/shapelib/shapelib-1.2.10
nano Makefile
[ ] Save the edited file, then type:
make lib
[ ] You may get the "undefined reference impure_ptr" messages. If
so, edit the file /usr/include/sys/reent.h to remove the word
"extern" from this line:
extern struct _reent *_impure_ptr __ATTRIBUTE_IMPURE_PTR__;
then try "make lib" again.
[ ] Type:
make lib_install
If you get "cp: cannot stat `.libs/libshp.la': No such file or
directory", then you forgot to edit the Makefile. BZZZT! Please
start again at step 1) above. Thank you for playing!
If you get something like: "Makefile:121: *** Missing separator.
Stop.", then it's likely that while editing the Makefile you ended
up with line-wrap on a line (one line broken into two or more lines
because the editor thought it was too long). Combine the line into
one line again and retry. Make sure not to delete any spaces that
are there between items on the line, else you'll get different
errors.
[ ] Now you should be ready to configure and compile Xastir with
Shapelib support. Type these commands:
cd ~/src/xastir
mkdir -p build
cd build
../configure
make
make install
The installed copy of Xastir should now have Shapelib support. You
can download NOAA weather alert maps and many other sorts of maps,
and Xastir will recognize and use them. Note that weather alert
shapefiles must go into the /usr/local/share/xastir/Counties
directory. All other shapefiles must go into the
/cygwin/user/local/share/xastir/maps directory (and subdirectories
below that of your choosing).
See the README.MAPS file for where to get the maps, and a script to
automate the download/install for you.
OPTIONAL: Adding ImageMagick:
--------------------------------------------------------------
Note: Recent Cygwin installations include ImageMagick 6.0.4.
Unfortunately, this install is linked against some X11 DLLs that no
longer get installed by the most recent X11 package. See
http://comments.gmane.org/gmane.os.cygwin.xfree/16493 for a
work-around. NOTE: It appears this problem may have been fixed in the
latest-latest (as of 13 November 2006) ImageMagick/Cygwin package.
The ideal solution to the problem mentioned above is to rebuild
ImageMagick from source code instead of using the (now-unmaintained)
Cygwin ImageMagick package. The instructions below walk you through a
build of a much older version of ImageMagick, and should still be
fairly accurate for a more recent vintage (as of this writing,
ImageMagick versions are up over 6.2, meaning that both the version in
Cygwin and the version mentione below are very old).
Allows using more than 68 different graphics format files as maps,
by creating an associated .geo file for each with tie-points. This
support also allows use of online Tiger and Terraserver maps with
Xastir, and NOAA weather radar images. Other people are working on
integrating even more online mapping sources. This will also allow
you to use any GIF/JPG/XPM/BMP/... image as an Xastir map.
Note: The much older Cygwin binary for ImageMagick-5.5.5 has a problem
in it's Magick-config script which makes it impossible to use for our
purposes. Don't try to use that version. Some people reported a
similar problem with 5.5.7.
Note that Xastir's "./configure" stage may fail trying to compile in
ImageMagick support. If this happens, make sure you have the
ImageMagick development package installed if using RPM packages, or
have installed the ImageMagick header files. If it still fails,
check the "config.log" file _very_ carefully. Often ImageMagick
tests fail due to some other library that ImageMagick depends upon
being absent, such as liblcms, libbz2, or others.
Until the RPM packagers for ImageMagick include all of the dependent
libraries in their RPM dependency list, the best way to assure that
ImageMagick is installed properly is to install it from sources.
ImageMagick:
http://www.imagemagick.org/
cd ~/src
mkdir imagemagick
[ ] Download the ImageMagick cygwin binary from www.imagemagick.org
or one of it's mirrors. If you can't find the version you need, try
here:
http://we7u.wetnet.net/xastir/ImageMagick/cygwin/
[ ] Put it in the ~/src/imagemagick directory.
[ ] Extract the files:
cd ~/src/imagemagick
tar xzvf filename
[ ] Copy the files/directories into the /usr tree:
cd ImageMagick-5.5.3
cp -R * /usr
[ ] Reconfigure Xastir to use this library:
cd ~/src/xastir
cd ../build
../Xastir/configure
[ ] If "configure" did not find ImageMagick properly, edit the
resulting config.h file and change this line:
/* #undef HAVE_IMAGEMAGICK */
to this:
#define HAVE_IMAGEMAGICK 1
[ ] Finish the Xastir build and install:
make
make install
[ ] Add this to your ~/.profile file (note this is a different file
than the .bash_profile file):
export MAGICK_HOME=/usr
Now on-line Tigermaps should work for you. Unfortunately it looks
like the ".profile" file doesn't automatically get run if you start
up the X-server from a windows shortcut. If you don't set the
MAGICK_HOME variable in your shell that you start Xastir from, then
ImageMagick will fail to display images and you'll get messages like
"No decode delegate for this image format" in the xterm you started
Xastir from. If that happens, you can close Xastir, type
. ./.profile
and then type "xastir &" again to make it work. Another option is
to start X from within a standard Cygwin window. After starting X
you can close the original Cygwin window. Yet another option is to
create a script for starting Xastir so that you can set the
MAGICK_HOME variable just before you start it. It could look
something like this:
#!/bin/sh
export MAGICK_HOME=/usr
xastir &
Perhaps name it "aprs". Issue this command to turn it into an
executable file:
chmod 755 aprs
Start it by typing "./aprs".
--------------------------------------------------------------------
Note from Kirk Mefford, KC2ELO:
Also one more way to work around the "MAGICK_HOME" issues with
running from the startxwin.bat file is to add "SET MAGICK_HOME=/usr"
to the bat file before it gets to loading things. [remember DOS? ;)
]
I have Xastir loading directly from "startxwin.bat" with "run
/usr/local/bin/xastir" and ImageMagick works fine with "SET
MAGICK_HOME=/usr" at the top of the bat file.
--------------------------------------------------------------------
HIGHLY RECOMMENDED: If you create a file called "terraserver.geo"
in the /usr/local/share/xastir/maps directory, containing the single line
"TERRASERVER-SATELLITE", and select it with the Map Chooser, you should
see satellite images on the map screen. This is assuming that you have
an Internet connection up and running of course. It fetches the
images from the Microsoft Terraserver.
Also create a "terraserver-topo.geo" file in the same area somewhere.
Inside that file put the keyword "TERRASERVER-TOPO". Selecting this map
will fetch topo maps from the Microsoft Terraserver. More interesting
keywords that can be used in other files are "TERRASERVER-REFLECTIVITY"
and "TERRASERVER-URBAN". There should be files for all four Terraserver
options installed in your /usr/local/share/xastir/maps/Online directory
once you install Xastir.
This means if you're online, you can have access to street maps
(Tigermap server), satellite images (Terraserver), and topo maps
(again Terraserver)!
OPTIONAL: Install GeoTIFF support:
-----------------------------------
Note: Recent Cygwin installations include GeoTIFF support, and if you
installed everything in the list in step 1, you already have it.. You
only need to manually install libgeotiff if you did not have the 3
libgeotiff choices, the 2 libproj choices, and the proj choice
available when installing cygwin, or if Xastir doesn't find libgeotiff.
Allows using USGS DRG topo maps or other types of GeoTIFF
maps/images and has the ability to tile smaller maps into a larger
contiguous map of an area:
[NOTE: when checked on 30 Oct 2004, it is now possible to install
libproj and libgeotiff directly from cygwin setup. Since at least one
user has had considerable trouble installing xastir with geotiff using
the instructions below, it is recommended that these libraries be
installed through cygwin setup instead. Be sure to install the
"-devel" versions that will include headers and libraries needed to
compile xastir.]
For GeoTIFF support (such as USGS DRG topo maps) you need one each
of libproj, proj-nad27, and libgeotiff:
libproj (tested with proj-4.4.7):
---------------------------------
http://www.remotesensing.org/proj/
or http://we7u.wetnet.net/xastir/libproj/
Datum translations (tested with proj-nad27-1.1):
------------------------------------------------
ftp://ftp.remotesensing.org/pub/proj/
or http://we7u.wetnet.net/xastir/libproj/
libgeotiff (tested with libgeotiff-1.2.0):
------------------------------------------
http://www.remotesensing.org/geotiff/geotiff.html
or ftp://ftp.remotesensing.org/pub/geotiff/libgeotiff/
or http://we7u.wetnet.net/xastir/libgeotiff/
Please note that the order of installation for these libraries is
critical. If not installing from cygwin setup, please be sure to
follow the instructions below carefully.
Adding libproj to Cygwin (tested with proj-4.4.7):
--------------------------------------------------
Again, if you installed everything suggested in step 1, you already
have this and building libproj from source is unnecessary.
NOTE: You must install libproj BEFORE compiling libgeotiff, because
libgeotiff uses libproj to do the datum translations. If you install
libgeotiff first, datum translations won't work.
[ ] Type:
cd ~/src
mkdir libproj
[ ] Download the libproj and proj-nad27 files and place them in the
~/src/libproj directory.
The proj-nad27-1.1.tar.gz must be decompressed in the nad
subdirectory of the proj distribution directory before you run
configure.
[ ] Type: