From 445cd67b7d6f83ee3ee5eba64fb20cd16753517a Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 29 Nov 2016 20:50:33 +0100 Subject: [PATCH 01/20] appimagetool instead of AppImageAssistant Closes #50 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b571fb1..516f04d 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,12 @@ tar xf patchelf-0.9.tar.bz2 ( cd patchelf-0.9/ && ./configure && make && sudo make install ) ``` -* Optional if you want to generate AppImages: Download [AppImageAssistant](https://github.com/probonopd/AppImageKit/releases) and put it into your $PATH, e.g., into `/usr/local/bin`. Make sure it is renamed to `AppImageAssistant` and is `chmod a+x` +* Optional if you want to generate AppImages: Download [appimagetool](https://github.com/probonopd/AppImageKit/releases) and put it into your $PATH, e.g., into `/usr/local/bin`. Make sure it is renamed to `appimagetool` and is `chmod a+x` ``` -wget https://github.com/probonopd/AppImageKit/releases/download/6/AppImageAssistant_6-x86_64.AppImage -O AppImageAssistant -chmod a+x AppImageAssistant -sudo mv AppImageAssistant /usr/local/bin/ +wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool +chmod a+x appimagetool +sudo mv appimagetool /usr/local/bin/ ``` ## Usage From db6f23ebf1897afd3f8aebd545bd701d019a80c7 Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 29 Nov 2016 21:13:50 +0100 Subject: [PATCH 02/20] opentodolist [ci skip] --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 516f04d..9fcd25a 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,10 @@ These projects are already using [Travis CI](http://travis-ci.org/) and linuxdep - https://github.com/chkmue/qttravisCI_1 - https://github.com/eteran/edb-debugger +This project on GitLab uses linuxdeployqt: + +- https://gitlab.com/rpdev/opentodolist + These can be bundled successfully using linuxdeployqt: - https://github.com/eteran/edb-debugger/pull/458 From 5c15c458638c3a8bea1e6c851d7f8a1a544522da Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 30 Nov 2016 22:48:11 +0100 Subject: [PATCH 03/20] make -j2 for Travis CI [ci skip] --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 22e23ad..23a7c53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_install: - tar xf patchelf-0.9.tar.bz2 - cd patchelf-*/ - ./configure - - make -j7 + - make -j2 - sudo make install - cd - - ID=$(wget -q https://api.travis-ci.org/repos/probonopd/appimagetool/builds -O - | head -n 1 | sed -e 's|}|\n|g' | grep '"result":0' | head -n 1 | sed -e 's|,|\n|g' | grep '"id"' | cut -d ":" -f 2) From 6ae2091eb2714cad7f4e2a9c46c33bb494be7a3e Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 4 Dec 2016 11:24:17 +0100 Subject: [PATCH 04/20] Use continuous build of linuxdeployqt and upload to GitHub Releases --- .travis.yml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 23a7c53..0e6ab08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,17 +7,14 @@ os: linux before_install: - sudo add-apt-repository --yes ppa:beineri/opt-qt57-trusty - sudo apt-get update -qq - - wget https://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.bz2 - - tar xf patchelf-0.9.tar.bz2 - - cd patchelf-*/ + - git clone https://github.com/NixOS/patchelf.git + - cd patchelf + - bash ./bootstrap.sh - ./configure - - make -j2 + - make -j7 - sudo make install - cd - - - ID=$(wget -q https://api.travis-ci.org/repos/probonopd/appimagetool/builds -O - | head -n 1 | sed -e 's|}|\n|g' | grep '"result":0' | head -n 1 | sed -e 's|,|\n|g' | grep '"id"' | cut -d ":" -f 2) - - URL=$(wget -q "http://archive.travis-ci.org/jobs/$((ID+1))/log.txt" -O - | grep -o "https://transfer.sh/.*/appimagetool" | tail -n 1 | sed -e 's|\r||g') - - if [ -z "$URL" ] ; then URL=$(wget -q "http://archive.travis-ci.org/jobs/$((ID+2))/log.txt" -O - | grep -o "https://transfer.sh/.*/appimagetool" | tail -n 1 | sed -e 's|\r||g') ; fi - - sudo wget -c "$URL" -O /usr/local/bin/appimagetool + - sudo wget -c "https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" -O /usr/local/bin/appimagetool - sudo chmod a+x /usr/local/bin/appimagetool install: @@ -30,8 +27,15 @@ script: - mkdir -p linuxdeployqt.AppDir/usr/bin/ - cp /usr/local/bin/patchelf linuxdeployqt.AppDir/usr/bin/ - cp /usr/local/bin/appimagetool linuxdeployqt.AppDir/usr/bin/ - - cp ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/linuxdeployqt - - export VERSION=$(git describe --always) - - ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/linuxdeployqt -verbose=3 -appimage + - cp ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/usr/bin/linuxdeployqt + - find linuxdeployqt.AppDir/ + - export VERSION=continuous + - ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/usr/bin/linuxdeployqt -verbose=3 -appimage - ls -lh - - curl --upload-file ./linuxdeployqt-*.AppImage https://transfer.sh/linuxdeployqt-$VERSION-x86_64.appimage + - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + - bash ./upload.sh ./linuxdeployqt-*.AppImage + +branches: + except: + - # Do not build tags that we create when we upload to GitHub Releases + - /^(?i:continuous)$/ From 4951fd133b43e475d1bd64f32b9c5e265253485b Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 4 Dec 2016 11:26:45 +0100 Subject: [PATCH 05/20] Deploy imageformats --- shared/shared.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index 6578f5f..7332cb3 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -826,8 +826,9 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath if (containsHowOften(deploymentInfo.deployedLibraries, "libQt5Svg")) { pluginList.append(QStringLiteral("imageformats/") + plugin); } + } else { pluginList.append(QStringLiteral("imageformats/") + plugin); - } + } } } From f210de67cec536e5be854746d6ba99b28671603f Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 4 Dec 2016 11:47:01 +0100 Subject: [PATCH 06/20] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0e6ab08..ab5405c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,7 @@ script: - export VERSION=continuous - ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/usr/bin/linuxdeployqt -verbose=3 -appimage - ls -lh + - find *.AppDir - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh - bash ./upload.sh ./linuxdeployqt-*.AppImage From 56c778da222b035aa3ab317447b121582966630f Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 4 Dec 2016 12:49:49 +0100 Subject: [PATCH 07/20] Do not use FHS-like structure in this branch --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab5405c..4bf417c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_install: - cd patchelf - bash ./bootstrap.sh - ./configure - - make -j7 + - make -j2 - sudo make install - cd - - sudo wget -c "https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" -O /usr/local/bin/appimagetool @@ -27,10 +27,10 @@ script: - mkdir -p linuxdeployqt.AppDir/usr/bin/ - cp /usr/local/bin/patchelf linuxdeployqt.AppDir/usr/bin/ - cp /usr/local/bin/appimagetool linuxdeployqt.AppDir/usr/bin/ - - cp ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/usr/bin/linuxdeployqt - find linuxdeployqt.AppDir/ - export VERSION=continuous - - ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/usr/bin/linuxdeployqt -verbose=3 -appimage + - cp ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/linuxdeployqt + - ./linuxdeployqt/linuxdeployqt linuxdeployqt.AppDir/linuxdeployqt -verbose=3 -appimage - ls -lh - find *.AppDir - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh From b7374df1b276460222878d8ad0816a09299637ad Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 4 Dec 2016 13:32:30 +0100 Subject: [PATCH 08/20] Add PatternPaint [ci skip] --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9fcd25a..654e20f 100644 --- a/README.md +++ b/README.md @@ -93,12 +93,13 @@ These are my first steps with Qt and with C++ for that matter, and it is stil ve These projects are already using [Travis CI](http://travis-ci.org/) and linuxdeployqt to provide AppImages of their builds: -- https://github.com/probonopd/linuxdeployqt/ obviously ;-) +- https://github.com/Blinkinlabs/PatternPaint - https://github.com/fathomssen/redtimer - https://github.com/coryo/amphetype2 - https://github.com/chkmue/MyQtTravisTemplateProject - https://github.com/chkmue/qttravisCI_1 - https://github.com/eteran/edb-debugger +- https://github.com/probonopd/linuxdeployqt/ obviously ;-) This project on GitLab uses linuxdeployqt: From 97b8ba862bcfb47da1670247c231f38d6d14e840 Mon Sep 17 00:00:00 2001 From: atehxx Date: Fri, 30 Dec 2016 14:06:20 +0100 Subject: [PATCH 09/20] Update shared.cpp Fixed few paths to Web Engine resources as where they seem to be in 5.7.1 --- shared/shared.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index 7332cb3..b04162d 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -894,23 +894,23 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath sourcePath = pluginSourcePath + "/../libexec/QtWebEngineProcess"; destinationPath = pluginDestinationPath + "/../libexec/QtWebEngineProcess"; copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../libexec/qtwebengine_resources.pak"; + sourcePath = pluginSourcePath + "/../resources/qtwebengine_resources.pak"; destinationPath = pluginDestinationPath + "/../resources/qtwebengine_resources.pak"; copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../libexec/qtwebengine_devtools_resources.pak"; + sourcePath = pluginSourcePath + "/../resources/qtwebengine_devtools_resources.pak"; destinationPath = pluginDestinationPath + "/../resources/qtwebengine_devtools_resources.pak"; copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../libexec/qtwebengine_resources_100p.pak"; + sourcePath = pluginSourcePath + "/../resources/qtwebengine_resources_100p.pak"; destinationPath = pluginDestinationPath + "/../resources/qtwebengine_resources_100p.pak"; copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../libexec/qtwebengine_resources_200p.pak"; + sourcePath = pluginSourcePath + "/../resources/qtwebengine_resources_200p.pak"; destinationPath = pluginDestinationPath + "/../resources/qtwebengine_resources_200p.pak"; copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../libexec/icudtl.dat"; + sourcePath = pluginSourcePath + "/../resources/icudtl.dat"; destinationPath = pluginDestinationPath + "/../resources/icudtl.dat"; copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../libexec/qtwebengine_locales"; - destinationPath = pluginDestinationPath + "/../resources/"; + sourcePath = pluginSourcePath + "/../libexec/qtwebengine_locales"; // TODO: this is actually here ../translations/qtwebengine_locales + destinationPath = pluginDestinationPath + "/../resources/"; // TODO: find where to put it recursiveCopy(sourcePath, destinationPath); } From a8bba5c421c4c70b85f9fee5610db608eb8cf95e Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 23 Jan 2017 19:20:50 +0100 Subject: [PATCH 10/20] Qt 5.8 --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4bf417c..54fed16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ dist: trusty os: linux before_install: - - sudo add-apt-repository --yes ppa:beineri/opt-qt57-trusty + - sudo add-apt-repository --yes ppa:beineri/opt-qt58-trusty - sudo apt-get update -qq - git clone https://github.com/NixOS/patchelf.git - cd patchelf @@ -18,11 +18,11 @@ before_install: - sudo chmod a+x /usr/local/bin/appimagetool install: - - sudo apt-get -y install qt57base binutils + - sudo apt-get -y install qt58base binutils script: - - source /opt/qt57/bin/qt57-env.sh - - /opt/qt57/bin/qmake linuxdeployqt.pro + - source /opt/qt*/bin/qt*-env.sh + - /opt/qt*/bin/qmake linuxdeployqt.pro - make -j7 - mkdir -p linuxdeployqt.AppDir/usr/bin/ - cp /usr/local/bin/patchelf linuxdeployqt.AppDir/usr/bin/ From 1c72b5580f692495ee993aeed20f844b3798925a Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 29 Jan 2017 00:56:30 +0100 Subject: [PATCH 11/20] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 654e20f..861aeda 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ These projects are already using [Travis CI](http://travis-ci.org/) and linuxdep - https://github.com/chkmue/qttravisCI_1 - https://github.com/eteran/edb-debugger - https://github.com/probonopd/linuxdeployqt/ obviously ;-) +- https://github.com/bjorn/tiled/ This project on GitLab uses linuxdeployqt: From 64a285a4643a681055cc52e1e90ef313050fe088 Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 29 Jan 2017 01:01:05 +0100 Subject: [PATCH 12/20] Additional projects using linuxdeployqt [ci skip] --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 861aeda..aca6635 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,9 @@ These projects are already using [Travis CI](http://travis-ci.org/) and linuxdep - https://github.com/eteran/edb-debugger - https://github.com/probonopd/linuxdeployqt/ obviously ;-) - https://github.com/bjorn/tiled/ +- https://github.com/evpo/EncryptPad +- https://github.com/grahamrow/Muview2 +- https://github.com/freemountain/quark/ This project on GitLab uses linuxdeployqt: From d16cef0dfcaefaa9f954e83200e15af41892cfd5 Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 29 Jan 2017 01:08:15 +0100 Subject: [PATCH 13/20] Update README.md [ci skip] --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index aca6635..1abc807 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ These are my first steps with Qt and with C++ for that matter, and it is stil ve These projects are already using [Travis CI](http://travis-ci.org/) and linuxdeployqt to provide AppImages of their builds: +- Autodesk EAGLE for Linux http://www.autodesk.com/products/eagle/free-download - https://github.com/Blinkinlabs/PatternPaint - https://github.com/fathomssen/redtimer - https://github.com/coryo/amphetype2 From 15f8501c3e3a1c10c0ed04c6fddf661b4fc139ff Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 29 Jan 2017 01:09:18 +0100 Subject: [PATCH 14/20] Update README.md [ci skip] --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1abc807..61faf55 100644 --- a/README.md +++ b/README.md @@ -92,8 +92,6 @@ These are my first steps with Qt and with C++ for that matter, and it is stil ve ## Projects using linuxdeployqt These projects are already using [Travis CI](http://travis-ci.org/) and linuxdeployqt to provide AppImages of their builds: - -- Autodesk EAGLE for Linux http://www.autodesk.com/products/eagle/free-download - https://github.com/Blinkinlabs/PatternPaint - https://github.com/fathomssen/redtimer - https://github.com/coryo/amphetype2 @@ -101,6 +99,10 @@ These projects are already using [Travis CI](http://travis-ci.org/) and linuxdep - https://github.com/chkmue/qttravisCI_1 - https://github.com/eteran/edb-debugger - https://github.com/probonopd/linuxdeployqt/ obviously ;-) + + +These projects are already using linuxdeployqt: +- Autodesk EAGLE for Linux http://www.autodesk.com/products/eagle/free-download - https://github.com/bjorn/tiled/ - https://github.com/evpo/EncryptPad - https://github.com/grahamrow/Muview2 From 0d1619a91d947238dae568bb31c3decfdcc46085 Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 29 Jan 2017 09:54:31 +0100 Subject: [PATCH 15/20] Update README.md [ci skip] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 61faf55..8020dbd 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ __This may not be fully working yet.__ Use with care, run with maximum verbosity sudo apt-get -y install git g++ libgl1-mesa-dev git clone https://github.com/probonopd/linuxdeployqt.git # Then build in Qt Creator, or use -export PATH=/tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64/bin/:$PATH +export PATH=/tmp/.mount_QtCreator-*-x86_64/5.7/gcc_64/bin/:$PATH cd linuxdeployqt qmake linuxdeployqt.pro make From 92e02657d94cd00312ad7592c73578d8af1cb40f Mon Sep 17 00:00:00 2001 From: Manio Date: Mon, 30 Jan 2017 17:47:38 +0100 Subject: [PATCH 16/20] Update shared.h Add new function --- shared/shared.h | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/shared.h b/shared/shared.h index 60c0fd9..736f920 100644 --- a/shared/shared.h +++ b/shared/shared.h @@ -112,6 +112,7 @@ QString copyLibrary(const LibraryInfo &library, const QString path); DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &additionalExecutables); DeploymentInfo deployQtLibraries(QList libraries,const QString &bundlePath, const QStringList &binaryPaths, bool useLoaderPath); void createQtConf(const QString &appDirPath); +void createQtConfForQtWebEngineProcess(const QString &appDirPath); void deployPlugins(const QString &appDirPath, DeploymentInfo deploymentInfo); bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo, QStringList &qmlDirs); void changeIdentification(const QString &id, const QString &binaryPath); From 959ef98726795336f20d9e6870459727df96ac59 Mon Sep 17 00:00:00 2001 From: Manio Date: Mon, 30 Jan 2017 17:50:28 +0100 Subject: [PATCH 17/20] Update shared.cpp Final improvement to Qt WebEngine resources location --- shared/shared.cpp | 70 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 16 deletions(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index b04162d..3d77b87 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -889,28 +889,42 @@ void deployPlugins(const AppDirInfo &appDirInfo, const QString &pluginSourcePath // especially since stuff that is supposed to come from resources actually // seems to come in libexec in the upstream Qt binary distribution if (containsHowOften(deploymentInfo.deployedLibraries, "libQt5WebEngineCore")) { - QDir().mkpath(appDirInfo.path + "/resources"); - QDir().mkpath(appDirInfo.path + "/libexec"); - sourcePath = pluginSourcePath + "/../libexec/QtWebEngineProcess"; - destinationPath = pluginDestinationPath + "/../libexec/QtWebEngineProcess"; + // Find directories with needed files: + QString qtLibexecPath = qtToBeBundledInfo.value("QT_INSTALL_LIBEXECS"); + QString qtDataPath = qtToBeBundledInfo.value("QT_INSTALL_DATA"); + QString qtTranslationsPath = qtToBeBundledInfo.value("QT_INSTALL_TRANSLATIONS"); + // create destination directories: + QString dstLibexec = appDirInfo.path + "/libexec"; + QString dstResources = appDirInfo.path + "/resources"; + QString dstTranslations = appDirInfo.path + "/translations"; + QDir().mkpath(dstLibexec); + QDir().mkpath(dstResources); + QDir().mkpath(dstTranslations); + // WebEngine executable: + sourcePath = QDir::cleanPath(qtLibexecPath + "/QtWebEngineProcess"); + destinationPath = QDir::cleanPath(dstLibexec + "/QtWebEngineProcess"); copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../resources/qtwebengine_resources.pak"; - destinationPath = pluginDestinationPath + "/../resources/qtwebengine_resources.pak"; + // put qt.conf file next to browser process so it can also make use of our local Qt resources + createQtConfForQtWebEngineProcess(dstLibexec); + // Resources: + sourcePath = QDir::cleanPath(qtDataPath + "/resources/qtwebengine_resources.pak"); + destinationPath = QDir::cleanPath(dstResources + "/qtwebengine_resources.pak"); copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../resources/qtwebengine_devtools_resources.pak"; - destinationPath = pluginDestinationPath + "/../resources/qtwebengine_devtools_resources.pak"; + sourcePath = QDir::cleanPath(qtDataPath + "/resources/qtwebengine_devtools_resources.pak"); + destinationPath = QDir::cleanPath(dstResources + "/qtwebengine_devtools_resources.pak"); copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../resources/qtwebengine_resources_100p.pak"; - destinationPath = pluginDestinationPath + "/../resources/qtwebengine_resources_100p.pak"; + sourcePath = QDir::cleanPath(qtDataPath + "/resources/qtwebengine_resources_100p.pak"); + destinationPath = QDir::cleanPath(dstResources + "/qtwebengine_resources_100p.pak"); copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../resources/qtwebengine_resources_200p.pak"; - destinationPath = pluginDestinationPath + "/../resources/qtwebengine_resources_200p.pak"; + sourcePath = QDir::cleanPath(qtDataPath + "/resources/qtwebengine_resources_200p.pak"); + destinationPath = QDir::cleanPath(dstResources + "/qtwebengine_resources_200p.pak"); copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../resources/icudtl.dat"; - destinationPath = pluginDestinationPath + "/../resources/icudtl.dat"; + sourcePath = QDir::cleanPath(qtDataPath + "/resources/icudtl.dat"); + destinationPath = QDir::cleanPath(dstResources + "/icudtl.dat"); copyFilePrintStatus(sourcePath, destinationPath); - sourcePath = pluginSourcePath + "/../libexec/qtwebengine_locales"; // TODO: this is actually here ../translations/qtwebengine_locales - destinationPath = pluginDestinationPath + "/../resources/"; // TODO: find where to put it + // Translations: + sourcePath = QDir::cleanPath(qtTranslationsPath + "/qtwebengine_locales"); + destinationPath = QDir::cleanPath(dstTranslations + "/qtwebengine_locales"); recursiveCopy(sourcePath, destinationPath); } @@ -964,6 +978,30 @@ void createQtConf(const QString &appDirPath) } } +void createQtConfForQtWebEngineProcess(const QString &appDirPath) +{ + QByteArray contents = "# Generated by linuxdeployqt\n" + "# https://github.com/probonopd/linuxdeployqt/\n" + "[Paths]\n" + "Prefix = ../\n"; + QString filePath = appDirPath + "/"; + QString fileName = filePath + "qt.conf"; + + QDir().mkpath(filePath); + + QFile qtconf(fileName); + if (qtconf.exists() && !alwaysOwerwriteEnabled) { + LogWarning() << fileName << "already exists, will not overwrite."; + return; + } + + qtconf.open(QIODevice::WriteOnly); + if (qtconf.write(contents) != -1) { + LogNormal() << "Created configuration file for Qt WebEngine process:" << fileName; + LogNormal() << "This file sets the prefix option to parent directory of browser process executable"; + } +} + void deployPlugins(const QString &appDirPath, DeploymentInfo deploymentInfo) { AppDirInfo applicationBundle; From a680de5b2b07d89207a8bd46da6ce08e2a69406a Mon Sep 17 00:00:00 2001 From: Manio Date: Mon, 30 Jan 2017 18:06:57 +0100 Subject: [PATCH 18/20] Improve bundling of Qt libs Workaround for not bundling Qt libs when Qt is installed in /usr/local/Qt... --- shared/shared.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index 7332cb3..86c77b8 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -257,8 +257,8 @@ LibraryInfo parseLddLibraryLine(const QString &line, const QString &appDirPath, With the Qt provided by qt.io the libicu libraries come bundled, but that is not the case with e.g., Qt from ppas. Hence we make sure libicu is always bundled since it cannot be assumed to be on target sytems */ - - if (! trimmed.contains("libicu")) { + // Manual make of Qt deploys it to /usr/local/Qt-x.x.x so we cannot remove this path just like that, so let's allow known libs of Qt. + if (!trimmed.contains("libicu") && !trimmed.contains("lib/libQt") && !trimmed.contains("lib/libqgsttools")) { if ((trimmed.startsWith("/usr") or (trimmed.startsWith("/lib")))) { return info; } From 453fbfd163d870fb62aec28b585d14ec787bd03a Mon Sep 17 00:00:00 2001 From: "U. Bruhin" Date: Sun, 12 Feb 2017 23:09:51 +0100 Subject: [PATCH 19/20] Fix compile error when using Qt5.2 Error message: 'QJsonValue::QJsonValue(const void*)' is private --- shared/shared.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/shared.cpp b/shared/shared.cpp index a103876..dce817a 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -1109,7 +1109,7 @@ bool deployQmlImports(const QString &appDirPath, DeploymentInfo deploymentInfo, QString path = import["path"].toString(); QString type = import["type"].toString(); - if (import["name"] == "QtQuick.Controls") + if (import["name"].toString() == "QtQuick.Controls") qtQuickContolsInUse = true; LogNormal() << "Deploying QML import" << name; From ff61e8816227cb6c02be3d233180c46def5467fe Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 14 Feb 2017 22:31:38 +0100 Subject: [PATCH 20/20] Do not run strip on files that contain rpath starting with $ Workaround for https://github.com/NixOS/patchelf/issues/10? --- shared/shared.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/shared/shared.cpp b/shared/shared.cpp index dce817a..1d958f8 100644 --- a/shared/shared.cpp +++ b/shared/shared.cpp @@ -618,6 +618,36 @@ void runStrip(const QString &binaryPath) // Since we might have a symlink, we need to find its target first QString resolvedPath = QFileInfo(binaryPath).canonicalFilePath(); + LogDebug() << "Determining whether to run strip:"; + LogDebug() << " checking whether" << resolvedPath << "has an rpath set"; + LogDebug() << "patchelf" << "--print-rpath" << resolvedPath; + QProcess patchelfread; + patchelfread.start("patchelf", QStringList() << "--print-rpath" << resolvedPath); + if (!patchelfread.waitForStarted()) { + if(patchelfread.errorString().contains("execvp: No such file or directory")){ + LogError() << "Could not start patchelf."; + LogError() << "Make sure it is installed on your $PATH."; + } else { + LogError() << "Could not start patchelf. Process error is" << patchelfread.errorString(); + } + exit(1); + } + patchelfread.waitForFinished(); + + if (patchelfread.exitCode() != 0){ + LogError() << "Error reading rpath with patchelf" << QFileInfo(resolvedPath).completeBaseName() << ":" << patchelfread.readAllStandardError(); + LogError() << "Error reading rpath with patchelf" << QFileInfo(resolvedPath).completeBaseName() << ":" << patchelfread.readAllStandardOutput(); + exit(1); + } + + QString rpath = patchelfread.readAllStandardOutput(); + + if (rpath.startsWith("$")){ + LogDebug() << "Already contains rpath starting with $, hence not stripping"; + LogDebug() << patchelfread.readAllStandardOutput(); + return; + } + LogDebug() << "Using strip:"; LogDebug() << " stripping" << resolvedPath; QProcess strip;