Forums

OverviewV-Play 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 4 years, 9 months ago.
    • This topic was modified 4 years, 9 months ago.
    #6868

    Alex
    V-Play 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://v-play.net/doc/demos-chickenoutbreak-resources-chickenoutbreak-qrc/) and modify the setMainQmlFileName call like done here (the second, commented one): http://v-play.net/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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support