187 Commits

Author SHA1 Message Date
TheAssassin bb3ca84e09 Move back test code
The code has never belonged into the BasicPluginsDeployer anyway. This
also makes calling the basic deployer's default code optional to
custom deployers.

This commit further puts a note in all existing deployers which call
the default deployment code for future developers.
2019-09-24 02:36:34 +02:00
TheAssassin d643148681 Clean up includes 2019-09-24 02:24:36 +02:00
TheAssassin 3c5345f02f Extract remaining deployment code into classes 2019-09-24 02:23:31 +02:00
TheAssassin 4543c5c3f3 Forward required data needed by remaining deployers 2019-09-24 02:19:54 +02:00
TheAssassin 12a5f2621b Use template magic to save redundant code 2019-09-24 01:42:36 +02:00
TheAssassin d9f645f3aa Speed up unit test runs 2019-09-24 01:32:33 +02:00
TheAssassin 936b67cd39 Never ignore exceptions silently
Not even a message? Come on.
2019-09-24 01:30:04 +02:00
TheAssassin c958bcf6c3 Fix test build 2019-09-24 01:29:41 +02:00
TheAssassin 309c012c71 Actually evaluate return code 2019-09-24 01:26:59 +02:00
TheAssassin 066373c0fc Move xcb-gl plugins deployment into class 2019-09-24 01:26:43 +02:00
TheAssassin bf252a8c37 Allow for including util.h in deployers 2019-09-24 01:26:11 +02:00
TheAssassin b3bdda2160 Work around multiple definition errors
Temporary workaround until we have moved all the code out of the file
into new classes.
2019-09-24 01:25:35 +02:00
TheAssassin aef5f5ca80 Remove unneeded includes 2019-09-24 01:25:04 +02:00
TheAssassin 6847d4d6fa Actually make use of return code 2019-09-24 01:18:29 +02:00
TheAssassin f3ed93cb8e Rename remaining classes 2019-09-24 01:06:54 +02:00
TheAssassin 10cac38239 Simplify plugins deployer factory API 2019-09-24 00:55:22 +02:00
TheAssassin 84efc25c1d Extract platform plugins deployment 2019-09-24 00:47:34 +02:00
TheAssassin 52e2edc5ed New deployment structure, mk. 1 2019-09-24 00:46:33 +02:00
TheAssassin ae5373d815 Reduce size of main.cpp 2019-09-23 22:38:42 +02:00
TheAssassin 67873d77ec Move definitions into separate source file
Also removes static prefix of most functions, as you can't declare
static methods more than once (e.g., by including a header more than
once, by accident or intentionally).

