-
Notifications
You must be signed in to change notification settings - Fork 21
/
fu.pro
171 lines (148 loc) · 5.02 KB
/
fu.pro
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#-------------------------------------------------
#
# Project created by QtCreator 2019-04-29T21:23:38
#
#-------------------------------------------------
QT += core sql network
#QMAKE_CXXFLAGS += -fopenmp
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = fu
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# app version auto-updating
VERSION = $$system(cd \""$$_PRO_FILE_PWD_"\" && git branch --show-current)
DEFINES += APP_VERSION=\\\"$${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
CONFIG += c++11
SOURCES += \
src/aboutdialog.cpp \
src/components/errormessage.cpp \
src/components/flowlayout.cpp \
src/components/pathpicker.cpp \
src/components/previewbox.cpp \
src/components/tagbutton.cpp \
src/components/tagsedit.cpp \
src/components/thumbnaillabel.cpp \
src/configdialog.cpp \
src/core/clipservice.cpp \
src/core/formatservice.cpp \
src/core/serverservice.cpp \
src/core/settingservice.cpp \
src/core/tagservice.cpp \
src/core/uploadservice.cpp \
src/core/uploadthread.cpp \
src/historywindow.cpp \
src/application.cpp \
src/main.cpp \
src/protocols/ftpprotocol.cpp \
src/protocols/localstorageprotocol.cpp \
src/protocols/imgurprotocol.cpp \
src/protocols/qiniuprotocol.cpp \
src/protocols/sftpprotocol.cpp \
src/runguard.cpp \
src/store/migrations/migrationv0.cpp \
src/store/migrator.cpp \
src/upgradedialog.cpp \
src/uploaddialog.cpp
HEADERS += \
src/aboutdialog.h \
src/components/errormessage.h \
src/components/flowlayout.h \
src/components/focuswatcher.h \
src/components/pathpicker.h \
src/components/previewbox.h \
src/components/tagbutton.h \
src/components/tagsedit.h \
src/components/thumbnaillabel.h \
src/configdialog.h \
src/core/clipservice.h \
src/core/formatservice.h \
src/core/serverservice.h \
src/core/settingservice.h \
src/core/tagservice.h \
src/core/uploadservice.h \
src/core/uploadthread.h \
src/core/utils.h \
src/historywindow.h \
src/application.h \
src/models/clip.h \
src/models/format.h \
src/models/server.h \
src/models/tag.h \
src/models/upload.h \
src/protocols/base.h \
src/protocols/ftpprotocol.h \
src/protocols/localstorageprotocol.h \
src/protocols/imgurprotocol.h \
src/protocols/qiniuprotocol.h \
src/protocols/sftpprotocol.h \
src/runguard.h \
src/store/migration.h \
src/store/migrations/migrationv0.h \
src/store/migrator.h \
src/upgradedialog.h \
src/uploaddialog.h
FORMS += \
src/aboutdialog.ui \
src/configdialog.ui \
src/historywindow.ui \
src/upgradedialog.ui \
src/uploaddialog.ui
RESOURCES += \
fu.qrc
TRANSLATIONS = \
i18n/fu.zh_cn.ts \
i18n/fu.en_us.ts
TRANSLATIONS_FILES =
LANGS =
qtPrepareTool(LRELEASE, lrelease)
for(tsfile, TRANSLATIONS) {
qmfile = $$shadowed($$tsfile)
qmfile ~= s,.ts$,.qm,
qmdir = $$dirname(qmfile)
LANGS = $$LANGS,$$basename(qmfile)
!exists($$qmdir) {
mkpath($$qmdir)|error("Aborting.")
}
command = $$LRELEASE -removeidentical $$tsfile -qm $$qmfile
system($$command)|error("Failed to run: $$command")
TRANSLATIONS_FILES += $$qmfile
}
DEFINES += LANGS=\\\"$${LANGS}\\\"
CONFIG(release, debug|release) {
BUILD = release
}
CONFIG(debug, debug|release) {
BUILD = debug
}
msvc:COMPILER=msvc
gcc:COMPILER=gcc
ROOTDIR = $$PWD/..
DEPSDIR = $$ROOTDIR/deps/$$QT_ARCH/$$BUILD
DESTDIR = $$ROOTDIR/builds/fu-$$COMPILER-$$QT_ARCH-$$BUILD-$$VERSION
win32 {
RC_FILE = platforms/win32/fu.rc
INCLUDEPATH += $$DEPSDIR/include
LIBS += -L$$DEPSDIR/bin -lqcurl1
dlls.path = $$DESTDIR
dlls.files = $$DEPSDIR/bin/*.dll
INSTALLS += dlls
langs.path = $$DESTDIR/i18n
langs.files = $$qmdir/*.qm
INSTALLS += langs
}
unix {
LIBS += -lqcurl
}
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
DISTFILES +=