From 87956f028ac76109ce4c6b7d25aafab6384f381a Mon Sep 17 00:00:00 2001 From: "Anselmo Lacerda S. de Melo" Date: Thu, 3 Mar 2011 19:01:41 -0300 Subject: qtfliyingbus: debian rules, symbian wrapper Signed-off-by: Anselmo Lacerda S. de Melo Signed-off-by: Adriano Rezende --- qtflyingbus/build/debian/changelog | 5 + qtflyingbus/build/debian/compat | 1 + qtflyingbus/build/debian/control | 13 +++ qtflyingbus/build/debian/rules | 19 +++ qtflyingbus/build/icon-qtflyingbus.png | Bin 0 -> 6606 bytes qtflyingbus/build/icon-qtflyingbus.svg | 162 ++++++++++++++++++++++++++ qtflyingbus/build/main.cpp | 38 ++++++ qtflyingbus/build/mainwindow.cpp | 43 +++++++ qtflyingbus/build/mainwindow.h | 22 ++++ qtflyingbus/build/qtflyingbus.desktop | 8 ++ qtflyingbus/build/qtflyingbus.pro | 40 +++++++ qtflyingbus/build/resource.qrc | 207 +++++++++++++++++++++++++++++++++ 12 files changed, 558 insertions(+) create mode 100644 qtflyingbus/build/debian/changelog create mode 100644 qtflyingbus/build/debian/compat create mode 100644 qtflyingbus/build/debian/control create mode 100755 qtflyingbus/build/debian/rules create mode 100644 qtflyingbus/build/icon-qtflyingbus.png create mode 100755 qtflyingbus/build/icon-qtflyingbus.svg create mode 100644 qtflyingbus/build/main.cpp create mode 100644 qtflyingbus/build/mainwindow.cpp create mode 100644 qtflyingbus/build/mainwindow.h create mode 100644 qtflyingbus/build/qtflyingbus.desktop create mode 100644 qtflyingbus/build/qtflyingbus.pro create mode 100644 qtflyingbus/build/resource.qrc diff --git a/qtflyingbus/build/debian/changelog b/qtflyingbus/build/debian/changelog new file mode 100644 index 0000000..5ac228c --- /dev/null +++ b/qtflyingbus/build/debian/changelog @@ -0,0 +1,5 @@ +qtflyingbus (0.1-1) unstable; urgency=low + + * Initial release + + -- Adriano Rezende Thu, 25 Nov 2010 10:37:30 -0300 diff --git a/qtflyingbus/build/debian/compat b/qtflyingbus/build/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/qtflyingbus/build/debian/compat @@ -0,0 +1 @@ +5 diff --git a/qtflyingbus/build/debian/control b/qtflyingbus/build/debian/control new file mode 100644 index 0000000..014c8ec --- /dev/null +++ b/qtflyingbus/build/debian/control @@ -0,0 +1,13 @@ +Source: qtflyingbus +Section: user/Other +Priority: extra +Maintainer: Adriano Rezende +Build-Depends: debhelper (>= 5), libqt4-dev +Standards-Version: 3.8.4 + +Package: qtflyingbus +Section: user/Other +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Qt Flying Bus + This is a simple game written in QML diff --git a/qtflyingbus/build/debian/rules b/qtflyingbus/build/debian/rules new file mode 100755 index 0000000..8b85e3e --- /dev/null +++ b/qtflyingbus/build/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 + +DEB_BUILDDIR = debian/builddeb +DEB_QMAKE_ARGS = $(CURDIR)/qtflyingbus.pro + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/qmake.mk + +clear:: + rm -fr $(DEB_BUILDDIR) diff --git a/qtflyingbus/build/icon-qtflyingbus.png b/qtflyingbus/build/icon-qtflyingbus.png new file mode 100644 index 0000000..8dc6ed0 Binary files /dev/null and b/qtflyingbus/build/icon-qtflyingbus.png differ diff --git a/qtflyingbus/build/icon-qtflyingbus.svg b/qtflyingbus/build/icon-qtflyingbus.svg new file mode 100755 index 0000000..6462de8 --- /dev/null +++ b/qtflyingbus/build/icon-qtflyingbus.svg @@ -0,0 +1,162 @@ + + + + + + + diff --git a/qtflyingbus/build/main.cpp b/qtflyingbus/build/main.cpp new file mode 100644 index 0000000..6326dd9 --- /dev/null +++ b/qtflyingbus/build/main.cpp @@ -0,0 +1,38 @@ +#include +#include +#include + +#ifdef Q_OS_SYMBIAN +#include +#include +#endif + + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + +#ifdef Q_OS_SYMBIAN + // lock portrait mode for symbian + CAknAppUi *akn = dynamic_cast(CEikonEnv::Static()->AppUi()); + TRAPD(error, if (akn) akn->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape); ); +#endif + + QDeclarativeView view; + +#if defined(Q_OS_SYMBIAN) + view.setSource(QUrl::fromLocalFile("main_640_360.qml")); +#else + view.setSource(QUrl::fromLocalFile("/usr/share/qtflyingbus/main_800_480.qml")); +#endif + + QObject::connect(view.engine(), SIGNAL(quit()), qApp, SLOT(quit())); + +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) + view.showFullScreen(); +#else + view.show(); +#endif + + return app.exec(); +} diff --git a/qtflyingbus/build/mainwindow.cpp b/qtflyingbus/build/mainwindow.cpp new file mode 100644 index 0000000..0eb1499 --- /dev/null +++ b/qtflyingbus/build/mainwindow.cpp @@ -0,0 +1,43 @@ +#include "mainwindow.h" + +#include +#include + +#if defined(Q_OS_SYMBIAN) +#include +#include +#include +#include +#endif + +MainWindow::MainWindow() + : QDeclarativeView(), + m_isPortrait(false) +{ +#if defined(Q_OS_SYMBIAN) + setSource(QUrl::fromLocalFile("c://data/qtflyingbus/main_640_360.qml")); +#else + setSource(QUrl::fromLocalFile("/usr/share/qtflyingbus/main_800_480.qml")); +#endif + + QObject::connect(engine(), SIGNAL(quit()), qApp, SLOT(quit())); + +#if defined(Q_OS_SYMBIAN) + QTimer::singleShot(0, this, SLOT(lockViewMode())); +#endif +} + +#if defined(Q_OS_SYMBIAN) +void MainWindow::lockViewMode() +{ + CAknAppUi *aknAppUi = dynamic_cast(CEikonEnv::Static()->AppUi()); + + if (!aknAppUi) + return; + + if (m_isPortrait) + aknAppUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait); + else + aknAppUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape); +} +#endif diff --git a/qtflyingbus/build/mainwindow.h b/qtflyingbus/build/mainwindow.h new file mode 100644 index 0000000..8e92912 --- /dev/null +++ b/qtflyingbus/build/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +class MainWindow : public QDeclarativeView +{ + Q_OBJECT + +public: + MainWindow(); + +protected slots: +#ifdef Q_OS_SYMBIAN + void lockViewMode(); +#endif + +private: + bool m_isPortrait; +}; + +#endif diff --git a/qtflyingbus/build/qtflyingbus.desktop b/qtflyingbus/build/qtflyingbus.desktop new file mode 100644 index 0000000..2f45a99 --- /dev/null +++ b/qtflyingbus/build/qtflyingbus.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=Qt Flying Bus +Categories=Applications +Exec=/usr/bin/FlyingBus +Icon=icon-qtflyingbus +X-Icon-path=/usr/share/pixmaps/ +X-Osso-Type=application/x-executable diff --git a/qtflyingbus/build/qtflyingbus.pro b/qtflyingbus/build/qtflyingbus.pro new file mode 100644 index 0000000..41f7c41 --- /dev/null +++ b/qtflyingbus/build/qtflyingbus.pro @@ -0,0 +1,40 @@ +TEMPLATE = app +TARGET = FlyingBus + +QT += xml declarative + +HEADERS += mainwindow.h +SOURCES += main.cpp mainwindow.cpp + +symbian { + LIBS += -lesock -lconnmon -lcone -lavkon + + TARGET.UID3 = 0xe9179145 + TARGET.EPOCHEAPSIZE = 0x20000 0x6000000 + + ICON = icon-qtflyingbus.svg + + qmlfiles.sources = ../core ../main_640_360.qml + DEPLOYMENT += qmlfiles + + DEPLOYMENT.installer_header = 0xA000D7CE +} + +linux-g++-maemo5 { + INSTALLS += desktop + desktop.path = /usr/share/applications/hildon + desktop.files = qtflyingbus.desktop + + INSTALLS += icon64 + icon64.path = /usr/share/icons/hicolor/64x64/apps + icon64.files = icon-qtflyingbus.png + + INSTALLS += qmlfiles + qmlfiles.path = /usr/share/qtflyingbus + qmlfiles.files = ../core ../main_800_480.qml +} + +target.path = /usr/bin +INSTALLS += target + +QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5 diff --git a/qtflyingbus/build/resource.qrc b/qtflyingbus/build/resource.qrc new file mode 100644 index 0000000..c6b9566 --- /dev/null +++ b/qtflyingbus/build/resource.qrc @@ -0,0 +1,207 @@ + + + ../main_800_480.qml + ../core/Background.qml + ../core/FinalSplash.qml + ../core/Splash.qml + ../core/sprites/Peace.qml + ../core/sprites/Balloon.qml + ../core/sprites/Bird.qml + ../core/sprites/Stone.qml + ../core/sprites/Cloud.qml + ../core/sprites/Tree.qml + ../core/sprites/LadyBug.qml + ../core/AboutMenu.qml + ../core/FrameSprite.qml + ../core/Score.qml + ../core/Sprite.qml + ../core/Player.qml + ../core/ScoreMenu.qml + ../core/Main.qml + ../core/Balloon.qml + ../core/DigitLabel.qml + ../core/FinalSplashItem.qml + ../core/LevelModel.qml + ../core/MenuAnimation.qml + ../core/YouWinMenu.qml + ../core/levels/1.xml + ../core/levels/3.xml + ../core/levels/2.xml + ../core/PlayMenu.qml + ../core/images/sprites/std.png + ../core/images/sprites/elements/tree5.png + ../core/images/sprites/elements/ladybug3.png + ../core/images/sprites/elements/peace4.png + ../core/images/sprites/elements/ladybug2.png + ../core/images/sprites/elements/bird3.png + ../core/images/sprites/elements/bird4.png + ../core/images/sprites/elements/cloud2.png + ../core/images/sprites/elements/cloud3.png + ../core/images/sprites/elements/peace1.png + ../core/images/sprites/elements/peace5.png + ../core/images/sprites/elements/cloud7.png + ../core/images/sprites/elements/cloud6.png + ../core/images/sprites/elements/cloud1.png + ../core/images/sprites/elements/tree7.png + ../core/images/sprites/elements/tree6.png + ../core/images/sprites/elements/tree1.png + ../core/images/sprites/elements/peace2.png + ../core/images/sprites/elements/tree2.png + ../core/images/sprites/elements/tree3.png + ../core/images/sprites/elements/bird5.png + ../core/images/sprites/elements/cloud4.png + ../core/images/sprites/elements/bird2.png + ../core/images/sprites/elements/cloud5.png + ../core/images/sprites/elements/bird1.png + ../core/images/sprites/elements/ladybug1.png + ../core/images/sprites/elements/balloon.png + ../core/images/sprites/elements/tree4.png + ../core/images/sprites/elements/peace3.png + ../core/images/sprites/elements/stone.png + ../core/images/sprites/star.png + ../core/images/sprites/qml.png + ../core/images/sprites/van/running/2.png + ../core/images/sprites/van/running/6.png + ../core/images/sprites/van/running/1.png + ../core/images/sprites/van/running/4.png + ../core/images/sprites/van/running/5.png + ../core/images/sprites/van/running/3.png + ../core/images/sprites/van/inflating/2.png + ../core/images/sprites/van/inflating/6.png + ../core/images/sprites/van/inflating/1.png + ../core/images/sprites/van/inflating/4.png + ../core/images/sprites/van/inflating/5.png + ../core/images/sprites/van/inflating/3.png + ../core/images/splash/note.png + ../core/images/splash/tablet.png + ../core/images/splash/n8.png + ../core/images/splash/van.png + ../core/images/splash/finalbackground.png + ../core/images/splash/background.png + ../core/images/scene/elements/street.png + ../core/images/scene/elements/moon.png + ../core/images/scene/elements/sunlight.png + ../core/images/scene/elements/sand.png + ../core/images/scene/elements/cloud2.png + ../core/images/scene/elements/cloud3.png + ../core/images/scene/elements/bigmountain1.png + ../core/images/scene/elements/road.png + ../core/images/scene/elements/cloud1.png + ../core/images/scene/elements/sun.png + ../core/images/scene/elements/ground.png + ../core/images/scene/elements/water.png + ../core/images/scene/elements/mountain.png + ../core/images/scene/elements/cloud4.png + ../core/images/scene/elements/cloud5.png + ../core/images/scene/elements/bigmountain2.png + ../core/images/scene/elements/bush.png + ../core/images/scene/elements/grass.png + ../core/images/scene/sky/light.png + ../core/images/scene/sky/dark.png + ../core/images/scene/sky/gray.png + ../core/images/balloons/blue/2.png + ../core/images/balloons/blue/6.png + ../core/images/balloons/blue/1.png + ../core/images/balloons/blue/4.png + ../core/images/balloons/blue/5.png + ../core/images/balloons/blue/3.png + ../core/images/balloons/pink/2.png + ../core/images/balloons/pink/6.png + ../core/images/balloons/pink/1.png + ../core/images/balloons/pink/4.png + ../core/images/balloons/pink/5.png + ../core/images/balloons/pink/3.png + ../core/images/balloons/green/2.png + ../core/images/balloons/green/6.png + ../core/images/balloons/green/1.png + ../core/images/balloons/green/4.png + ../core/images/balloons/green/5.png + ../core/images/balloons/green/3.png + ../core/images/balloons/yellow/2.png + ../core/images/balloons/yellow/6.png + ../core/images/balloons/yellow/1.png + ../core/images/balloons/yellow/4.png + ../core/images/balloons/yellow/5.png + ../core/images/balloons/yellow/3.png + ../core/images/balloons/red/2.png + ../core/images/balloons/red/6.png + ../core/images/balloons/red/1.png + ../core/images/balloons/red/4.png + ../core/images/balloons/red/5.png + ../core/images/balloons/red/3.png + ../core/images/balloons/line.png + ../core/images/score.png + ../core/images/life.png + ../core/images/menu/about.png + ../core/images/menu/menu_youwin.png + ../core/images/menu/details.png + ../core/images/menu/leave_title.png + ../core/images/menu/menu_gameover.png + ../core/images/menu/yourscore.png + ../core/images/menu/button/play_pressed.png + ../core/images/menu/button/exit.png + ../core/images/menu/button/about.png + ../core/images/menu/button/next_level_pressed.png + ../core/images/menu/button/about_pressed.png + ../core/images/menu/button/no.png + ../core/images/menu/button/no_pressed.png + ../core/images/menu/button/menu_pressed.png + ../core/images/menu/button/yes_pressed.png + ../core/images/menu/button/retry.png + ../core/images/menu/button/help.png + ../core/images/menu/button/help_pressed.png + ../core/images/menu/button/yes.png + ../core/images/menu/button/retry_pressed.png + ../core/images/menu/button/exit_pressed.png + ../core/images/menu/button/next_level.png + ../core/images/menu/button/play.png + ../core/images/menu/button/restart.png + ../core/images/menu/button/restart_pressed.png + ../core/images/menu/button/menu.png + ../core/images/menu/complete_title.png + ../core/images/menu/highscore.png + ../core/images/menu/menu_div.png + ../core/images/menu/dot.png + ../core/images/menu/menu.png + ../core/images/LICENSE.txt + ../core/images/buttons/pause.png + ../core/images/buttons/close.png + ../core/images/buttons/play2.png + ../core/images/buttons/pause2.png + ../core/images/buttons/back2.png + ../core/images/buttons/play.png + ../core/images/buttons/back.png + ../core/images/buttons/close2.png + ../core/images/digits/2.png + ../core/images/digits/minus.png + ../core/images/digits/9.png + ../core/images/digits/0.png + ../core/images/digits/6.png + ../core/images/digits/1.png + ../core/images/digits/8.png + ../core/images/digits/7.png + ../core/images/digits/4.png + ../core/images/digits/5.png + ../core/images/digits/3.png + ../core/images/help/ladybug.png + ../core/images/help/rock.png + ../core/images/help/title.png + ../core/images/help/tap.png + ../core/images/help/peace.png + ../core/images/help/tree.png + ../core/images/help/cloud.png + ../core/images/help/playnow.png + ../core/images/help/bird.png + ../core/images/help/background.png + ../core/images/help/balloon.png + ../core/images/help/pop.png + ../core/HelpScreen.qml + ../core/Button.qml + ../core/engine.js + ../core/Base.qml + ../core/LeaveMenu.qml + ../core/GameOverMenu.qml + ../core/CompleteMenu.qml + ../core/Menu.qml + + -- cgit v1.2.3