aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/demos/maroon
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2012-12-11 14:17:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-12 10:32:50 +0100
commita0fb0a5dd32b031f89abe603ed07a50c74327e37 (patch)
tree04dd8b801c1e5daca81701542a8f6815c8b35274 /examples/quick/demos/maroon
parentb570d384c0704ea12364e353493eeb6f1ae34cd3 (diff)
Use resource files for most examples
Make examples shadow-build-friendly by using resource files instead of trying to derive the qml path from applicationDirPath(). Change-Id: I669424554c772d9b261249b366247190f5fbd8b1 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'examples/quick/demos/maroon')
-rw-r--r--examples/quick/demos/maroon/main.cpp2
-rw-r--r--examples/quick/demos/maroon/maroon.pro5
-rw-r--r--examples/quick/demos/maroon/maroon.qrc71
3 files changed, 74 insertions, 4 deletions
diff --git a/examples/quick/demos/maroon/main.cpp b/examples/quick/demos/maroon/main.cpp
index da2343e444..6866cf8d7b 100644
--- a/examples/quick/demos/maroon/main.cpp
+++ b/examples/quick/demos/maroon/main.cpp
@@ -38,4 +38,4 @@
**
****************************************************************************/
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(maroon)
+DECLARATIVE_EXAMPLE_MAIN(demos/maroon/maroon)
diff --git a/examples/quick/demos/maroon/maroon.pro b/examples/quick/demos/maroon/maroon.pro
index e193927e72..6ca0a2bf16 100644
--- a/examples/quick/demos/maroon/maroon.pro
+++ b/examples/quick/demos/maroon/maroon.pro
@@ -2,8 +2,7 @@ TEMPLATE = app
QT += qml quick
SOURCES += main.cpp
+RESOURCES += maroon.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/maroon
-qml.files = maroon.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/maroon
-INSTALLS += target qml
+INSTALLS += target
diff --git a/examples/quick/demos/maroon/maroon.qrc b/examples/quick/demos/maroon/maroon.qrc
new file mode 100644
index 0000000000..52c2a4e513
--- /dev/null
+++ b/examples/quick/demos/maroon/maroon.qrc
@@ -0,0 +1,71 @@
+<RCC>
+ <qresource prefix="/demos/maroon">
+ <file>maroon.qml</file>
+ <file>content/BuildButton.qml</file>
+ <file>content/GameCanvas.qml</file>
+ <file>content/GameOverScreen.qml</file>
+ <file>content/InfoBar.qml</file>
+ <file>content/logic.js</file>
+ <file>content/NewGameScreen.qml</file>
+ <file>content/SoundEffect.qml</file>
+ <file>content/audio/bomb-action.wav</file>
+ <file>content/audio/catch-action.wav</file>
+ <file>content/audio/catch.wav</file>
+ <file>content/audio/currency.wav</file>
+ <file>content/audio/factory-action.wav</file>
+ <file>content/audio/melee-action.wav</file>
+ <file>content/audio/projectile-action.wav</file>
+ <file>content/audio/shooter-action.wav</file>
+ <file>content/gfx/background.png</file>
+ <file>content/gfx/bomb-action.png</file>
+ <file>content/gfx/bomb-idle.png</file>
+ <file>content/gfx/bomb.png</file>
+ <file>content/gfx/button-help.png</file>
+ <file>content/gfx/button-play.png</file>
+ <file>content/gfx/catch-action.png</file>
+ <file>content/gfx/catch.png</file>
+ <file>content/gfx/cloud.png</file>
+ <file>content/gfx/currency.png</file>
+ <file>content/gfx/dialog-bomb.png</file>
+ <file>content/gfx/dialog-factory.png</file>
+ <file>content/gfx/dialog-melee.png</file>
+ <file>content/gfx/dialog-pointer.png</file>
+ <file>content/gfx/dialog-shooter.png</file>
+ <file>content/gfx/dialog.png</file>
+ <file>content/gfx/factory-action.png</file>
+ <file>content/gfx/factory-idle.png</file>
+ <file>content/gfx/factory.png</file>
+ <file>content/gfx/grid.png</file>
+ <file>content/gfx/help.png</file>
+ <file>content/gfx/lifes.png</file>
+ <file>content/gfx/logo-bubble.png</file>
+ <file>content/gfx/logo-fish.png</file>
+ <file>content/gfx/logo.png</file>
+ <file>content/gfx/melee-action.png</file>
+ <file>content/gfx/melee-idle.png</file>
+ <file>content/gfx/melee.png</file>
+ <file>content/gfx/mob-idle.png</file>
+ <file>content/gfx/mob.png</file>
+ <file>content/gfx/points.png</file>
+ <file>content/gfx/projectile-action.png</file>
+ <file>content/gfx/projectile.png</file>
+ <file>content/gfx/scores.png</file>
+ <file>content/gfx/shooter-action.png</file>
+ <file>content/gfx/shooter-idle.png</file>
+ <file>content/gfx/shooter.png</file>
+ <file>content/gfx/sunlight.png</file>
+ <file>content/gfx/text-1.png</file>
+ <file>content/gfx/text-2.png</file>
+ <file>content/gfx/text-3.png</file>
+ <file>content/gfx/text-blank.png</file>
+ <file>content/gfx/text-gameover.png</file>
+ <file>content/gfx/text-go.png</file>
+ <file>content/gfx/wave.png</file>
+ <file>content/mobs/MobBase.qml</file>
+ <file>content/towers/Bomb.qml</file>
+ <file>content/towers/Factory.qml</file>
+ <file>content/towers/Melee.qml</file>
+ <file>content/towers/Ranged.qml</file>
+ <file>content/towers/TowerBase.qml</file>
+ </qresource>
+</RCC>