forked from mpaperno/qgroundcontrol_aq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qgc_install.pri
257 lines (218 loc) · 15 KB
/
qgc_install.pri
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
# -------------------------------------------------
# QGroundControl AQ - AutoQuad Groundstation
# Based on QGroundControl - Micro Air Vehicle Groundstation
# Extensively Modifeid For AutoQuad flight controller
# Please see our website at <http://autoquad.org>
# Please see the original QGroundControl website
# at <http://qgroundcontrol.org>
#
# QGroundControl Creator:
# Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2011 QGroundControl Developers
#
# AutoQuad Maintainer:
# Maxim Paperno <MPaperno@WorldDesign.com>
# (c) 2013-2014 Maxim Paperno
#
# Original Conversion for AutoQuad
# 2012-2013 by Peter Hafner
#
#
# This file is part of the open source AutoQuad project.
# QGroundControl AQ is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# QGroundControl is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with QGroundControl AQ. If not, see <http://www.gnu.org/licenses/>.
# -------------------------------------------------
TARGETDIR = $$DESTDIR
# MAC OS X
MacBuild: {
TARGETDIR = $${TARGETDIR}/$${TARGET}.app
QMAKE_POST_LINK += $$quote(echo "Copying files")
# Copy AQ files
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/Contents/MacOS/aq/bin
QMAKE_POST_LINK += && cp -rf $$BASEDIR/aq/bin/aq_osx_all/* $$TARGETDIR/Contents/MacOS/aq/bin
QMAKE_POST_LINK += && chmod +x $$TARGETDIR/Contents/MacOS/aq/bin/*
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/Contents/MacOS/aq/mixes
QMAKE_POST_LINK += && cp -rf $$BASEDIR/aq/mixes/* $$TARGETDIR/Contents/MacOS/aq/mixes
# Copy google earth starter file
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/Contents/MacOS/files
QMAKE_POST_LINK += && cp -f $$BASEDIR/files/*.* $$TARGETDIR/Contents/MacOS/files
# Copy audio files
QMAKE_POST_LINK += && cp -r $$BASEDIR/files/audio $$TARGETDIR/Contents/MacOS/files/.
# Copy style files
QMAKE_POST_LINK += && cp -r $$BASEDIR/files/styles $$TARGETDIR/Contents/MacOS/files/.
# Copy language files
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/Contents/MacOS/files/lang
QMAKE_POST_LINK += && cp -f $$BASEDIR/files/lang/*.qm $$TARGETDIR/Contents/MacOS/files/lang
QMAKE_POST_LINK += && cp -rf $$BASEDIR/files/lang/flags $$TARGETDIR/Contents/MacOS/files/lang/.
# Copy libraries
#QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/qgroundcontrol.app/Contents/libs
#QMAKE_POST_LINK += && cp -rf $$BASEDIR/libs/lib/$${MACBITS}/lib/* $$TARGETDIR/qgroundcontrol.app/Contents/libs
# Copy frameworks
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/qgroundcontrol.app/Contents/Frameworks
QMAKE_POST_LINK += && cp -rf $$BASEDIR/libs/lib/Frameworks/* $$TARGETDIR/Contents/Frameworks
# SDL Framework
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL.framework/Versions/A/SDL" "@executable_path/../Frameworks/SDL.framework/Versions/A/SDL" $$TARGETDIR/Contents/MacOS/$$TARGET
# Fix library paths inside executable
# QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
# QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
# QMAKE_POST_LINK += && install_name_tool -change libosgViewer.dylib "@executable_path/../libs/libosgViewer.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
# QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
# QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
# QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
# QMAKE_POST_LINK += && install_name_tool -change libosgWidget.dylib "@executable_path/../libs/libosgWidget.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/MacOS/qgroundcontrol
# Fix library paths within libraries (inter-library dependencies)
# OSG GA LIBRARY
# QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
# QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgGA.dylib
# OSG DB LIBRARY
# QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib
# QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgDB.dylib
# OSG TEXT LIBRARY
# QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
# QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgText.dylib
# OSG UTIL LIBRARY
# QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgUtil.dylib
# QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgUtil.dylib
# OSG VIEWER LIBRARY
# QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
# QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgViewer.dylib
# OSG WIDGET LIBRARY
# QMAKE_POST_LINK += && install_name_tool -change libosgGA.dylib "@executable_path/../libs/libosgGA.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgText.dylib "@executable_path/../libs/libosgText.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgDB.dylib "@executable_path/../libs/libosgDB.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgUtil.dylib "@executable_path/../libs/libosgUtil.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosg.dylib "@executable_path/../libs/libosg.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
# QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
# QMAKE_POST_LINK += && install_name_tool -change libosgViewer.dylib "@executable_path/../libs/libosgViewer.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosgWidget.dylib
# CORE OSG LIBRARY
# QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosg.dylib
DoMacDeploy: QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt $$TARGETDIR
}
# GNU/Linux
LinuxBuild{
QMAKE_POST_LINK += $$quote(echo "Copying files")
# Validated copy commands
!exists($$TARGETDIR){
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR
}
# Copy AQ and supporting files
Build32Bits {
exists(/usr/local):LIBS += -L/usr/local
}
Build64Bits {
exists(/usr/local/lib64):LIBS += -L/usr/local/lib64
}
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/aq/bin
QMAKE_POST_LINK += && cp -rf $$BASEDIR/aq/bin/aq_unix_all/* $$TARGETDIR/aq/bin
QMAKE_POST_LINK += && mkdir -p $$TARGETDIR/aq/mixes
QMAKE_POST_LINK += && cp -rf $$BASEDIR/aq/mixes/* $$TARGETDIR/aq/mixes
QMAKE_POST_LINK += && chmod +x $$TARGETDIR/aq/bin/*
QMAKE_POST_LINK += && cp -rf $$BASEDIR/files/*.* $$TARGETDIR/files
QMAKE_POST_LINK += && cp -rf $$BASEDIR/files/audio $$TARGETDIR/files/audio
QMAKE_POST_LINK += && cp -rf $$BASEDIR/files/styles $$TARGETDIR/files/styles
QMAKE_POST_LINK += && cp -f $$BASEDIR/files/lang/*.qm $$TARGETDIR/files/lang
QMAKE_POST_LINK += && cp -rf $$BASEDIR/files/lang/flags $$TARGETDIR/files/lang/flags
# osg/osgEarth dynamic casts might fail without this compiler option.
# see http://osgearth.org/wiki/FAQ for details.
#QMAKE_CXXFLAGS += -Wl,-E
}
# Windows
WinBuild {
# Copy dependencies
BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")
greaterThan(QT_MAJOR_VERSION, 4) {
QTLIBDLLPFX = "Qt5"
QTLIBDBGDLLSFX = "d.dll"
} else {
QTLIBDLLPFX = "Qt"
QTLIBDBGDLLSFX = "d4.dll"
}
QMAKE_POST_LINK += $$quote(echo "Copying files"$$escape_expand(\\n))
# Copy AQ files
QMAKE_POST_LINK += $$quote(xcopy /D /Y /E /I "$$BASEDIR_WIN\\aq\\bin\\aq_win_all\\*" "$$TARGETDIR_WIN\\aq\\bin" $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y /E /I "$$BASEDIR_WIN\\aq\\mixes\\*" "$$TARGETDIR_WIN\\aq\\mixes" $$escape_expand(\\n))
# Copy application resources
QMAKE_POST_LINK += $$quote(xcopy /D /Y /I "$$BASEDIR_WIN\\files\\*.*" "$$TARGETDIR_WIN\\files\\" $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y /E /I "$$BASEDIR_WIN\\files\\audio" "$$TARGETDIR_WIN\\files\\audio" $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y /E /I "$$BASEDIR_WIN\\files\\styles" "$$TARGETDIR_WIN\\files\\styles" $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y /I "$$BASEDIR_WIN\\files\\lang\\*.qm" "$$TARGETDIR_WIN\\files\\lang" $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y /E /I "$$BASEDIR_WIN\\files\\lang\\flags" "$$TARGETDIR_WIN\\files\\lang\\flags" $$escape_expand(\\n))
ReleaseBuild {
COPY_DLL_LIST = \
$$BASEDIR_WIN\\libs\\lib\\sdl\\win32\\SDL.dll \
$$(QTDIR)\\bin\\icu*.dll \
# $$BASEDIR_WIN\\libs\\thirdParty\\libxbee\\lib\\libxbee.dll \
QT_DLL_LIST = Core Gui Multimedia Network OpenGL Sql Svg Test WebKit Xml XmlPatterns
QT_PLUGIN_LIST = imageformats iconengines sqldrivers
greaterThan(QT_MAJOR_VERSION, 4) {
QT_DLL_LIST += Concurrent MultimediaWidgets Positioning PrintSupport Qml Quick Sensors WebChannel WebKitWidgets Widgets
QT_PLUGIN_LIST += audio mediaservice platforms
}
for(QT_DLL, QT_DLL_LIST) {
COPY_DLL_LIST += $$(QTDIR)\\bin\\$${QTLIBDLLPFX}$${QT_DLL}.dll
}
# Copy compiler-specific DLLs
win32-msvc* {
win32-msvc2010:MSVC_SHORT_VERSION = "100"
win32-msvc2012:MSVC_SHORT_VERSION = "110"
win32-msvc2013:MSVC_SHORT_VERSION = "120"
MSVC_ENV_VAR = "VS"$${MSVC_SHORT_VERSION}"COMNTOOLS"
MSVC_REDIST_DLL_PATH = $$getenv($$MSVC_ENV_VAR)
MSVC_REDIST_DLL_PATH ~= s,Common7.{1}Tools.{1},VC\redist\x86\Microsoft.VC$${MSVC_SHORT_VERSION}.CRT\,ig
#isEmpty(MSVC_REDIST_DLL_PATH): error("MSVC directory not found in" $$MSVC_ENV_VAR "environment variable")
COPY_DLL_LIST += "\"$${MSVC_REDIST_DLL_PATH}msvc?1?0.dll\""
}
win32-g++ {
# we need to know where MinGW lives so we can copy some DLLs from there.
MINGW_PATH = $$(MINGW_PATH)
isEmpty(MINGW_PATH): error("MINGW_PATH not found")
COPY_DLL_LIST += $${MINGW_PATH}\\bin\\libwinpthread-1.dll
COPY_DLL_LIST += $${MINGW_PATH}\\bin\\libstdc++-6.dll
}
# Copy VLC files
contains(DEFINES, QGC_USE_VLC) {
#QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\libs\\vlc\\plugins\\*" "$$TARGETDIR_WIN\\plugins" /E /I $$escape_expand(\\n))
COPY_DLL_LIST += $$BASEDIR_WIN\\libs\\vlc\\libvlccore.dll
COPY_DLL_LIST += $$BASEDIR_WIN\\libs\\vlc\\libvlc.dll
}
# Copy all DLLs to base folder
for(COPY_DLL, COPY_DLL_LIST) {
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$${COPY_DLL}" "$$TARGETDIR_WIN"$$escape_expand(\\n))
}
# Copy all QT plugin DLLs and delete the debug ones
for(QT_PLUGIN, QT_PLUGIN_LIST) {
QMAKE_POST_LINK += $$quote(xcopy /D /Y /E /I "$$(QTDIR)\\plugins\\$${QT_PLUGIN}\\*.dll" "$$TARGETDIR_WIN\\$${QT_PLUGIN}" $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(del /Q "$$TARGETDIR_WIN\\$${QT_PLUGIN}\\*$${QTLIBDBGDLLSFX}" $$escape_expand(\\n))
}
# clean up stuff not needed by release versions
greaterThan(QT_MAJOR_VERSION, 4) {
QMAKE_POST_LINK += $$quote(del /F "$$TARGETDIR_WIN\\*.manifest" $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(del /Q "$$TARGETDIR_WIN\\platforms\\qminimal*" $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(del /Q "$$TARGETDIR_WIN\\platforms\\qoffscreen*" $$escape_expand(\\n))
} else {
QMAKE_POST_LINK += $$quote(del /F "$$TARGETDIR_WIN\\qgroundcontrol.exp" $$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(del /F "$$TARGETDIR_WIN\\qgroundcontrol.lib" $$escape_expand(\\n))
}
} # end if release version
}