RingWinClient.pro 6.74 KB
Newer Older
1 2 3 4 5 6 7 8
#-------------------------------------------------
#
# Project created by QtCreator 2015-03-23T14:30:35
#
#-------------------------------------------------

QT       += core gui

9 10 11
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets svg xml

win32: QT += winextras
12

Guillaume Roguez's avatar
Guillaume Roguez committed
13
VERSION = 1.0.0
14
GIT_VERSION = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
15

16 17
NIGHTLY_VERSION =$$system(date +'%Y%m%d')

18
DEFINES += VERSION=\\\"$$VERSION\\\"
19
DEFINES += GIT_VERSION=\\\"$$GIT_VERSION\\\"
20
DEFINES += NIGHTLY_VERSION=\\\"$$NIGHTLY_VERSION\\\"
21

22
BUILD=$${BUILD}
Edric Milaret's avatar
Edric Milaret committed
23
TARGET = Ring
24 25 26 27
TEMPLATE = app

QMAKE_CXXFLAGS += -std=c++11

28 29 30 31
contains(BUILD, Debug) {
    QMAKE_STRIP = echo
    CONFIG += console
}
32

33 34 35 36
isEmpty(QMAKE_LRELEASE) {
    QMAKE_LRELEASE = lrelease
}

37 38 39 40 41 42 43 44
SOURCES += main.cpp\
        mainwindow.cpp \
    callwidget.cpp \
    configurationwidget.cpp \
    navstack.cpp \
    navwidget.cpp \
    accountdetails.cpp \
    aboutdialog.cpp \
45
    videowidget.cpp \
46
    utils.cpp \
47
    wizarddialog.cpp \
48
    windowscontactbackend.cpp \
Edric Milaret's avatar
Edric Milaret committed
49
    historydelegate.cpp \
50
    contactdelegate.cpp \
51
    selectareadialog.cpp \
52
    accountserializationadapter.cpp \
53
    instantmessagingwidget.cpp \
54 55
    accountstatedelegate.cpp \
    videoview.cpp \
Edric Milaret's avatar
Edric Milaret committed
56
    videooverlay.cpp \
57
    imdelegate.cpp \
58
    contactpicker.cpp \
59
    contactmethodpicker.cpp \
60
    globalsystemtray.cpp \
61
    smartlistdelegate.cpp \
62 63 64 65 66
    callutilsdialog.cpp \
    combar.cpp \
    idlabel.cpp \
    smartlist.cpp \
    ringcontactlineedit.cpp \
Edric Milaret's avatar
Edric Milaret committed
67 68
    pixbufmanipulator.cpp \
    qualitydialog.cpp
69 70 71 72 73 74 75 76

HEADERS  += mainwindow.h \
    callwidget.h \
    configurationwidget.h \
    navstack.h \
    navwidget.h \
    accountdetails.h \
    aboutdialog.h \
77
    videowidget.h \
78
    utils.h \
79
    wizarddialog.h \
80
    windowscontactbackend.h \
Edric Milaret's avatar
Edric Milaret committed
81
    historydelegate.h \
82
    contactdelegate.h \
83
    selectareadialog.h \
84
    accountserializationadapter.h \
85
    instantmessagingwidget.h \
86 87
    accountstatedelegate.h \
    videoview.h \
Edric Milaret's avatar
Edric Milaret committed
88
    videooverlay.h \
89
    imdelegate.h \
90
    contactpicker.h \
91
    contactmethodpicker.h \
92
    settingskey.h \
93
    globalsystemtray.h \
94
    smartlistdelegate.h \
95 96 97 98 99
    callutilsdialog.h \
    combar.h \
    idlabel.h \
    smartlist.h \
    ringcontactlineedit.h \
Edric Milaret's avatar
Edric Milaret committed
100
    pixbufmanipulator.h \
101 102
    qualitydialog.h \
    ringthemeutils.h
103

104 105 106 107 108
contains(DEFINES, URI_PROTOCOL) {
 HEADERS += shmclient.h
 SOURCES += shmclient.cpp
}

109 110 111 112 113
FORMS    += mainwindow.ui \
    callwidget.ui \
    configurationwidget.ui \
    accountdetails.ui \
    aboutdialog.ui \
114
    wizarddialog.ui \
115 116
    instantmessagingwidget.ui \
    videoview.ui \
117
    videooverlay.ui \
118
    contactpicker.ui \
119
    contactmethodpicker.ui \
120
    callutilsdialog.ui \
Edric Milaret's avatar
Edric Milaret committed
121 122
    combar.ui \
    qualitydialog.ui
123

124 125
win32: LIBS += -lole32 -luuid -lshlwapi

126
INCLUDEPATH += $${RING}/include/libringclient
127
INCLUDEPATH += $${RING}/include
128

129
LIBS += -L$${RING}/lib -lringclient
130 131 132

RESOURCES += \
    ressources.qrc
133 134 135

RC_FILE = ico.rc

136 137
TRANSLATIONS = translations/ring_client_windows.ts \
               translations/ring_client_windows_fr.ts \
138 139 140 141 142
               translations/ring_client_windows_ar.ts \
               translations/ring_client_windows_de.ts \
               translations/ring_client_windows_lt.ts \
               translations/ring_client_windows_ru.ts \
               translations/ring_client_windows_uk.ts \
143 144 145 146 147 148 149 150
               translations/ring_client_windows_cs_CZ.ts \
               translations/ring_client_windows_eo.ts \
               translations/ring_client_windows_es.ts \
               translations/ring_client_windows_he.ts \
               translations/ring_client_windows_pt_BR.ts \
               translations/ring_client_windows_pt.ts \
               translations/ring_client_windows_ru_RU.ts \
               translations/ring_client_windows_tr.ts
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169

maketranslationdir.target = customtarget
maketranslationdir.commands = $(MKDIR) $$OUT_PWD/share/ring/translations/

updateqm.input = TRANSLATIONS
updateqm.output = $$OUT_PWD/release/share/ring/translations/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm $$OUT_PWD/release/share/ring/translations/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link

QMAKE_EXTRA_TARGETS += maketranslationdir
QMAKE_EXTRA_COMPILERS += updateqm

PRE_TARGETDEPS += customtarget compiler_updateqm_make_all

QM_FILES.files = share
QM_FILES.path = $$OUT_PWD/release

INSTALLS += QM_FILES

170
DISTFILES += \
171
    License.rtf \
172
    ring.nsi
173

174 175
win32 {

176
    RINGTONES.files = $${RING}/share/ring/ringtones
177 178
    RINGTONES.path = $$OUT_PWD/release

179
    PACKAGING.files = ring.nsi images/ring.ico
180 181 182 183 184
    PACKAGING.path = $$OUT_PWD/release

    LICENSE.files = License.rtf
    LICENSE.path = $$OUT_PWD/release

185
    RUNTIMEDIR=$$[QT_INSTALL_BINS]
186 187 188 189

    RUNTIME.files = $${RING}/bin/libring.dll $${RING}/bin/libringclient.dll
    RUNTIME.path = $$OUT_PWD/release

190 191 192
    LRC_TRANSLATION.files = $${RING}/share/libringclient/translations
    LRC_TRANSLATION.path = $$OUT_PWD/release/share/libringclient/

193
    QTRUNTIME.files = $$RUNTIMEDIR/Qt5Core.dll $$RUNTIMEDIR/Qt5Widgets.dll \
194
                            $$RUNTIMEDIR/Qt5Gui.dll $$RUNTIMEDIR/Qt5Svg.dll \
195
                            $$RUNTIMEDIR/Qt5Xml.dll $$RUNTIMEDIR/Qt5WinExtras.dll
196 197
    QTRUNTIME.path = $$OUT_PWD/release

198
    QTDEPSRUNTIME.files = $$RUNTIMEDIR/zlib1.dll \
199 200 201
                            $$RUNTIMEDIR/libfreetype-6.dll $$RUNTIMEDIR/libglib-2.0-0.dll \
                            $$RUNTIMEDIR/libharfbuzz-0.dll \
                            $$RUNTIMEDIR/libintl-8.dll $$RUNTIMEDIR/libpcre-1.dll \
202
                            $$RUNTIMEDIR/libpcre16-0.dll $$RUNTIMEDIR/libpng16-16.dll \
203
                            $$RUNTIMEDIR/libjpeg-8.dll $$RUNTIMEDIR/libiconv-2.dll \
204 205 206
                            $$RUNTIMEDIR/libidn-11.dll $$RUNTIMEDIR/liblzma-5.dll \
                            $$RUNTIMEDIR/libGLESv2.dll $$RUNTIMEDIR/libbz2-1.dll \
                            $$RUNTIMEDIR/iconv.dll
207 208 209 210 211
    QTDEPSRUNTIME.path = $$OUT_PWD/release

    QTPLATFORMS.files = $$(QTDIR)/plugins/platforms/qwindows.dll
    QTPLATFORMS.path = $$OUT_PWD/release/platforms

212 213 214
    QTPLUGINIMAGE.files = $$(QTDIR)/plugins/imageformats/
    QTPLUGINIMAGE.path = $$OUT_PWD/release

215
    LIBSTD.files = $$RUNTIMEDIR/libgcc_s_sjlj-1.dll $$RUNTIMEDIR/libstdc++-6.dll \
216
                    $$RUNTIMEDIR/libwinpthread-1.dll $$RUNTIMEDIR/libgcc_s_seh-1.dll
217
    LIBSTD.path = $$OUT_PWD/release
218

219
    INSTALLS += RINGTONES PACKAGING LICENSE RUNTIME LRC_TRANSLATION QTRUNTIME QTDEPSRUNTIME \
220
                QTPLUGINIMAGE QTPLATFORMS LIBSTD
221 222 223 224 225 226 227 228 229 230

    ENABLE_AUTOUPDATE=$${ENABLE_AUTOUPDATE}
    equals (ENABLE_AUTOUPDATE, True) {
       DEFINES += ENABLE_AUTOUPDATE
       LIBS += -L$${RING}/lib -lWinSparkle
       WINSPARKLE.files = $${RING}/bin/WinSparkle.dll $${RING}/bin/libringclient.dll
       WINSPARKLE.path = $$OUT_PWD/release
       INSTALLS += WINSPARKLE
       message("AUTO UPDATES enabled")
    }
231
}