mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
deb package now bundles qt5 libs and goodies
This commit is contained in:
parent
d429f3ec81
commit
6379a7d937
@ -5,6 +5,124 @@ TEMPLATE = subdirs
|
||||
# Copy Qt runtime libraries into the build directory (to run or package)
|
||||
equals(copydata, 1) {
|
||||
|
||||
GCS_LIBRARY_PATH
|
||||
|
||||
linux-* {
|
||||
|
||||
QT_LIBS = libQt5Core.so.5 \
|
||||
libQt5Gui.so.5 \
|
||||
libQt5Widgets.so.5 \
|
||||
libQt5Network.so.5 \
|
||||
libQt5OpenGL.so.5 \
|
||||
libQt5Sql.so.5 \
|
||||
libQt5Svg.so.5 \
|
||||
libQt5Test.so.5 \
|
||||
libQt5Xml.so.5 \
|
||||
libQt5Declarative.so.5 \
|
||||
libQt5XmlPatterns.so.5 \
|
||||
libQt5Script.so.5 \
|
||||
libQt5Concurrent.so.5 \
|
||||
libQt5PrintSupport.so.5 \
|
||||
libQt5SerialPort.so.5 \
|
||||
libQt5Multimedia.so.5 \
|
||||
libQt5MultimediaWidgets.so.5 \
|
||||
libQt5Quick.so.5 \
|
||||
libQt5Qml.so.5 \
|
||||
libQt5V8.so.5 \
|
||||
libQt5DBus.so.5 \
|
||||
libQt5QuickParticles.so.5 \
|
||||
libicui18n.so.51 \
|
||||
libicuuc.so.51 \
|
||||
libicudata.so.51
|
||||
|
||||
data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_LIBRARY_PATH\") $$addNewline()
|
||||
for(lib, QT_LIBS) {
|
||||
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_LIBS]/$$lib\") $$targetPath(\"$$GCS_QT_LIBRARY_PATH/$$lib\") $$addNewline()
|
||||
}
|
||||
|
||||
# create Qt plugin directories
|
||||
QT_PLUGIN_DIRS = iconengines \
|
||||
imageformats \
|
||||
platforms \
|
||||
mediaservice \
|
||||
sqldrivers
|
||||
for(dir, QT_PLUGIN_DIRS) {
|
||||
data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_PLUGINS_PATH/$$dir\") $$addNewline()
|
||||
}
|
||||
QT_PLUGIN_LIBS = iconengines/libqsvgicon.so \
|
||||
imageformats/libqgif.so \
|
||||
imageformats/libqico.so \
|
||||
imageformats/libqjpeg.so \
|
||||
imageformats/libqmng.so \
|
||||
imageformats/libqsvg.so \
|
||||
imageformats/libqtiff.so \
|
||||
platforms/libqxcb.so \
|
||||
sqldrivers/libqsqlite.so
|
||||
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()
|
||||
}
|
||||
|
||||
# Remove the few unwanted libs after whole dir copy
|
||||
QT_QUICK2_DELS = QtQuick/Controls/libqtquickcontrolsplugin.so \
|
||||
QtQuick/Controls/Private/libqtquickcontrolsprivateplugin.so \
|
||||
QtQuick/Dialogs/libdialogplugin.so
|
||||
|
||||
for(delfile, QT_QUICK2_DELS) {
|
||||
data_copy.commands += $(DEL_FILE) $$targetPath(\"$$GCS_QT_QML_PATH/$${delfile}\") $$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
|
||||
}
|
||||
# Windows release only, no debug target DLLs ending with 'd'
|
||||
# It is assumed that SDL.dll can be found in the same directory as mingw32-make.exe
|
||||
win32 {
|
||||
|
@ -89,6 +89,9 @@ macx {
|
||||
} else {
|
||||
GCS_APP_WRAPPER = openpilotgcs
|
||||
GCS_APP_TARGET = openpilotgcs.bin
|
||||
GCS_QT_LIBRARY_PATH = $$GCS_BUILD_TREE/$$GCS_LIBRARY_BASENAME/qt5
|
||||
GCS_QT_PLUGINS_PATH = $$GCS_BUILD_TREE/$$GCS_LIBRARY_BASENAME/qt5/plugins
|
||||
GCS_QT_QML_PATH = $$GCS_BUILD_TREE/$$GCS_LIBRARY_BASENAME/qt5/qml
|
||||
}
|
||||
GCS_LIBRARY_PATH = $$GCS_BUILD_TREE/$$GCS_LIBRARY_BASENAME/openpilotgcs
|
||||
GCS_PLUGIN_PATH = $$GCS_LIBRARY_PATH/plugins
|
||||
|
@ -31,7 +31,7 @@ macx {
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/$${PROVIDER}/
|
||||
} else:linux-* {
|
||||
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
|
||||
QMAKE_RPATHDIR += \$\$ORIGIN
|
||||
QMAKE_RPATHDIR = \$\$ORIGIN
|
||||
QMAKE_RPATHDIR += \$\$ORIGIN/..
|
||||
QMAKE_RPATHDIR += \$\$ORIGIN/../..
|
||||
GCS_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
|
||||
@ -45,7 +45,7 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hGCS_symbols
|
||||
CONFIG += plugin plugin_with_soname
|
||||
|
||||
!macx {
|
||||
target.path = /$$GCS_LIBRARY_BASENAME/opnepilotgcs/plugins/$$PROVIDER
|
||||
target.path = /$$GCS_LIBRARY_BASENAME/openpilotgcs/plugins/$$PROVIDER
|
||||
pluginspec.files += $${TARGET}.pluginspec
|
||||
pluginspec.path = /$$GCS_LIBRARY_BASENAME/openpilotgcs/plugins/$$PROVIDER
|
||||
INSTALLS += target pluginspec
|
||||
|
@ -3,7 +3,8 @@ macx {
|
||||
} else:linux-* {
|
||||
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
|
||||
# this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var
|
||||
QMAKE_RPATHDIR += \$\$ORIGIN/../$$GCS_LIBRARY_BASENAME/openpilotgcs
|
||||
QMAKE_RPATHDIR = \$\$ORIGIN/../$$GCS_LIBRARY_BASENAME/openpilotgcs
|
||||
QMAKE_RPATHDIR += \$\$ORIGIN/../$$GCS_LIBRARY_BASENAME/qt5
|
||||
GCS_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
|
||||
|
||||
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${GCS_PLUGIN_RPATH}\'
|
||||
|
@ -1,2 +1,2 @@
|
||||
shlibs:Depends=libc6 (>= 2.3.6-6~), libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libgl1-mesa-glx | libgl1, libglu1-mesa | libglu1, libphonon4 (>= 4:4.3.0), libqt4-network (>= 4:4.6.1), libqt4-opengl (>= 4:4.6.1), libqt4-script (>= 4:4.5.3), libqt4-sql (>= 4:4.5.3), libqt4-svg (>= 4:4.5.3), libqt4-test (>= 4:4.5.3), libqt4-xml (>= 4:4.5.3), libqtcore4 (>= 4:4.7.0~beta1), libqtgui4 (>= 4:4.6.2), libsdl1.2debian (>= 1.2.10-1), libstdc++6 (>= 4.1.1), libudev0 (>= 147), libusb-0.1-4 (>= 2:0.1.12), phonon
|
||||
shlibs:Depends=libc6 (>= 2.3.6-6~), libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libgl1-mesa-glx | libgl1, libglu1-mesa | libglu1, libphonon4 (>= 4:4.3.0), libsdl1.2debian (>= 1.2.10-1), libstdc++6 (>= 4.1.1), libudev0 | libudev1, libusb-0.1-4 (>= 2:0.1.12), phonon
|
||||
misc:Depends=
|
||||
|
@ -25,7 +25,7 @@ clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean
|
||||
|
||||
|
||||
install:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
@ -37,6 +37,7 @@ install:
|
||||
cp -arp build/openpilotgcs_release/lib debian/openpilot/usr/local/OpenPilot
|
||||
cp -arp build/openpilotgcs_release/share debian/openpilot/usr/local/OpenPilot
|
||||
cp -arp build/openpilotgcs_release/.obj debian/openpilot/usr/local/OpenPilot
|
||||
cp -arp package/linux/qt.conf debian/openpilot/usr/local/OpenPilot/bin
|
||||
cp -arp package/linux/openpilot.desktop debian/openpilot/usr/share/applications
|
||||
cp -arp package/linux/openpilot.png debian/openpilot/usr/share/pixmaps
|
||||
cp -arp package/linux/openpilot_menu.png debian/openpilot/usr/share/pixmaps
|
||||
@ -73,10 +74,10 @@ binary-arch: install
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_installdeb
|
||||
dh_shlibdeps -l/usr/local/OpenPilot/lib/openpilotgcs --dpkg-shlibdeps-params="--ignore-missing-info -v"
|
||||
dh_shlibdeps -l/usr/local/OpenPilot/lib/openpilotgcs -l/usr/local/OpenPilot/lib/qt5 --dpkg-shlibdeps-params="--ignore-missing-info -v"
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
dh_builddeb -- -Zbzip2
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
|
6
package/linux/qt.conf
Normal file
6
package/linux/qt.conf
Normal file
@ -0,0 +1,6 @@
|
||||
[Paths]
|
||||
Prefix = ..
|
||||
Plugins = lib/qt5/plugins
|
||||
Imports = lib/qt5/qml
|
||||
Qml2Imports = lib/qt5/qml
|
||||
Libraries = lib/qt5
|
Loading…
Reference in New Issue
Block a user