[SailfishDevel] Path to main qml in resource file - not found whatever I try
Hi guys, I've put all my qml files into a resource file and I did NOT include the qml folder in the rpm. PROBLEM: what path should I use in the main.cpp file to point to the main qml file in the resource? SailfishApp::pathTo(qml/main.qml) returns /usr/share/myapp/qml/main.qml - not found SailfishApp::pathTo(qrc:/qml/main.qml) returns /usr/share/myapp/qrc/qml/main.qml - not found SailfishApp::pathTo(qrc:///qml/main.qml) returns /usr/share/myapp/qrc:/qml/main.qml - not found and so on. So it stubbornly tries to locate it in the (missing) qml folder, not in the resource. I'm out of ideas. RESOURCES += \ myapp.qrc is included in the .pro file and all files are in it. Am I missing something else? Please help! Bolek ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
On Wednesday 23 of April 2014 09:23:29 tw_bolek wrote: Hi guys, I've put all my qml files into a resource file and I did NOT include the qml folder in the rpm. PROBLEM: what path should I use in the main.cpp file to point to the main qml file in the resource? SailfishApp::pathTo(qml/main.qml) returns /usr/share/myapp/qml/main.qml - not found SailfishApp::pathTo(qrc:/qml/main.qml) returns /usr/share/myapp/qrc/qml/main.qml - not found SailfishApp::pathTo(qrc:///qml/main.qml) returns /usr/share/myapp/qrc:/qml/main.qml - not found and so on. So it stubbornly tries to locate it in the (missing) qml folder, not in the resource. I'm out of ideas. RESOURCES += \ myapp.qrc is included in the .pro file and all files are in it. Am I missing something else? Please help! Bolek ___ SailfishOS.org Devel mailing list I don't think you should use SailfishApp::pathTo since it points to a file in data directory (see sailfishapp.h for some documentation). Can you get on with using QUrl(qrc:/main.qml) ? B ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
PROBLEM: what path should I use in the main.cpp file to point to the main qml file in the resource? SailfishApp::pathTo(qrc:/qml/main.qml) returns /usr/share/myapp/qrc/qml/main.qml - not found To load the QML file from resource, you should not use SailfishApp::pathTo, instead use QUrl(qrc:/qml/main.qml). /Kim ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] SDK 1404 and translations
Thanks a lot Juha, I'll give the latest .prf a try! On Tue, Apr 22, 2014 at 4:10 PM, Juha Kallioinen juha.kallioi...@jolla.comwrote: On 22.04.2014 16:47, Luca Donaggio wrote: Did I hit a bug with the newly added translations support? This two lines in .pro (I just changed the lang code in standard .pro file created by sialfishapp/qtquick app wizard) file: CONFIG += sailfishapp_i18n TRANSLATIONS += translations/harbour-yourproject-it.ts produce the following error at buld time: lrelease error: Cannot open /home/mersdk/share/Projects/SailfishOS/harbour-yourproject/translations/harbour-yourproject-it.ts: No such file or directory Looking at sailfishapp_i18n.prf it seems it generates harbour-yourproject.ts file only, not all the *.ts files specified in your .pro file. Did I get something wrong or is it really a bug? You did nothing wrong. It is a bug. The translation support was very lightly tested and could fail in a number of ways. This support was changed and fixed over the Easter weekend. If you want to try the changes and know what to do, you can replace the sailfishapp_18n.prf file in the sb2 targets with the latest from here: https://github.com/sailfish-sdk/libsailfishapp/blob/master/data/sailfishapp_i18n.prf Or as a workaround you can copy the existing .ts file to harbour-yourproject-it.ts in the project's translations folder. The changes will be released after the next device software release. Best regards, Juha ___ SailfishOS.org Devel mailing list -- Luca Donaggio ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Qt Kits broken on Windows?
On 22.04.2014 16:55, Gabriel Böhme wrote: Hi Juha, first of all - thanks for your fast answer! Secondary: it's not a big problem in my case, cause my main system is Linux and there is everything working fine. Also creating another user in Windows, may not be perfect, but also not too much effort. ;) But maybe it could help, if you allow to change the deploy path. Or the path of the SailfishAlphaX folder itself. Because linking to the new user solved the problem with the Qt Kits, what means it's building the project, only deploy is not working. So the user (or the installer checks) could change it to pure C:\ or something else the user wants? Or is there something preventing this? Hi Gabriel, I just noticed that Qt Creator has a commandline option '-settingspath' that can be used to tell where it should save/load its settings from. If you set it to for example C:\SailfishOS\mysettings then Qt Creator will use that as its settings directory. This should avoid the problem with non-ascii chars. In principle we could use this as a default for all windows installations, which is something we'll have to consider. If you want to try this, you should add the -settingspath option to the SailfishOS IDE shortcut, which you use to launch the IDE. Fixing the non-ascii chars in the bat files is proving to be a bit more involved than I had hoped. Best regards, Juha ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
Thank you!!! Yes, QUrl(qrc:/myapp/main.qml) does the job!! Now, *PLEASE*, one more help request: what is the best way to EXCLUDE the qml folder from being added to the rpm file? Thank you, B. I don't think you should use SailfishApp::pathTo since it points to a file in data directory (see sailfishapp.h for some documentation). Can you get on with using QUrl(qrc:/main.qml) ? On Wednesday 23 of April 2014 09:23:29 tw_bolek wrote: Hi guys, I've put all my qml files into a resource file and I did NOT include the qml folder in the rpm. PROBLEM: what path should I use in the main.cpp file to point to the main qml file in the resource? SailfishApp::pathTo(qml/main.qml) returns /usr/share/myapp/qml/main.qml - not found SailfishApp::pathTo(qrc:/qml/main.qml) returns /usr/share/myapp/qrc/qml/main.qml - not found SailfishApp::pathTo(qrc:///qml/main.qml) returns /usr/share/myapp/qrc:/qml/main.qml - not found and so on. So it stubbornly tries to locate it in the (missing) qml folder, not in the resource. I'm out of ideas. RESOURCES += \ myapp.qrc is included in the .pro file and all files are in it. Am I missing something else? Please help! Bolek ___ SailfishOS.org Devel mailing list I don't think you should use SailfishApp::pathTo since it points to a file in data directory (see sailfishapp.h for some documentation). Can you get on with using QUrl(qrc:/main.qml) ? B ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
you can try to add INSTALLS -= qml somewhere after sailfishapp config line, or just rename folder name 23.04.2014 14:19, tw_bolek пишет: Thank you!!! Yes, QUrl(qrc:/myapp/main.qml) does the job!! Now, *PLEASE*, one more help request: what is the best way to EXCLUDE the qml folder from being added to the rpm file? Thank you, B. I don't think you should use SailfishApp::pathTo since it points to a file in data directory (see sailfishapp.h for some documentation). Can you get on with using QUrl(qrc:/main.qml) ? On Wednesday 23 of April 2014 09:23:29 tw_bolek wrote: Hi guys, I've put all my qml files into a resource file and I did NOT include the qml folder in the rpm. PROBLEM: what path should I use in the main.cpp file to point to the main qml file in the resource? SailfishApp::pathTo(qml/main.qml) returns /usr/share/myapp/qml/main.qml - not found SailfishApp::pathTo(qrc:/qml/main.qml) returns /usr/share/myapp/qrc/qml/main.qml - not found SailfishApp::pathTo(qrc:///qml/main.qml) returns /usr/share/myapp/qrc:/qml/main.qml - not found and so on. So it stubbornly tries to locate it in the (missing) qml folder, not in the resource. I'm out of ideas. RESOURCES += \ myapp.qrc is included in the .pro file and all files are in it. Am I missing something else? Please help! Bolek ___ SailfishOS.org Devel mailing list I don't think you should use SailfishApp::pathTo since it points to a file in data directory (see sailfishapp.h for some documentation). Can you get on with using QUrl(qrc:/main.qml) ? B ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Qt Kits broken on Windows?
Hi Juha, thanks again, I'll give it a try asap (just at work) and let you know the result. Thanks, Gabriel. 2014-04-23 10:16 GMT+02:00 Juha Kallioinen juha.kallioi...@jolla.com: On 22.04.2014 16:55, Gabriel Böhme wrote: Hi Juha, first of all - thanks for your fast answer! Secondary: it's not a big problem in my case, cause my main system is Linux and there is everything working fine. Also creating another user in Windows, may not be perfect, but also not too much effort. ;) But maybe it could help, if you allow to change the deploy path. Or the path of the SailfishAlphaX folder itself. Because linking to the new user solved the problem with the Qt Kits, what means it's building the project, only deploy is not working. So the user (or the installer checks) could change it to pure C:\ or something else the user wants? Or is there something preventing this? Hi Gabriel, I just noticed that Qt Creator has a commandline option '-settingspath' that can be used to tell where it should save/load its settings from. If you set it to for example C:\SailfishOS\mysettings then Qt Creator will use that as its settings directory. This should avoid the problem with non-ascii chars. In principle we could use this as a default for all windows installations, which is something we'll have to consider. If you want to try this, you should add the -settingspath option to the SailfishOS IDE shortcut, which you use to launch the IDE. Fixing the non-ascii chars in the bat files is proving to be a bit more involved than I had hoped. Best regards, Juha ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
Doesn't work :( INSTALLS -= qml doesn't seem to do anything, and renaming the qml folder results in an RPM build error - files not found Anything else, please? Gosh, it was so easy and obvious in Qt4.8 Thank you, Bolek you can try to add INSTALLS -= qml somewhere after sailfishapp config line, or just rename folder name Now, *PLEASE*, one more help request: what is the best way to EXCLUDE the qml folder from being added to the rpm file? ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
show your full pro file 24.04.2014 00:39, tw_bolek пишет: Doesn't work :( INSTALLS -= qml doesn't seem to do anything, and renaming the qml folder results in an RPM build error - files not found Anything else, please? Gosh, it was so easy and obvious in Qt4.8 Thank you, Bolek you can try to add INSTALLS -= qml somewhere after sailfishapp config line, or just rename folder name Now, *PLEASE*, one more help request: what is the best way to EXCLUDE the qml folder from being added to the rpm file? ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
show your full pro file Hey Andrey, here you are. Nothing special in there. # The name of your app. # NOTICE: name defined in TARGET has a corresponding QML filename. # If name defined in TARGET is changed, following needs to be # done to match new name: # - corresponding QML filename must be changed # - desktop icon filename must be changed # - desktop filename must be changed # - icon definition filename in desktop file must be changed TARGET = myapp CONFIG += sailfishapp INSTALLS -= qml SOURCES += src/myapp.cpp OTHER_FILES += rpm/myapp.yaml \ myapp.desktop RESOURCES += \ myapp.qrc Doesn't work :( INSTALLS -= qml doesn't seem to do anything, and renaming the qml folder results in an RPM build error - files not found Anything else, please? Gosh, it was so easy and obvious in Qt4.8 Thank you, Bolek you can try to add INSTALLS -= qml somewhere after sailfishapp config line, or just rename folder name Now, *PLEASE*, one more help request: what is the best way to EXCLUDE the qml folder from being added to the rpm file? ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
okay, then try this: desktop.files = $${TARGET}.desktop desktop.path = /usr/share/applications icon.files = $${TARGET}.png icon.path = /usr/share/icons/hicolor/86x86/apps INSTALLS = desktop icon 24.04.2014 00:56, tw_bolek пишет: show your full pro file Hey Andrey, here you are. Nothing special in there. # The name of your app. # NOTICE: name defined in TARGET has a corresponding QML filename. # If name defined in TARGET is changed, following needs to be # done to match new name: # - corresponding QML filename must be changed # - desktop icon filename must be changed # - desktop filename must be changed # - icon definition filename in desktop file must be changed TARGET = myapp CONFIG += sailfishapp INSTALLS -= qml SOURCES += src/myapp.cpp OTHER_FILES += rpm/myapp.yaml \ myapp.desktop RESOURCES += \ myapp.qrc Doesn't work :( INSTALLS -= qml doesn't seem to do anything, and renaming the qml folder results in an RPM build error - files not found Anything else, please? Gosh, it was so easy and obvious in Qt4.8 Thank you, Bolek you can try to add INSTALLS -= qml somewhere after sailfishapp config line, or just rename folder name Now, *PLEASE*, one more help request: what is the best way to EXCLUDE the qml folder from being added to the rpm file? ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
Doesn't work, either :(( The qml folder is still added to rpm. And while building the rpm I get messages about overriding commands for target 'install_desktop', ignoring old commands for target 'install_icon', etc. okay, then try this: desktop.files = $${TARGET}.desktop desktop.path = /usr/share/applications icon.files = $${TARGET}.png icon.path = /usr/share/icons/hicolor/86x86/apps INSTALLS = desktop icon W dniu 2014-04-23 20:39:30 użytkownik tw_bolek tw_bo...@op.pl napisał: Doesn't work :( INSTALLS -= qml doesn't seem to do anything, and renaming the qml folder results in an RPM build error - files not found Anything else, please? Gosh, it was so easy and obvious in Qt4.8 Thank you, Bolek you can try to add INSTALLS -= qml somewhere after sailfishapp config line, or just rename folder name Now, *PLEASE*, one more help request: what is the best way to EXCLUDE the qml folder from being added to the rpm file? ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
did you made clean and removed build folder content? 24.04.2014 01:16, tw_bolek пишет: Doesn't work, either :(( The qml folder is still added to rpm. And while building the rpm I get messages about overriding commands for target 'install_desktop', ignoring old commands for target 'install_icon', etc. okay, then try this: desktop.files = $${TARGET}.desktop desktop.path = /usr/share/applications icon.files = $${TARGET}.png icon.path = /usr/share/icons/hicolor/86x86/apps INSTALLS = desktop icon W dniu 2014-04-23 20:39:30 użytkownik tw_bolek tw_bo...@op.pl napisał: Doesn't work :( INSTALLS -= qml doesn't seem to do anything, and renaming the qml folder results in an RPM build error - files not found Anything else, please? Gosh, it was so easy and obvious in Qt4.8 Thank you, Bolek you can try to add INSTALLS -= qml somewhere after sailfishapp config line, or just rename folder name Now, *PLEASE*, one more help request: what is the best way to EXCLUDE the qml folder from being added to the rpm file? ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
Yes, I did clean, deleted the whole build folder, then did clean again. That FREAKING folder still gets added did you made clean and removed build folder content? 24.04.2014 01:16, tw_bolek пишет: Doesn't work, either :(( The qml folder is still added to rpm. And while building the rpm I get messages about overriding commands for target 'install_desktop', ignoring old commands for target 'install_icon', etc. okay, then try this: desktop.files = $${TARGET}.desktop desktop.path = /usr/share/applications icon.files = $${TARGET}.png icon.path = /usr/share/icons/hicolor/86x86/apps INSTALLS = desktop icon W dniu 2014-04-23 20:39:30 użytkownik tw_bolek tw_bo...@op.pl napisał: Doesn't work :( INSTALLS -= qml doesn't seem to do anything, and renaming the qml folder results in an RPM build error - files not found Anything else, please? Gosh, it was so easy and obvious in Qt4.8 Thank you, Bolek you can try to add INSTALLS -= qml somewhere after sailfishapp config line, or just rename folder name Now, *PLEASE*, one more help request: what is the best way to EXCLUDE the qml folder from being added to the rpm file? ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Qt Kits broken on Windows?
Hi Juha, great news - it's working perfectly. Also all Kit, Compiler paths are set correctly by default. :) And now - as you said - SailfishOS project is also shown in the settings. Thank you very much for this great hint! Gabriel. Am 23.04.2014 10:16, schrieb Juha Kallioinen: On 22.04.2014 16:55, Gabriel Böhme wrote: Hi Juha, first of all - thanks for your fast answer! Secondary: it's not a big problem in my case, cause my main system is Linux and there is everything working fine. Also creating another user in Windows, may not be perfect, but also not too much effort. ;) But maybe it could help, if you allow to change the deploy path. Or the path of the SailfishAlphaX folder itself. Because linking to the new user solved the problem with the Qt Kits, what means it's building the project, only deploy is not working. So the user (or the installer checks) could change it to pure C:\ or something else the user wants? Or is there something preventing this? Hi Gabriel, I just noticed that Qt Creator has a commandline option '-settingspath' that can be used to tell where it should save/load its settings from. If you set it to for example C:\SailfishOS\mysettings then Qt Creator will use that as its settings directory. This should avoid the problem with non-ascii chars. In principle we could use this as a default for all windows installations, which is something we'll have to consider. If you want to try this, you should add the -settingspath option to the SailfishOS IDE shortcut, which you use to launch the IDE. Fixing the non-ascii chars in the bat files is proving to be a bit more involved than I had hoped. Best regards, Juha ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Qt Kits broken on Windows?
Oh what I forgot: some additional information, if you want a shortcut on the Windows 8 App Menu with the changed command line option, just create a shortcut on your normal desktop, add the command line option and name the shortcut to your prefered name. Now right click and select the show at start option and delete the shortcut on the normal Desktop. :) Gabriel. Am 23.04.2014 21:45, schrieb Gabriel Böhme: Hi Juha, great news - it's working perfectly. Also all Kit, Compiler paths are set correctly by default. :) And now - as you said - SailfishOS project is also shown in the settings. Thank you very much for this great hint! Gabriel. Am 23.04.2014 10:16, schrieb Juha Kallioinen: On 22.04.2014 16:55, Gabriel Böhme wrote: Hi Juha, first of all - thanks for your fast answer! Secondary: it's not a big problem in my case, cause my main system is Linux and there is everything working fine. Also creating another user in Windows, may not be perfect, but also not too much effort. ;) But maybe it could help, if you allow to change the deploy path. Or the path of the SailfishAlphaX folder itself. Because linking to the new user solved the problem with the Qt Kits, what means it's building the project, only deploy is not working. So the user (or the installer checks) could change it to pure C:\ or something else the user wants? Or is there something preventing this? Hi Gabriel, I just noticed that Qt Creator has a commandline option '-settingspath' that can be used to tell where it should save/load its settings from. If you set it to for example C:\SailfishOS\mysettings then Qt Creator will use that as its settings directory. This should avoid the problem with non-ascii chars. In principle we could use this as a default for all windows installations, which is something we'll have to consider. If you want to try this, you should add the -settingspath option to the SailfishOS IDE shortcut, which you use to launch the IDE. Fixing the non-ascii chars in the bat files is proving to be a bit more involved than I had hoped. Best regards, Juha ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
I've just managed to build rpm without the freakin' qml folder, but in order to do that I additionally needed: - manually edit Makefile and remove qml_install and qml_uninstall - in .specs file remove /usr/share/myappand %{_datadir}/%{name}/qml lines Don't mean to be rude or something, but it is seriously SICK to have to do such things to exclude a folder that is in a resource and thus it is no longer needed. In Qt4.8 all I needed to do was to comment out one line (DEPLOYMENTFOLDER) in .pro file, and on BB10 I just need to exclude asset in bar-descriptor.xml. Bolek W dniu 2014-04-23 21:18:04 użytkownik Andrey Kozhevnikov coderusin...@gmail.com napisał: did you made clean and removed build folder content? 24.04.2014 01:16, tw_bolek пишет: Doesn't work, either :(( The qml folder is still added to rpm. And while building the rpm I get messages about overriding commands for target 'install_desktop', ignoring old commands for target 'install_icon', etc. okay, then try this: desktop.files = $${TARGET}.desktop desktop.path = /usr/share/applications icon.files = $${TARGET}.png icon.path = /usr/share/icons/hicolor/86x86/apps INSTALLS = desktop icon W dniu 2014-04-23 20:39:30 użytkownik tw_bolek tw_bo...@op.pl napisał: Doesn't work :( INSTALLS -= qml doesn't seem to do anything, and renaming the qml folder results in an RPM build error - files not found Anything else, please? Gosh, it was so easy and obvious in Qt4.8 Thank you, Bolek you can try to add INSTALLS -= qml somewhere after sailfishapp config line, or just rename folder name Now, *PLEASE*, one more help request: what is the best way to EXCLUDE the qml folder from being added to the rpm file? ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try
On Wed, 2014-04-23 at 22:53 +0200, tw_bolek wrote: - manually edit Makefile and remove qml_install and qml_uninstall - in .specs file remove /usr/share/myappand %{_datadir}/%{name}/qml lines I usually do this by renaming the qml folder, create a new qml folder, and create en empty qml file in the folder (otherwise the deploy fails). This changes the path to files included in the resource, so they have to be added again. Don't mean to be rude or something, but it is seriously SICK to have to do such things to exclude a folder that is in a resource and thus it is no longer needed. In Qt4.8 all I needed to do was to comment out one line (DEPLOYMENTFOLDER) in .pro file, and on BB10 I just need to exclude asset in bar-descriptor.xml. It is rather irritating ;) /Kim ___ SailfishOS.org Devel mailing list
[SailfishDevel] rcc -threshold option doesn't work?
Hello guys, Has anyone managed to get the -threshold option of rcc (resource compiler) to work? By default the threshold is quite high and leaves many files uncompressed in the resource, so I usually change it to much lower threshold. It used to work fine on Symbian and Harmattan, it does work on BB10, but on Sailfish OS adding e.g. -threshold 2 to rcc command in Makefile (to get threshold level of 2%) doesn't seem to have any result whatsoever - all the files remain uncompressed while with such a very low threshold everything should be compressed... Also tried other values, e.g. 10, to no avail. Thanks, Bolek ___ SailfishOS.org Devel mailing list