1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

Merge remote-tracking branch 'dev/parched/OP-1700_copydata_doubles_if_called_twice' into next

This commit is contained in:
James Duley 2015-03-30 11:40:22 +13:00
commit c245d18683
2 changed files with 26 additions and 133 deletions

View File

@ -5,9 +5,31 @@ TEMPLATE = subdirs
# Copy Qt runtime libraries into the build directory (to run or package)
equals(copyqt, 1) {
GCS_LIBRARY_PATH
# Copy QtQuick2 complete directories
# Some of these directories have a lot of files
# Easier to copy everything
QT_QUICK2_DIRS = QtQuick/Controls \
QtQuick/Dialogs \
QtQuick/Layouts \
QtQuick/LocalStorage \
QtQuick/Particles.2 \
QtQuick/PrivateWidgets \
QtQuick/Window.2 \
QtQuick/XmlListModel \
QtQuick.2
linux-* {
# create QtQuick directory
data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_QML_PATH/QtQuick\") $$addNewline()
for(dir, QT_QUICK2_DIRS) {
data_copy.commands += @rm -rf $$targetPath(\"$$GCS_QT_QML_PATH/$$dir\") $$addNewline()
data_copy.commands += $(COPY_DIR) $$targetPath(\"$$[QT_INSTALL_QML]/$$dir\") $$targetPath(\"$$GCS_QT_QML_PATH/$$dir\") $$addNewline()
}
data_copy.target = FORCE
QMAKE_EXTRA_TARGETS += data_copy
linux {
QT_LIBS = libQt5Core.so.5 \
libQt5Gui.so.5 \
@ -63,58 +85,6 @@ GCS_LIBRARY_PATH
for(lib, QT_PLUGIN_LIBS) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/$$lib\") $$targetPath(\"$$GCS_QT_PLUGINS_PATH/$$lib\") $$addNewline()
}
# create QtQuick2 plugin directories
QT_QUICK2_DIRS = QtQuick \
QtQuick.2 \
QtQuick/Layouts \
QtQuick/LocalStorage \
QtQuick/Particles.2 \
QtQuick/PrivateWidgets \
QtQuick/Window.2 \
QtQuick/XmlListModel
for(dir, QT_QUICK2_DIRS) {
data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_QML_PATH/$$dir\") $$addNewline()
}
# Copy QtQuick2 complete directories
# These directories have a lot of files
# Easier to copy everything
QTQ_WHOLE_DIRS = QtQuick/Controls \
QtQuick/Dialogs
for(dir, QTQ_WHOLE_DIRS) {
data_copy.commands += $(COPY_DIR) $$targetPath(\"$$[QT_INSTALL_QML]/$$dir\") $$targetPath(\"$$GCS_QT_QML_PATH/$$dir\") $$addNewline()
}
# Remaining QtQuick plugin libs
QT_QUICK2_DLLS = QtQuick.2/libqtquick2plugin.so \
QtQuick.2/plugins.qmltypes \
QtQuick.2/qmldir \
QtQuick/Layouts/libqquicklayoutsplugin.so \
QtQuick/Layouts/plugins.qmltypes \
QtQuick/Layouts/qmldir \
QtQuick/LocalStorage/libqmllocalstorageplugin.so \
QtQuick/LocalStorage/plugins.qmltypes \
QtQuick/LocalStorage/qmldir \
QtQuick/Particles.2/libparticlesplugin.so \
QtQuick/Particles.2/plugins.qmltypes \
QtQuick/Particles.2/qmldir \
QtQuick/PrivateWidgets/libwidgetsplugin.so \
QtQuick/PrivateWidgets/plugins.qmltypes \
QtQuick/PrivateWidgets/qmldir \
QtQuick/Window.2/libwindowplugin.so \
QtQuick/Window.2/plugins.qmltypes \
QtQuick/Window.2/qmldir \
QtQuick/XmlListModel/libqmlxmllistmodelplugin.so \
QtQuick/XmlListModel/plugins.qmltypes \
QtQuick/XmlListModel/qmldir
for(lib, QT_QUICK2_DLLS) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_QML]/$$lib\") $$targetPath(\"$$GCS_QT_QML_PATH/$$lib\") $$addNewline()
}
data_copy.target = FORCE
QMAKE_EXTRA_TARGETS += data_copy
}
win32 {
@ -179,55 +149,6 @@ GCS_LIBRARY_PATH
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
}
# create QtQuick2 plugin directories
QT_QUICK2_DIRS = qtquick \
qtquick.2 \
qtquick/layouts \
qtquick/localstorage \
qtquick/particles.2 \
qtquick/privatewidgets \
qtquick/window.2 \
qtquick/xmllistmodel
for(dir, QT_QUICK2_DIRS) {
data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_APP_PATH/$$dir\") $$addNewline()
}
# Copy QtQuick2 complete directories
# These directories have a lot of files
# Easier to copy everything
QTQ_WHOLE_DIRS = qtquick/controls \
qtquick/dialogs
for(dir, QTQ_WHOLE_DIRS) {
data_copy.commands += $(COPY_DIR) $$targetPath(\"$$[QT_INSTALL_QML]/$$dir\") $$targetPath(\"$$GCS_APP_PATH/$$dir\") $$addNewline()
}
# Remaining QtQuick plugin DLLs
QT_QUICK2_DLLS = QtQuick.2/qtquick2plugin$${DS}.dll \
QtQuick.2/plugins.qmltypes \
QtQuick.2/qmldir \
qtquick/layouts/qquicklayoutsplugin$${DS}.dll \
qtquick/layouts/plugins.qmltypes \
qtquick/layouts/qmldir \
qtquick/localstorage/qmllocalstorageplugin$${DS}.dll \
qtquick/localstorage/plugins.qmltypes \
qtquick/localstorage/qmldir \
qtquick/particles.2/particlesplugin$${DS}.dll \
qtquick/particles.2/plugins.qmltypes \
qtquick/particles.2/qmldir \
qtquick/privatewidgets/widgetsplugin$${DS}.dll \
qtquick/privatewidgets/plugins.qmltypes \
qtquick/privatewidgets/qmldir \
qtquick/window.2/windowplugin$${DS}.dll \
qtquick/window.2/plugins.qmltypes \
qtquick/window.2/qmldir \
qtquick/XmlListModel/qmlxmllistmodelplugin$${DS}.dll \
qtquick/XmlListModel/plugins.qmltypes \
qtquick/XmlListModel/qmldir
for(dll, QT_QUICK2_DLLS) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_QML]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
}
# copy OpenSSL DLLs
OPENSSL_DLLS = \
ssleay32.dll \
@ -242,35 +163,5 @@ GCS_LIBRARY_PATH
for(dll, OPENGL_DLLS) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$${MESAWIN_DIR}/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline()
}
data_copy.target = FORCE
QMAKE_EXTRA_TARGETS += data_copy
}
macx{
#NOTE: debug dylib can be copied as they will be cleaned out with packaging scripts
#standard plugins directory (will copy just dylib, plugins.qmltypes and qmldir
QT_QUICK2_PLUGINS = QtQuick.2 QtQuick/Layouts QtQuick/LocalStorage QtQuick/Particles.2 QtQuick/PrivateWidgets QtQuick/Window.2 QtQuick/XmlListModel
#those directories will be fully copied to dest
QT_QUICK2_FULL_DIRS = QtQuick/Controls QtQuick/Dialogs
#create QtQuick dir (that will host all subdirs)
data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_QML_PATH/QtQuick\") $$addNewline()
for(dir, QT_QUICK2_FULL_DIRS) {
#data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_QML_PATH/$$dir\") $$addNewline()
data_copy.commands += $(COPY_DIR) $$targetPath(\"$$[QT_INSTALL_QML]/$$dir\") $$targetPath(\"$$GCS_QT_QML_PATH/$$dir\") $$addNewline()
}
for(lib, QT_QUICK2_PLUGINS) {
data_copy.commands += $(MKDIR) $$targetPath(\"$$GCS_QT_QML_PATH/$$lib\") $$addNewline()
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_QML]/$$lib/\"*.dylib) $$targetPath(\"$$GCS_QT_QML_PATH/$$lib/\") $$addNewline()
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_QML]/$$lib/plugins.qmltypes\") $$targetPath(\"$$GCS_QT_QML_PATH/$$lib/plugins.qmltypes\") $$addNewline()
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_QML]/$$lib/qmldir\") $$targetPath(\"$$GCS_QT_QML_PATH/$$lib/qmldir\") $$addNewline()
}
data_copy.target = FORCE
QMAKE_EXTRA_TARGETS += data_copy
}
}

View File

@ -119,6 +119,8 @@ macx {
contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1
GCS_APP_TARGET = openpilotgcs
GCS_QT_QML_PATH = $$GCS_APP_PATH
copyqt = $$copydata
} else {
GCS_APP_TARGET = openpilotgcs