-
Notifications
You must be signed in to change notification settings - Fork 12
/
SubutaiControlCenter.pro
304 lines (269 loc) · 9.53 KB
/
SubutaiControlCenter.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
#-------------------------------------------------
#
# Project created by QtCreator 2016-02-17T12:15:31
#
#-------------------------------------------------
QT += core gui network websockets quick
CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4) : QT += widgets
TARGET = SubutaiControlCenter
TEMPLATE = app
INCLUDEPATH += commons/include
INCLUDEPATH += hub/include
INCLUDEPATH += hub/forms
INCLUDEPATH += libssh2/include
SOURCES += \
main.cpp \
commons/src/InternalCriticalSection.cpp \
commons/src/Commons.cpp \
hub/src/RestWorker.cpp \
hub/src/DlgLogin.cpp \
hub/src/SettingsManager.cpp \
hub/src/DlgSettings.cpp \
hub/src/TrayControlWindow.cpp \
hub/src/SystemCallWrapper.cpp \
hub/src/TrayWebSocketServer.cpp \
hub/src/HubController.cpp \
hub/src/DlgAbout.cpp \
hub/src/DownloadFileManager.cpp \
hub/src/updater/ExecutableUpdater.cpp \
hub/src/DlgGenerateSshKey.cpp \
hub/src/updater/HubComponentsUpdater.cpp \
hub/src/updater/UpdaterComponentP2P.cpp \
hub/src/updater/UpdaterComponentTray.cpp \
hub/src/updater/IUpdaterComponent.cpp \
libssh2/src/LibsshController.cpp \
commons/src/OsBranchConsts.cpp \
hub/src/SsdpController.cpp \
hub/src/RhController.cpp \
hub/src/NotificationLogger.cpp \
hub/src/DlgNotifications.cpp \
hub/src/NotificationObserver.cpp \
hub/src/DlgNotificationsModel.cpp \
hub/src/DlgNotification.cpp \
commons/src/Logger.cpp \
commons/src/LanguageController.cpp \
hub/src/DlgEnvironment.cpp \
hub/src/P2PController.cpp \
hub/src/X2GoClient.cpp \
hub/src/DlgPeer.cpp \
hub/src/TraySkinController.cpp \
hub/src/HostMachineController.cpp \
hub/forms/DlgTransferFile.cpp \
hub/src/DlgRegisterPeer.cpp \
DlgCreatePeer.cpp \
hub/src/PeerController.cpp \
commons/src/VagrantProvider.cpp \
hub/src/updater/UpdaterComponentVagrant.cpp \
hub/src/updater/UpdaterComponentX2go.cpp \
hub/src/updater/UpdaterComponentVirtualbox.cpp \
hub/src/updater/UpdaterComponentChrome.cpp \
hub/src/updater/UpdaterComponentFirefox.cpp \
hub/src/updater/UpdaterComponentE2E.cpp \
hub/src/updater/UpdaterComponentSubutaiBox.cpp \
hub/src/updater/UpdaterComponentVagrantSubutai.cpp \
hub/src/updater/UpdaterComponentVagrantVBguest.cpp \
commons/src/Environment.cpp \
hub/src/updater/UpdaterComponentVagrantLibvirt.cpp \
hub/src/updater/UpdaterComponentVagrantParallels.cpp \
hub/src/updater/UpdaterComponentVagrantVmware.cpp \
hub/src/updater/UpdaterComponentVMware.cpp \
hub/src/updater/UpdaterComponentVagrantVMwareUtility.cpp \
hub/src/updater/UpdaterComponentXQuartz.cpp \
hub/src/updater/UpdaterComponentHyperv.cpp \
hub/src/DlgCreateFolder.cpp \
hub/src/updater/UpdaterComponentKvm.cpp \
hub/src/updater/UpdaterComponentParallels.cpp \
hub/src/SshKeyController.cpp \
hub/src/echoclient.cpp
HEADERS += \
hub/include/RestWorker.h \
hub/include/DlgLogin.h \
hub/include/SettingsManager.h \
hub/include/DlgSettings.h \
hub/include/TrayControlWindow.h \
hub/include/SystemCallWrapper.h \
hub/include/TrayWebSocketServer.h \
hub/include/HubController.h \
hub/include/DlgAbout.h \
hub/include/RestContainers.h \
hub/include/DownloadFileManager.h \
hub/include/updater/ExecutableUpdater.h \
hub/include/DlgGenerateSshKey.h \
hub/include/updater/HubComponentsUpdater.h \
hub/include/updater/IUpdaterComponent.h \
hub/include/updater/UpdaterComponentP2P.h \
hub/include/updater/UpdaterComponentTray.h \
commons/include/InternalCriticalSection.h \
commons/include/Locker.h \
commons/include/Commons.h \
libssh2/include/LibsshController.h \
commons/include/OsBranchConsts.h \
hub/include/SsdpController.h \
hub/include/RhController.h \
hub/include/NotificationLogger.h \
hub/include/DlgNotifications.h \
hub/include/NotificationObserver.h \
hub/include/DlgNotificationsModel.h \
hub/include/DlgNotification.h \
commons/include/Logger.h \
commons/include/LanguageController.h \
hub/include/DlgEnvironment.h \
hub/include/P2PController.h \
hub/include/X2GoClient.h \
hub/include/DlgPeer.h \
hub/include/TraySkinController.h \
hub/include/HostMachineController.h \
hub/forms/DlgTransferFile.h \
hub/include/DlgRegisterPeer.h \
DlgCreatePeer.h \
hub/include/PeerController.h \
commons/include/VagrantProvider.h \
hub/include/updater/UpdaterComponentVagrant.h \
hub/include/updater/UpdaterComponentX2go.h \
hub/include/updater/UpdaterComponentVirtualbox.h \
hub/include/updater/UpdaterComponentChrome.h \
hub/include/updater/UpdaterComponentFirefox.h\
hub/include/updater/UpdaterComponentE2E.h \
hub/include/updater/UpdaterComponentSubutaiBox.h \
hub/include/updater/UpdaterComponentVagrantSubutai.h \
hub/include/updater/UpdaterComponentVagrantVBguest.h \
commons/include/Environment.h \
hub/include/updater/UpdaterComponentVagrantLibvirt.h \
hub/include/updater/UpdaterComponentVagrantParallels.h \
hub/include/updater/UpdaterComponentVagrantVmware.h \
hub/include/updater/UpdaterComponentVMware.h \
hub/include/updater/UpdaterComponentVagrantVMwareUtility.h \
hub/include/updater/UpdaterComponentXQuartz.h \
hub/include/updater/UpdaterComponentHyperv.h \
hub/include/DlgCreateFolder.h \
hub/include/updater/UpdaterComponentKvm.h \
hub/include/updater/UpdaterComponentParallels.h \
hub/include/SshKeyController.h \
hub/include/echoclient.h
TRANSLATIONS = SubutaiControlCenter_en_US.ts \
SubutaiControlCenter_ru_RU.ts \
SubutaiControlCenter_pt_BR.ts
FORMS += \
hub/forms/DlgLogin.ui \
hub/forms/DlgSettings.ui \
hub/forms/TrayControlWindow.ui \
hub/forms/DlgAbout.ui \
hub/forms/DlgGenerateSshKey.ui \
hub/forms/DlgNotifications.ui \
hub/forms/DlgNotification.ui \
hub/forms/DlgEnvironment.ui \
hub/forms/DlgPeer.ui \
hub/forms/DlgTransferFile.ui \
hub/forms/DlgRegisterPeer.ui \
DlgCreatePeer.ui \
hub/forms/DlgCreateFolder.ui
RESOURCES += \
resources/resources.qrc \
skins/skins.qrc
unix: {
TRAY_VERSION = $$system(cat version)
}
win32: {
TRAY_VERSION = $$system(type version)
}
DEFINES += QT_MESSAGELOGCONTEXT
DEFINES += TRAY_VERSION=\\\"$$TRAY_VERSION\\\"
TRAY_BUILD_NUMBER = $$system(git describe)
DEFINES += TRAY_BUILD_NUMBER=\\\"$$TRAY_BUILD_NUMBER\\\"
GIT_BRANCH_STR = $$system(git rev-parse --abbrev-ref HEAD)
DEFINES += GIT_BRANCH=\\\"$$GIT_BRANCH_STR\\\"
GBV=BT_MASTER
equals(GIT_BRANCH_STR, "master") {
GBV=BT_MASTER
}
equals(GIT_BRANCH_STR, "HEAD") {
GBV=BT_PROD
}
equals(GIT_BRANCH_STR, "head") {
GBV=BT_PROD
}
equals(GIT_BRANCH_STR, "dev") {
GBV=BT_DEV
}
DEFINES += CURRENT_BRANCH=$$GBV
#////////////////////////////////////////////////////////////////////////////
unix:!macx {
QMAKE_CXXFLAGS += -fshort-wchar
DEFINES += RT_OS_LINUX
DEFINES += CURRENT_OS=OS_LINUX
LIBS += -ldl -lpthread -lssh2
QMAKE_RPATHDIR += ../lib
}
#////////////////////////////////////////////////////////////////////////////
macx: {
DEFINES += RT_OS_DARWIN
DEFINES += CURRENT_OS=OS_MAC
QMAKE_LFLAGS += -F /System/Library/Frameworks/CoreFoundation.framework/
LIBS += -framework CoreFoundation
LIBS += -ldl -lpthread
ICON = $$PWD/resources/cc_icon_mac.icns
QMAKE_INFO_PLIST = $$PWD/Info.plist
LIBS += -L/usr/local/lib -lssh2
# USE WITH CROSS COMPILATION
# LIBS += -L$$PWD/libssh2/lib -lssh2
# QMAKE_CXXFLAGS += -fshort-wchar -stdlib=libc++ -std=c++11
# QMAKE_LFLAGS += -stdlib=libc++
}
#////////////////////////////////////////////////////////////////////////////
win32: {
CONFIG -= embed_manifest_exe
DEFINES += CURRENT_OS=OS_WIN
DEFINES += RT_OS_WINDOWS
LIBS += -lws2_32 -L$$PWD/libssh2/lib/win32 -llibssh2
RC_FILE = control-center.rc
# LIBS += -lpthread
# QMAKE_LFLAGS += -static-libstdc++ -static-libgcc
}
#////////////////////////////////////////////////////////////////////////////
tests {
message(Test build)
QT += testlib
TARGET = TestingTray
LIBS += -lgcov
#QMAKE_CXXFLAGS += --coverage
#QMAKE_LFLAGS += --coverage
QMAKE_CXXFLAGS += -g -fprofile-arcs -ftest-coverage -O0
QMAKE_LFLAGS += -g -fprofile-arcs -ftest-coverage -O0
SOURCES -= main.cpp
HEADERS += tests/CCommonsTest.h \
tests/Tester.h \
tests/LanguageControllerTest.h \
tests/LoggerTest.h \
tests/OsBranchConstsTest.h \
tests/TrayWebSocketServerTest.h \
tests/SystemCallWrapperTest.h \
tests/DlgNotificationsModelTest.h \
tests/NotificationObserverTest.h \
tests/DlgSettingsTest.h \
tests/NotificationLoggerTest.h \
tests/SettingsManagerTest.h \
tests/RhControllerTest.h \
tests/HubControlllerTest.h \
tests/DownloadFileManagerTest.h \
tests/RestWorkerTest.h
SOURCES += tests/main.cpp \
tests/CCommonsTest.cpp \
tests/Tester.cpp \
tests/LanguageControllerTest.cpp \
tests/LoggerTest.cpp \
tests/OsBranchConstsTest.cpp \
tests/TrayWebSocketServerTest.cpp \
tests/SystemCallWrapperTest.cpp \
tests/DlgNotificationsModelTest.cpp \
tests/NotificationObserverTest.cpp \
tests/DlgSettingsTest.cpp \
tests/NotificationLoggerTest.cpp \
tests/SettingsManagerTest.cpp \
tests/RhControllerTest.cpp \
tests/HubControlllerTest.cpp \
tests/DownloadFileManagerTest.cpp \
tests/RestWorkerTest.cpp
} else {
message(Normal build)
}