forked from wznpp1/ShadowClash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ShadowClash.pro
161 lines (131 loc) · 4.38 KB
/
ShadowClash.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
QT += core gui network webenginewidgets
ICON = resources/icons/icon.icns
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = ShadowClash
CONFIG += c++11
CONFIG += sdk_no_version_check
CONFIG += lrelease
CONFIG += embed_translations
# 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). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses 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
win32 {
SOURCES += \
src/framelesswindow.cpp \
src/notificationcenter.cpp
RESOURCES += resources/shadowclash_windows.qrc
QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
LIBS += $$PWD/framework/libyaml-cpp.lib
}
macx {
OBJECTIVE_SOURCES += \
src/framelesswindow.mm \
src/notificationcenter.mm
LIBS += -framework Carbon -framework Cocoa -framework Security
RESOURCES += resources/shadowclash_mac.qrc
QMAKE_INFO_PLIST = resources/Info.plist
LIBS += $$PWD/framework/libyaml-cpp.a
}
unix:!mac {
SOURCES += \
src/notificationcenter.cpp
RESOURCES += resources/shadowclash_linux.qrc
LIBS += $$PWD/framework/libyaml-cpp.a
isEmpty(PREFIX) {
PREFIX = /usr/local
}
target.path = $$PREFIX/bin
shortcutfiles.files = resources/ShadowClash.desktop
shortcutfiles.path = $$PREFIX/share/applications/
data.files += resources/icons/Icon_256.png
data.path = $$PREFIX/share/hicolor/256x256/ShadowClash.png
INSTALLS += shortcutfiles
INSTALLS += data
}
!isEmpty(target.path): INSTALLS += target
SOURCES += \
src/aboutwindow.cpp \
src/addremoteconfigwindow.cpp \
src/apirequest.cpp \
src/appdelegate.cpp \
src/appversionutil.cpp \
src/clashconfig.cpp \
src/clashresourcemanager.cpp \
src/configmanager.cpp \
src/enhancemodemanager.cpp \
src/launchatlogin.cpp \
src/logger.cpp \
src/main.cpp \
src/mainwindow.cpp \
src/paths.cpp \
src/proxyconfighelpermanager.cpp \
src/remoteconfigmanager.cpp \
src/runguard.cpp \
src/settings.cpp \
src/systemtray.cpp \
src/remoteconfigwindow.cpp \
src/urlschemehandler.cpp
HEADERS += \
src/addremoteconfigwindow.h \
src/appdelegate.h \
src/appversionutil.h \
src/clashconfig.h \
src/clashresourcemanager.h \
src/enhancemodemanager.h \
src/framelesswindow.h \
src/aboutwindow.h \
src/apirequest.h \
src/configmanager.h \
src/launchatlogin.h \
src/logger.h \
src/mainwindow.h \
src/notificationcenter.h \
src/paths.h \
src/proxyconfighelpermanager.h \
src/remoteconfigmanager.h \
src/runguard.h \
src/settings.h \
src/systemtray.h \
src/shadowclash.h \
src/remoteconfigwindow.h \
src/urlschemehandler.h
INCLUDEPATH += $$PWD/src/plog/include
INCLUDEPATH += $$PWD/src/yaml-cpp/include
FORMS += \
ui/addremoteconfigwindow.ui \
ui/mainwindow.ui \
ui/aboutwindow.ui \
ui/remoteconfigwindow.ui
!include("src/fervor/Fervor.pri") {
error("Unable to include Fervor autoupdater.")
}
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
RESOURCES += \
resources/shadowclash.qrc
# Translation Part (from: https://github.com/lhy0403/Qv2ray)
QM_FILES_RESOURCE_PREFIX = "translations"
message("Detecting Translation files.....")
for(var, $$list($$files("translations/*.ts", true))) {
LOCALE_FILENAME = $$basename(var)
message(Found: $$LOCALE_FILENAME)
!equals(LOCALE_FILENAME, "shadowclash_en_US.ts") {
# ONLY USED IN LRELEASE CONTEXT - en-US is not EXTRA...
EXTRA_TRANSLATIONS += translations/$$LOCALE_FILENAME
}
}
TRANSLATIONS += \
translations/shadowclash_en_US.ts
message("Translations:" $$TRANSLATIONS)
message("EXTRA Translations:" $$EXTRA_TRANSLATIONS)
APP_QML_FILES.files += resources/clashxdashboard
APP_QML_FILES.files += resources/yacddashboard
APP_QML_FILES.path = Contents/Resources
QMAKE_BUNDLE_DATA += APP_QML_FILES
LIBS += $$PWD/framework/shadowclash.a