-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathanylink.pro
122 lines (98 loc) · 3.16 KB
/
anylink.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
QT += core gui websockets widgets
CONFIG += c++14
TRANSLATIONS = i18n/anylink_zh_CN.ts
win32|macx|linux:!android {
include(3rdparty/SingleApplication/singleapplication.pri)
include(3rdparty/qtkeychain/qtkeychain.pri)
# used by SingleApplication
DEFINES += QAPPLICATION_CLASS=QApplication
}
# Copies the given files to the destination directory
defineTest(copyToDestDir) {
files = $$1
DDIR = $$DESTDIR/../
for(FILE, files) {
FILE = $$PWD/$$FILE
# Replace slashes in paths with backslashes for Windows
win32:FILE ~= s,/,\\,g
win32:DDIR ~= s,/,\\,g
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
}
export(QMAKE_POST_LINK)
}
defineTest(copyIcon) {
files = $$1
DDIR = $$PWD/installer/config
for(FILE, files) {
FILE = $$PWD/$$FILE
# Replace slashes in paths with backslashes for Windows
win32:FILE ~= s,/,\\,g
win32:DDIR ~= s,/,\\,g
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
}
export(QMAKE_POST_LINK)
}
VERSION = 0.9.5
macx {
# https://doc.qt.io/qt-6/qmake-variable-reference.html#qmake-info-plist The value of QMAKE_BUNDLE should not be set directly by the project.
QMAKE_TARGET_BUNDLE_PREFIX = pro.anylink
HEADERS += src/macdockiconhandler.h
SOURCES += src/macdockiconhandler.mm
TARGET = AnyLink
# QMAKE_APPLE_DEVICE_ARCHS = x86_64
ICON = resource/mac/anylink.icns
QMAKE_INFO_PLIST = resource/mac/Info.plist
DESTDIR = $$PWD/out/bin
copyIcon(resource/mac/anylink.icns)
}
win32 {
# https://doc.qt.io/qt-6/qmake-variable-reference.html#version
#RC_FILE = resource.rc
RC_ICONS = resource\windows\anylink.ico
QMAKE_TARGET_PRODUCT = "AnyLink Secure Client"
QMAKE_TARGET_COMPANY = "https://anylink.pro"
QMAKE_TARGET_DESCRIPTION = "AnyLink Secure Client"
QMAKE_TARGET_COPYRIGHT = "Copyright 2022-2023 https://anylink.pro. All rights reserved."
DESTDIR = $$PWD/out/bin
copyIcon(assets/anylink64.png resource/windows/anylink.ico)
}
linux:!android {
DESTDIR = $$PWD/out/opt/anylink/bin
copyToDestDir(assets/anylink.png resource/linux/anylink.desktop)
copyIcon(assets/anylink64.png)
}
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
src/anylink.cpp \
src/common.cpp \
src/configmanager.cpp \
src/detaildialog.cpp \
src/jsonrpcwebsocketclient.cpp \
src/keychainclass.cpp \
src/loading.cpp \
src/main.cpp \
src/profilemanager.cpp \
src/textbrowser.cpp
HEADERS += \
src/anylink.h \
src/common.h \
src/configmanager.h \
src/detaildialog.h \
src/jsonrpcwebsocketclient.h \
src/keychainclass.h \
src/loading.h \
src/profilemanager.h \
src/textbrowser.h
FORMS += \
src/anylink.ui \
src/detaildialog.ui \
src/profilemanager.ui \
src/textbrowser.ui
RESOURCES += \
i18n.qrc \
resource.qrc \
icons.qrc
DISTFILES += \
style.qss