Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. linuxdeploy: appimage is only working in local environment
Forum Updated to NodeBB v4.3 + New Features

linuxdeploy: appimage is only working in local environment

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 2 Posters 529 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    Yunus
    wrote on 10 Aug 2021, 10:14 last edited by
    #1

    Hi all,

    I have a qml project and I want to deploy it as appimage . I am using linuxdeply to achieve that and here is the documentation.

    When I followed the steps, I got an appimage at the end and it works fine in my pc without a problem. Since this is an appimage, I am also expecting this to work in my other linux PCs. But when I moved this appimage to other PCs, its not working and giving me error in the terminal as follows:

    :~/Documents/documents/appImage/QtQuickAppRef/build$ ./QtQuickApp-82a3b40-x86_64.AppImage 
    
    QQmlApplicationEngine failed to load component
    qrc:/main.qml:2 module "QtQuick.Window" is not installed
    

    Here is my .pro file to deploy:

    TEMPLATE += app
    QT += quick
    QT += qml quick
    QT += widgets
    QT += core
    CONFIG += c++11 release
    CONFIG += link_pkgconfig
    PKGCONFIG += opencv4
    
    SOURCES += src/main.cpp
    SOURCES += src/opencvimageprovider.cpp
    SOURCES += src/videostreamer.cpp
    
    HEADERS += src/opencvimageprovider.h 
    HEADERS += src/videostreamer.h
    
    RESOURCES += src/qml.qrc
    
    QML_IMPORT_PATH += /opt/Qt/5.15.2/gcc_64/qml
    QML2_IMPORT_PATH += /opt/Qt/5.15.2/gcc_64/qml
    
    QML_DESIGNER_IMPORT_PATH =
    
    
    # Default rules for deployment.
    
    unix {
        isEmpty(PREFIX) {
            PREFIX = /usr
        }
    
        target.path = $$PREFIX/bin
    
        shortcutfiles.files = resources/qtquickapp.desktop
        shortcutfiles.path = $$PREFIX/share/applications/
        data.files += resources/qtquickapp.png
        data.path = $$PREFIX/share/pixmaps/
    
        INSTALLS += shortcutfiles
        INSTALLS += data
    }
    
    INSTALLS += target
    
    DISTFILES += \
        resources/qtquickapp.desktop \
        resources/qtquickapp.png
    

    What can cause this and how can I figure out this issue, thanks all

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Aug 2021, 19:17 last edited by
      #2

      Hi,

      Based on a quick look of the project README, did you specify QML_SOURCES_PATHS ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      Y 1 Reply Last reply 11 Aug 2021, 04:54
      1
      • S SGaist
        10 Aug 2021, 19:17

        Hi,

        Based on a quick look of the project README, did you specify QML_SOURCES_PATHS ?

        Y Offline
        Y Offline
        Yunus
        wrote on 11 Aug 2021, 04:54 last edited by
        #3

        @SGaist Thanks for your reply. Where should I specify that ? inside .pro file ?

        Also where is the location of this path, can you give an example.

        Thanks

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 11 Aug 2021, 08:13 last edited by
          #4

          On the README of the project it's written that this is an environment variable. Define it before the call to the command. You can do it on the same line.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • Y Offline
            Y Offline
            Yunus
            wrote on 11 Aug 2021, 09:00 last edited by
            #5

            @SGaist yes I got the point. but where is this path and what is that ? I tried couple of paths:

            /opt/Qt/5.15.2/gcc_64/qml

            /opt/Qt/5.15.2/gcc_64/include

            These folders are inside my qt installation folder, and I tried like:

            export QML_SOURCES_PATHS=/opt/Qt/5.15.2/gcc_64/include

            but results are same, where QML_SOURCES_PATHS locates actually?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 11 Aug 2021, 19:04 last edited by SGaist 8 Nov 2021, 19:04
              #6

              It should point to your application QML sources.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1

              1/6

              10 Aug 2021, 10:14

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved