Fixed translation of missing files
[quandoparte] / application / application.pro
index ee1e5f9..3c2be85 100644 (file)
@@ -5,6 +5,7 @@
 #-------------------------------------------------
 
 VERSION = 0.4.80
+USE_RESOURCES=0
 
 QT += webkit network
 CONFIG += qt webkit mobility
@@ -65,6 +66,10 @@ TEMPLATE = app
 VERSION_STRING = '\\"$${VERSION}\\"'
 DEFINES += QP_VERSION=\"$${VERSION_STRING}\"
 
+contains(USE_RESOURCES,1) {
+    DEFINES += USE_RESOURCES=1
+}
+
 !debug {
 #    DEFINES += QT_NO_DEBUG_OUTPUT
 }
@@ -101,6 +106,19 @@ symbian {
     TARGET.EPOCHEAPSIZE = 0x020000 0x800000
 }
 
+QMLSOURCES = \
+    resources/harmattan/qml/main.qml \
+    resources/harmattan/qml/StationListPage.qml \
+    resources/harmattan/qml/StationPage.qml \
+    resources/harmattan/qml/SearchBar.qml \
+    resources/harmattan/qml/PageHeader.qml \
+    resources/harmattan/qml/uiconstants.js \
+    resources/harmattan/qml/StationListPage.js \
+    resources/harmattan/qml/AboutPage.qml \
+    resources/harmattan/qml/InfoBar.qml \
+    resources/harmattan/qml/DroppedShadow.qml \
+    resources/harmattan/qml/DelayIndicator.qml
+
 OTHER_FILES += \
     resources/harmattan/applications/quandoparte.desktop \
     resources/fremantle/applications/quandoparte.desktop \
@@ -115,16 +133,7 @@ OTHER_FILES += \
     resources/stations/stations.qpl \
     resources/stations/generatelist.xq \
     resources/stations/generateunclassifiedlist.xq \
-    resources/harmattan/qml/main.qml \
-    resources/harmattan/qml/StationListPage.qml \
-    resources/harmattan/qml/StationPage.qml \
-    resources/harmattan/qml/SearchBar.qml \
-    resources/harmattan/qml/PageHeader.qml \
-    resources/harmattan/qml/uiconstants.js \
-    resources/harmattan/qml/StationListPage.js \
-    resources/harmattan/qml/AboutPage.qml \
-    resources/harmattan/qml/InfoBar.qml \
-    resources/harmattan/qml/DroppedShadow.qml
+    $$QMLSOURCES
 
 unix {
     isEmpty(PREFIX) {
@@ -150,7 +159,11 @@ unix {
 
     BINDIR=$$PREFIX/bin
     DESKTOPDIR=$$PREFIX/share/applications
-    DATADIR=$$PREFIX/share/apps/$${TARGET}
+    contains(USE_RESOURCES,1) {
+        DATADIR=":"
+    } else {
+        DATADIR=$$PREFIX/share/apps/$${TARGET}
+    }
     DEFINES += DATADIR=\\\"$${DATADIR}\\\" PKGDATADIR=\\\"$${PKGDATADIR}\\\"
 }
 
@@ -187,14 +200,26 @@ unix:!symbian {
     INSTALLS += icon48
     INSTALLS += icon64
     INSTALLS += iconscalable
-    INSTALLS += css
-    INSTALLS += i18n
-    INSTALLS += stations
+    !contains(USE_RESOURCES,1) {
+        INSTALLS += css
+        INSTALLS += i18n
+        INSTALLS += stations
+    }
 }
 
-harmattan {
-    qml.files = resources/harmattan/qml/*.qml resources/harmattan/qml/*.js
-    qml.path = $$DATADIR/qml
-    INSTALLS += qml
+!contains(USE_RESOURCES,1) {
+    harmattan {
+        qml.files = resources/harmattan/qml/*.qml resources/harmattan/qml/*.js
+        qml.path = $$DATADIR/qml
+        INSTALLS += qml
+    }
 }
 
+contains(USE_RESOURCES,1) {
+    RESOURCES += \
+        quandoparte.qrc
+}
+
+hack_to_fix_translations {
+    SOURCES += $$QMLSOURCES
+}