Merge branch 'development'
[quandoparte] / application / application.pro
old mode 100644 (file)
new mode 100755 (executable)
index e75bec0..d10fcf4
@@ -4,17 +4,42 @@
 #
 #-------------------------------------------------
 
-VERSION = 0.4.82
+isEmpty(VERSION) {
+    VERSION = 0.7.0rc
+}
 USE_RESOURCES = 0
 
-QT += webkit network
-CONFIG += qt webkit mobility
-MOBILITY = location
+QT += network
+CONFIG += qt
+CONFIG += link_pkgconfig
+
+lessThan(QT_MAJOR_VERSION, 5) {
+    QT += webkit
+    CONFIG += webkit mobility
+    MOBILITY = location
+} else {
+    QT += qml quick concurrent location webkitwidgets webkit
+}
 
-contains(MEEGO_EDITION,harmattan) {
-    CONFIG += harmattan
+contains(MEEGO_EDITION, harmattan) {
+   CONFIG += harmattan
 }
 
+sailfish {
+    PLATFORM = sailfish
+    DEFINES += TARGET_PLATFORM_SAILFISH
+    # enable booster
+packagesExist(qdeclarative-boostable) {
+    message("Building with qdeclarative-boostable support")
+    DEFINES += HAS_BOOSTER
+    PKGCONFIG += qdeclarative-boostable
+} else {
+    warning("qdeclarative-boostable not available; startup times will be slower")
+}
+    QMAKE_LFLAGS += -pie -rdynamic
+    PLATFORM_SOURCES = view.cpp
+    PLATFORM_HEADERS = view.h view_qt5.h
+}
 harmattan {
     QT += declarative
     PLATFORM = harmattan
@@ -24,7 +49,7 @@ harmattan {
     QMAKE_CXXFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-psabi
     QMAKE_LFLAGS += -pie -rdynamic
     PLATFORM_SOURCES = view.cpp
-    PLATFORM_HEADERS = view.h
+    PLATFORM_HEADERS = view.h view_qt4.h
 }
 maemo5 {
     QT += maemo5
@@ -42,15 +67,11 @@ maemo5 {
         keypressforwarder.h \
         settingsdialog.h \
         stationview.h
+    FORMS += \
+        settingsdialog.ui \
+        stationlistview.ui
 }
-symbian {
-    QT += declarative
-    DEFINES += TARGET_PLATFORM_SYMBIAN
-    PLATFORM = symbian
-    PLATFORM_SOURCES = view.cpp
-    PLATFORM_HEADERS = view.h
-}
-!harmattan:!maemo5:!symbian {
+!sailfish:!harmattan:!maemo5 {
     PLATFORM = desktop
     DEFINES += TARGET_PLATFORM_DESKTOP
     PLATFORM_SOURCES = view.cpp
@@ -58,6 +79,7 @@ symbian {
 
 message(Compiling For:    $$PLATFORM)
 message(Platform Sources: $$PLATFORM_SOURCES)
+message(Qt Version:       $$QT_MAJOR_VERSION"."$$QT_MINOR_VERSION)
 message(Qt Modules Used:  $$QT)
 message(Building version: $$VERSION)
 
@@ -66,12 +88,13 @@ TEMPLATE = app
 VERSION_STRING = '\\"$${VERSION}\\"'
 DEFINES += QP_VERSION=\"$${VERSION_STRING}\"
 
-contains(USE_RESOURCES,1) {
+contains(USE_RESOURCES, 1) {
     DEFINES += USE_RESOURCES=1
+    CONFIG += resources
 }
 
 !debug {
-#    DEFINES += QT_NO_DEBUG_OUTPUT
+    DEFINES += QT_NO_DEBUG_OUTPUT
 }
 
 TRANSLATIONS = resources/i18n/quandoparte_it.ts
@@ -79,6 +102,7 @@ TRANSLATIONS = resources/i18n/quandoparte_it.ts
 SOURCES += \
     $$PLATFORM_SOURCES \
     main.cpp \
+    stationitem.cpp \
     stationlistmodel.cpp \
     stationlistproxymodel.cpp \
     settings.cpp \
@@ -88,6 +112,7 @@ SOURCES += \
 
 HEADERS += \
     $$PLATFORM_HEADERS \
+    stationitem.h \
     stationlistmodel.h \
     stationlistproxymodel.h \
     settings.h \
@@ -95,17 +120,6 @@ HEADERS += \
     stationschedulemodel.h \
     stationscheduleitem.h
 
-FORMS += \
-    settingsdialog.ui \
-    stationlistview.ui
-
-symbian {
-    TARGET.UID3 = 0xe30fb688
-    # TARGET.CAPABILITY += 
-    TARGET.EPOCSTACKSIZE = 0x14000
-    TARGET.EPOCHEAPSIZE = 0x020000 0x800000
-}
-
 QMLSOURCES = \
     resources/harmattan/qml/main.qml \
     resources/harmattan/qml/StationListPage.qml \
@@ -119,14 +133,25 @@ QMLSOURCES = \
     resources/harmattan/qml/InfoBar.qml \
     resources/harmattan/qml/DroppedShadow.qml \
     resources/harmattan/qml/DelayIndicator.qml \
-    resources/harmattan/qml/StationScheduleDelegate.qml
+    resources/harmattan/qml/StationScheduleDelegate.qml \
+    resources/sailfish/qml/main.qml \
+    resources/sailfish/qml/cover/CoverPage.qml \
+    resources/sailfish/qml/pages/AboutPage.qml \
+    resources/sailfish/qml/pages/StationListPage.qml \
+    resources/sailfish/qml/pages/StationPage.qml \
+    resources/sailfish/qml/pages/components/DelayIndicator.qml \
+    resources/sailfish/qml/pages/components/StationScheduleDelegate.qml
 
 OTHER_FILES += \
+    resources/sailfish/applications/quandoparte.desktop \
     resources/harmattan/applications/quandoparte.desktop \
     resources/fremantle/applications/quandoparte.desktop \
     icons/48x48/quandoparte.png \
     icons/64x64/quandoparte.png \
+    icons/80x80/quandoparte.png \
     icons/scalable/quandoparte.svg \
+    icons/sailfish/86x86/quandoparte.png \
+    icons/sailfish/scalable/quandoparte.svg \
     icons/quandoparte.png \
     resources/quandoparte.css \
     resources/arrivals.css \
@@ -135,61 +160,83 @@ OTHER_FILES += \
     resources/stations/stations.qpl \
     resources/stations/generatelist.xq \
     resources/stations/generateunclassifiedlist.xq \
-    $$QMLSOURCES
+    $$QMLSOURCES \
+    resources/sailfish/qml/StationListPage.qml
 
-unix {
-    isEmpty(PREFIX) {
-        maemo5 {
-            PREFIX=/opt/usr
-        }
-        harmattan {
-            PREFIX=/opt/$${TARGET}
-        }
-        desktop {
-            PREFIX=/usr/local
-        }
-    }
+isEmpty(PREFIX) {
     maemo5 {
-        DESKTOPDIR=/usr/share/applications/hildon
+        PREFIX=/opt/usr
     }
     harmattan {
-        DESKTOPDIR=/usr/share/applications
+        PREFIX=/opt/$${TARGET}
     }
-    desktop {
-        DESKTOPDIR=$$PREFIX/share/applications
+    sailfish {
+        PREFIX=/usr
     }
-
-    BINDIR=$$PREFIX/bin
-    contains(USE_RESOURCES,1) {
-        DATADIR=":"
-    } else {
-        DATADIR=$$PREFIX/share/apps/$${TARGET}
+    !maemo5:!harmattan:!sailfish {
+        PREFIX=/usr/local
     }
-    DEFINES += DATADIR=\\\"$${DATADIR}\\\" PKGDATADIR=\\\"$${PKGDATADIR}\\\"
 }
+maemo5 {
+    DESKTOPDIR=/usr/share/applications/hildon
+}
+harmattan {
+    DESKTOPDIR=/usr/share/applications
+}
+sailfish {
+    DESKTOPDIR=$$PREFIX/share/applications
+}
+desktop {
+    DESKTOPDIR=$$PREFIX/share/applications
+}
+BINDIR=$$PREFIX/bin
+contains(USE_RESOURCES, 1) {
+    DATADIR=":"
+} else {
+    DATADIR=$$PREFIX/share/apps/$${TARGET}
+}
+DEFINES += DATADIR=\\\"$${DATADIR}\\\" PKGDATADIR=\\\"$${PKGDATADIR}\\\"
 
 message(Installing to prefix $$PREFIX)
+message(Executable to $$BINDIR)
+message(Desktop file to $$DESKTOPDIR)
+message(Data to $$DATADIR)
+message(Extra defines $$DEFINES)
 
-unix:!symbian {
-    target.path = $$BINDIR
-    INSTALLS += target
-}
+target.path = $$BINDIR
+INSTALLS += target
 
-unix:!symbian {
+unix {
     desktopfile.files = resources/$$PLATFORM/applications/$${TARGET}.desktop
     desktopfile.path = $$DESKTOPDIR
     INSTALLS += desktopfile
+
+    i18n.files = $$replace(TRANSLATIONS, .ts, .qm)
+    stations.files = resources/stations/stations.qpl
+
+    i18n.path = $$DATADIR/i18n
+    stations.path = $$DATADIR/stations
+
+    INSTALLS += i18n
+    INSTALLS += stations
 }
 
-unix:!symbian {
-    css.files = resources/$${TARGET}.css resources/arrivals.css resources/departures.css
+sailfish {
+    desktopfile.files = resources/$$PLATFORM/applications/$${TARGET}.desktop
+    desktopfile.path = $$DESKTOPDIR
+    INSTALLS += desktopfile
+
     i18n.files = $$replace(TRANSLATIONS, .ts, .qm)
     stations.files = resources/stations/stations.qpl
 
     i18n.path = $$DATADIR/i18n
-    css.path = $$DATADIR/css
     stations.path = $$DATADIR/stations
 
+    INSTALLS += i18n
+    INSTALLS += stations
+}
+
+desktop {
     icon48.files = icons/48x48/$${TARGET}.png
     icon64.files = icons/64x64/$${TARGET}.png
     iconscalable.files = icons/scalable/$${TARGET}.svg
@@ -199,16 +246,66 @@ unix:!symbian {
     iconscalable.path = /usr/share/icons/hicolor/scalable/apps
 
     INSTALLS += icon48
-    INSTALLS += icon64
     INSTALLS += iconscalable
-    !contains(USE_RESOURCES,1) {
+}
+
+maemo5 {
+    css.files = resources/$${TARGET}.css resources/arrivals.css resources/departures.css
+    css.path = $$DATADIR/css
+    !contains(USE_RESOURCES, 1) {
         INSTALLS += css
-        INSTALLS += i18n
-        INSTALLS += stations
     }
 }
 
-!contains(USE_RESOURCES,1) {
+sailfish {
+    QML_IMPORT_PATH = resources/sailfish/qml/
+    icon86.files = icons/sailfish/86x86/$${TARGET}.png
+    icon86.path = /usr/share/icons/hicolor/86x86/apps
+    INSTALLS += icon86
+}
+
+harmattan {
+    desktopfile.files = resources/$$PLATFORM/applications/$${TARGET}.desktop
+    desktopfile.path = $$DESKTOPDIR
+    INSTALLS += desktopfile
+
+    icon48.files = icons/48x48/$${TARGET}.png
+    icon48.path = /usr/share/icons/hicolor/48x48/apps
+    INSTALLS += icon48
+
+    icon64.files = icons/64x64/$${TARGET}.png
+    icon64.path = /usr/share/icons/hicolor/64x64/apps
+    INSTALLS += icon64
+
+    iconscalable.files = icons/scalable/$${TARGET}.svg
+    iconscalable.path = /usr/share/icons/hicolor/scalable/apps
+    INSTALLS += iconscalable
+
+    INSTALLS += i18n
+    INSTALLS += stations
+    icon80.files = icons/80x80/$${TARGET}.png
+    icon80.path = /usr/share/icons/hicolor/meegotouch/apps
+    INSTALLS += icon80
+
+    i18n.files = $$replace(TRANSLATIONS, .ts, .qm)
+    i18n.path = $$DATADIR/i18n
+    INSTALLS += i18n
+
+    stations.files = resources/stations/stations.qpl
+    stations.path = $$DATADIR/stations
+    INSTALLS += stations
+}
+
+!contains(USE_RESOURCES, 1) {
+    sailfish {
+        qml.files = resources/sailfish/qml/*.qml \
+                    resources/sailfish/qml/*.js \
+                    resources/sailfish/qml/pages \
+                    resources/sailfish/qml/pages/components \
+                    resources/sailfish/qml/cover
+        qml.path = $$DATADIR/qml
+        INSTALLS += qml
+    }
     harmattan {
         qml.files = resources/harmattan/qml/*.qml resources/harmattan/qml/*.js
         qml.path = $$DATADIR/qml
@@ -216,7 +313,7 @@ unix:!symbian {
     }
 }
 
-contains(USE_RESOURCES,1) {
+contains(USE_RESOURCES, 1) {
     RESOURCES += \
         quandoparte.qrc
 }