Should overall speed up compilation a bit.
2019-09-23 18:46:26 +02:00
TheAssassin ff54bf779c Merge pull request #47 from haampie/fix-deploy-qt-3d
Deploy sceneparsers, geometryloaders and gamepads as well
2019-09-23 15:00:46 +02:00
Harmen Stoppels a8811792d3 Deploy sceneparsers, geometryloaders and gamepads as well 2019-09-23 14:52:44 +02:00
TheAssassin 49b51efca4 Never ask to integrate linuxdeploy-plugin-qt AppImages 2019-09-06 15:51:20 +02:00
TheAssassin 356d82d9f5 Merge pull request #45 from linuxdeploy/fix-test-runs
Fix test runs
2019-09-06 03:55:00 +02:00
TheAssassin 374c7d9e5e Actually run tests on Travis 2019-09-06 03:13:49 +02:00
TheAssassin 8b94b2259b Update linuxdeploy 2019-09-06 03:13:32 +02:00
TheAssassin 6d9d5afb22 Add tests only if they are built and can therefore be run 2019-09-06 03:13:06 +02:00
TheAssassin 1c96d54d93 Merge pull request #43 from haampie/fix-optional-tests
Make it possible to opt out of building tests
2019-09-06 02:43:31 +02:00
Harmen Stoppels 06c852e908 Make it possible to opt out of building tests 2019-09-05 13:34:24 +02:00
TheAssassin 6e33b499a6 Fix Travis test runs, mk. 4 2019-08-23 04:15:05 +02:00
TheAssassin cf5ac4f2f5 Fix Travis test runs, mk. 3 2019-08-23 04:11:02 +02:00
TheAssassin 72878c2cb2 Fix Travis test runs, mk. 2 2019-08-23 04:02:14 +02:00
TheAssassin 1db44b20c5 Fix Travis test runs, mk. 1 2019-08-23 03:46:11 +02:00
TheAssassin aaa5e23c2e Fix package names 2019-08-23 02:39:24 +02:00
TheAssassin b39cf24907 Fix Qt PPA in use 2019-08-23 02:37:10 +02:00
TheAssassin b1ceca11d9 Upgrade to xenial from EOL trusty 2019-08-23 02:30:56 +02:00
TheAssassin 2ad5a212b2 Add AppRun hook setting QT_QPA_PLATFORMTHEME if needed
Fixes #33.
2019-08-22 13:53:31 +02:00
TheAssassin e7037d79bd Fix Gtk 2 platform theme files deployment 2019-08-22 13:53:31 +02:00
TheAssassin 3c9ad18fc9 Fix comment 2019-08-22 13:52:36 +02:00
TheAssassin 9ba887429b Fix message 2019-08-22 13:52:36 +02:00
TheAssassin d29b4ec188 Explicitly exit with 0 on successful termination 2019-08-22 13:52:36 +02:00
TheAssassin 80af1cdc18 Improve logging 2019-08-22 13:52:36 +02:00
TheAssassin 3b04ea2571 Merge pull request #38 from linuxdeploy/improve_check_command_implementation
Fix check_command function
2019-07-25 21:47:59 +02:00
TheAssassin 8c68322928 Merge pull request #39 from linuxdeploy/update_linuxdeploy
Update linuxdeploy brings a fix for issue #37
2019-07-25 21:07:54 +02:00
Alexis Lopez Zubieta bbb1746a92 Document and improve code style 2019-07-25 13:51:56 -05:00
Alexis Lopez Zubieta 185de6e800 Update linuxdeploy brings a fix for issue #37 2019-07-25 13:36:02 -05:00
Alexis Lopez Zubieta 0e6af10264 Simplify check_command function 2019-07-25 13:21:40 -05:00
TheAssassin ddff57738b Merge pull request #35 from linuxdeploy/failing-master
Make QGtk 2 Theme and Style deployment optional
2019-07-10 22:54:30 +02:00
Alexis LĂłpez Zubieta a4b33ca056 Merge branch 'master' into failing-master 2019-07-09 18:15:31 +00:00
Alexis Lopez Zubieta cdff8d0e85 Make QGtk 2 Theme and Style deployment optional 2019-07-08 20:02:13 -05:00
TheAssassin af8e660111 Revert "Fix deployment of Gtk2 platform theme libs"
This reverts commit 8f8212b79b.
2019-07-07 01:50:40 +02:00
TheAssassin 8f8212b79b Fix deployment of Gtk2 platform theme libs 2019-07-06 13:36:31 +02:00
TheAssassin 5de7fd24d8 Fix copy-pasta syntax 2019-06-29 15:04:26 +02:00
TheAssassin 69d8a587f1 Bundle 32-bit strip in 32-bit AppImage 2019-06-29 15:04:25 +02:00
TheAssassin 5d2191e43e Merge pull request #31 from linuxdeploy/use_QT_INSTALL_BINS
Prepend QT_INSTALL_BINS to PATH
2019-06-26 12:41:52 +02:00
Alexis Lopez Zubieta 0c11d9d51f Prepend QT_INSTALL_BINS to PATH 2019-06-25 09:43:23 -05:00
TheAssassin 48529b186a Merge pull request #30 from haampie/fix-experimental-theme-deployment-for-qt5.12.3
Make sure the experimental platform themes deployment does not throw
2019-06-12 00:40:18 +02:00
Harmen Stoppels dfa4e5e113 directory_iterator throws when directory does not exist, so make sure the directory exists (e.g. the styles directory has gone missing in Qt5.12.3) 2019-06-11 13:45:01 +02:00
TheAssassin 490331e2fa Merge pull request #29 from haampie/bump-version
Bump linuxdeploy version
2019-06-10 22:17:26 +02:00
Harmen Stoppels 9d462d163f Bump linuxdeploy version 2019-06-10 21:12:55 +02:00
TheAssassin 0be3b6605b Merge pull request #27 from haampie/feature-bump-version
Bump linuxdeploy version
2019-06-10 17:12:38 +02:00
Harmen Stoppels ebb5c206e3 Bump linuxdeploy version 2019-06-10 17:06:48 +02:00
TheAssassin 4407071b62 Fix appimagetool annoyance 2019-05-01 23:54:49 +02:00
TheAssassin cbc0b47904 (Partly experimental) support for platform themes
Gtk 2 platform theme & style is deployed by default if possible.

