Giter VIP home page Giter VIP logo

Comments (19)

probonopd avatar probonopd commented on May 19, 2024 1
sudo apt-get update
sudo apt install gitbuild-essential qmlscene libgl1-mesa-dev
cd cool-retro-term
git clone --recursive https://github.com/Swordfish90/cool-retro-term.git
cd cool-retro-term
export PATH=/tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64/bin/:$PATH
qmake
make

./cool-retro-term 
# This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

export QT_PLUGIN_PATH=/tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64/plugins/
export LD_LIBRARY_PATH=/tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64/lib/
export QTDIR=/tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64 # not needed?

./cool-retro-term QQmlApplicationEngine failed to load component
qrc:/main.qml:24 module "QtGraphicalEffects" is not installed
qrc:/main.qml:23 module "QtQuick.Controls" is not installed
qrc:/main.qml:22 module "QtQuick.Window" is not installed
qrc:/main.qml:21 module "QtQuick" is not installed
qrc:/main.qml:24 module "QtGraphicalEffects" is not installed
qrc:/main.qml:23 module "QtQuick.Controls" is not installed
qrc:/main.qml:22 module "QtQuick.Window" is not installed
qrc:/main.qml:21 module "QtQuick" is not installed
qrc:/main.qml:24 module "QtGraphicalEffects" is not installed
qrc:/main.qml:23 module "QtQuick.Controls" is not installed
qrc:/main.qml:22 module "QtQuick.Window" is not installed
qrc:/main.qml:21 module "QtQuick" is not installed
qrc:/main.qml:24 module "QtGraphicalEffects" is not installed
qrc:/main.qml:23 module "QtQuick.Controls" is not installed
qrc:/main.qml:22 module "QtQuick.Window" is not installed
qrc:/main.qml:21 module "QtQuick" is not installed

# When I do

export QML2_IMPORT_PATH=/tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64/qml/

# then it runs.

Looks like the code to bundle QML is there but /home/me/build-linuxdeployqt-Desktop_Qt_5_7_0_GCC_64bit-Debug/linuxdeployqt/linuxdeployqt /home/me/cool-retro-term/cool-retro-term -qmldir=/home/me/cool-retro-term/qml -verbose=3 must be used.

When doing this, then some of the QML plugins do get copied to qml/ but the bundled app still complains:

QQmlApplicationEngine failed to load component
qrc:/main.qml:24 module "QtGraphicalEffects" is not installed

Cannot load QML interface

Copying in all the files under 5.7/gcc_64/qml/QtGraphicalEffects solves this, then we get

QQmlApplicationEngine failed to load component
qrc:/main.qml:132 Type ApplicationSettings unavailable
qrc:/ApplicationSettings.qml:26 Type Storage unavailable
qrc:/Storage.qml:22 module "QtQuick.LocalStorage" is not installed

Cannot load QML interface

Deploying 5.7/gcc_64/qml/QtQuick/LocalStorage would solve this.

When I copy in the missing parts manually, then the lack of running patchelf makes it not work (tries to load Qt components from system Qt in /sur/lib which obviously fails). However, when I run linuxdeployqt a second time, it does the patching.

So it is possible to bundle cool-retro-term with some manual tweaking, but linuxdeployqt still needs to be worked on, so that no manual intervention will be necessary.

from linuxdeployqt.

userappgate avatar userappgate commented on May 19, 2024

it errors out, about the lack of that binary. I don't know if it should actually be included in the appimage but isn't.

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

Can you provide a link to the application that you are trying to bundle?

from linuxdeployqt.

userappgate avatar userappgate commented on May 19, 2024

https://github.com/Swordfish90/cool-retro-term

This. I compiled it locally and it works fine.

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

Working with some manual steps:

