Embed resources *on Symbian* - is it possible?
-
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).
-
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) -
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...
-
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...
-
@djgtram Maybe they are packaged with the .sis because the files are still specified in your DEPLOYMENTFOLDERS in the .pro file?
-
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.
-
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.
-
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).
-
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.