2021-07-28 16:13:29 +07:00
QT += widgets core gui network xml remoteobjects quick
2020-12-16 06:02:22 +03:00
TARGET = AmneziaVPN
TEMPLATE = app
2021-01-07 20:53:42 +03:00
# CONFIG += console
2020-12-16 06:02:22 +03:00
2021-09-24 13:14:35 +03:00
CONFIG += qtquickcompiler
2021-12-20 02:29:23 +03:00
CONFIG += qzxing_multimedia \
enable_decoder_qr_code \
enable_encoder_qr_code
2021-09-24 13:14:35 +03:00
2020-12-16 06:02:22 +03:00
DEFINES += QT_DEPRECATED_WARNINGS
2021-07-27 09:33:49 +03:00
include ( "3rd/QtSsh/src/ssh/qssh.pri" )
2020-12-26 23:55:20 +03:00
include ( "3rd/QtSsh/src/botan/botan.pri" )
2021-08-08 18:10:09 +03:00
! android : ! ios : include ( "3rd/SingleApplication/singleapplication.pri" )
2021-09-16 16:19:14 +03:00
include ( "3rd/SortFilterProxyModel/SortFilterProxyModel.pri" )
2021-12-20 02:29:23 +03:00
include ( "3rd/QZXing/src/QZXing-components.pri" )
2020-12-26 23:55:20 +03:00
2021-10-17 13:03:03 +03:00
INCLUDEPATH += $ $ PWD / 3 rd / OpenSSL / include
DEPENDPATH += $ $ PWD / 3 rd / OpenSSL / include
2020-12-16 06:02:22 +03:00
HEADERS += \
2021-02-02 01:47:40 +03:00
. . / ipc / ipc . h \
2021-04-04 23:12:36 +03:00
configurators / cloak_configurator . h \
2021-10-04 19:07:49 +03:00
configurators / ikev2_configurator . h \
2021-05-07 23:28:37 +03:00
configurators / shadowsocks_configurator . h \
2021-06-12 11:59:36 +03:00
configurators / ssh_configurator . h \
2021-05-10 02:33:31 +03:00
configurators / vpn_configurator . h \
2021-06-12 11:59:36 +03:00
configurators / wireguard_configurator . h \
2021-09-09 20:15:44 +03:00
containers / containers_defs . h \
2021-01-07 20:53:42 +03:00
core / defs . h \
core / errorstrings . h \
2021-02-02 01:47:40 +03:00
core / ipcclient . h \
2021-04-04 23:12:36 +03:00
configurators / openvpn_configurator . h \
2021-11-19 19:02:39 +03:00
core / privileged_process . h \
2021-04-04 23:12:36 +03:00
core / scripts_registry . h \
core / server_defs . h \
2021-01-07 20:53:42 +03:00
core / servercontroller . h \
debug . h \
defines . h \
managementserver . h \
2021-04-04 23:12:36 +03:00
protocols / protocols_defs . h \
2021-01-07 20:53:42 +03:00
settings . h \
2021-11-26 17:43:02 +03:00
ui / notificationhandler . h \
2021-09-10 22:19:00 +03:00
ui / models / containers_model . h \
ui / models / protocols_model . h \
2021-09-03 20:17:13 +03:00
ui / pages . h \
ui / pages_logic / AppSettingsLogic . h \
ui / pages_logic / GeneralSettingsLogic . h \
ui / pages_logic / NetworkSettingsLogic . h \
2021-09-07 11:48:25 +03:00
ui / pages_logic / NewServerProtocolsLogic . h \
2021-09-07 21:01:56 +03:00
ui / pages_logic / PageLogicBase . h \
2021-12-20 02:29:23 +03:00
ui / pages_logic / QrDecoderLogic . h \
2021-09-20 21:51:28 +03:00
ui / pages_logic / ServerConfiguringProgressLogic . h \
2021-09-07 19:26:58 +03:00
ui / pages_logic / ServerContainersLogic . h \
2021-09-03 20:17:13 +03:00
ui / pages_logic / ServerListLogic . h \
ui / pages_logic / ServerSettingsLogic . h \
ui / pages_logic / ShareConnectionLogic . h \
ui / pages_logic / SitesLogic . h \
2021-09-04 12:53:58 +03:00
ui / pages_logic / StartPageLogic . h \
2021-09-03 20:17:13 +03:00
ui / pages_logic / VpnLogic . h \
ui / pages_logic / WizardLogic . h \
2021-09-06 13:41:45 +03:00
ui / pages_logic / protocols / CloakLogic . h \
ui / pages_logic / protocols / OpenVpnLogic . h \
2021-09-22 14:49:08 +03:00
ui / pages_logic / protocols / OtherProtocolsLogic . h \
2021-09-16 16:19:14 +03:00
ui / pages_logic / protocols / PageProtocolLogicBase . h \
2021-09-06 13:41:45 +03:00
ui / pages_logic / protocols / ShadowSocksLogic . h \
2021-09-07 22:11:43 +03:00
ui / property_helper . h \
2021-09-09 20:15:44 +03:00
ui / models / servers_model . h \
2021-07-28 16:13:29 +07:00
ui / uilogic . h \
2021-02-24 21:58:32 +03:00
ui / qautostart . h \
2021-09-09 20:15:44 +03:00
ui / models / sites_model . h \
2021-01-07 20:53:42 +03:00
utils . h \
vpnconnection . h \
protocols / vpnprotocol . h \
2021-10-23 04:26:47 -07:00
logger . h \
loghandler . h \
loglevel . h \
constants . h
2020-12-16 06:02:22 +03:00
SOURCES += \
2021-04-04 23:12:36 +03:00
configurators / cloak_configurator . cpp \
2021-10-04 19:07:49 +03:00
configurators / ikev2_configurator . cpp \
2021-05-07 23:28:37 +03:00
configurators / shadowsocks_configurator . cpp \
2021-06-12 11:59:36 +03:00
configurators / ssh_configurator . cpp \
2021-05-10 02:33:31 +03:00
configurators / vpn_configurator . cpp \
2021-06-12 11:59:36 +03:00
configurators / wireguard_configurator . cpp \
2021-09-09 20:15:44 +03:00
containers / containers_defs . cpp \
2021-05-10 02:33:31 +03:00
core / errorstrings . cpp \
2021-02-02 01:47:40 +03:00
core / ipcclient . cpp \
2021-04-04 23:12:36 +03:00
configurators / openvpn_configurator . cpp \
2021-11-19 19:02:39 +03:00
core / privileged_process . cpp \
2021-04-04 23:12:36 +03:00
core / scripts_registry . cpp \
core / server_defs . cpp \
2021-01-07 20:53:42 +03:00
core / servercontroller . cpp \
debug . cpp \
main . cpp \
managementserver . cpp \
2021-05-10 02:33:31 +03:00
protocols / protocols_defs . cpp \
2021-01-07 20:53:42 +03:00
settings . cpp \
2021-11-26 17:43:02 +03:00
ui / notificationhandler . cpp \
2021-09-10 22:19:00 +03:00
ui / models / containers_model . cpp \
ui / models / protocols_model . cpp \
2021-09-03 20:17:13 +03:00
ui / pages_logic / AppSettingsLogic . cpp \
ui / pages_logic / GeneralSettingsLogic . cpp \
ui / pages_logic / NetworkSettingsLogic . cpp \
2021-09-07 11:48:25 +03:00
ui / pages_logic / NewServerProtocolsLogic . cpp \
2021-09-07 21:01:56 +03:00
ui / pages_logic / PageLogicBase . cpp \
2021-12-20 02:29:23 +03:00
ui / pages_logic / QrDecoderLogic . cpp \
2021-09-20 21:51:28 +03:00
ui / pages_logic / ServerConfiguringProgressLogic . cpp \
2021-09-07 19:26:58 +03:00
ui / pages_logic / ServerContainersLogic . cpp \
2021-09-03 20:17:13 +03:00
ui / pages_logic / ServerListLogic . cpp \
ui / pages_logic / ServerSettingsLogic . cpp \
ui / pages_logic / ShareConnectionLogic . cpp \
ui / pages_logic / SitesLogic . cpp \
2021-09-04 12:53:58 +03:00
ui / pages_logic / StartPageLogic . cpp \
2021-09-03 20:17:13 +03:00
ui / pages_logic / VpnLogic . cpp \
ui / pages_logic / WizardLogic . cpp \
2021-09-06 13:41:45 +03:00
ui / pages_logic / protocols / CloakLogic . cpp \
ui / pages_logic / protocols / OpenVpnLogic . cpp \
2021-09-22 14:49:08 +03:00
ui / pages_logic / protocols / OtherProtocolsLogic . cpp \
2021-09-16 16:19:14 +03:00
ui / pages_logic / protocols / PageProtocolLogicBase . cpp \
2021-09-06 13:41:45 +03:00
ui / pages_logic / protocols / ShadowSocksLogic . cpp \
2021-09-09 20:15:44 +03:00
ui / models / servers_model . cpp \
2021-07-28 16:13:29 +07:00
ui / uilogic . cpp \
2021-02-24 21:58:32 +03:00
ui / qautostart . cpp \
2021-09-09 20:15:44 +03:00
ui / models / sites_model . cpp \
2021-01-07 20:53:42 +03:00
utils . cpp \
vpnconnection . cpp \
protocols / vpnprotocol . cpp \
2021-10-23 04:26:47 -07:00
logger . cpp \
loghandler . cpp
2020-12-16 06:02:22 +03:00
RESOURCES += \
2021-01-07 20:53:42 +03:00
resources . qrc
2020-12-16 06:02:22 +03:00
TRANSLATIONS = \
2021-01-07 20:53:42 +03:00
translations / amneziavpn_ru . ts
2020-12-16 06:02:22 +03:00
win32 {
2021-11-30 21:51:06 +03:00
DEFINES += MVPN_WINDOWS
2020-12-16 06:02:22 +03:00
OTHER_FILES += platform_win / vpnclient . rc
RC_FILE = platform_win / vpnclient . rc
2021-01-03 23:55:04 +03:00
HEADERS += \
2021-12-21 02:57:23 +03:00
protocols / ikev2_vpn_protocol_windows . h \
ui / framelesswindow . h
2021-01-03 23:55:04 +03:00
2021-01-03 21:18:20 +03:00
SOURCES += \
2021-12-21 02:57:23 +03:00
protocols / ikev2_vpn_protocol_windows . cpp \
2021-01-03 21:18:20 +03:00
ui / framelesswindow . cpp
2020-12-16 06:02:22 +03:00
2021-12-21 02:57:23 +03:00
VERSION = 2.0 .0 .0
2020-12-16 06:02:22 +03:00
QMAKE_TARGET_COMPANY = "AmneziaVPN"
QMAKE_TARGET_PRODUCT = "AmneziaVPN"
2021-01-03 21:18:20 +03:00
2020-12-16 06:02:22 +03:00
LIBS += \
- luser32 \
- lrasapi32 \
- lshlwapi \
- liphlpapi \
- lws2_32 \
- liphlpapi \
- lgdi32
2021-10-17 13:03:03 +03:00
! contains ( QMAKE_TARGET . arch , x86_64 ) {
2021-10-18 05:11:50 -07:00
message ( "Windows x86 build" )
2021-10-18 18:49:15 +03:00
LIBS += - L $ $ PWD / 3 rd / OpenSSL / lib / windows / x86 / - llibssl - llibcrypto
2021-10-17 13:03:03 +03:00
}
else {
2021-10-18 05:11:50 -07:00
message ( "Windows x86_64 build" )
2021-10-18 18:49:15 +03:00
LIBS += - L $ $ PWD / 3 rd / OpenSSL / lib / windows / x86_64 / - llibssl - llibcrypto
2021-10-17 13:03:03 +03:00
}
2020-12-16 06:02:22 +03:00
}
macx {
2021-11-30 21:51:06 +03:00
DEFINES += MVPN_MACOS
2020-12-16 06:02:22 +03:00
ICON = $ $ PWD / images / app . icns
2021-01-03 21:18:20 +03:00
2021-01-03 23:55:04 +03:00
HEADERS += ui / macos_util . h
SOURCES += ui / macos_util . mm
2021-01-03 21:18:20 +03:00
2021-09-15 08:03:28 -07:00
LIBS += - framework Cocoa - framework ApplicationServices - framework CoreServices - framework Foundation - framework AppKit - framework Security
2021-10-17 08:00:52 -07:00
LIBS += $ $ PWD / 3 rd / OpenSSL / lib / macos / x86_64 / libcrypto . a
LIBS += $ $ PWD / 3 rd / OpenSSL / lib / macos / x86_64 / libssl . a
2020-12-16 06:02:22 +03:00
}
2021-01-20 23:07:23 +03:00
2021-10-17 07:00:00 -07:00
linux : ! android {
2021-11-30 21:51:06 +03:00
DEFINES += MVPN_LINUX
2021-10-17 07:00:00 -07:00
LIBS += / usr / lib / x86_64 - linux - gnu / libcrypto . a
LIBS += / usr / lib / x86_64 - linux - gnu / libssl . a
2020-12-16 06:02:22 +03:00
}
2021-01-20 23:07:23 +03:00
2021-10-22 01:07:20 +03:00
win32 | macx | linux : ! android {
HEADERS += \
2021-11-28 17:28:25 +03:00
ui / systemtray_notificationhandler . h \
2021-10-22 01:07:20 +03:00
protocols / openvpnprotocol . h \
protocols / openvpnovercloakprotocol . h \
protocols / shadowsocksvpnprotocol . h \
protocols / wireguardprotocol . h \
SOURCES += \
2021-11-28 17:28:25 +03:00
ui / systemtray_notificationhandler . cpp \
2021-10-22 01:07:20 +03:00
protocols / openvpnprotocol . cpp \
protocols / openvpnovercloakprotocol . cpp \
protocols / shadowsocksvpnprotocol . cpp \
protocols / wireguardprotocol . cpp \
}
2021-09-30 15:56:48 +03:00
android {
QT += androidextras
2021-11-30 21:51:06 +03:00
DEFINES += MVPN_ANDROID
2021-09-30 15:56:48 +03:00
INCLUDEPATH += platforms / android
2021-11-26 17:43:02 +03:00
HEADERS += \
2021-12-20 02:29:23 +03:00
platforms / android / native . h \
2021-11-26 17:43:02 +03:00
platforms / android / android_controller . h \
platforms / android / android_notificationhandler . h \
protocols / android_vpnprotocol . h
SOURCES += \
2021-12-20 02:29:23 +03:00
platforms / android / native . cpp \
2021-11-26 17:43:02 +03:00
platforms / android / android_controller . cpp \
platforms / android / android_notificationhandler . cpp \
protocols / android_vpnprotocol . cpp
2021-09-30 18:16:41 +03:00
2021-09-30 15:56:48 +03:00
DISTFILES += \
android / AndroidManifest . xml \
android / build . gradle \
android / gradle / wrapper / gradle - wrapper . jar \
android / gradle / wrapper / gradle - wrapper . properties \
android / gradlew \
android / gradlew . bat \
2021-10-21 14:45:08 +03:00
android / gradle . properties \
2021-10-06 22:45:25 +03:00
android / res / values / libs . xml \
2021-10-16 18:33:18 +03:00
android / src / org / amnezia / vpn / OpenVPNThreadv3 . kt \
2021-10-06 22:45:25 +03:00
android / src / org / amnezia / vpn / VpnService . kt \
android / src / org / amnezia / vpn / VpnServiceBinder . kt \
2021-10-11 15:36:40 +03:00
android / src / org / amnezia / vpn / qt / VPNPermissionHelper . kt
2021-10-06 22:45:25 +03:00
ANDROID_PACKAGE_SOURCE_DIR = $ $ PWD / android
2021-10-18 18:49:15 +03:00
for ( abi , ANDROID_ABIS ) : {
equals ( ANDROID_TARGET_ARCH , $ $ abi ) {
LIBS += $ $ PWD / 3 rd / OpenSSL / lib / android / $ $ { abi } / libcrypto . a
LIBS += $ $ PWD / 3 rd / OpenSSL / lib / android / $ $ { abi } / libssl . a
}
ANDROID_EXTRA_LIBS += $ $ PWD / android / lib / wireguard / $ $ { abi } / libwg . so
ANDROID_EXTRA_LIBS += $ $ PWD / android / lib / wireguard / $ $ { abi } / libwg - go . so
ANDROID_EXTRA_LIBS += $ $ PWD / android / lib / wireguard / $ $ { abi } / libwg - quick . so
ANDROID_EXTRA_LIBS += $ $ PWD / android / lib / openvpn / $ $ { abi } / libjbcrypto . so
ANDROID_EXTRA_LIBS += $ $ PWD / android / lib / openvpn / $ $ { abi } / libopenvpn . so
ANDROID_EXTRA_LIBS += $ $ PWD / android / lib / openvpn / $ $ { abi } / libopvpnutil . so
ANDROID_EXTRA_LIBS += $ $ PWD / android / lib / openvpn / $ $ { abi } / libovpn3 . so
ANDROID_EXTRA_LIBS += $ $ PWD / android / lib / openvpn / $ $ { abi } / libovpnexec . so
}
2021-09-30 15:56:48 +03:00
}
2021-10-18 05:11:50 -07:00
ios {
message ( "Client ios build" )
CONFIG += static
2021-10-23 04:26:47 -07:00
CONFIG += file_copies
# For the authentication
LIBS += - framework AuthenticationServices
# For notifications
LIBS += - framework UIKit
LIBS += - framework Foundation
LIBS += - framework StoreKit
LIBS += - framework UserNotifications
DEFINES += MVPN_IOS
HEADERS += \
2021-11-30 16:56:24 +04:00
protocols / ios_vpnprotocol . h \
2021-11-30 12:53:12 -08:00
platforms / ios / iosnotificationhandler . h \
2021-11-30 16:56:24 +04:00
platforms / ios / json . h \
platforms / ios / bigint . h \
platforms / ios / bigintipv6addr . h \
platforms / ios / ipaddress . h \
platforms / ios / ipaddressrange . h
SOURCES += \
protocols / ios_vpnprotocol . mm \
2021-11-30 12:53:12 -08:00
platforms / ios / iosnotificationhandler . mm \
2021-11-30 16:56:24 +04:00
platforms / ios / json . cpp \
platforms / ios / iosglue . mm \
platforms / ios / ipaddress . cpp \
platforms / ios / ipaddressrange . cpp
2021-10-18 05:11:50 -07:00
Q_ENABLE_BITCODE . value = NO
Q_ENABLE_BITCODE . name = ENABLE_BITCODE
QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE
2021-12-01 20:02:54 +04:00
# CONFIG ( iphoneos , iphoneos | iphonesimulator ) {
iphoneos {
message ( "Building for iPhone OS" )
QMAKE_TARGET_BUNDLE_PREFIX = org . amnezia
QMAKE_BUNDLE = AmneziaVPN
QMAKE_IOS_DEPLOYMENT_TARGET = 12.0
QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 1
QMAKE_DEVELOPMENT_TEAM = X7UJ388FXK
QMAKE_PROVISIONING_PROFILE = f2fefb59 - 14 aa - 4 aa9 - ac14 - 1 d5531b06dcc
QMAKE_XCODE_CODE_SIGN_IDENTITY = "Apple Distribution"
2021-12-08 15:55:36 +04:00
QMAKE_INFO_PLIST = $ $ PWD / ios / app / Info . plist
2021-12-01 20:02:54 +04:00
XCODEBUILD_FLAGS += - allowProvisioningUpdates
2021-11-30 16:56:24 +04:00
2021-12-01 20:02:54 +04:00
DEFINES += iphoneos
2021-11-30 16:56:24 +04:00
2021-12-01 20:02:54 +04:00
contains ( QT_ARCH , arm64 ) {
message ( "Building for iOS/ARM v8 64-bit architecture" )
ARCH_TAG = "ios_armv8_64"
2021-11-30 16:56:24 +04:00
LIBS += $ $ PWD / 3 rd / OpenSSL / lib / ios / iphone / libcrypto . a
LIBS += $ $ PWD / 3 rd / OpenSSL / lib / ios / iphone / libssl . a
2021-12-01 20:02:54 +04:00
} else {
message ( "Building for iOS/ARM v7 (32-bit) architecture" )
ARCH_TAG = "ios_armv7"
}
2021-11-30 16:56:24 +04:00
}
2021-12-01 20:02:54 +04:00
# }
2021-11-30 16:56:24 +04:00
# CONFIG ( iphonesimulator , iphoneos | iphonesimulator ) {
2021-12-01 20:02:54 +04:00
# iphonesimulator {
# message ( "Building for iPhone Simulator" )
# ARCH_TAG = "ios_x86_64"
#
# DEFINES += iphonesimulator
#
# LIBS += $ $ PWD / 3 rd / OpenSSL / lib / ios / simulator / libcrypto . a
# LIBS += $ $ PWD / 3 rd / OpenSSL / lib / ios / simulator / libssl . a
# }
2021-11-30 16:56:24 +04:00
# }
2021-10-23 04:26:47 -07:00
NETWORKEXTENSION = 1
2021-11-30 16:56:24 +04:00
# ! build_pass : system ( ruby $ $ PWD / scripts / xcode_patcher . rb "$$PWD" "$$OUT_PWD/AmneziaVPN.xcodeproj" "2.0" "2.0.0" "ios" "$$NETWORKEXTENSION" | | echo "Failed to merge xcode with wireguard" )
2021-10-23 04:26:47 -07:00
# ruby %{sourceDir}/client/ios/xcode_patcher.rb "%{buildDir}/AmneziaVPN.xcodeproj" "2.0" "2.0.0" "ios" "1"
# cd client / && / Users / md / Qt / 5.15 .2 / ios / bin / qmake - o Makefile / Users / md / amnezia / desktop - client / client / client . pro - spec macx - ios - clang CONFIG += iphonesimulator CONFIG += simulator CONFIG += qml_debug - after
# %{sourceDir}/client/ios/xcode_patcher.rb %{buildDir}/client/AmneziaVPN.xcodeproj 2.0 2.0.0 ios 1
2021-10-18 05:11:50 -07:00
}
2021-09-15 08:03:28 -07:00
REPC_REPLICA += . . / ipc / ipc_interface . rep
! ios : REPC_REPLICA += . . / ipc / ipc_process_interface . rep
2021-10-21 14:45:08 +03:00