forked from qutescoop/qutescoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
QuteScoop.pro
executable file
·380 lines (358 loc) · 13 KB
/
QuteScoop.pro
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
# #####################################################################
# This file is part of QuteScoop. See README for license
# #####################################################################
# QuteScoop version
VERSION = "2.2-dev" # should not include spaces
VER_STR = '\\"$${VERSION}\\"'
DEFINES += VERSION_NUMBER=\"$$VER_STR\" # complex escaping to preserve
# string through qmake -> console ->
# compiler
# Subversion revision
CVS_REVISION = '\\"$Revision$\\"' # Gets set automatically on commit of THIS file.
# This is just the revision of THIS file, not the whole working copy.
# Well, better than nothing. No working copy revision information is
# available cross-platform :(
CVS_REVISION = $$replace(CVS_REVISION, "\\$", "") # strip away any special characters...
CVS_REVISION = $$replace(CVS_REVISION, "Revision:", "Rev") # as these tend to give compiler errors
CVS_REVISION = $$replace(CVS_REVISION, " ", "")
DEFINES += CVS_REVISION=\"$$CVS_REVISION\" # complex escaping to preserve
# string through qmake -> console ->
# compiler
TEMPLATE = app
CONFIG *= qt
# CONFIG *= debug
# CONFIG *= release
CONFIG *= warn_on
TARGET = QuteScoop
# Let's make sure we do not mix up 32 and 64bit binaries. Provide
# 32bit installers or clearly mark them as 64bit to avaoid confusion.
# Hint: Setting up a virtual machine (e.g. in VirtualBox) is from my
# experience much easier than cross-compiling 32bit from a 64bit host.
win32: {
contains(QMAKE_TARGET.arch, x86_64):PLATFORM = "win64"
else:PLATFORM = "win32"
}
macx: {
# QMAKE_TARGET.arch is only available on Windows?!
QMAKE_TARGET.arch = $$QMAKE_HOST.arch
contains(QMAKE_TARGET.arch, x86_64):PLATFORM = "macx64"
else:PLATFORM = "macx32"
}
!macx:unix: {
# QMAKE_TARGET.arch is only available on Windows?!
linux-g++:QMAKE_TARGET.arch = $$QMAKE_HOST.arch
# allow for 32bit cross-compiling on 64bit with g++ (_HOST and _TARGET different)
linux-g++-32:QMAKE_TARGET.arch = x86
linux-g++-64:QMAKE_TARGET.arch = x86_64
contains(QMAKE_TARGET.arch, x86_64):PLATFORM = "unix64"
else:PLATFORM = "unix32"
}
# Qt libraries
# finding Qt's paths:
#message(Qt version: $$[QT_VERSION])
#message(Qt is installed in $$[QT_INSTALL_PREFIX])
#message(Documentation: $$[QT_INSTALL_DOCS])
#message(Header files: $$[QT_INSTALL_HEADERS])
message(Libraries: $$[QT_INSTALL_LIBS])
message(Binary files (executables): $$[QT_INSTALL_BINS])
message(Plugins: $$[QT_INSTALL_PLUGINS])
#message(Data files: $$[QT_INSTALL_DATA])
#message(Translation files: $$[QT_INSTALL_TRANSLATIONS])
#message(Settings: $$[QT_INSTALL_SETTINGS])
#message(Examples: $$[QT_INSTALL_EXAMPLES])
#message(Demonstrations: $$[QT_INSTALL_DEMOS])
QT *= core gui network opengl xml
# in debug mode, we output to current directory
CONFIG(debug,release|debug) {
!build_pass:message("DEBUG")
DEBUGRELEASE = "debug"
DESTDIR = ./
# If precompiled headers are not possible, qmake should deactivate it.
# If compiling/linking problems arise, this should be deactivated.
# uncomment to activate:
#CONFIG += precompile_header
PRECOMPILED_HEADER = src/_pch.h
precompile_header:!isEmpty(PRECOMPILED_HEADER):!build_pass:message("Using precompiled headers.")
}
# in release mode, we include a 'make install' target and output to ./DIST-$PLATFORM
CONFIG(release,release|debug) {
!build_pass:message("RELEASE")
DEBUGRELEASE = "release"
DESTDIR = ./DIST-$${PLATFORM}
# Add a "make install" target for deploying Qt/compiler/QuteScoop files.
# Qt library files
myQtLib.path = $$DESTDIR
win32 {
myQtLib.files += $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}QtCore4.dll
myQtLib.files += $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}QtGui4.dll
myQtLib.files += $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}QtNetwork4.dll
myQtLib.files += $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}QtXml4.dll
myQtLib.files += $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}QtOpenGL4.dll
}
unix {
myQtLib.files += $$[QT_INSTALL_LIBS]$${DIR_SEPARATOR}libQtCore.so.4
myQtLib.files += $$[QT_INSTALL_LIBS]$${DIR_SEPARATOR}libQtGui.so.4
myQtLib.files += $$[QT_INSTALL_LIBS]$${DIR_SEPARATOR}libQtNetwork.so.4
myQtLib.files += $$[QT_INSTALL_LIBS]$${DIR_SEPARATOR}libQtXml.so.4
myQtLib.files += $$[QT_INSTALL_LIBS]$${DIR_SEPARATOR}libQtOpenGL.so.4
}
# Image plugins: http://doc.qt.digia.com/qt/deployment-plugins.html
imageLib.path = $$DESTDIR/imageformats
IMAGEPLUGINS = qgif qico qjpeg qmng qsvg qtga qtiff
unix {
IMAGEPLUGINSDIR = $$[QT_INSTALL_PLUGINS]$${DIR_SEPARATOR}imageformats$${DIR_SEPARATOR}
for(plugin, IMAGEPLUGINS) {
imageLib.files += $${IMAGEPLUGINSDIR}lib$${plugin}.so
}
} else:win32 {
IMAGEPLUGINSDIR = $$[QT_INSTALL_PLUGINS]$${DIR_SEPARATOR}imageformats$${DIR_SEPARATOR}
for(plugin, IMAGEPLUGINS) {
imageLib.files += $${IMAGEPLUGINSDIR}$${plugin}4.dll
}
}
!build_pass:message("Qt library files added to 'install': $${myQtLib.files} $${imageLib.files}")
# Compiler libraries
myCompilerLib.path = $$DESTDIR
win32-g++ { # For MingW
myCompilerLib.files += $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}mingwm10.dll
myCompilerLib.files += $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}libgcc_s_dw2-1.dll
!build_pass:message("MingW compiler libraries added to 'install': $${myCompilerLib.files}")
}
else:!build_pass:message("No compiler libraries added to 'install'")
# QuteScoop additional files
rootFiles.path = $$DESTDIR
rootFiles.files += ./README.html \
./COPYING \
./CHANGELOG
unix:rootFiles.files += ./QuteScoop.sh \
./QuteScoop.desktop \
./src/qutescoop.png \
./picsToMovie.sh
dataFiles.path = $$DESTDIR/data
dataFiles.files += ./data/_notes.txt
dataFiles.files += ./data/airports.dat
dataFiles.files += ./data/coastline.dat
dataFiles.files += ./data/countries.dat
dataFiles.files += ./data/countrycodes.dat
dataFiles.files += ./data/dataversions.txt
dataFiles.files += ./data/firdisplay.dat
dataFiles.files += ./data/firdisplay.sup
dataFiles.files += ./data/firlist.dat
dataFiles.files += ./data/airlines.dat
dataFiles.files += ./data/station.dat
dataFiles.files += ./data/cloudmirrors.dat
dataFiles.files += "./data/clouds/_notes.txt"
downloadedFiles.path = $$DESTDIR/downloaded
downloadedFiles.files += ./downloaded/_notes.txt
screenshotsFiles.path = $$DESTDIR/screenshots
screenshotsFiles.files += ./screenshots/_notes.txt
texturesFiles.path = $$DESTDIR/textures
texturesFiles.files += ./textures/_notes.txt
texturesFiles.files += ./textures/1024px-continents.png
texturesFiles.files += ./textures/1024px-toposhaded.png
texturesFiles.files += ./textures/1440px-elevation.png
texturesFiles.files += ./textures/2048px.png
texturesFiles.files += ./textures/2048px-color.png
texturesFiles.files += ./textures/2048px-contrast.png
texturesFiles.files += ./textures/2048px-lights.png
texturesFiles.files += ./textures/2048px-toposhaded.png
texturesFiles.files += ./textures/4096px.png
texturesFiles.files += ./textures/4096px-color.png
texturesFiles.files += ./textures/8192px-arctic-toposhaded.png
texturesFiles.files += ./textures/8192px-topo.png
texturesFiles.files += ./textures/10800px.png
texturesFiles.files += ./textures/10800px-continents.png
texturesFiles.files += ./textures/10800px-lights.png
cloudsFiles.path = $$DESTDIR/textures/clouds
cloudsFiles.files += ./textures/clouds/_notes.txt
!build_pass:message("QuteScoop files added to 'install': $${rootFiles.files} $${dataFiles.files} $${downloadedFiles.files} $${texturesFiles.files} $${screenShotFiles.files}.")
!build_pass:message("Run 'make install' to copy them to the correct locations")
# Adds an "install" target for make, executed by "make install"
# (Can be added to QtCreator project also as build step)
INSTALLS *= rootFiles \
dataFiles \
downloadedFiles \
screenshotsFiles \
texturesFiles \
cloudsFiles \
imageLib \
myQtLib \
myCompilerLib
}
# Notice: 32bit support dropped for OSX, all versions past 10.5 are able to execute 64bit-binaries
macx {
CONFIG += app_bundle
ICON = src/Dolomynum.icns
CONFIG *= x86_64
LIBS += -framework OpenGL
}
win32 {
RC_FILE = src/windowsicon.rc
LIBS += -lglu32
}
# OSX also considered as unix, therefore condition added to check
# if the platform is a "real" Unix
!macx:unix {
LIBS += -lGLU
}
# Input
FORMS = \
src/PilotDetails.ui \
src/ControllerDetails.ui \
src/AirportDetails.ui \
src/PreferencesDialog.ui \
src/PlanFlightDialog.ui \
src/BookedAtcDialog.ui \
src/ListClientsDialog.ui\
src/SectorView.ui \
src/Window.ui
HEADERS += src/_pch.h \
src/WhazzupData.h \
src/Whazzup.h \
src/Waypoint.h \
src/Tessellator.h \
src/Settings.h \
src/Pilot.h \
src/NavData.h \
src/NavAid.h \
src/Metar.h \
src/MapObject.h \
src/MapScreen.h\
src/LineReader.h \
src/helpers.h \
src/SectorReader.h \
src/Sector.h \
src/FileReader.h \
src/Controller.h \
src/Client.h \
src/BookedController.h \
src/Airway.h \
src/Airport.h \
src/Airac.h \
src/Window.h \
src/SearchVisitor.h \
src/SearchResultModel.h \
src/PreferencesDialog.h \
src/PlanFlightDialog.h \
src/PilotDetails.h \
src/MetarSearchVisitor.h \
src/MetarModel.h \
src/MapObjectVisitor.h \
src/GLWidget.h \
src/FriendsVisitor.h \
src/ControllerDetails.h \
src/ClientSelectionWidget.h \
src/ClientDetails.h \
src/BookedAtcDialogModel.h \
src/BookedAtcDialog.h \
src/AirportDetailsDeparturesModel.h \
src/AirportDetailsAtcModel.h \
src/AirportDetailsArrivalsModel.h \
src/AirportDetails.h \
src/Route.h \
src/PlanFlightRoutesModel.h \
src/BookedAtcSortFilter.h \
src/helpers.h \
src/ListClientsDialogModel.h \
src/ListClientsDialog.h \
src/Ping.h \
src/LogBrowserDialog.h \
src/GuiMessage.h \
src/Station.h \
src/Launcher.h \
src/SectorView.h \
src/Net.h \
src/SondeData.h \
src/JobList.h \
src/Platform.h
SOURCES += src/WhazzupData.cpp \
src/Whazzup.cpp \
src/Waypoint.cpp \
src/Tessellator.cpp \
src/Settings.cpp \
src/QuteScoop.cpp \
src/Pilot.cpp \
src/NavData.cpp \
src/NavAid.cpp \
src/Metar.cpp \
src/MapObject.cpp \
src/MapScreen.cpp\
src/LineReader.cpp \
src/SectorReader.cpp \
src/Sector.cpp \
src/FileReader.cpp \
src/Controller.cpp \
src/Client.cpp \
src/BookedController.cpp \
src/Airway.cpp \
src/Airport.cpp \
src/Airac.cpp \
src/Window.cpp \
src/SearchVisitor.cpp \
src/SearchResultModel.cpp \
src/PreferencesDialog.cpp \
src/PlanFlightDialog.cpp \
src/PilotDetails.cpp \
src/MetarSearchVisitor.cpp \
src/MetarModel.cpp \
src/GLWidget.cpp \
src/FriendsVisitor.cpp \
src/ControllerDetails.cpp \
src/ClientSelectionWidget.cpp \
src/ClientDetails.cpp \
src/BookedAtcDialogModel.cpp \
src/BookedAtcDialog.cpp \
src/AirportDetailsDeparturesModel.cpp \
src/AirportDetailsAtcModel.cpp \
src/AirportDetailsArrivalsModel.cpp \
src/AirportDetails.cpp \
src/Route.cpp \
src/PlanFlightRoutesModel.cpp \
src/BookedAtcSortFilter.cpp \
src/ListClientsDialogModel.cpp \
src/ListClientsDialog.cpp \
src/Ping.cpp \
src/LogBrowserDialog.cpp \
src/GuiMessage.cpp \
src/Station.cpp \
src/Launcher.cpp \
src/SectorView.cpp \
src/Net.cpp \
src/SondeData.cpp \
src/JobList.cpp \
src/Platform.cpp
RESOURCES += src/Resources.qrc
OTHER_FILES += CHANGELOG \
README.html \
data/_notes.txt \
data/dataversions.txt \
data/station.dat \
data/firlist.dat \
data/firdisplay.dat \
data/firdisplay.sup \
data/countrycodes.dat \
data/countries.dat \
data/coastline.dat \
data/cloudmirrors.dat \
data/airports.dat \
data/airlines.dat \
QuteScoop-upload.pri \
downloaded/_notes.txt \
screenshots/_notes.txt \
textures/_notes.txt \
textures/clouds/_notes.txt
macx:OTHER_FILES += \
macbundle.sh
unix:OTHER_FILES += \
QuteScoop.sh \
QuteScoop.desktop \
picsToMovie.sh
# Report DESTDIR to user
!build_pass:message("Compiled $$TARGET will be put to $$DESTDIR")
# temp files
MOC_DIR = ./temp/$${PLATFORM}-$${DEBUGRELEASE}
UI_DIR = ./temp/$${PLATFORM}-$${DEBUGRELEASE}
OBJECTS_DIR = ./temp/$${PLATFORM}-$${DEBUGRELEASE}
RCC_DIR = ./temp/$${PLATFORM}-$${DEBUGRELEASE}
# include 'make installer-*' targets which build installers for Linux & Win
include("QuteScoop-makeInstaller.pri")