Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Hybrid View

  1. #1
    Registered User
    Join Date
    Jan 2013
    Location
    Hyderabad,India
    Posts
    13

    [HELP] How to hide qml files in .sis file

    I have made a small app

    When i unpack the the deployed sis file whole code is available in qml files

    I tried
    -adding .qrc file and added main.qml and mainpage.qml to it
    but they are still visible in sis file

    -tried removing this lines folder_01.source = qml/Mycalc folder_01.target = qml
    but the app is not opening

    Please can one help me up here

  2. #2
    Registered User
    Join Date
    Jan 2013
    Location
    Hyderabad,India
    Posts
    13

    Re: [HELP] How to hide qml files in .sis file

    Please any one help me

  3. #3
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Gurgaon,India
    Posts
    4,114

    Re: [HELP] How to hide qml files in .sis file

    Found this thread with people discussing the same as you are trying to do, but afraid there's no solution to it as evident from it :

    http://qt-project.org/forums/viewthread/10704

    Some say to keep most of your important logic in C++ code so even if your qml is visible then its of no use to anyone.

  4. #4
    Registered User
    Join Date
    Jan 2013
    Location
    Hyderabad,India
    Posts
    13

    Re: [HELP] How to hide qml files in .sis file

    I tried to add the qml files to .qrc(resource files) but still they are visible

    Tweetian by dickson.. He was able to hide the qml files

    It is open source now
    https://github.com/dicksonleong/Tweetian
    http://dickson-dev.blogspot.in/
    Try the above source file
    After deploying the source file there are no more QML files in .sis file. I don't how he has done that.

    Thank you very much bro.. Is there any thanks button on this forum i want to hit +10 for u

  5. #5
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Gurgaon,India
    Posts
    4,114

    Re: [HELP] How to hide qml files in .sis file

    Also do you have the .pro file looking exactly like the Tweetian project's .pro file(especially the qrc thing).May be scan the whole project again & properly , you might be missing something.

    Found another thread, see this also : http://www.parussoft.com/DevBlog/201...resource-file/

    This link says :
    People add qml files to resource file for protection. The resource file (.qrc) is compiled by the building system to binary file.

    So i think your .qrc file is not getting compiled to a binary file

  6. #6
    Registered User
    Join Date
    Jan 2013
    Location
    Hyderabad,India
    Posts
    13

    Re: [HELP] How to hide qml files in .sis file

    Quote Originally Posted by vineet.jain View Post
    Also do you have the .pro file looking exactly like the Tweetian project's .pro file(especially the qrc thing).May be scan the whole project again & properly , you might be missing something.

    Found another thread, see this also : http://www.parussoft.com/DevBlog/201...resource-file/

    This link says :
    People add qml files to resource file for protection. The resource file (.qrc) is compiled by the building system to binary file.

    So i think your .qrc file is not getting compiled to a binary file
    Ya i saw that link..
    - added .qrc
    - commented .qml folders
    but if i add this "viewer.rootContext()->setContextProperty("installPath", "file:///" + QCoreApplication::applicationDirPath() + "/"); "getting error


    I have sent mail to the dickson
    Code:
    Thanks for the reply
    
    I have done all except this
    I could not find this QmlApplicationViewer::setMainQmlFile().
    
    and
    if i comment those folders QML files in the project is diaappearing.
    I attached
    - two images with and without commenting the folders
    - image of .qrc
    - image of main.cpp
    
    From: Dickson Leong <dicksonleong8@gmail.com>
    To: Mahindar Boregam <mahindar_527@yahoo.com>
    Sent: Thursday, January 24, 2013 10:01 AM
    Subject: Re: How to hide the QML files in sis file after deploying
    
    After you added all the files to qrc, you also need to comment out some line in your project file. If you are using the template project file, you need toe comment out the first few line, it look something like:
    
        folder_01.source = qml/myapp
        folder_01.target = qml
        DEPLOYMENTFOLDERS = folder_01
    
    Just remove/comment the few line. You also need to use QDeclarativeView::setSource() instead of QmlApplicationViewer::setMainQmlFile()
    
    On 24 January 2013 03:21, Mahindar Boregam <mahindar_527@yahoo.com> wrote:
    
        Hi bro,
    
                      I saw your tweetian source code and learned that it doesn't create qml files after deploying .sis file . But i have made a small application which contains main.qml, MainPage.qml they are visible in .sis after deploying. I used .qrc file with main.qml , MainPage.qml paths. But still they are visible in .sis file. Do i need to change any code regarding this.
    
        Hope u understood. I just want to hide all the qml files as they contains source code.
        Please help me bro. Can u send me the .qrc file for main.qml , MainPage.qml paths
    
        Thank you very much.
    And How to attach the images to this thread

  7. #7
    Regular Contributor
    Join Date
    Feb 2012
    Posts
    130

    Re: [HELP] How to hide qml files in .sis file

    Thumbs up! Thanks for this. I also got it working.

  8. #8
    Regular Contributor
    Join Date
    Feb 2012
    Posts
    130

    Re: [HELP] How to hide qml files in .sis file

    I have one problem with this method. I can not get any Audio to work!
    All my other resources, images, files etc. load fine but the "Audio" element will not load an play audio.
    Any ideas what the problem is?

    Thanks.

  9. #9
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Gurgaon,India
    Posts
    4,114

    Re: [HELP] How to hide qml files in .sis file

    If some threads to believed then it is not possible to play audio using loaded from resource file: http://www.developer.nokia.com/Commu...from-Resources

  10. #10
    Regular Contributor
    Join Date
    Feb 2012
    Posts
    130

    Re: [HELP] How to hide qml files in .sis file

    Quote Originally Posted by vineet.jain View Post
    If some threads to believed then it is not possible to play audio using loaded from resource file: http://www.developer.nokia.com/Commu...from-Resources
    Thanks for the reference, a nice workaround is provided.

  11. #11
    Regular Contributor
    Join Date
    Apr 2012
    Location
    malaysia
    Posts
    263

    Re: [HELP] How to hide qml files in .sis file

    How did you guys get it work ?.I already put all my qml file in resouurce.The deploment folder and qml folder in pro. files also commented out but why the qml is not compiled into sis.I can create a sis files but qml files is not included so when i install and open the app,it just blank screen.The sis file size also reduced by 1 1/2 so i guess the qml file is not getting compiled.

    pro.

    Code:
    # Add more folders to ship with the application, here
    #folder_01.source = qml/XXXXX
    #folder_01.target = qml
    folder_02.source = qml/XXXXX
    folder_02.target = qml
    DEPLOYMENTFOLDERS = folder_02 #folder_01
    Main.cpp

    Code:
    QApplication app(argc, argv);
         app.setApplicationName("xxxxxxxxx");
    
         QDeclarativeView view;
         //QDeclarativeContext *context = view.rootContext();
    
         qmlRegisterType<xxxxxxxxr>("xxxxxxxx", 1, 0, "xxxxxxxxxx");
         qmlRegisterType<xxxxxx>("xxxxxx", 1, 0, "Shake");
    
         view.setSource(QUrl("qrc:/qml/XXXXX/start.qml"));
    
         view.window()->show();
    
         QObject::connect(view.engine(), SIGNAL(quit()), &view, SLOT(close()));
    
         return app.exec();

  12. #12
    Regular Contributor
    Join Date
    Feb 2012
    Posts
    130

    Re: [HELP] How to hide qml files in .sis file

    [QUOTE=babylongreece;917015]How did you guys get it work ?.I already put all my qml file in resource.The deploment folder and qml folder in pro. files also commented out but why the qml is not compiled into sis.I can create a sis files but qml files is not included so when i install and open the app,it just blank screen.The sis file size also reduced by 1 1/2 so i guess the qml file is not getting compiled.


    Does start.qml open other files? You also have to use QT.resolvedUrl("") in QML to access *any* file stored in the resource file including qml files, images or otherwise.
    I think that the file size should shrink because the QML files will be compressed in the .sis file.

    As long as you have a .qrc file, have added your files to that .qrc and have the resource in your .pro then those files should be packaged into the .sis and accessible
    RESOURCES += \
    qml/xxxxxxx/xxx.qrc
    Last edited by CLTSchwarz; 2013-05-06 at 13:44.

  13. #13
    Regular Contributor
    Join Date
    Apr 2012
    Location
    malaysia
    Posts
    263

    Re: [HELP] How to hide qml files in .sis file

    "start.qml" is actually a "main.qml".Does "Qt.resolveUrl" necessary since i have only one main qml and another one qml files only to handle all the function and the app ui ?.How about image since i did not put it in resource..Just qml files in resource.
    Last edited by babylongreece; 2013-05-06 at 14:32.

  14. #14
    Regular Contributor
    Join Date
    Feb 2012
    Posts
    130

    Re: [HELP] How to hide qml files in .sis file

    Quote Originally Posted by babylongreece View Post
    "start.qml" is actually a "main.qml".Does "Qt.resolveUrl" necessary since i have only one main qml and another one qml files only to handle all the function and the app ui ?.How about image since i did not put it in resource..Just qml files in resource.
    If the image is not in the resource then it needs to be in an included folder in the .pro
    I found images worked okay in the resource.
    I haven't got far enough to try having a mixed environment where I included some stuff in a folder and put the qml files in the resource but I do know that putting everything in the resource works (except for audio as mentioned below).

  15. #15
    Regular Contributor
    Join Date
    Apr 2012
    Location
    malaysia
    Posts
    263

    Re: [HELP] How to hide qml files in .sis file

    Quote Originally Posted by CLTSchwarz View Post
    If the image is not in the resource then it needs to be in an included folder in the .pro
    I found images worked okay in the resource.
    I haven't got far enough to try having a mixed environment where I included some stuff in a folder and put the qml files in the resource but I do know that putting everything in the resource works (except for audio as mentioned below).
    Hmmm ,need to experiment more to make it work and if you mean "qml audio element" won't work when the qml. is in resource then too bad because my app use qml audio.
    Last edited by babylongreece; 2013-05-07 at 11:41.

Similar Threads

  1. How to hide moc files in Carbide project explorer
    By Roose in forum [Archived] Qt SDKs and Tools
    Replies: 6
    Last Post: 2010-06-11, 11:38
  2. Hide image-files
    By Somberland in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 2
    Last Post: 2009-12-29, 10:59
  3. How can I hide files in nokia5130 (s40)
    By clevernut2 in forum Series 40 & S60 Platform Feedback Archive
    Replies: 1
    Last Post: 2009-06-30, 13:40
  4. S40 3rd Edition Hide Lock Files
    By olyans4u in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2007-01-03, 20:08
  5. How to hide system files and folders?
    By jugnoyasir in forum Symbian
    Replies: 0
    Last Post: 2005-04-01, 12:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×