Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-24 Thread tw_bolek

Thomas Perl th.p...@gmail.com wrote:

 Why do you want to use Qt Resources instead of deploying the files to 
 the filesystem?

To hide some of QML code away from prying eyes.  Of course, I know that it's 
a very poor protection as it is just compression so everything can be easily 
extracted, but that's actually all I need.  I do not intend to protect the code 
from anyone, just from those copypasters who take whole portions of other 
people's projects (or even whole applications) and use as their own without 
crediting the source or contacting the author and just asking.  Some time ago I 
had my entire QML app copied this way and released in Nokia store (with just 
some colors changed) and since then I use resources.   People who copy others' 
work this way usually can't code too much themselves (and that's why they copy) 
so they usually don't know how to extract from the resource, either.   And even 
if they know, at least it takes some effort (surely more than just copying a 
.qml file) - I mean if they don't have time to contact the author and just ask 
for permission then at least they'll spend that t
 ime on extracting and decompressing from the resource :-)   That's my goal - 
to force such people to make some more effort than Ctrl+C / Ctrl+V ;-)  It 
enhances their skills, so it's quite an educational attempt - maybe one day 
they'll start writing apps themselves.

That's why I use Qt resource rather than some more sophisticated protection - 
for the type of persons I want to protect it against it is quite sufficient,  
and from other types of people I do not need to protect it, nor do I have time 
to do it.

B.
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-24 Thread tw_bolek


Thomas Perl th.p...@gmail.com wrote:

 Why do you want to use Qt Resources instead of deploying the files to 
 the filesystem?

To hide SOME code from those who like to just copypaste rather than ask for 
permission or credit the source. Not from everyone, just from those 
copypasters. Some time ago I had my entire QML application copied this way 
and released in Nokia store with just some minor things changed, and since then 
I've been using resources.

I know that it's a poor protection as it is just compression so it can be 
easily decompressed and extracted, but I guess it is enough for those who copy 
stuff like this, as it's usually people who can't code too much themselves (or 
else they wouldn't need to copy simple stuff), so it is doubtful that they'd 
know how to decompress and extract from the binary.  And even if they know, at 
least it takes some more effort than Ctrl+C / Ctrl+V - I mean if they don't 
bother to contact the author and ask, at least they'll need to spend time on 
extracting it from resource, which for me is a sufficient trade off ;-) 

I know that better protection solutions exist, but I do not have time (nor 
actually the need) to use them

And, like you mentioned, I'm not sure if I'd like the idea of people being able 
to modify the app on the fly while it still shows my name as an author...

B.
___
SailfishOS.org Devel mailing list


[SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread tw_bolek
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

2014-04-23 Thread Bartek Taczała
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

2014-04-23 Thread kim
 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] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread 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


Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread Andrey Kozhevnikov
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] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread 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


Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread Andrey Kozhevnikov

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

2014-04-23 Thread 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


Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread Andrey Kozhevnikov

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

2014-04-23 Thread 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

Re: [SailfishDevel] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread Andrey Kozhevnikov

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

2014-04-23 Thread tw_bolek
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] Path to main qml in resource file - not found whatever I try

2014-04-23 Thread tw_bolek
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

2014-04-23 Thread Kim Foder
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