Forums

OverviewV-Play 1 SupportGame Deployment and.qrc Files › Reply To: Game Deployment and.qrc Files

OverviewV-Play 1 SupportGame Deployment and.qrc Files › Reply To: Game Deployment and.qrc Files
#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

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