Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Embed resources *on Symbian* - is it possible?

Embed resources *on Symbian* - is it possible?

Scheduled Pinned Locked Moved QML and Qt Quick
10 Posts 3 Posters 3.8k 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.
  • D Offline
    D Offline
    djgtram
    wrote on last edited by
    #1

    I know the routine, .qrc file, referring to resources with the qrc: prefix. It all works flawlessly when I build for the desktop. However, when compiling into Symbian .sis, the resources stay outside (as dictated by the various package and other files for the toolchain). My mistake somewhere or simply not possible with a .sis package? (Environment is Qt Creator with its usual GCCE toolchain).

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      It is possible. Look into assistant about symbian-specific .pro variables.
      Also maybe you will be ok with embedding your qrc into executable binary (by adding them into RESOURCES variable)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        djgtram
        wrote on last edited by
        #3

        RESOURCES most definitely not, I have that now, this is why the desktop build is OK. Still no cigar on Symbian. I'll check out what happened to my Assistant, when I start it, it comes up empty, only with the default text, nothing in the left pane. And the updater says I have all the documentation right here. Strange...

        Found it. Am I really supposed to manually add it in Preferences, or was this an installation error? Anyway, wasn't that hard to find, just curious...

        1 Reply Last reply
        0
        • D Offline
          D Offline
          djgtram
          wrote on last edited by
          #4

          I finally arrived at a stage where the resources are probably embedded (without them, the EXE is smaller), still, the .sis contains them in their original form as well, so they will be deployed on the target device (in the usual folder below private). I could manually edit the package files every time, of course, but running qmake any time would undo those changes. There must be a better way for sure...

          1 Reply Last reply
          0
          • R Offline
            R Offline
            roopeshchander
            wrote on last edited by
            #5

            @djgtram Maybe they are packaged with the .sis because the files are still specified in your DEPLOYMENTFOLDERS in the .pro file?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              djgtram
              wrote on last edited by
              #6

              Bingo. I knew there had to be some solution... :-) Thanks a lot.

              It was right in front of my eyes although it's not documented in Assistant. Besides, there are problems with it: if I remove the folder, Project explorer removes the source files, so I can no longer edit them in Creator. As a workaround, I add the folder now but remove it again in the Symbian section of the .pro file. A workaround for sure but it seems to work for now.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                roopeshchander
                wrote on last edited by
                #7

                np. :)
                I don't expect Qt Assistant to have anything about DEPLOYMENTFOLDERS because it's a Qt Creator feature (which auto-generates a .pri file to handle this variable when you create a project), not really a Qt feature.

                So are you saying that Qt Creator doesn't keep qml sources in the project explorer even if they're added as resources? Too bad.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  djgtram
                  wrote on last edited by
                  #8

                  Assistant has a doc about qmake (well, not Assistant-specific but it comes with the SDK and Assistant can display it among all other docs). That doc does mention DEPLOYMENT but not DEPLOYMENTFOLDERS.

                  Yes, exactly the case. Creator tries to be too smart here, I guess. Other files (like images, SVGs) can be referenced by OTHER_FILES but I couldn't find any other way than the workaround above to handle QML files (unless there is another undocumented qmake variable for this, of course).

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    roopeshchander
                    wrote on last edited by
                    #9

                    I did consider qmake as part of Qt in my previous answer. DEPLOYMENT is a qmake feature (has a not-so-straightforward usage, though). DEPLOYMENTFOLDERS is not. The auto-generated pri file reads DEPLOYMENTFOLDERS from the .pro file and populates DEPLOYMENT.

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      djgtram
                      wrote on last edited by
                      #10

                      Yes, indeed. Well, the whole build process, going back to the old Symbian tools, is much more than convoluted but I'm neither the first nor the last one to note it... :-)

                      1 Reply Last reply
                      0

                      • Login

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