sudo apt-get update
sudo apt install gitbuild-essential qmlscene libgl1-mesa-dev
git clone --recursive https://github.com/Swordfish90/cool-retro-term.git
cd cool-retro-term
export PATH=/tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64/bin/:$PATH
qmake
make
cd ..
wget https://transfer.sh/tlUbT/linuxdeployqt.appimage
chmod a+x linuxdeployqt.appimage
./linuxdeployqt.appimage /home/me/cool-retro-term/cool-retro-term -qmldir=/home/me/cool-retro-term/qmltermwidget/

# Work around https://github.com/probonopd/linuxdeployqt/issues/25
cp -r /tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64/qml/QtQuick/Dialogs cool-retro-term/qml/QtQuick/
cp -r /tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64/qml/QtQuick/PrivateWidgets cool-retro-term/qml/QtQuick/
cp -r /tmp/.mount_QtCreator-5.7.0-x86_64/5.7/gcc_64/qml/QtQuick/LocalStorage cool-retro-term/qml/QtQuick/

# Run again so that the manually copied in libraries get their rpath set
./linuxdeployqt.appimage /home/me/cool-retro-term/cool-retro-term -qmldir=/home/me/cool-retro-term/qmltermwidget/

cool-retro-term/cool-retro-term # runs!

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

So the remaining question is:

Why doesn't it deploy

  • QtQuick/Dialogs
  • QtQuick/PrivateWidgets
  • QtQuick/LocalStorage

automatically?

from linuxdeployqt.

userappgate avatar userappgate commented on May 19, 2024

It could be because AFAIK QML is run dynamically, so probably the files are loaded at runtime and paths do not appear in the binary?

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

We might have inherited this issue:
https://bugreports.qt.io/browse/QTBUG-45977

from linuxdeployqt.

Larpon avatar Larpon commented on May 19, 2024

The only "fix" I've been able to come up with in my python version was to let the user specify the dynamically loaded QML imports in the arguments like this:
--qml-import "QtMultimedia 5.0" --qml-import "QtQuick.Dialogs 1.2"

Then write a temporary dummy .qml file using those imports and run qmlimportscanner on that. Not beautiful but it works.

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

80aca76 Fix bundling of QtQuick/PrivateWidgets.
Still have to run linuxdeployqt twice so that it finds all Sql libs. Why?
Otherwise, works. No more manual copying needed.

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

Also in https://github.com/probonopd/xdgurl-1/blob/patch-1/.travis.yml, https://travis-ci.org/probonopd/xdgurl-1/builds/171791783

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

Still need to run twice, 4b2c81f

Revert this once running twice is no longer needed.

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

QtQuick.Layouts gets deployed now, but QtQuick.Controls doesn't. Why? What can we do to have it deployed automatically?

Would we have to parse all qml files for statements like

import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0

and deploy these? How do macedployqt and windeployqt solve this? Is this what qmlimportscanner is supposed to do?

from linuxdeployqt.

Larpon avatar Larpon commented on May 19, 2024

Are you relying on qmlimportscanner?
Some of the guys at QtMob says it's got a bad habit of not finding things. I was recommended to have a dummy file, e.g. imports.qml in the project root directory with all (or troublesome) imports in it. So until it's fixed you might want to roll your own import scanner? :-/

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

Yes I am using qmlimportscanner, but perhaps I am running it with the wrong arguments?

from linuxdeployqt.

Larpon avatar Larpon commented on May 19, 2024

It never hurts to double check - just wanted to note that it's known to be inconsistent in it's import discoveries (some runs work - some runs don't) - I've experienced it several times now with the version from 5.6.x

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

See #78 (comment) for my current suspicion

from linuxdeployqt.

TheAssassin avatar TheAssassin commented on May 19, 2024

I guess the algorithm checking for libraries should just be implemented like here: https://github.com/Genymobile/copydeps

They just create a dependency tree (a real tree structure, see the graphics), then traverse the graph, and have the list of libraries to bundle. That shouldn't be too hard to implement on our side, too.

I'd love to be able to generate such graphs with linuxdeployqt, too.

from linuxdeployqt.

probonopd avatar probonopd commented on May 19, 2024

PR welcome! 👍 💯

from linuxdeployqt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.