Log error code in case of network error
[quandoparte] / application / application.pro
1 #-------------------------------------------------
2 #
3 # Project created by QtCreator 2010-11-13T19:51:39
4 #
5 #-------------------------------------------------
6
7 VERSION = 0.5.1
8 USE_RESOURCES = 0
9
10 QT += webkit network
11 CONFIG += qt webkit mobility
12 MOBILITY = location
13
14 contains(MEEGO_EDITION,harmattan) {
15     CONFIG += harmattan
16 }
17
18 harmattan {
19     QT += declarative
20     PLATFORM = harmattan
21     DEFINES += TARGET_PLATFORM_HARMATTAN
22     # enable booster
23     CONFIG += qdeclarative-boostable
24     QMAKE_CXXFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-psabi
25     QMAKE_LFLAGS += -pie -rdynamic
26     PLATFORM_SOURCES = view.cpp
27     PLATFORM_HEADERS = view.h
28 }
29 maemo5 {
30     QT += maemo5
31     PLATFORM = fremantle
32     DEFINES += TARGET_PLATFORM_FREMANTLE
33     PLATFORM_SOURCES = \
34         app.cpp \
35         stationlistview.cpp \
36         stationview.cpp \
37         settingsdialog.cpp \
38         keypressforwarder.cpp
39     PLATFORM_HEADERS= \
40         app.h \
41         stationlistview.h \
42         keypressforwarder.h \
43         settingsdialog.h \
44         stationview.h
45 }
46 symbian {
47     QT += declarative
48     DEFINES += TARGET_PLATFORM_SYMBIAN
49     PLATFORM = symbian
50     PLATFORM_SOURCES = view.cpp
51     PLATFORM_HEADERS = view.h
52 }
53 !harmattan:!maemo5:!symbian {
54     PLATFORM = desktop
55     DEFINES += TARGET_PLATFORM_DESKTOP
56     PLATFORM_SOURCES = view.cpp
57 }
58
59 message(Compiling For:    $$PLATFORM)
60 message(Platform Sources: $$PLATFORM_SOURCES)
61 message(Qt Modules Used:  $$QT)
62 message(Building version: $$VERSION)
63
64 TARGET = quandoparte
65 TEMPLATE = app
66 VERSION_STRING = '\\"$${VERSION}\\"'
67 DEFINES += QP_VERSION=\"$${VERSION_STRING}\"
68
69 contains(USE_RESOURCES,1) {
70     DEFINES += USE_RESOURCES=1
71 }
72
73 !debug {
74     DEFINES += QT_NO_DEBUG_OUTPUT
75 }
76
77 TRANSLATIONS = resources/i18n/quandoparte_it.ts
78
79 SOURCES += \
80     $$PLATFORM_SOURCES \
81     main.cpp \
82     stationlistmodel.cpp \
83     stationlistproxymodel.cpp \
84     settings.cpp \
85     dataprovider.cpp \
86     stationschedulemodel.cpp \
87     stationscheduleitem.cpp
88
89 HEADERS += \
90     $$PLATFORM_HEADERS \
91     stationlistmodel.h \
92     stationlistproxymodel.h \
93     settings.h \
94     dataprovider.h \
95     stationschedulemodel.h \
96     stationscheduleitem.h
97
98 FORMS += \
99     settingsdialog.ui \
100     stationlistview.ui
101
102 symbian {
103     TARGET.UID3 = 0xe30fb688
104     # TARGET.CAPABILITY += 
105     TARGET.EPOCSTACKSIZE = 0x14000
106     TARGET.EPOCHEAPSIZE = 0x020000 0x800000
107 }
108
109 QMLSOURCES = \
110     resources/harmattan/qml/main.qml \
111     resources/harmattan/qml/StationListPage.qml \
112     resources/harmattan/qml/StationPage.qml \
113     resources/harmattan/qml/SearchBar.qml \
114     resources/harmattan/qml/PageHeader.qml \
115     resources/harmattan/qml/PageHeader.js \
116     resources/harmattan/qml/uiconstants.js \
117     resources/harmattan/qml/StationListPage.js \
118     resources/harmattan/qml/AboutPage.qml \
119     resources/harmattan/qml/InfoBar.qml \
120     resources/harmattan/qml/DroppedShadow.qml \
121     resources/harmattan/qml/DelayIndicator.qml \
122     resources/harmattan/qml/StationScheduleDelegate.qml
123
124 OTHER_FILES += \
125     resources/harmattan/applications/quandoparte.desktop \
126     resources/fremantle/applications/quandoparte.desktop \
127     icons/48x48/quandoparte.png \
128     icons/64x64/quandoparte.png \
129     icons/80x80/quandoparte.png \
130     icons/scalable/quandoparte.svg \
131     icons/quandoparte.png \
132     resources/quandoparte.css \
133     resources/arrivals.css \
134     resources/departures.css \
135     $$replace(TRANSLATIONS, .ts, .qm) \
136     resources/stations/stations.qpl \
137     resources/stations/generatelist.xq \
138     resources/stations/generateunclassifiedlist.xq \
139     $$QMLSOURCES
140
141 unix {
142     isEmpty(PREFIX) {
143         maemo5 {
144             PREFIX=/opt/usr
145         }
146         harmattan {
147             PREFIX=/opt/$${TARGET}
148         }
149         desktop {
150             PREFIX=/usr/local
151         }
152     }
153     maemo5 {
154         DESKTOPDIR=/usr/share/applications/hildon
155     }
156     harmattan {
157         DESKTOPDIR=/usr/share/applications
158     }
159     desktop {
160         DESKTOPDIR=$$PREFIX/share/applications
161     }
162
163     BINDIR=$$PREFIX/bin
164     contains(USE_RESOURCES,1) {
165         DATADIR=":"
166     } else {
167         DATADIR=$$PREFIX/share/apps/$${TARGET}
168     }
169     DEFINES += DATADIR=\\\"$${DATADIR}\\\" PKGDATADIR=\\\"$${PKGDATADIR}\\\"
170 }
171
172 message(Installing to prefix $$PREFIX)
173
174 unix:!symbian {
175     target.path = $$BINDIR
176     INSTALLS += target
177 }
178
179 unix:!symbian {
180     desktopfile.files = resources/$$PLATFORM/applications/$${TARGET}.desktop
181     desktopfile.path = $$DESKTOPDIR
182     INSTALLS += desktopfile
183 }
184
185 unix:!symbian {
186     i18n.files = $$replace(TRANSLATIONS, .ts, .qm)
187     stations.files = resources/stations/stations.qpl
188
189     i18n.path = $$DATADIR/i18n
190     stations.path = $$DATADIR/stations
191
192     icon48.files = icons/48x48/$${TARGET}.png
193     icon64.files = icons/64x64/$${TARGET}.png
194     iconscalable.files = icons/scalable/$${TARGET}.svg
195
196     icon48.path = /usr/share/icons/hicolor/48x48/apps
197     icon64.path = /usr/share/icons/hicolor/64x64/apps
198     iconscalable.path = /usr/share/icons/hicolor/scalable/apps
199
200     INSTALLS += icon48
201     INSTALLS += iconscalable
202     !contains(USE_RESOURCES,1) {
203         INSTALLS += i18n
204         INSTALLS += stations
205     }
206 }
207
208 maemo5 {
209     css.files = resources/$${TARGET}.css resources/arrivals.css resources/departures.css
210     css.path = $$DATADIR/css
211     !contains(USE_RESOURCES,1) {
212         INSTALLS += css
213     }
214 }
215
216 harmattan {
217     icon80.files = icons/80x80/$${TARGET}.png
218     icon80.path = /usr/share/icons/hicolor/meegotouch/apps
219     INSTALLS += icon80
220 }
221
222 !contains(USE_RESOURCES,1) {
223     harmattan {
224         qml.files = resources/harmattan/qml/*.qml resources/harmattan/qml/*.js
225         qml.path = $$DATADIR/qml
226         INSTALLS += qml
227     }
228 }
229
230 contains(USE_RESOURCES,1) {
231     RESOURCES += \
232         quandoparte.qrc
233 }
234
235 hack_to_fix_translations {
236     SOURCES += $$QMLSOURCES
237 }