aboutsummaryrefslogtreecommitdiff
path: root/src/WhatsApp.pro
blob: 64342d0bb04849f299bd650f7f3924ea9d308e2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#-------------------------------------------------
#
# Project created by QtCreator Wed Apr  7 02:25:15 IST 2021
#
#-------------------------------------------------

QT += core gui webengine webenginewidgets xml positioning

CONFIG += c++11

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

!qtConfig(webengine-spellchecker) {
    error("Qt WebEngine compiled without spellchecker support, this example will not work.")
}

qtConfig(webengine-native-spellchecker) {
    error("Spellcheck example can not be built when using native OS dictionaries.")
}

TARGET = whatsie
TEMPLATE = app
LIBS += -L/usr/X11/lib -lX11

win32{
    LIBS += User32.Lib
}

include(singleapplication/singleapplication.pri)
DEFINES += QAPPLICATION_CLASS=QApplication

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Refer to the documentation for the
# deprecated API to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# No debug output in release mode
CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT

# Define git info
GIT_HASH="\\\"$$system(git -C \""$$_PRO_FILE_PWD_"\" rev-parse --short HEAD)\\\""
GIT_BRANCH="\\\"$$system(git -C \""$$_PRO_FILE_PWD_"\" rev-parse --abbrev-ref HEAD)\\\""
BUILD_TIMESTAMP="\\\"$$system(date -u +\""%Y-%m-%dT%H:%M:%SUTC\"")\\\""
DEFINES += GIT_HASH=$$GIT_HASH GIT_BRANCH=$$GIT_BRANCH BUILD_TIMESTAMP=$$BUILD_TIMESTAMP

# Set program version
VERSION = 4.4
DEFINES += VERSIONSTR=\\\"$${VERSION}\\\"

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
        SunClock.cpp \
        about.cpp \
        automatictheme.cpp \
        dictionaries.cpp \
        downloadmanagerwidget.cpp \
        downloadwidget.cpp \
        elidedlabel.cpp \
        lock.cpp \
        main.cpp \
        mainwindow.cpp \
        permissiondialog.cpp \
        rateapp.cpp \
        settingswidget.cpp \
        utils.cpp \
        webenginepage.cpp \
        webview.cpp \
        widgets/scrolltext/scrolltext.cpp

RESOURCES += \
        icons.qrc

HEADERS += \
    SunClock.hpp \
    about.h \
    autolockeventfilter.h \
    automatictheme.h \
    common.h \
    dictionaries.h \
    downloadmanagerwidget.h \
    downloadwidget.h \
    elidedlabel.h \
    lock.h \
    mainwindow.h \
    notificationpopup.h \
    permissiondialog.h \
    rateapp.h \
    requestinterceptor.h \
    settingswidget.h \
    utils.h \
    webenginepage.h \
    webview.h \
    widgets/scrolltext/scrolltext.h


FORMS += \
    about.ui \
    automatictheme.ui \
    certificateerrordialog.ui \
    downloadmanagerwidget.ui \
    downloadwidget.ui \
    lock.ui \
    passworddialog.ui \
    permissiondialog.ui \
    rateapp.ui \
    settingswidget.ui

qtPrepareTool(CONVERT_TOOL, qwebengine_convert_dict)

DICTIONARIES_DIR = qtwebengine_dictionaries

dict.files = $$files($$PWD/dictionaries/*.dic, true)

dictoolbuild.input = dict.files
dictoolbuild.output = $${DICTIONARIES_DIR}/${QMAKE_FILE_BASE}.bdic
dictoolbuild.depends = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.aff
dictoolbuild.commands = $${CONVERT_TOOL} ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
dictoolbuild.name = Build ${QMAKE_FILE_IN_BASE}
dictoolbuild.CONFIG = no_link target_predeps
QMAKE_EXTRA_COMPILERS += dictoolbuild


# Default rules for deployment.
isEmpty(PREFIX){
 PREFIX = /usr
}

BINDIR  = $$PREFIX/bin
DATADIR = $$PREFIX/share

target.path = $$BINDIR

dicts.files = $${DICTIONARIES_DIR}/
dicts.path  = $$DATADIR/org.keshavnrj.ubuntu/WhatSie/

icon.files = icons/whatsie.png
icon.path  = $$DATADIR/icons/hicolor/512x512/apps/

desktop.files = whatsie.desktop
desktop.path  = $$DATADIR/applications/

INSTALLS += target dicts icon desktop