[xswiftbus] Make xswiftbus completely Qt free

This commit is contained in:
Roland Winklmeier
2018-03-25 16:10:54 +02:00
parent b0a8fcaa45
commit 6a8ae67e06
13 changed files with 525 additions and 429 deletions

View File

@@ -1,10 +1,9 @@
load(common_pre)
QT += core gui widgets dbus network
TEMPLATE = lib
CONFIG += shared plugin
CONFIG -= qt
INCLUDEPATH += $$EXTERNALSROOT/common/include/XPLM
@@ -107,7 +106,6 @@ INSTALLS += target
dep_target.path = $$PREFIX/$$XSWIFTBUS_DIR
win32 {
dep_target.files *= $$DestRoot/lib/blackmisc.dll
dep_target.files *= $$DestRoot/bin/dbus-daemon.exe
win32-g++ {
dep_target.files *= $$DestRoot/bin/libdbus-1-3.dll
@@ -118,12 +116,6 @@ win32 {
dep_target.files *= $$DestRoot/bin/expat.dll
dep_target.files *= $$DestRoot/bin/libevent_core.dll
}
dep_target.files *= $$[QT_INSTALL_BINS]/Qt5Core$${DLL_DEBUG_SUFFIX}.dll
dep_target.files *= $$[QT_INSTALL_BINS]/Qt5Gui$${DLL_DEBUG_SUFFIX}.dll
dep_target.files *= $$[QT_INSTALL_BINS]/Qt5Widgets$${DLL_DEBUG_SUFFIX}.dll
dep_target.files *= $$[QT_INSTALL_BINS]/Qt5DBus$${DLL_DEBUG_SUFFIX}.dll
dep_target.files *= $$[QT_INSTALL_BINS]/Qt5Network$${DLL_DEBUG_SUFFIX}.dll
dep_target.files *= $$[QT_INSTALL_BINS]/Qt5Xml$${DLL_DEBUG_SUFFIX}.dll
dep_target.CONFIG += no_check_exist
dbus_share.path = $$PREFIX/$$XSWIFTBUS_DIR/share/dbus-1
@@ -135,24 +127,8 @@ win32 {
legacy_data_target.files *= LegacyData
} else:macx: {
dep_target.files *= $$DestRoot/lib/libdbus-1.3.dylib
dep_target.files *= $$DestRoot/lib/libevent_core.2.1.8.dylib
dep_target.extra += rsync -avzl --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtCore.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtCore.framework/ &&
dep_target.extra += rsync -avzl --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtGui.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtGui.framework/ &&
dep_target.extra += rsync -avzl --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtWidgets.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtWidgets.framework/ &&
dep_target.extra += rsync -avzl --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtDBus.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtDBus.framework/ &&
dep_target.extra += rsync -avzl --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtNetwork.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtNetwork.framework/ &&
dep_target.extra += rsync -avzl --exclude \'Headers*\' --exclude \'*debug*\' $$[QT_INSTALL_LIBS]/QtXml.framework/ $${PREFIX}/$$XSWIFTBUS_DIR/QtXml.framework/
dep_target.CONFIG += no_check_exist
# Manually copy to workaround shortcomings introduced
# when qmake migrated away from GNU install in Qt 5.9
dep_target.depends += copy_blackmisc
copy_blackmisc.target = copy_blackmisc
source_path = $$PREFIX/lib/libblackmisc.0.dylib
dest_path = $$PREFIX/$$XSWIFTBUS_DIR
copy_blackmisc.commands = cp $$shell_path($$source_path) $$shell_path($$dest_path)
QMAKE_EXTRA_TARGETS += copy_blackmisc
legacy_data_target.path = $$PREFIX/xswiftbus
legacy_data_target.files *= LegacyData
@@ -160,48 +136,13 @@ win32 {
# We cannot modify the original library since this is xswiftbus specific.
legacy_data_target.depends += fix_plugin_rpath
fix_plugin_rpath.target = fix_plugin_rpath
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/libblackmisc.0.dylib\" \"@loader_path/libblackmisc.0.dylib\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtWidgets.framework/Versions/5/QtWidgets\" \"@loader_path/QtWidgets.framework/Versions/5/QtWidgets\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtGui.framework/Versions/5/QtGui\" \"@loader_path/QtGui.framework/Versions/5/QtGui\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtDBus.framework/Versions/5/QtDBus\" \"@loader_path/QtDBus.framework/Versions/5/QtDBus\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtNetwork.framework/Versions/5/QtNetwork\" \"@loader_path/QtNetwork.framework/Versions/5/QtNetwork\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtCore.framework/Versions/5/QtCore\" \"@loader_path/QtCore.framework/Versions/5/QtCore\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/QtXml.framework/Versions/5/QtXml\" \"@loader_path/QtXml.framework/Versions/5/QtXml\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/libevent_core.2.1.8.dylib\" \"@loader_path/libevent_core.2.1.8.dylib\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl) &&
fix_plugin_rpath.commands += install_name_tool -change \"@rpath/libdbus-1.3.dylib\" \"@loader_path/libdbus-1.3.dylib\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/mac.xpl)
QMAKE_EXTRA_TARGETS += fix_plugin_rpath
fix_plugin_rpath.depends += fix_misc_rpath
fix_misc_rpath.target = fix_misc_rpath
fix_misc_rpath.commands += install_name_tool -id \"@loader_path/libblackmisc.0.dylib\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtGui.framework/Versions/5/QtGui\" \"@loader_path/QtGui.framework/Versions/5/QtGui\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtDBus.framework/Versions/5/QtDBus\" \"@loader_path/QtDBus.framework/Versions/5/QtDBus\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtNetwork.framework/Versions/5/QtNetwork\" \"@loader_path/QtNetwork.framework/Versions/5/QtNetwork\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtCore.framework/Versions/5/QtCore\" \"@loader_path/QtCore.framework/Versions/5/QtCore\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib) &&
fix_misc_rpath.commands += install_name_tool -change \"@rpath/QtXml.framework/Versions/5/QtXml\" \"@loader_path/QtXml.framework/Versions/5/QtXml\" $$shell_path($$PREFIX/$$XSWIFTBUS_DIR/libblackmisc.0.dylib)
QMAKE_EXTRA_TARGETS += fix_misc_rpath
} else:unix: {
dep_target.files *= $$[QT_INSTALL_LIBS]/libQt5Core.so.5
dep_target.files *= $$[QT_INSTALL_LIBS]/libQt5Gui.so.5
dep_target.files *= $$[QT_INSTALL_LIBS]/libQt5Widgets.so.5
dep_target.files *= $$[QT_INSTALL_LIBS]/libQt5DBus.so.5
dep_target.files *= $$[QT_INSTALL_LIBS]/libQt5Network.so.5
dep_target.files *= $$[QT_INSTALL_LIBS]/libQt5Xml.so.5
dep_target.files *= $$[QT_INSTALL_LIBS]/libicui18n.so.56
dep_target.files *= $$[QT_INSTALL_LIBS]/libicuuc.so.56
dep_target.files *= $$[QT_INSTALL_LIBS]/libicudata.so.56
dep_target.CONFIG += no_check_exist
# Manually copy to workaround shortcomings introduced
# when qmake migrated away from GNU install in Qt 5.9
dep_target.depends += copy_blackmisc
copy_blackmisc.target = copy_blackmisc
source_path = $$PREFIX/lib/libblackmisc.so.0
dest_path = $$PREFIX/$$XSWIFTBUS_DIR
copy_blackmisc.commands = cp $$shell_path($$source_path) $$shell_path($$dest_path)
QMAKE_EXTRA_TARGETS += copy_blackmisc
legacy_data_target.path = $$PREFIX/xswiftbus
legacy_data_target.files *= LegacyData
}