4 # A version of the installer.bat for mingw build
5 # Similarily basily copy all dependent files from the host system
6 # to be available for the NSIS stage
8 # Remember to have installed the generated mingw-viking package first so the
9 # binaries are available from the default location
10 # (e.g. as root rpm -i mingw32-viking-1.7-1.noarch.rpm)
12 # 'MINGW' and 'DESTINATION' values can be defined to override inbuilt defaults
15 if [ -z "$DESTINATION" ]; then
16 DESTINATION
=installer
/bin
18 # General clean out tmp copy location so 32v64 versions can't conflict
19 if [ -z "$NOCLEAN" ]; then
24 if [ -z "$MINGW" ]; then
25 if [ "$HOSTTYPE" == "x86_64" ]; then
26 MINGW
=/usr
/x86_64-w64-mingw32
/sys-root
/mingw
28 MINGW
=/usr
/i686-w64-mingw32
/sys-root
/mingw
34 echo Make language copies
35 for x
in $
(ls ..
/po
/*.gmo
); do
36 mkdir
-p $DESTINATION/locale
/$
(basename -s .gmo
$x)/LC_MESSAGES
37 cp $MINGW/share
/locale
/$
(basename -s .gmo
$x)/LC_MESSAGES
/viking.mo
$DESTINATION/locale
/$
(basename -s .gmo
$x)/LC_MESSAGES
/
41 cp $MINGW_BIN/*viking.exe
$DESTINATION/viking.exe
42 cp ..
/COPYING
$DESTINATION/COPYING_GPL.txt
43 cp ..
/AUTHORS
$DESTINATION/AUTHORS.txt
44 cp ..
/NEWS
$DESTINATION/NEWS.txt
45 cp ..
/README
$DESTINATION/README.txt
46 # PDF generation if required
47 if [ ! -e ..
/help
/C
/viking.pdf
]; then
51 echo "Help PDF generation failed."
55 cp ..
/help
/C
/viking.pdf
$DESTINATION
56 cp ..
/tools
/viking-cache.py
$DESTINATION
57 cp installer
/translations
/*nsh
$DESTINATION
58 cp installer
/pixmaps
/viking_icon.ico
$DESTINATION
60 echo Copying Extension Configuration Data
61 mkdir
$DESTINATION/data
62 cp ..
/data
/*.xml
$DESTINATION/data
63 cp ..
/data
/latlontz.txt
$DESTINATION/data
65 echo Copying Helper Apps
66 # Needed when spawning other programs (e.g. when invoking GPSBabel)
67 if [ "$HOSTTYPE" == "x86_64" ]; then
68 cp $MINGW_BIN/gspawn-win64-helper.exe
$DESTINATION
70 cp $MINGW_BIN/gspawn-win32-helper.exe
$DESTINATION
73 echo Copying Libraries
75 cp $MINGW_BIN/libatk
*.dll
$DESTINATION
76 cp $MINGW_BIN/libcairo
*.dll
$DESTINATION
77 cp $MINGW_BIN/libgcc
*.dll
$DESTINATION
78 cp $MINGW_BIN/libgcrypt
*.dll
$DESTINATION
79 cp $MINGW_BIN/libgdk
*.dll
$DESTINATION
80 cp $MINGW_BIN/libgettext
*.dll
$DESTINATION
81 cp $MINGW_BIN/libgio
*.dll
$DESTINATION
82 cp $MINGW_BIN/libglib
*.dll
$DESTINATION
83 cp $MINGW_BIN/libgmodule
*.dll
$DESTINATION
84 cp $MINGW_BIN/libgnurx
*.dll
$DESTINATION
85 cp $MINGW_BIN/libgobject
*.dll
$DESTINATION
86 cp $MINGW_BIN/libgpg
*.dll
$DESTINATION
87 cp $MINGW_BIN/libgtk
*.dll
$DESTINATION
88 cp $MINGW_BIN/libintl
*.dll
$DESTINATION
89 cp $MINGW_BIN/libffi
*.dll
$DESTINATION
90 cp $MINGW_BIN/libfontconfig
*.dll
$DESTINATION
91 cp $MINGW_BIN/libfreetype
*.dll
$DESTINATION
92 cp $MINGW_BIN/libharfbuzz
*.dll
$DESTINATION
93 cp $MINGW_BIN/libjasper
*.dll
$DESTINATION
94 cp $MINGW_BIN/libjpeg
*.dll
$DESTINATION
95 cp $MINGW_BIN/liblzma
*.dll
$DESTINATION
96 cp $MINGW_BIN/libpng
*.dll
$DESTINATION
97 cp $MINGW_BIN/libpango
*.dll
$DESTINATION
98 cp $MINGW_BIN/libpixman
*.dll
$DESTINATION
99 cp $MINGW_BIN/libtiff
*.dll
$DESTINATION
100 cp $MINGW_BIN/libxml2
*.dll
$DESTINATION
101 cp $MINGW_BIN/zlib1.dll
$DESTINATION
102 cp $MINGW_BIN/libzip
*.dll
$DESTINATION
105 cp $MINGW_BIN/libexpat
*.dll
$DESTINATION
106 # Curl 7.17+ has quite a few dependencies for SSL support
107 cp $MINGW_BIN/libcurl
*.dll
$DESTINATION
108 cp $MINGW_BIN/libssh
*.dll
$DESTINATION
109 cp $MINGW_BIN/libidn
*.dll
$DESTINATION
110 cp $MINGW_BIN/libnspr
*.dll
$DESTINATION
111 cp $MINGW_BIN/libplc
*.dll
$DESTINATION
112 cp $MINGW_BIN/libplds
*.dll
$DESTINATION
113 cp $MINGW_BIN/nss
*.dll
$DESTINATION
114 cp $MINGW_BIN/ssl
*.dll
$DESTINATION
115 cp $MINGW_BIN/softokn
*.dll
$DESTINATION
116 cp $MINGW_BIN/smime
*.dll
$DESTINATION
117 cp $MINGW_BIN/freebl
*.dll
$DESTINATION
118 if [ "$HOSTTYPE" == "x86_64" ]; then
119 cp /usr
/share
/doc
/packages
/mingw64-libcurl-devel
/COPYING
$DESTINATION/COPYING_curl.txt
121 cp /usr
/share
/doc
/packages
/mingw32-libcurl-devel
/COPYING
$DESTINATION/COPYING_curl.txt
124 cp $MINGW_BIN/libexiv2.dll
$DESTINATION
125 cp $MINGW_BIN/libgexiv2
*.dll
$DESTINATION
126 cp $MINGW_BIN/libstdc
++*.dll
$DESTINATION
127 cp $MINGW_BIN/libbz
*.dll
$DESTINATION
128 cp $MINGW_BIN/libmagic
*.dll
$DESTINATION
129 cp $MINGW/share
/misc
/magic
* $DESTINATION
130 cp $MINGW_BIN/libsqlite3
*.dll
$DESTINATION
131 cp $MINGW_BIN/libnettle
*.dll
$DESTINATION
132 cp $MINGW_BIN/libgps
*.dll
$DESTINATION
133 cp $MINGW_BIN/libwinpthread
*.dll
$DESTINATION
134 cp $MINGW_BIN/liboauth
*.dll
$DESTINATION
136 # Extra GTK stuff required for (default) theme to work in Windows
137 mkdir
-p $DESTINATION/lib
138 cp -a $MINGW/lib
/gtk-2.0
$DESTINATION/lib
139 mkdir
-p $DESTINATION/share
/themes
140 cp -a $MINGW/share
/themes
/MS-Windows
$DESTINATION/share
/themes
142 echo Copying GPSBabel Installer
143 mkdir
$DESTINATION/Optional
144 # ATM GPSBabel needs to be in 'cache' dir
145 cp cache
/GPSBabel-1.5
.4-Setup.exe
$DESTINATION/Optional
148 if [ -z "$DEBUG" ]; then
149 makensis
-X"SetCompressor lzma" viking-installer.nsi
151 # Speedier install generation when testing
152 makensis
-X"SetCompress off" viking-installer.nsi
155 if [ "$HOSTTYPE" == "x86_64" ]; then
156 rename viking viking-win64 viking-
[0-9].
[0-9].
[0-9].
[0-9].exe
158 rename viking viking-win32 viking-
[0-9].
[0-9].
[0-9].
[0-9].exe