Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 1 Support › Game Deployment and.qrc Files

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6862

    Matt

    Greetings,

    Is it possible to release a game and not share all the QML code?  I have used .qrc files in the past but I have a feeling it is going to be a few days of tinkering and struggle to get my project to run by creating one of these packages for a release.  If there is a tool to aid in this process and climb source trees that I don’t know about, I am all ears.   I think .qrc files can also be unpacked from an exe but if someone goes to this level of effort, they win.  The documentation is a little confusing for Qt like if you need “qrc:/” or “:/” or whatever and nothing kills creativity more for me than configuration issues.

    P.S. – I am already familiar with the Creator resource adding pipeline for .qrc files.  I am hoping to find something more automated.

    Thanks!

    • This topic was modified 10 years, 2 months ago by  Xevoius.
    • This topic was modified 10 years, 2 months ago by  Xevoius.
    #6868

    Alex
    Felgo Team

    Hi,

    Thanks for bringing this up for discussion, yes it’s definitely possible to use resource files for release binaries and it’s also highly recommended to protect passwords like the game network secret or a flurry id from users!

    We use resource files for our showcase games too, all you need to do is to add your project’s files within the QML folder except images, videos and sound resources to a QRC file (see: http://felgo.com/doc/demos-chickenoutbreak-resources-chickenoutbreak-qrc/) and modify the setMainQmlFileName call like done here (the second, commented one): http://felgo.com/doc/demos-chickenoutbreak-main-cpp/, there is no need to modify other existing source files then in general.

    Depending on your target platform images, videos and sound files must still be shipped beside the binary (like on Windows).

    Regarding tools, I guess it doesn’t get much easier as it’s currently offered by Qt Creator, you could probably create a shell script which auto-generates the QRC file from a given source folder, using a find command like the snippet below:

    RESOURCE_FILE=resources.qrc
    
    echo "<RCC><qresource prefix=\"/\">" > $RESOURCE_FILE
    
    # Skip all files except the given extensions
    find $QMLDIR -type f -iname "*.qml" -or -iname "*.js" -or -iname "*.json" -or -iname "*.plist" -or -iname "*.ttf" -or -iname "qmldir" -or -iname "*.qm" -print0 | while read -d $'\0' x; do
      echo "<file>$x</file>" >> $RESOURCE_FILE
    done
    
    echo "</qresource></RCC>" >> $RESOURCE_FILE

    ? Which level of automation would you prefer?

    Best,

    Alex

    #6869

    Matt

    That’s it!

    Awesome response and very much appreciated.

    You nailed it.

     

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded