blob: b0a74fd88b7c5ac1b91093d00fd76e60dda5853a [file] [log] [blame]
Edric Milaret627500d2015-03-27 16:41:40 -04001#-------------------------------------------------
2#
3# Project created by QtCreator 2015-03-23T14:30:35
4#
5#-------------------------------------------------
6
7QT += core gui
8
Edric Milareted0b2802015-10-01 15:10:02 -04009greaterThan(QT_MAJOR_VERSION, 4): QT += widgets svg xml
10
11win32: QT += winextras
Edric Milaret627500d2015-03-27 16:41:40 -040012
Guillaume Rogueze024e472015-05-15 17:12:56 -040013VERSION = 0.3.0
Edric Milaret7af18792015-05-21 16:03:03 -040014GIT_VERSION = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
Edric Milaret627500d2015-03-27 16:41:40 -040015
Edric Milaret79d3f682015-12-09 12:32:52 -050016NIGHTLY_VERSION =$$system(date +'%Y%m%d')
17
Edric Milaret627500d2015-03-27 16:41:40 -040018DEFINES += VERSION=\\\"$$VERSION\\\"
Edric Milaret7af18792015-05-21 16:03:03 -040019DEFINES += GIT_VERSION=\\\"$$GIT_VERSION\\\"
Edric Milaret79d3f682015-12-09 12:32:52 -050020DEFINES += NIGHTLY_VERSION=\\\"$$NIGHTLY_VERSION\\\"
Edric Milaret627500d2015-03-27 16:41:40 -040021
Edric Milaretf38362d2015-05-08 11:53:46 -040022BUILD=$${BUILD}
Edric Milareta34e4ba2015-06-01 14:47:49 -040023TARGET = Ring
Edric Milaret627500d2015-03-27 16:41:40 -040024TEMPLATE = app
25
26QMAKE_CXXFLAGS += -std=c++11
27
Edric Milaretf38362d2015-05-08 11:53:46 -040028contains(BUILD, Debug) {
29 QMAKE_STRIP = echo
30 CONFIG += console
31}
Edric Milaret627500d2015-03-27 16:41:40 -040032
Edric Milaret53ac6e52015-09-14 13:37:06 -040033isEmpty(QMAKE_LRELEASE) {
34 QMAKE_LRELEASE = lrelease
35}
36
Edric Milaret627500d2015-03-27 16:41:40 -040037SOURCES += main.cpp\
38 mainwindow.cpp \
39 callwidget.cpp \
40 configurationwidget.cpp \
41 navstack.cpp \
42 navbar.cpp \
Edric Milaret627500d2015-03-27 16:41:40 -040043 navwidget.cpp \
44 accountdetails.cpp \
Edric Milaret627500d2015-03-27 16:41:40 -040045 aboutdialog.cpp \
Edric Milaret4bba46d2015-04-29 16:33:38 -040046 videowidget.cpp \
Edric Milaret559bda52015-04-29 17:02:31 -040047 utils.cpp \
Edric Milaret67007d12015-05-07 09:40:09 -040048 wizarddialog.cpp \
Edric Milaret53f57b62015-05-11 11:02:17 -040049 windowscontactbackend.cpp \
Edric Milaretdb76aa82015-05-11 16:01:00 -040050 historydelegate.cpp \
Edric Milaret7153eed2015-06-03 15:29:03 -040051 contactdelegate.cpp \
Edric Milaret3e6aefe2015-06-05 16:07:26 -040052 selectareadialog.cpp \
Edric Milaretcdc978b2015-06-04 11:25:12 -040053 accountserializationadapter.cpp \
Edric Milaret5d61a062015-06-12 11:16:08 -040054 instantmessagingwidget.cpp \
Edric Milaret029b95a2015-06-09 09:51:44 -040055 accountstatedelegate.cpp \
56 videoview.cpp \
Edric Milaret83b248c2015-06-02 11:42:23 -040057 videooverlay.cpp \
Edric Milaret43f3c1e2015-07-16 17:52:47 -040058 imdelegate.cpp \
Edric Milaret2afd2bf2015-07-21 17:12:25 -040059 contactpicker.cpp \
Edric Milaret2cf34292015-06-22 16:27:03 -040060 contactmethodpicker.cpp \
Edric Milaret5cbf2b62015-07-09 11:36:53 -040061 globalsystemtray.cpp \
Edric Milaret80e0b212015-10-16 10:07:43 -040062 smartlistdelegate.cpp \
Nicolas Jager97a21b42015-12-03 16:55:45 -050063 callutilsdialog.cpp \
64 combar.cpp \
65 idlabel.cpp \
66 smartlist.cpp \
67 mainwindowtoolbar.cpp \
68 ringcontactlineedit.cpp \
Edric Milaret864a2052016-01-14 15:45:03 -050069 pixbufmanipulator.cpp \
70 qualitydialog.cpp
Edric Milaret627500d2015-03-27 16:41:40 -040071
72HEADERS += mainwindow.h \
73 callwidget.h \
74 configurationwidget.h \
75 navstack.h \
76 navbar.h \
Edric Milaret627500d2015-03-27 16:41:40 -040077 navwidget.h \
78 accountdetails.h \
Edric Milaret627500d2015-03-27 16:41:40 -040079 aboutdialog.h \
Edric Milaret4bba46d2015-04-29 16:33:38 -040080 videowidget.h \
Edric Milaret559bda52015-04-29 17:02:31 -040081 utils.h \
Edric Milaret67007d12015-05-07 09:40:09 -040082 wizarddialog.h \
Edric Milaret53f57b62015-05-11 11:02:17 -040083 windowscontactbackend.h \
Edric Milaretdb76aa82015-05-11 16:01:00 -040084 historydelegate.h \
Edric Milaret7153eed2015-06-03 15:29:03 -040085 contactdelegate.h \
Edric Milaret3e6aefe2015-06-05 16:07:26 -040086 selectareadialog.h \
Edric Milaretcdc978b2015-06-04 11:25:12 -040087 accountserializationadapter.h \
Edric Milaret5d61a062015-06-12 11:16:08 -040088 instantmessagingwidget.h \
Edric Milaret029b95a2015-06-09 09:51:44 -040089 accountstatedelegate.h \
90 videoview.h \
Edric Milaret83b248c2015-06-02 11:42:23 -040091 videooverlay.h \
Edric Milaret43f3c1e2015-07-16 17:52:47 -040092 imdelegate.h \
Edric Milaret2afd2bf2015-07-21 17:12:25 -040093 contactpicker.h \
Edric Milaretb25af972015-06-17 16:55:45 -040094 contactmethodpicker.h \
Edric Milaret2cf34292015-06-22 16:27:03 -040095 settingskey.h \
Edric Milaret5cbf2b62015-07-09 11:36:53 -040096 globalsystemtray.h \
Edric Milaret80e0b212015-10-16 10:07:43 -040097 smartlistdelegate.h \
Nicolas Jager97a21b42015-12-03 16:55:45 -050098 callutilsdialog.h \
99 combar.h \
100 idlabel.h \
101 smartlist.h \
102 mainwindowtoolbar.h \
103 ringcontactlineedit.h \
Edric Milaret864a2052016-01-14 15:45:03 -0500104 pixbufmanipulator.h \
Edric Milaret4e370992016-01-20 11:29:32 -0500105 qualitydialog.h \
106 ringthemeutils.h
Edric Milaret627500d2015-03-27 16:41:40 -0400107
Edric Milaretfe390942015-08-04 13:41:03 -0400108contains(DEFINES, URI_PROTOCOL) {
109 HEADERS += shmclient.h
110 SOURCES += shmclient.cpp
111}
112
Edric Milaret627500d2015-03-27 16:41:40 -0400113FORMS += mainwindow.ui \
114 callwidget.ui \
115 configurationwidget.ui \
116 navbar.ui \
Edric Milaret627500d2015-03-27 16:41:40 -0400117 accountdetails.ui \
118 aboutdialog.ui \
Edric Milaretcdc978b2015-06-04 11:25:12 -0400119 wizarddialog.ui \
Edric Milaret029b95a2015-06-09 09:51:44 -0400120 instantmessagingwidget.ui \
121 videoview.ui \
Edric Milaret43f3c1e2015-07-16 17:52:47 -0400122 videooverlay.ui \
Edric Milaret2afd2bf2015-07-21 17:12:25 -0400123 contactpicker.ui \
Edric Milaret5cbf2b62015-07-09 11:36:53 -0400124 contactmethodpicker.ui \
Nicolas Jager97a21b42015-12-03 16:55:45 -0500125 callutilsdialog.ui \
Edric Milaret864a2052016-01-14 15:45:03 -0500126 combar.ui \
127 qualitydialog.ui
Edric Milaret627500d2015-03-27 16:41:40 -0400128
Edric Milaret4bba46d2015-04-29 16:33:38 -0400129win32: LIBS += -lole32 -luuid -lshlwapi
130
Edric Milaretf38362d2015-05-08 11:53:46 -0400131INCLUDEPATH += $${RING}/include/libringclient
Edric Milaret79d3f682015-12-09 12:32:52 -0500132INCLUDEPATH += $${RING}/include
Edric Milaret627500d2015-03-27 16:41:40 -0400133
Edric Milaret1eca0292015-06-29 12:03:36 -0400134LIBS += -L$${RING}/lib -lringclient
Edric Milaret627500d2015-03-27 16:41:40 -0400135
136RESOURCES += \
137 ressources.qrc
Edric Milaret18e81842015-04-29 13:51:36 -0400138
139RC_FILE = ico.rc
140
Edric Milaret68ce2e62015-09-18 11:50:06 -0400141TRANSLATIONS = translations/ring_client_windows.ts \
142 translations/ring_client_windows_fr.ts \
Edric Milaret24c15d72015-10-15 10:06:26 -0400143 translations/ring_client_windows_ar.ts \
144 translations/ring_client_windows_de.ts \
145 translations/ring_client_windows_lt.ts \
146 translations/ring_client_windows_ru.ts \
147 translations/ring_client_windows_uk.ts \
Edric Milaret53ac6e52015-09-14 13:37:06 -0400148
149maketranslationdir.target = customtarget
150maketranslationdir.commands = $(MKDIR) $$OUT_PWD/share/ring/translations/
151
152updateqm.input = TRANSLATIONS
153updateqm.output = $$OUT_PWD/release/share/ring/translations/${QMAKE_FILE_BASE}.qm
154updateqm.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm $$OUT_PWD/release/share/ring/translations/${QMAKE_FILE_BASE}.qm
155updateqm.CONFIG += no_link
156
157QMAKE_EXTRA_TARGETS += maketranslationdir
158QMAKE_EXTRA_COMPILERS += updateqm
159
160PRE_TARGETDEPS += customtarget compiler_updateqm_make_all
161
162QM_FILES.files = share
163QM_FILES.path = $$OUT_PWD/release
164
165INSTALLS += QM_FILES
166
Edric Milaret18e81842015-04-29 13:51:36 -0400167DISTFILES += \
Edric Milaret031c3052015-04-29 18:14:18 -0400168 License.rtf \
Edric Milaret34eb9202015-05-14 12:36:41 -0400169 ring.nsi
Edric Milaret031c3052015-04-29 18:14:18 -0400170
Edric Milaretf38362d2015-05-08 11:53:46 -0400171win32 {
Edric Milaret031c3052015-04-29 18:14:18 -0400172
Edric Milaretb1b00ce2016-02-03 14:10:05 -0500173 RINGTONES.files = $${RING}/share/ring/ringtones
Edric Milaretf38362d2015-05-08 11:53:46 -0400174 RINGTONES.path = $$OUT_PWD/release
Edric Milaret031c3052015-04-29 18:14:18 -0400175
Edric Milaret34eb9202015-05-14 12:36:41 -0400176 PACKAGING.files = ring.nsi images/ring.ico
Edric Milaretf38362d2015-05-08 11:53:46 -0400177 PACKAGING.path = $$OUT_PWD/release
Edric Milaret031c3052015-04-29 18:14:18 -0400178
Edric Milaretf38362d2015-05-08 11:53:46 -0400179 LICENSE.files = License.rtf
180 LICENSE.path = $$OUT_PWD/release
181
Edric Milarete36688f2015-11-24 13:31:50 -0500182 RUNTIMEDIR=$$[QT_INSTALL_BINS]
Edric Milaretf38362d2015-05-08 11:53:46 -0400183
184 RUNTIME.files = $${RING}/bin/libring.dll $${RING}/bin/libringclient.dll
185 RUNTIME.path = $$OUT_PWD/release
186
Edric Milaret53ac6e52015-09-14 13:37:06 -0400187 LRC_TRANSLATION.files = $${RING}/share/libringclient/translations
188 LRC_TRANSLATION.path = $$OUT_PWD/release/share/libringclient/
189
Edric Milaretf38362d2015-05-08 11:53:46 -0400190 QTRUNTIME.files = $$RUNTIMEDIR/Qt5Core.dll $$RUNTIMEDIR/Qt5Widgets.dll \
Edric Milaret43f3c1e2015-07-16 17:52:47 -0400191 $$RUNTIMEDIR/Qt5Gui.dll $$RUNTIMEDIR/Qt5Svg.dll \
Edric Milaret2cf34292015-06-22 16:27:03 -0400192 $$RUNTIMEDIR/Qt5Xml.dll $$RUNTIMEDIR/Qt5WinExtras.dll
Edric Milaretf38362d2015-05-08 11:53:46 -0400193 QTRUNTIME.path = $$OUT_PWD/release
194
Edric Milaret791f0002015-09-28 12:58:47 -0400195 QTDEPSRUNTIME.files = $$RUNTIMEDIR/zlib1.dll \
Edric Milaretf38362d2015-05-08 11:53:46 -0400196 $$RUNTIMEDIR/libfreetype-6.dll $$RUNTIMEDIR/libglib-2.0-0.dll \
197 $$RUNTIMEDIR/libharfbuzz-0.dll \
198 $$RUNTIMEDIR/libintl-8.dll $$RUNTIMEDIR/libpcre-1.dll \
Edric Milaret7d40a4a2015-05-13 13:01:15 -0400199 $$RUNTIMEDIR/libpcre16-0.dll $$RUNTIMEDIR/libpng16-16.dll \
Edric Milaretff4946b2015-10-14 09:25:28 -0400200 $$RUNTIMEDIR/libjpeg-8.dll $$RUNTIMEDIR/libiconv-2.dll \
Edric Milarete36688f2015-11-24 13:31:50 -0500201 $$RUNTIMEDIR/libidn-11.dll $$RUNTIMEDIR/liblzma-5.dll \
202 $$RUNTIMEDIR/libGLESv2.dll $$RUNTIMEDIR/libbz2-1.dll \
203 $$RUNTIMEDIR/iconv.dll
Edric Milaretf38362d2015-05-08 11:53:46 -0400204 QTDEPSRUNTIME.path = $$OUT_PWD/release
205
206 QTPLATFORMS.files = $$(QTDIR)/plugins/platforms/qwindows.dll
207 QTPLATFORMS.path = $$OUT_PWD/release/platforms
208
Edric Milaret7d40a4a2015-05-13 13:01:15 -0400209 QTPLUGINIMAGE.files = $$(QTDIR)/plugins/imageformats/
210 QTPLUGINIMAGE.path = $$OUT_PWD/release
211
Edric Milaretf38362d2015-05-08 11:53:46 -0400212 LIBSTD.files = $$RUNTIMEDIR/libgcc_s_sjlj-1.dll $$RUNTIMEDIR/libstdc++-6.dll \
Edric Milaret9de048c2016-02-18 16:01:24 -0500213 $$RUNTIMEDIR/libwinpthread-1.dll $$RUNTIMEDIR/libgcc_s_seh-1.dll
Edric Milaretf38362d2015-05-08 11:53:46 -0400214 LIBSTD.path = $$OUT_PWD/release
215
Edric Milaret53ac6e52015-09-14 13:37:06 -0400216 INSTALLS += RINGTONES PACKAGING LICENSE RUNTIME LRC_TRANSLATION QTRUNTIME QTDEPSRUNTIME \
Edric Milaret7d40a4a2015-05-13 13:01:15 -0400217 QTPLUGINIMAGE QTPLATFORMS LIBSTD
Edric Milaret79d3f682015-12-09 12:32:52 -0500218
219 ENABLE_AUTOUPDATE=$${ENABLE_AUTOUPDATE}
220 equals (ENABLE_AUTOUPDATE, True) {
221 DEFINES += ENABLE_AUTOUPDATE
222 LIBS += -L$${RING}/lib -lWinSparkle
223 WINSPARKLE.files = $${RING}/bin/WinSparkle.dll $${RING}/bin/libringclient.dll
224 WINSPARKLE.path = $$OUT_PWD/release
225 INSTALLS += WINSPARKLE
226 message("AUTO UPDATES enabled")
227 }
Edric Milaretf38362d2015-05-08 11:53:46 -0400228}