1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Ground: Some housekeeping for Windows packaging. No other changes. See also OP-92, OP-93, OP-221.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2317 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
osnwt 2011-01-02 00:32:09 +00:00 committed by osnwt
parent 2ea7f39b87
commit 87b3d482d5
3 changed files with 69 additions and 36 deletions

View File

@ -9,5 +9,5 @@ include(openpilotgcs.pri)
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = src share
SUBDIRS = src share packaging
unix:!macx:!isEmpty(copydata):SUBDIRS += bin

View File

@ -0,0 +1,68 @@
include(../openpilotgcs.pri)
TEMPLATE = subdirs
SUBDIRS =
# Copy Qt runtime libraries into the build directory (to run or package)
equals(copydata, 1) {
# Windows only, debug target DLLs ending with 'd' are not copied
win32:CONFIG(release, debug|release) {
# copy packaging dir (with installer scripts which use relative paths)
data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/packaging/winx86\") $$targetPath(\"$$GCS_BUILD_TREE/packaging/winx86\") $$addNewline()
# copy Qt DLLs and phonon4
QT_DLLS = libgcc_s_dw2-1.dll \
mingwm10.dll \
phonon4.dll \
QtCore4.dll \
QtGui4.dll \
QtNetwork4.dll \
QtOpenGL4.dll \
QtSql4.dll \
QtSvg4.dll \
QtTest4.dll \
QtXml4.dll
for(dll, QT_DLLS) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
}
# copy iconengines
QT_ICONENGINE_DLLS = qsvgicon4.dll
data_copy.commands += @$(CHK_DIR_EXISTS) $$targetPath(\"$$GCS_APP_PATH/iconengines\") $(MKDIR) $$targetPath(\"$$GCS_APP_PATH/iconengines\") $$addNewline()
for(dll, QT_ICONENGINE_DLLS) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/iconengines/$$dll\") $$targetPath(\"$$GCS_APP_PATH/iconengines/$$dll\") $$addNewline()
}
# copy imageformats
QT_IMAGEFORMAT_DLLS = qgif4.dll qico4.dll qjpeg4.dll qmng4.dll qsvg4.dll qtiff4.dll
data_copy.commands += @$(CHK_DIR_EXISTS) $$targetPath(\"$$GCS_APP_PATH/imageformats\") $(MKDIR) $$targetPath(\"$$GCS_APP_PATH/imageformats\") $$addNewline()
for(dll, QT_IMAGEFORMAT_DLLS) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/imageformats/$$dll\") $$targetPath(\"$$GCS_APP_PATH/imageformats/$$dll\") $$addNewline()
}
# copy phonon_backend
QT_PHONON_BACKEND_DLLS = phonon_ds94.dll
data_copy.commands += @$(CHK_DIR_EXISTS) $$targetPath(\"$$GCS_APP_PATH/phonon_backend\") $(MKDIR) $$targetPath(\"$$GCS_APP_PATH/phonon_backend\") $$addNewline()
for(dll, QT_PHONON_BACKEND_DLLS) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/phonon_backend/$$dll\") $$targetPath(\"$$GCS_APP_PATH/phonon_backend/$$dll\") $$addNewline()
}
# copy sqldrivers
QT_SQLDRIVERS_DLLS = qsqlite4.dll
data_copy.commands += @$(CHK_DIR_EXISTS) $$targetPath(\"$$GCS_APP_PATH/sqldrivers\") $(MKDIR) $$targetPath(\"$$GCS_APP_PATH/sqldrivers\") $$addNewline()
for(dll, QT_SQLDRIVERS_DLLS) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/sqldrivers/$$dll\") $$targetPath(\"$$GCS_APP_PATH/sqldrivers/$$dll\") $$addNewline()
}
# copy SDL (if available) - Simple DirectMedia Layer (www.libsdl.org)
SDL_DLL = SDL.dll
exists($$targetPath(\"$$[QT_INSTALL_BINS]/../../mingw/bin/$$SDL_DLL\")){
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/../../mingw/bin/$$SDL_DLL\") $$targetPath(\"$$GCS_APP_PATH/$$SDL_DLL\") $$addNewline()
}
data_copy.target = FORCE
QMAKE_EXTRA_TARGETS += data_copy
}
}

View File

@ -13,41 +13,6 @@ equals(copydata, 1) {
}
}
# copying required for installer QT DLLs
win32 {
CONFIG(release, debug|release) {
# copy packaging dir (with Wix script for build installer)
data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/packaging/winx86\") $$targetPath(\"$$GCS_BUILD_TREE/packaging/winx86\") $$addNewline()
QT_DLLs = libgcc_s_dw2-1.dll mingwm10.dll phonon4.dll QtCore4.dll QtGui4.dll QtNetwork4.dll QtOpenGL4.dll QtSql4.dll QtSvg4.dll QtTest4.dll QtXml4.dll
for(dll, QT_DLLs) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
}
# copy imageformats
QT_ImageFormats_DLLs = qgif4.dll qico4.dll qjpeg4.dll qmng4.dll qsvg4.dll qtiff4.dll
for(dll, QT_ImageFormats_DLLs) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/imageformats/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
}
# copy iconengine
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon4.dll\") $$targetPath(\"$$GCS_APP_PATH/qsvgicon4.dll\") $$addNewline()
# copy SDL (if available) - Simple DirectMedia Layer (www.libsdl.org)
SDL_DLL = $$targetPath(\"$$[QT_INSTALL_BINS]/../../mingw/bin/SDL.dll\")
exists($$SDL_DLL){
data_copy.commands += $(COPY_FILE) $$SDL_DLL $$targetPath(\"$$GCS_APP_PATH/SDL.dll\") $$addNewline()
}
# copy sql driver
data_copy.commands += @$(CHK_DIR_EXISTS) $$targetPath(\"$$GCS_APP_PATH/sqldrivers\") $(MKDIR) $$targetPath(\"$$GCS_APP_PATH/sqldrivers\") $$addNewline()
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/sqldrivers/qsqlite4.dll\") $$targetPath(\"$$GCS_APP_PATH/sqldrivers/qsqlite4.dll\") $$addNewline()
# copy phonon_ds94
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/phonon_backend/phonon_ds94.dll\") $$targetPath(\"$$GCS_APP_PATH/phonon_ds94.dll\") $$addNewline()
}
}
data_copy.target = FORCE
QMAKE_EXTRA_TARGETS += data_copy
}