By setting the DEPLOY_PLATFORM_THEMES environment variable all themes
and styles can be deployed. This feature is experimental, and might
lead to segfaults etc. Use with care.
2019-02-23 18:03:51 +01:00
TheAssassin 87dafe4993 Update linuxdeploy 2019-02-23 18:02:00 +01:00
TheAssassin 72014cfbec Fix deployment of xcbglintegrations plugins
The destination didn't end with a slash, so, like cp, liblinuxdeploy
just created a file with that name and overwrote it with every new
plugin.
2019-02-23 14:00:48 +01:00
TheAssassin 95d9790923 Update linuxdeploy
Fixes #24.
2019-02-20 13:15:26 +01:00
Alexis LĂłpez Zubieta 1f1f37c086 Undo wayland plugging support (#25)
* Revert "Disable tests until further notice"

This reverts commit 6ecd2fb1e0.

* Revert "Needs libGL for some reason"

This reverts commit 65550198e0.

* Revert "Don't need to ship the egl version for x86 and amd64"

This reverts commit a559d1525c.

* Revert "Fix tests mk. 2"

This reverts commit 31f8509d4b.

* Revert "Fix tests"

This reverts commit 2765eaf2f2.

* Revert "Fix package name"

This reverts commit a071ef73e6.

* Revert "Need an additional package now"

This reverts commit 7c1c92bd76.

* Revert "Upgrade to xenial to get wayland packages"

This reverts commit b10b5b0a8c.

* Revert "UI deployments require wayland libraries now"

This reverts commit 5711608a60.

* Revert "Add experimental wayland integration support"

This reverts commit 661d8320
2019-02-19 04:44:38 +01:00
TheAssassin 6ecd2fb1e0 Disable tests until further notice 2019-02-07 04:29:19 +01:00
TheAssassin 65550198e0 Needs libGL for some reason 2019-02-07 04:05:03 +01:00
TheAssassin a559d1525c Don't need to ship the egl version for x86 and amd64 2019-02-07 03:12:18 +01:00
TheAssassin 31f8509d4b Fix tests mk. 2 2019-02-07 02:33:49 +01:00
TheAssassin 2765eaf2f2 Fix tests 2019-02-07 01:46:30 +01:00
TheAssassin a071ef73e6 Fix package name 2019-02-07 01:32:35 +01:00
TheAssassin 7c1c92bd76 Need an additional package now 2019-02-07 01:27:45 +01:00
TheAssassin b10b5b0a8c Upgrade to xenial to get wayland packages 2019-02-07 01:13:08 +01:00
TheAssassin ab4eeb7ca4 May not use return outside bash functions 2019-02-07 01:00:49 +01:00
TheAssassin 5711608a60 UI deployments require wayland libraries now 2019-02-07 00:59:19 +01:00
TheAssassin c76a08c7a9 Update linuxdeploy 2019-02-07 00:47:57 +01:00
TheAssassin 7e4375f51f Allow for disabling copyright files deployment
Useful for debugging linuxdeploy and its plugins.
2019-02-06 23:30:19 +01:00
TheAssassin 661d8320ef Add experimental wayland integration support 2019-02-06 23:29:48 +01:00
TheAssassin feb31f123a Update linuxdeploy 2019-02-06 23:27:59 +01:00
TheAssassin dbd655b174 Refactor and improve integration plugins deployment 2019-02-06 23:27:45 +01:00
TheAssassin d80619ab74 Update linuxdeploy 2019-02-06 22:15:19 +01:00
TheAssassin 63e12a480e Update linuxdeploy 2018-11-28 23:14:10 +01:00
TheAssassin 45c1b6bac7 Fix PR filter 2018-11-11 17:28:56 +01:00
TheAssassin 6c823f8f07 Merge pull request #18 from linuxdeploy/fix_translation_deployment
Copy application translation files (.qm) into the usr/translations dir.
2018-11-06 13:01:41 +01:00
Alexis Lopez Zubieta 4d2507b43d Rename path_contains_file to pathContainsFile 2018-11-05 17:08:55 -06:00
Alexis Lopez Zubieta da8aedb50e Link translations files in usr/translation instead of coping 2018-11-05 17:05:55 -06:00
Alexis Lopez Zubieta 23160ae81e Update linuxdeploy version and protect against multiple inclusions of gtest 2018-11-05 17:02:25 -06:00
Alexis Lopez Zubieta 86cc5c6fdc Copy application translation files (.qm) into the usr/translations dir. 2018-11-03 09:36:26 -06:00
TheAssassin 61be02f796 Improve Travis uploading 2018-10-21 16:55:44 +02:00
TheAssassin fc18e9b04b Update README.md
[ci skip]
2018-10-16 00:10:52 +02:00
TheAssassin ddc63bfde7 Merge pull request #15 from linuxdeploy/add_integration_tests
Add integration tests
2018-10-13 02:25:03 +02:00
TheAssassin 0843709063 Syntax fixes 2018-10-13 02:14:16 +02:00
TheAssassin bb0b2d507e Move $ARCH check into .travis.yml 2018-10-13 02:06:53 +02:00
TheAssassin 07d10041e7 Ensure proper escaping 2018-10-13 01:54:27 +02:00
Alexis Lopez Zubieta 29db6d0a2e Add integration tests 2018-10-13 01:40:06 +02:00
TheAssassin 3a684c0e31 Document environment variables 2018-10-12 00:31:05 +02:00
TheAssassin ce371d35a6 Use semicolons for $EXTRA_QT_PLUGINS
Harmonizing the CSV separators across all plugins.
2018-10-11 04:14:01 +02:00
TheAssassin 7df31383c4 Embed update information 2018-10-04 15:22:53 +02:00
TheAssassin 6c868bd275 Update .travis.yml 2018-09-16 04:24:04 +02:00
TheAssassin 8d63f7fdc2 Rename build-appimage.sh to build.sh 2018-09-16 04:23:41 +02:00
TheAssassin a552be888a $EXTRA_QT_PLUGINS
Fixes #14.
2018-09-10 04:00:18 +02:00
TheAssassin f915e73fda Update linuxdeploy 2018-09-05 17:28:32 +02:00
TheAssassin 47e4e51e80 Add missing dependency 2018-09-04 16:04:27 +02:00
TheAssassin 91ac3967fe Fix linuxdeploy parameters 2018-09-04 14:38:56 +02:00
TheAssassin 609fac17c9 Add more information on usage to README 2018-08-30 17:20:33 +02:00
TheAssassin fa377a24e4 Fix environment variable handling
My bad, sorry @azubieta.
2018-08-12 15:03:56 +02:00
TheAssassin a04d3d7285 Merge pull request #11 from linuxdeploy/fix_qtwebengine_deployment
Fix qtwebengine deployment
2018-08-11 19:06:10 +02:00
Alexis Lopez Zubieta ec8c00ff8a Don't change Qt data dir. It causes that QtWebEngine resources could not be found at runtime. 2018-08-11 18:55:30 +02:00
Alexis Lopez Zubieta 5bb3edbdc1 Change "qtwebengine_locales" deployment path to "usr/translations". 2018-08-11 16:32:06 +02:00
TheAssassin 8e70d7ad8e Remove deprecated commands
CC #10.
2018-08-09 19:46:43 +02:00
TheAssassin 1554811914 Downgrade nlohmann/json
Fixes #10.
2018-08-09 19:42:36 +02:00
TheAssassin 53933d37f9 Merge pull request #9 from linuxdeploy/add_data_fild_to_qt.conf
Add Data field to the qt.conf file
2018-08-04 22:11:28 +02:00
Alexis Lopez Zubieta dc6d393a02 Add Data field to the qt.conf file 2018-08-04 14:14:05 -05:00
TheAssassin 9ad2349692 Merge pull request #6 from linuxdeploy/qml_support
QML support
2018-08-03 23:17:37 +02:00
TheAssassin 7bcab32e4e Fix namespace 2018-08-03 23:09:29 +02:00
Alexis Lopez Zubieta 3b2dfc69c4 Using lowercase at tests namespace 2018-08-03 15:54:26 -05:00
Alexis Lopez Zubieta 13d7198632 Removing LINUXDEPLOY_QT_PLUGIN prefix from the configuration environment variables. 2018-08-03 15:53:58 -05:00
Alexis Lopez Zubieta 5d91fcfc25 Adding new line at the end of the file. 2018-08-03 15:53:06 -05:00
Alexis Lopez Zubieta 35de78dfcd Add clean up function 2018-08-03 15:04:16 -05:00
Alexis Lopez Zubieta 64c8aa9de3 Copy QML module dirs recursively. 2018-08-03 15:04:16 -05:00
Alexis Lopez Zubieta c92f941510 Create web engine directory recursively 2018-08-03 15:04:16 -05:00
TheAssassin dc8343f7ff Fix build script 2018-08-03 15:04:07 -05:00
Alexis Lopez Zubieta 7c0c68a328 Replace communicate implementation. It has a buffer overflow error. 2018-08-03 15:02:54 -05:00
TheAssassin d042cb9eca Throw exception if command fails
Also fixes code style
2018-08-03 15:02:54 -05:00
Alexis Lopez Zubieta ef04002eb1 Fix QmlSourcesPath loggin 2018-08-03 15:02:54 -05:00
TheAssassin 3be36ef3a1 Code style 2018-08-03 01:34:34 +02:00
TheAssassin a4bd2ec513 Remove useless exception 2018-08-03 01:34:34 +02:00
TheAssassin d89489860c Revert to scanning entire AppDir for QML imports 2018-08-03 01:34:34 +02:00
TheAssassin 0ba98fa90d Improve code style 2018-08-03 01:34:34 +02:00
TheAssassin c95d08e721 Fix QML deployment 2018-08-03 01:34:34 +02:00
TheAssassin e3dbb0ae82 Fix environment variable handling 2018-08-03 01:34:14 +02:00
TheAssassin a4373918ef Merge branch 'master' into qml_support 2018-08-03 01:04:05 +02:00
TheAssassin 2515f881b9 Update linuxdeploy 2018-08-03 00:57:17 +02:00
TheAssassin 7682a1ccac Code style 2018-08-03 00:32:24 +02:00
TheAssassin b008e2babf Make sure directory exists before creating files 2018-08-02 23:47:06 +02:00
TheAssassin 9c813b053b Fix webengine qt.conf path 2018-08-02 23:47:05 +02:00
TheAssassin dba0926573 Debug qt.conf creation for webengine plugins
Error message: "Failed to open qt.conf for writing"
strace shows it's trying to write in the system Qt directory.
2018-08-02 23:47:04 +02:00
TheAssassin 1ce2732d7b Update linuxdeploy 2018-07-31 16:22:50 +02:00
Alexis Lopez Zubieta 8eb75ddfa2 Add LINUXDEPLOY_QT_PLUGIN_QML_SOURCES_PATHS environment var to allow the specification of aditional qml sources paths. 2018-07-25 13:52:56 -05:00
Alexis Lopez Zubieta 165eedabf9 Set THREADS_PTHREAD_ARG. 2018-07-24 17:11:01 -05:00
Alexis Lopez Zubieta 3574353f17 Intall only multilib versions of gcc and g++ in the i386 build. 2018-07-24 16:42:04 -05:00
Alexis Lopez Zubieta be6ebffb38 Also set gcc-4.9 as default gcc command. 2018-07-24 16:32:38 -05:00
Alexis Lopez Zubieta 287979bd3f Use gcc-4.9 and add multilib for croscompiling to i386. 2018-07-24 16:20:44 -05:00
Alexis Lopez Zubieta 42b32ca700 Moving gcc-6 and g++-6 install commands inside the matrix settings. 2018-07-24 15:45:47 -05:00
Alexis Lopez Zubieta 1dda95ed8b Change default g++ to g++-6 using update-alternatives. 2018-07-24 15:33:53 -05:00
Alexis Lopez Zubieta db49896947 Use travis apt addon and ubuntu-toolchain-r-test ppa 2018-07-24 15:26:55 -05:00
Alexis Lopez Zubieta 399533f54f It seems that g++-7 is not available in trusty, use g++-6 instead. 2018-07-24 15:13:47 -05:00
Alexis Lopez Zubieta d41118511f Use g++-7 in travis. 2018-07-24 15:08:20 -05:00
Alexis Lopez Zubieta 47862363f3 Resolve Qml Module Import relative path if the qmlimportscanner didn't do it. 2018-07-18 20:40:49 -05:00
Alexis Lopez Zubieta 5bc11acdb8 Use mkdtmp to create the temporay AppDir. 2018-07-18 18:30:18 -05:00
Alexis Lopez Zubieta b7124b7ab1 Make tmp AppDir in a random path. 2018-07-18 18:07:26 -05:00
TheAssassin b5094b23e4 Code style and structure improvements 2018-07-19 00:44:21 +02:00
TheAssassin b681855daa Update linuxdeploy 2018-07-18 22:12:58 +02:00
Alexis Lopez Zubieta 2d356f555a Integrate delpoy qml into linuxdeploy-plugin-qt main. 2018-07-18 13:32:43 -05:00
Alexis Lopez Zubieta e6f2a2343f Implement copy qml modules. 2018-07-18 12:48:55 -05:00
Alexis Lopez Zubieta 183f1d1a46 Implement 'Get QML Imports' related functions. 2018-07-18 00:11:07 -05:00
Alexis Lopez Zubieta 8385f25973 Add GTest 2018-07-17 18:19:16 -05:00
TheAssassin db0089036d Use patchelf v0.8
Seems like 0.10 breaks Qt libraries which expect a symbol called
qt_version_tag in a specific section in the symbols. Patchelf breaks
this by apparently moving the symbols to another section
(section 15 vs. 13).
We found out by looking into the readelf outputs of libQt5Core.so.5.
@azubieta spotted the different numbers, and looked up their meaning.

linuxdeployqt uses the patchelf binaries Debian jessie provides, which
is 0.8. Therefore we try to build that version from source instead,
hoping that this version won't break libraries.

If that doesn't work either, we'll try with the pre-built binaries.
2018-07-13 01:01:53 +02:00
TheAssassin 25c814eedf Fix LD_LIBRARY_PATH handling 2018-07-12 23:10:39 +02:00
TheAssassin 965cb1ce80 Update linuxdeploy 2018-07-12 21:10:19 +02:00
TheAssassin 6cb90eb371 Fix build issues 2018-07-07 05:38:31 +02:00
TheAssassin 8bfe677a58 Update linuxdeploy 2018-07-07 05:35:23 +02:00
TheAssassin fe6a24c4ed Revert "Install missing build dependency"
This reverts commit 67795b1fe6.
2018-07-07 05:35:10 +02:00
TheAssassin 67795b1fe6 Install missing build dependency 2018-07-07 05:32:15 +02:00
TheAssassin 96e7db96b5 Fix installation requirements for 32-bit build 2018-07-07 05:28:22 +02:00
TheAssassin 52c79b2ccd Install missing i386 build requirement 2018-07-07 05:23:57 +02:00
TheAssassin 25dfa8edcb Install multilib compilers 2018-07-07 05:20:28 +02:00
TheAssassin 9f662b0c26 Build patchelf for correct target architecture 2018-07-07 05:19:44 +02:00
TheAssassin 0873a95243 Add missing toolchain file 2018-07-07 05:15:47 +02:00
TheAssassin b04df41150 Build i386 AppImages 2018-07-07 05:12:21 +02:00
TheAssassin 6ca58c0f68 trusty's Qt doesn't provide xcbglintegrations 2018-07-07 04:54:07 +02:00
TheAssassin d8c79f24dc Allow user to specify custom qmake
Works by setting the $QMAKE environment variable.
2018-07-07 00:46:15 +02:00
TheAssassin a788ae4946 Add more information to README 2018-07-07 00:46:02 +02:00
TheAssassin 4fa4b1c1bd Update linuxdeploy 2018-06-29 02:50:40 +02:00
TheAssassin af0595201b Fix dependency search 2018-06-28 21:49:22 +02:00
TheAssassin 4f6fe7f937 Show which libraries are considered by the dependency search 2018-06-28 21:49:06 +02:00
TheAssassin 52c10cbf67 Make log output more readable 2018-06-28 15:40:18 +02:00
TheAssassin 276cfae702 Update linuxdeploy 2018-06-28 14:57:14 +02:00
TheAssassin e8628d31a4 Update linuxdeploy 2018-06-28 02:51:18 +02:00
TheAssassin e90769bc2e Bundle strip 2018-06-28 02:43:59 +02:00
TheAssassin f997512ad1 Strip deployed libraries 2018-06-28 01:37:38 +02:00
TheAssassin 93e3491f1b Fix build deps 2018-06-26 04:21:39 +02:00
TheAssassin c31dea600c Update linuxdeploy 2018-06-26 04:17:48 +02:00
TheAssassin eb6f0118b0 Create qt.conf in libexec directory
linuxdeployqt does it, too, so we should, too.
2018-06-26 03:40:40 +02:00
55 changed files with 12068 additions and 442 deletions
+3
View File
@@ -1,3 +1,6 @@
[submodule "lib/linuxdeploy"] [submodule "lib/linuxdeploy"]
path = lib/linuxdeploy path = lib/linuxdeploy
url = https://github.com/TheAssassin/linuxdeploy url = https://github.com/TheAssassin/linuxdeploy
[submodule "lib/googletest"]
path = lib/googletest
url = https://github.com/google/googletest.git
+44 -13
View File
@@ -1,33 +1,64 @@
language: cpp language: cpp
sudo: required sudo: required
dist: xenial
addons: matrix:
apt: include:
update: true - env: ARCH=x86_64
packages: addons:
- libmagic-dev apt:
- libmagick++-dev update: true
- libboost-regex1.55-dev sources:
- libboost-filesystem1.55-dev - sourceline: 'ppa:beineri/opt-qt-5.12.3-xenial'
- automake # required for patchelf packages:
- libmagic-dev
- libjpeg-dev
- libpng-dev
- cimg-dev
- automake # required for patchelf
- gcc
- g++
# Packages below are only required by the test srcipt
- qt512-meta-minimal
- qt512declarative
- qt512webengine
- mesa-common-dev
- libgl1-mesa-dev # <-- that's for xenial to provide the x86_64-linux-gnu/libGL.so symlink
- # libglvnd-dev # <-- that's for bionic to provide aforementioned symlink
- env: ARCH=i386
addons:
apt:
update: true
packages:
- libmagic-dev:i386
- libjpeg-dev:i386
- libpng-dev:i386
- automake # required for patchelf
- libfuse2:i386
- libcairo2:i386
- gcc-multilib
- g++-multilib
install: install:
- git clone https://github.com/NixOS/patchelf.git - git clone https://github.com/NixOS/patchelf.git -b 0.8
- cd patchelf - cd patchelf
- ./bootstrap.sh - ./bootstrap.sh
- ./configure --prefix=/usr - if [ "$ARCH" == "i386" ]; then export EXTRA_CONFIGURE_ARGS=("--build=i686-pc-linux-gnu" "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"); fi
- ./configure --prefix=/usr "${EXTRA_CONFIGURE_ARGS[@]}"
- make -j$(nproc) - make -j$(nproc)
- sudo make install - sudo make install
- cd .. - cd ..
- rm -rf patchelf - rm -rf patchelf
script: script:
- bash -xe travis/build-appimage.sh - bash -xe travis/build.sh
# TODO: allow for cross-compiling the test projects and install i386 packages for build dependencies, then remove $ARCH check
- if [ "$ARCH" == "x86_64" ]; then bash -xe travis/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage; fi
after_success: after_success:
- ls -lh - ls -lh
# make sure only pushes to rewrite create a new release, otherwise pretend PR and upload to transfer.sh # make sure only pushes to rewrite create a new release, otherwise pretend PR and upload to transfer.sh
- if [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi - if [ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- bash upload.sh linuxdeploy*.AppImage* - bash upload.sh linuxdeploy*.AppImage*
+6
View File
@@ -1,8 +1,14 @@
cmake_minimum_required(VERSION 3.6) cmake_minimum_required(VERSION 3.6)
project(linuxdeploy-plugin-qt) project(linuxdeploy-plugin-qt)
include(CTest)
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_subdirectory(lib) add_subdirectory(lib)
add_subdirectory(src) add_subdirectory(src)
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
+59 -1
View File
@@ -2,4 +2,62 @@
Plugin for linuxdeploy to bundle Qt dependencies of applications and libraries. Plugin for linuxdeploy to bundle Qt dependencies of applications and libraries.
***More information will follow soon!***
## About
linuxdeploy is a tool to create and maintain AppDirs, which can be turned into application bundles like AppImages.
linuxdeploy-plugin-qt is a bundling plugin for linuxdeploy. If an application uses Qt, linuxdeploy-plugin-qt will bundle all the Qt plugins and resources such as QML files or translations.
As linuxdeploy plugins are standalone applications, this software can also be run standalone. However, usage as a plugin from linuxdeploy is highly encouraged.
## Usage
As all linuxdeploy plugins, linuxdeploy-plugin-qt is a standalone tool implementing the so-called [Plugin Specification](https://github.com/linuxdeploy/linuxdeploy/wiki/Plugin-system). Therefore, there's two ways of using it: in "plugin mode" (i.e., together with linuxdeploy), or "standalone mode" (i.e., calling it directly).
The most widely and also recommended method is to use it together with linuxdeploy.
### Plugin mode
Just download the plugin's official AppImage, and put it next to linuxdeploy's AppImage (alternatively, put it into one of the other [search locations](https://github.com/linuxdeploy/linuxdeploy/wiki/Plugin-system#plugin-discovery)). Make sure the AppImage is executable, otherwise it cannot be called by linuxdeploy.
To enable the plugin, just call linuxdeploy as follows:
```bash
$ ./linuxdeploy-x86_64.AppImage --appdir AppDir [...] --plugin qt [...]
```
That's it! All you have to add is `--plugin qt`, and the plugin will be called by linuxdeploy.
**Note:** If the application doesn't use Qt, linuxdeploy-plugin-qt will return an error. That's expected behavior, as it might help discover issues when a program is expected to use Qt but suddenly does not any more.
### Standalone mode
To use linuxdeploy-plugin-standalone, download the official AppImage, make it executable and run it like:
```bash
./linuxdeploy-plugin-qt-x86_64.AppImage --appdir AppDir
```
linuxdeploy-plugin-qt will look for Qt libraries in the library directory `usr/lib/` and deploy the Qt plugins and other resources for these. This means that if linuxdeploy or another tool haven't been run on the AppDir yet, i.e., no Qt libraries have been deployed yet, linuxdeploy-plugin-qt won't be able to recognize which plugins and resources have to be deployed, and will return an error.
### Environment variables
Just like all linuxdeploy plugins, the Qt plugin's behavior can be configured some environment variables.
**General:**
- `$DEBUG=1`: enables verbose output, useful for debugging (equal to linuxdeploy's `-v0`)
- `$LD_LIBRARY_PATH=pathA:pathB`: Paths to check for library dependencies (see `man ld.so` for more information)
**Qt specific:**
- `$QMAKE=/path/to/my/qmake`: use another `qmake` binary to detect paths of plugins and other resources (usually doesn't need to be set manually, most Qt environments ship scripts changing `$PATH`)
- `$EXTRA_QT_PLUGINS=pluginA;pluginB`: Plugins to deploy even if not found automatically by linuxdeploy-plugin-qt
QML related:
- `$QML_SOURCES_PATHS`: directory containing the application's QML files -- useful/needed if QML files are "baked" into the binaries
- `$QML_MODULES_PATHS`: extra directories containing imported QML files (normally doesn't need to be specified)
+7
View File
@@ -0,0 +1,7 @@
set(CMAKE_SYSTEM_NAME Linux CACHE STRING "" FORCE)
set(CMAKE_SYSTEM_PROCESSOR i386 CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS "-m32" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-m32" CACHE STRING "" FORCE)
set(THREADS_PTHREAD_ARG "2" CACHE STRING "Forcibly set by CMakeLists.txt." FORCE)
+11
View File
@@ -1 +1,12 @@
add_subdirectory(linuxdeploy EXCLUDE_FROM_ALL) add_subdirectory(linuxdeploy EXCLUDE_FROM_ALL)
if(NOT TARGET gtest AND BUILD_TESTING)
add_subdirectory(googletest EXCLUDE_FROM_ALL)
endif()
# required to properly build nlohmann/json v. 2.0.0 on trusty
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_library(json INTERFACE)
set_property(TARGET json PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/json/include)
target_sources(json INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/json/include/json.hpp)
+1
Submodule lib/googletest added at 077ee54cef
File diff suppressed because it is too large Load Diff
+2
View File
@@ -5,3 +5,5 @@ Icon=linuxdeploy-plugin-qt
Terminal=true Terminal=true
NoDisplay=true NoDisplay=true
Type=Application Type=Application
Categories=Development;
X-AppImage-Integrate=false
+9 -2
View File
@@ -1,7 +1,14 @@
add_executable(linuxdeploy-plugin-qt main.cpp qt-modules.h) add_library(linuxdeploy-plugin-qt_util OBJECT util.cpp util.h)
target_link_libraries(linuxdeploy-plugin-qt linuxdeploy_core args) target_include_directories(linuxdeploy-plugin-qt_util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(linuxdeploy-plugin-qt_util linuxdeploy_core args)
add_executable(linuxdeploy-plugin-qt main.cpp qt-modules.h qml.cpp qml.h deployment.h)
target_link_libraries(linuxdeploy-plugin-qt linuxdeploy_core args json linuxdeploy-plugin-qt_util)
set_target_properties(linuxdeploy-plugin-qt PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") set_target_properties(linuxdeploy-plugin-qt PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
add_subdirectory(deployers)
target_link_libraries(linuxdeploy-plugin-qt deployers)
install( install(
TARGETS linuxdeploy-plugin-qt TARGETS linuxdeploy-plugin-qt
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
+33
View File
@@ -0,0 +1,33 @@
// system headers
#include <utility>
// library headers
#include <linuxdeploy/core/log.h>
// local headers
#include "BasicPluginsDeployer.h"
using namespace linuxdeploy::core::log;
using namespace linuxdeploy::core::appdir;
using namespace linuxdeploy::plugin::qt;
namespace bf = boost::filesystem;
BasicPluginsDeployer::BasicPluginsDeployer(std::string moduleName,
core::appdir::AppDir& appDir,
bf::path qtPluginsPath,
bf::path qtLibexecsPath,
bf::path installLibsPath,
bf::path qtTranslationsPath,
bf::path qtDataPath) : moduleName(std::move(moduleName)),
appDir(appDir),
qtPluginsPath(std::move(qtPluginsPath)),
qtLibexecsPath(std::move(qtLibexecsPath)),
qtInstallQmlPath(std::move(installLibsPath)),
qtTranslationsPath(std::move(qtTranslationsPath)),
qtDataPath(std::move(qtDataPath)) {}
bool BasicPluginsDeployer::deploy() {
// currently this is a no-op, but we might add more functionality later on, such as some kinds of default
// attempts to copy data based on the moduleName
return true;
}
+55
View File
@@ -0,0 +1,55 @@
#pragma once
// system headers
#include <memory>
// library headers
#include <linuxdeploy/core/appdir.h>
// local headers
#include "PluginsDeployer.h"
namespace linuxdeploy {
namespace plugin {
namespace qt {
/**
*
*/
class BasicPluginsDeployer : public PluginsDeployer {
protected:
std::string moduleName;
core::appdir::AppDir& appDir;
// Qt data
const boost::filesystem::path qtPluginsPath;
const boost::filesystem::path qtLibexecsPath;
const boost::filesystem::path qtInstallQmlPath;
const boost::filesystem::path qtTranslationsPath;
const boost::filesystem::path qtDataPath;
public:
/**
* Default constructor. Constructs a basic deployer for a plugin with the given name.
*
* @param moduleName
*/
explicit BasicPluginsDeployer(std::string moduleName, core::appdir::AppDir& appDir,
boost::filesystem::path qtPluginsPath,
boost::filesystem::path qtLibexecsPath,
boost::filesystem::path installLibsPath,
boost::filesystem::path qtTranslationsPath,
boost::filesystem::path qtDataPath);
/**
* Default destroyer is good enough for this class for now, but in case we need to change this we declare a virtual
* one.
*/
virtual ~BasicPluginsDeployer() = default;
public:
bool deploy() override;
};
}
}
}
+26
View File
@@ -0,0 +1,26 @@
// library headers
#include <linuxdeploy/core/log.h>
#include <boost/filesystem.hpp>
// local headers
#include "BearerPluginsDeployer.h"
using namespace linuxdeploy::plugin::qt;
using namespace linuxdeploy::core::log;
namespace bf = boost::filesystem;
bool BearerPluginsDeployer::deploy() {
// calling the default code is optional, but it won't hurt for now
if (!BasicPluginsDeployer::deploy())
return false;
ldLog() << "Deploying bearer plugins" << std::endl;
for (bf::directory_iterator i(qtPluginsPath / "bearer"); i != bf::directory_iterator(); ++i) {
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/bearer/"))
return false;
}
return true;
}
+17
View File
@@ -0,0 +1,17 @@
#pragma once
#include "BasicPluginsDeployer.h"
namespace linuxdeploy {
namespace plugin {
namespace qt {
class BearerPluginsDeployer : public BasicPluginsDeployer {
public:
// we can just use the base class's constructor
using BasicPluginsDeployer::BasicPluginsDeployer;
bool deploy() override;
};
}
}
}
+28
View File
@@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.1)
set(CLASSES
PluginsDeployer
PluginsDeployerFactory
BasicPluginsDeployer
PlatformPluginsDeployer
XcbglIntegrationPluginsDeployer
BearerPluginsDeployer
SvgPluginsDeployer
SqlPluginsDeployer
PositioningPluginsDeployer
MultimediaPluginsDeployer
WebEnginePluginsDeployer
QmlPluginsDeployer
Qt3DPluginsDeployer
GamepadPluginsDeployer
)
add_library(deployers OBJECT)
target_link_libraries(deployers PUBLIC linuxdeploy_core linuxdeploy-plugin-qt_util)
foreach(class ${CLASSES})
target_sources(deployers PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/${class}.h)
target_sources(deployers PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/${class}.cpp)
endforeach()
+26
View File
@@ -0,0 +1,26 @@
// library headers
#include <linuxdeploy/core/log.h>
#include <boost/filesystem.hpp>
// local headers
#include "GamepadPluginsDeployer.h"
using namespace linuxdeploy::plugin::qt;
using namespace linuxdeploy::core::log;
namespace bf = boost::filesystem;
bool GamepadPluginsDeployer::deploy() {
// calling the default code is optional, but it won't hurt for now
if (!BasicPluginsDeployer::deploy())
return false;
ldLog() << "Deploying Gamepad plugins" << std::endl;
for (bf::directory_iterator i(qtPluginsPath / "gamepads"); i != bf::directory_iterator(); ++i) {
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/gamepads/"))
return false;
}
return true;
}
+17
View File
@@ -0,0 +1,17 @@
#pragma once
#include "BasicPluginsDeployer.h"
namespace linuxdeploy {
namespace plugin {
namespace qt {
class GamepadPluginsDeployer : public BasicPluginsDeployer {
public:
// we can just use the base class's constructor
using BasicPluginsDeployer::BasicPluginsDeployer;
bool deploy() override;
};
}
}
}
@@ -0,0 +1,33 @@
// library headers
#include <linuxdeploy/core/log.h>
#include <boost/filesystem.hpp>
// local headers
#include "MultimediaPluginsDeployer.h"
using namespace linuxdeploy::plugin::qt;
using namespace linuxdeploy::core::log;
namespace bf = boost::filesystem;
bool MultimediaPluginsDeployer::deploy() {
// calling the default code is optional, but it won't hurt for now
if (!BasicPluginsDeployer::deploy())
return false;
ldLog() << "Deploying mediaservice plugins" << std::endl;
for (bf::directory_iterator i(qtPluginsPath / "mediaservice"); i != bf::directory_iterator(); ++i) {
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/mediaservice/"))
return false;
}
ldLog() << "Deploying audio plugins" << std::endl;
for (bf::directory_iterator i(qtPluginsPath / "audio"); i != bf::directory_iterator(); ++i) {
if (!appDir.deployLibrary(*i, appDir.path() / "usr/plugins/audio/"))
return false;
}
return true;
}
+17
View File
@@ -0,0 +1,17 @@
#pragma once
#include "BasicPluginsDeployer.h"
namespace linuxdeploy {
namespace plugin {
namespace qt {
class MultimediaPluginsDeployer : public BasicPluginsDeployer {
public:
// we can just use the base class's constructor
using BasicPluginsDeployer::BasicPluginsDeployer;
bool deploy() override;
};
}
}
}

Some files were not shown because too many files have changed in this diff Show More