mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-02 08:33:38 +02:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 03599e4da7 | |||
| 6f53abbae3 | |||
| 248a1ebd5c | |||
| b292908564 | |||
| 005bb39e41 |
+1
-1
@@ -129,4 +129,4 @@ captures/
|
|||||||
client/3rd/ShadowSocks/ss_ios.xcconfig
|
client/3rd/ShadowSocks/ss_ios.xcconfig
|
||||||
|
|
||||||
# UML generated pics
|
# UML generated pics
|
||||||
out/
|
out/
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
TEMPLATE = subdirs
|
|
||||||
SUBDIRS = client
|
|
||||||
|
|
||||||
!ios:!android {
|
|
||||||
SUBDIRS += service
|
|
||||||
}
|
|
||||||
+9
-1
@@ -1,7 +1,13 @@
|
|||||||
cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
|
||||||
|
|
||||||
set(PROJECT AmneziaVPN)
|
set(PROJECT AmneziaVPN)
|
||||||
project(${PROJECT})
|
|
||||||
|
project(${PROJECT} VERSION 2.1.2.0
|
||||||
|
DESCRIPTION "AmneziaVPN"
|
||||||
|
HOMEPAGE_URL "https://amnezia.org/"
|
||||||
|
)
|
||||||
|
set(RELEASE_DATE "2023-03-10")
|
||||||
|
set(APP_MAJOR_VERSION ${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.${CMAKE_PROJECT_VERSION_PATCH})
|
||||||
|
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
set(QT_ANDROID_BUILD_ALL_ABIS ON)
|
set(QT_ANDROID_BUILD_ALL_ABIS ON)
|
||||||
@@ -11,4 +17,6 @@ add_subdirectory(client)
|
|||||||
|
|
||||||
if(NOT IOS AND NOT ANDROID)
|
if(NOT IOS AND NOT ANDROID)
|
||||||
add_subdirectory(service)
|
add_subdirectory(service)
|
||||||
|
|
||||||
|
include(${CMAKE_SOURCE_DIR}/deploy/installer/config.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
+79
-91
@@ -1,33 +1,23 @@
|
|||||||
cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
|
cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
|
||||||
|
|
||||||
set(PROJECT AmneziaVPN)
|
set(PROJECT AmneziaVPN)
|
||||||
project(${PROJECT} VERSION 2.1.2)
|
project(${PROJECT})
|
||||||
set(BUILD_ID 1)
|
|
||||||
SET(QT_BUILD_TOOLS_WHEN_CROSS_COMPILING ON)
|
set(QT_BUILD_TOOLS_WHEN_CROSS_COMPILING ON)
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.17)
|
|
||||||
cmake_policy(SET CMP0099 OLD)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
|
|
||||||
cmake_policy(SET CMP0114 NEW)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
set(CMAKE_AUTORCC ON)
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER "Autogen")
|
set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER "Autogen")
|
||||||
set_property(GLOBAL PROPERTY AUTOMOC_TARGETS_FOLDER "Autogen")
|
set_property(GLOBAL PROPERTY AUTOMOC_TARGETS_FOLDER "Autogen")
|
||||||
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "Autogen")
|
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "Autogen")
|
||||||
|
|
||||||
find_package(Qt6 REQUIRED COMPONENTS
|
find_package(Qt6 REQUIRED COMPONENTS
|
||||||
Widgets Core Gui Network Xml
|
Widgets Core Gui Network Xml
|
||||||
RemoteObjects Quick Svg QuickControls2
|
RemoteObjects Quick Svg QuickControls2
|
||||||
Core5Compat Concurrent
|
Core5Compat Concurrent
|
||||||
)
|
)
|
||||||
set(LIBS ${LIBS}
|
set(LIBS ${LIBS}
|
||||||
Qt6::Widgets Qt6::Core Qt6::Gui
|
Qt6::Widgets Qt6::Core Qt6::Gui
|
||||||
Qt6::Network Qt6::Xml Qt6::RemoteObjects
|
Qt6::Network Qt6::Xml Qt6::RemoteObjects
|
||||||
Qt6::Quick Qt6::Svg Qt6::QuickControls2
|
Qt6::Quick Qt6::Svg Qt6::QuickControls2
|
||||||
@@ -43,11 +33,11 @@ endif()
|
|||||||
|
|
||||||
set(IS_CI ${CI})
|
set(IS_CI ${CI})
|
||||||
if(IS_CI)
|
if(IS_CI)
|
||||||
message("Detected CI env")
|
message("Detected CI env")
|
||||||
find_program(CCACHE "ccache")
|
find_program(CCACHE "ccache")
|
||||||
if(CCACHE)
|
if(CCACHE)
|
||||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE}")
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/cmake/3rdparty.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/cmake/3rdparty.cmake)
|
||||||
@@ -58,6 +48,8 @@ include_directories(
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
||||||
|
|
||||||
set(HEADERS ${HEADERS}
|
set(HEADERS ${HEADERS}
|
||||||
${CMAKE_CURRENT_LIST_DIR}/../ipc/ipc.h
|
${CMAKE_CURRENT_LIST_DIR}/../ipc/ipc.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/amnezia_application.h
|
${CMAKE_CURRENT_LIST_DIR}/amnezia_application.h
|
||||||
@@ -75,6 +67,7 @@ set(HEADERS ${HEADERS}
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/ui/uilogic.h
|
${CMAKE_CURRENT_LIST_DIR}/ui/uilogic.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/ui/qautostart.h
|
${CMAKE_CURRENT_LIST_DIR}/ui/qautostart.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/protocols/vpnprotocol.h
|
${CMAKE_CURRENT_LIST_DIR}/protocols/vpnprotocol.h
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT IOS)
|
if(NOT IOS)
|
||||||
@@ -136,6 +129,11 @@ qt6_add_resources(QRC ${QRC} ${CMAKE_CURRENT_LIST_DIR}/resources.qrc)
|
|||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_compile_definitions(MVPN_WINDOWS)
|
add_compile_definitions(MVPN_WINDOWS)
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/platforms/windows/amneziavpn.rc.in
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/platforms/windows/amneziavpn.rc
|
||||||
|
)
|
||||||
|
|
||||||
set(HEADERS ${HEADERS}
|
set(HEADERS ${HEADERS}
|
||||||
${CMAKE_CURRENT_LIST_DIR}/protocols/ikev2_vpn_protocol_windows.h
|
${CMAKE_CURRENT_LIST_DIR}/protocols/ikev2_vpn_protocol_windows.h
|
||||||
)
|
)
|
||||||
@@ -177,6 +175,14 @@ if(WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.17)
|
||||||
|
cmake_policy(SET CMP0099 OLD)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_XCODE_BUILD_SYSTEM VERSION_GREATER_EQUAL 12)
|
||||||
|
cmake_policy(SET CMP0114 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT BUILD_OSX_APP_IDENTIFIER)
|
if(NOT BUILD_OSX_APP_IDENTIFIER)
|
||||||
set(BUILD_OSX_APP_IDENTIFIER org.amnezia.AmneziaVPN CACHE STRING "OSX Application identifier")
|
set(BUILD_OSX_APP_IDENTIFIER org.amnezia.AmneziaVPN CACHE STRING "OSX Application identifier")
|
||||||
endif()
|
endif()
|
||||||
@@ -194,7 +200,6 @@ if(APPLE)
|
|||||||
set(CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${BUILD_VPN_DEVELOPMENT_TEAM})
|
set(CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${BUILD_VPN_DEVELOPMENT_TEAM})
|
||||||
set(CMAKE_XCODE_ATTRIBUTE_GROUP_ID_IOS ${BUILD_IOS_GROUP_IDENTIFIER})
|
set(CMAKE_XCODE_ATTRIBUTE_GROUP_ID_IOS ${BUILD_IOS_GROUP_IDENTIFIER})
|
||||||
|
|
||||||
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../build)
|
|
||||||
if(NOT IOS)
|
if(NOT IOS)
|
||||||
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE INTERNAL "" FORCE)
|
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE INTERNAL "" FORCE)
|
||||||
|
|
||||||
@@ -219,7 +224,7 @@ if(APPLE)
|
|||||||
find_library(FW_APPKIT AppKit)
|
find_library(FW_APPKIT AppKit)
|
||||||
find_library(FW_SECURITY Security)
|
find_library(FW_SECURITY Security)
|
||||||
|
|
||||||
set(LIBS ${LIBS}
|
set(LIBS ${LIBS}
|
||||||
${FW_COCOA} ${FW_APPLICATIONSERVICES}
|
${FW_COCOA} ${FW_APPLICATIONSERVICES}
|
||||||
${FW_FOUNDATION} ${FW_APPKIT}
|
${FW_FOUNDATION} ${FW_APPKIT}
|
||||||
${FW_SECURITY} ${FW_CORESERVICES}
|
${FW_SECURITY} ${FW_CORESERVICES}
|
||||||
@@ -228,7 +233,6 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(LINUX AND NOT ANDROID)
|
if(LINUX AND NOT ANDROID)
|
||||||
add_compile_definitions(MVPN_LINUX)
|
add_compile_definitions(MVPN_LINUX)
|
||||||
|
|
||||||
@@ -244,7 +248,7 @@ endif()
|
|||||||
if(WIN32 OR (APPLE AND NOT IOS) OR (LINUX AND NOT ANDROID))
|
if(WIN32 OR (APPLE AND NOT IOS) OR (LINUX AND NOT ANDROID))
|
||||||
message("Client desktop build")
|
message("Client desktop build")
|
||||||
add_compile_definitions(AMNEZIA_DESKTOP)
|
add_compile_definitions(AMNEZIA_DESKTOP)
|
||||||
|
|
||||||
set(HEADERS ${HEADERS}
|
set(HEADERS ${HEADERS}
|
||||||
${CMAKE_CURRENT_LIST_DIR}/core/ipcclient.h
|
${CMAKE_CURRENT_LIST_DIR}/core/ipcclient.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/core/privileged_process.h
|
${CMAKE_CURRENT_LIST_DIR}/core/privileged_process.h
|
||||||
@@ -293,8 +297,6 @@ if(ANDROID)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(IOS)
|
if(IOS)
|
||||||
message("Client iOS build")
|
message("Client iOS build")
|
||||||
|
|
||||||
@@ -307,35 +309,35 @@ if(IOS)
|
|||||||
find_library(FW_STOREKIT StoreKit)
|
find_library(FW_STOREKIT StoreKit)
|
||||||
find_library(FW_USERNOTIFICATIONS UserNotifications)
|
find_library(FW_USERNOTIFICATIONS UserNotifications)
|
||||||
|
|
||||||
set(LIBS ${LIBS}
|
set(LIBS ${LIBS}
|
||||||
${FW_AUTHENTICATIONSERVICES} ${FW_UIKIT}
|
${FW_AUTHENTICATIONSERVICES} ${FW_UIKIT}
|
||||||
${FW_FOUNDATION} ${FW_STOREKIT}
|
${FW_FOUNDATION} ${FW_STOREKIT}
|
||||||
${FW_USERNOTIFICATIONS}
|
${FW_USERNOTIFICATIONS}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_compile_definitions(MVPN_IOS)
|
add_compile_definitions(MVPN_IOS)
|
||||||
|
|
||||||
set(HEADERS ${HEADERS}
|
set(HEADERS ${HEADERS}
|
||||||
${CMAKE_CURRENT_LIST_DIR}/protocols/ios_vpnprotocol.h
|
${CMAKE_CURRENT_LIST_DIR}/protocols/ios_vpnprotocol.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/iosnotificationhandler.h
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/iosnotificationhandler.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/json.h
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/json.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/bigint.h
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/bigint.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/bigintipv6addr.h
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/bigintipv6addr.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/ipaddress.h
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/ipaddress.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/ipaddressrange.h
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/ipaddressrange.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/QtAppDelegate.h
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/QtAppDelegate.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/QtAppDelegate-C-Interface.h
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/QtAppDelegate-C-Interface.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCES ${SOURCES}
|
set(SOURCES ${SOURCES}
|
||||||
${CMAKE_CURRENT_LIST_DIR}/protocols/ios_vpnprotocol.mm
|
${CMAKE_CURRENT_LIST_DIR}/protocols/ios_vpnprotocol.mm
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/iosnotificationhandler.mm
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/iosnotificationhandler.mm
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/json.cpp
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/json.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/iosglue.mm
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/iosglue.mm
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/ipaddress.cpp
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/ipaddress.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/ipaddressrange.cpp
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/ipaddressrange.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/QRCodeReaderBase.mm
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/QRCodeReaderBase.mm
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/QtAppDelegate.mm
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/QtAppDelegate.mm
|
||||||
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/MobileUtils.mm
|
${CMAKE_CURRENT_LIST_DIR}/platforms/ios/MobileUtils.mm
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
@@ -343,7 +345,6 @@ endif()
|
|||||||
if(CMAKE_OSX_SYSROOT STREQUAL "iphoneos")
|
if(CMAKE_OSX_SYSROOT STREQUAL "iphoneos")
|
||||||
message("Building for iPhone OS")
|
message("Building for iPhone OS")
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 13.0)
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 13.0)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
qt_add_executable(${PROJECT} ${SOURCES} ${HEADERS} ${RESOURCES} ${QRC})
|
qt_add_executable(${PROJECT} ${SOURCES} ${HEADERS} ${RESOURCES} ${QRC})
|
||||||
@@ -351,9 +352,7 @@ qt_add_translations(${PROJECT} TS_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/translations/amneziavpn_ru.ts)
|
${CMAKE_CURRENT_LIST_DIR}/translations/amneziavpn_ru.ts)
|
||||||
|
|
||||||
if(APPLE AND NOT IOS)
|
if(APPLE AND NOT IOS)
|
||||||
set_target_properties(AmneziaVPN PROPERTIES
|
set_target_properties(AmneziaVPN PROPERTIES MACOSX_BUNDLE TRUE)
|
||||||
MACOSX_BUNDLE TRUE
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(IOS)
|
if(IOS)
|
||||||
@@ -372,26 +371,25 @@ if(IOS)
|
|||||||
set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../../Frameworks")
|
set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../../Frameworks")
|
||||||
set(CMAKE_XCODE_ATTRIBUTE_FRAMEWORK_SEARCH_PATHS ${CMAKE_CURRENT_LIST_DIR}/3rd/OpenVPNAdapter/build/Release-iphoneos)
|
set(CMAKE_XCODE_ATTRIBUTE_FRAMEWORK_SEARCH_PATHS ${CMAKE_CURRENT_LIST_DIR}/3rd/OpenVPNAdapter/build/Release-iphoneos)
|
||||||
|
|
||||||
|
|
||||||
#need to change for debug and relase
|
#need to change for debug and relase
|
||||||
set_target_properties(${PROJECT}
|
set_target_properties(${PROJECT}
|
||||||
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.amnezia.${PROJECT}"
|
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.amnezia.${PROJECT}"
|
||||||
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1"
|
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1"
|
||||||
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "X7UJ388FXK"
|
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "X7UJ388FXK"
|
||||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Apple Distribution"
|
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Apple Distribution"
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(${PROJECT}
|
set_target_properties(${PROJECT}
|
||||||
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.amnezia.${PROJECT}"
|
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.amnezia.${PROJECT}"
|
||||||
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1"
|
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1"
|
||||||
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "X7UJ388FXK"
|
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "X7UJ388FXK"
|
||||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY[variant=Debug] "Apple Development"
|
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY[variant=Debug] "Apple Development"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(LIBS ${LIBS}
|
set(LIBS ${LIBS}
|
||||||
${CMAKE_CURRENT_LIST_DIR}/3rd/OpenSSL/lib/ios/iphone/libcrypto.a
|
${CMAKE_CURRENT_LIST_DIR}/3rd/OpenSSL/lib/ios/iphone/libcrypto.a
|
||||||
${CMAKE_CURRENT_LIST_DIR}/3rd/OpenSSL/lib/ios/iphone/libssl.a
|
${CMAKE_CURRENT_LIST_DIR}/3rd/OpenSSL/lib/ios/iphone/libssl.a
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(${PROJECT} PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
target_include_directories(${PROJECT} PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
|
||||||
|
|
||||||
@@ -409,18 +407,17 @@ if(IOS)
|
|||||||
MACOSX_BUNDLE ON
|
MACOSX_BUNDLE ON
|
||||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/ios/app/Info.plist.in
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_LIST_DIR}/ios/app/Info.plist.in
|
||||||
MACOSX_BUNDLE_BUNDLE_NAME "AmneziaVPN"
|
MACOSX_BUNDLE_BUNDLE_NAME "AmneziaVPN"
|
||||||
MACOSX_BUNDLE_BUNDLE_VERSION "${BUILD_ID}"
|
MACOSX_BUNDLE_BUNDLE_VERSION "${CMAKE_PROJECT_VERSION_TWEAK}"
|
||||||
MACOSX_BUNDLE_COPYRIGHT "MPL-2.0"
|
MACOSX_BUNDLE_COPYRIGHT "MPL-2.0"
|
||||||
MACOSX_BUNDLE_GUI_IDENTIFIER "${BUILD_IOS_APP_IDENTIFIER}"
|
MACOSX_BUNDLE_GUI_IDENTIFIER "${BUILD_IOS_APP_IDENTIFIER}"
|
||||||
MACOSX_BUNDLE_INFO_STRING "AmneziaVPN"
|
MACOSX_BUNDLE_INFO_STRING "AmneziaVPN"
|
||||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${CMAKE_PROJECT_VERSION}-${BUILD_ID}"
|
MACOSX_BUNDLE_LONG_VERSION_STRING "${APP_MAJOR_VERSION}-${CMAKE_PROJECT_VERSION_TWEAK}"
|
||||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${CMAKE_PROJECT_VERSION}"
|
MACOSX_BUNDLE_SHORT_VERSION_STRING "${APP_MAJOR_VERSION}"
|
||||||
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${BUILD_IOS_APP_IDENTIFIER}"
|
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${BUILD_IOS_APP_IDENTIFIER}"
|
||||||
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_LIST_DIR}/ios/app/main.entitlements"
|
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_LIST_DIR}/ios/app/main.entitlements"
|
||||||
XCODE_ATTRIBUTE_MARKETING_VERSION "${CMAKE_PROJECT_VERSION}"
|
XCODE_ATTRIBUTE_MARKETING_VERSION "${APP_MAJOR_VERSION}"
|
||||||
XCODE_GENERATE_SCHEME TRUE
|
XCODE_GENERATE_SCHEME TRUE
|
||||||
MACOSX_BUNDLE_ICON_FILE "AppIcon"
|
MACOSX_BUNDLE_ICON_FILE "AppIcon"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(${PROJECT} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
target_include_directories(${PROJECT} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
||||||
@@ -430,8 +427,7 @@ if(IOS)
|
|||||||
-DVPN_NE_BUNDLEID=\"${BUILD_IOS_APP_IDENTIFIER}.network-extension\"
|
-DVPN_NE_BUNDLEID=\"${BUILD_IOS_APP_IDENTIFIER}.network-extension\"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_sources(${PROJECT} PRIVATE
|
||||||
target_sources(${PROJECT} PRIVATE
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/3rd/wireguard-apple/Sources/Shared/Keychain.swift
|
${CMAKE_CURRENT_LIST_DIR}/3rd/wireguard-apple/Sources/Shared/Keychain.swift
|
||||||
${CMAKE_CURRENT_LIST_DIR}/3rd/wireguard-apple/Sources/WireGuardKit/IPAddressRange.swift
|
${CMAKE_CURRENT_LIST_DIR}/3rd/wireguard-apple/Sources/WireGuardKit/IPAddressRange.swift
|
||||||
${CMAKE_CURRENT_LIST_DIR}/3rd/wireguard-apple/Sources/WireGuardKit/InterfaceConfiguration.swift
|
${CMAKE_CURRENT_LIST_DIR}/3rd/wireguard-apple/Sources/WireGuardKit/InterfaceConfiguration.swift
|
||||||
@@ -463,14 +459,14 @@ if(IOS)
|
|||||||
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
|
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(${PROJECT} PRIVATE
|
target_sources(${PROJECT} PRIVATE
|
||||||
${CMAKE_CURRENT_LIST_DIR}/ios/Media.xcassets
|
${CMAKE_CURRENT_LIST_DIR}/ios/Media.xcassets
|
||||||
|
|
||||||
)
|
)
|
||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
${CMAKE_CURRENT_LIST_DIR}/ios/Media.xcassets
|
${CMAKE_CURRENT_LIST_DIR}/ios/Media.xcassets
|
||||||
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
|
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory(ios/networkextension)
|
add_subdirectory(ios/networkextension)
|
||||||
add_dependencies(${PROJECT} networkextension)
|
add_dependencies(${PROJECT} networkextension)
|
||||||
@@ -482,49 +478,41 @@ set_source_files_properties(
|
|||||||
set_target_properties(${PROJECT} PROPERTIES XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY ON)
|
set_target_properties(${PROJECT} PROPERTIES XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY ON)
|
||||||
set_target_properties(${PROJECT} PROPERTIES XCODE_LINK_BUILD_PHASE_MODE KNOWN_LOCATION)
|
set_target_properties(${PROJECT} PROPERTIES XCODE_LINK_BUILD_PHASE_MODE KNOWN_LOCATION)
|
||||||
|
|
||||||
|
|
||||||
set_target_properties("networkextension"
|
set_target_properties("networkextension"
|
||||||
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.amnezia.${PROJECT}.network-extension"
|
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.amnezia.${PROJECT}.network-extension"
|
||||||
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1"
|
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1"
|
||||||
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "X7UJ388FXK"
|
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "X7UJ388FXK"
|
||||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Apple Distribution"
|
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Apple Distribution"
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties("networkextension"
|
set_target_properties("networkextension"
|
||||||
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.amnezia.${PROJECT}.network-extension"
|
PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "org.amnezia.${PROJECT}.network-extension"
|
||||||
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1"
|
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1"
|
||||||
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "X7UJ388FXK"
|
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "X7UJ388FXK"
|
||||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY[variant=Debug] "Apple Development"
|
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY[variant=Debug] "Apple Development"
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties (${PROJECT} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_STYLE Manual)
|
|
||||||
|
|
||||||
|
set_target_properties(${PROJECT} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_STYLE Manual)
|
||||||
set_target_properties(${PROJECT} PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "match AppStore org.amnezia.AmneziaVPN")
|
set_target_properties(${PROJECT} PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "match AppStore org.amnezia.AmneziaVPN")
|
||||||
|
|
||||||
set_target_properties(${PROJECT} PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER[variant=Debug] "match Development org.amnezia.AmneziaVPN")
|
set_target_properties(${PROJECT} PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER[variant=Debug] "match Development org.amnezia.AmneziaVPN")
|
||||||
|
|
||||||
|
set_target_properties("networkextension" PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_STYLE Manual)
|
||||||
set_target_properties ("networkextension" PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_STYLE Manual)
|
|
||||||
|
|
||||||
set_target_properties("networkextension" PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "match AppStore org.amnezia.AmneziaVPN.network-extension")
|
set_target_properties("networkextension" PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "match AppStore org.amnezia.AmneziaVPN.network-extension")
|
||||||
|
|
||||||
set_target_properties("networkextension" PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER[variant=Debug] "match Development org.amnezia.AmneziaVPN.network-extension")
|
set_target_properties("networkextension" PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER[variant=Debug] "match Development org.amnezia.AmneziaVPN.network-extension")
|
||||||
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${PROJECT} POST_BUILD
|
TARGET ${PROJECT} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/AndroidManifest.xml
|
${CMAKE_CURRENT_LIST_DIR}/android/AndroidManifest.xml
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/build.gradle
|
${CMAKE_CURRENT_LIST_DIR}/android/build.gradle
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/gradle/wrapper/gradle-wrapper.jar
|
${CMAKE_CURRENT_LIST_DIR}/android/gradle/wrapper/gradle-wrapper.jar
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/gradle/wrapper/gradle-wrapper.properties
|
${CMAKE_CURRENT_LIST_DIR}/android/gradle/wrapper/gradle-wrapper.properties
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/gradlew
|
${CMAKE_CURRENT_LIST_DIR}/android/gradlew
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/gradlew.bat
|
${CMAKE_CURRENT_LIST_DIR}/android/gradlew.bat
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/gradle.properties
|
${CMAKE_CURRENT_LIST_DIR}/android/gradle.properties
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/res/values/libs.xml
|
${CMAKE_CURRENT_LIST_DIR}/android/res/values/libs.xml
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/res/xml/fileprovider.xml
|
${CMAKE_CURRENT_LIST_DIR}/android/res/xml/fileprovider.xml
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/src/org/amnezia/vpn/AuthHelper.java
|
${CMAKE_CURRENT_LIST_DIR}/android/src/org/amnezia/vpn/AuthHelper.java
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android/src/org/amnezia/vpn/IPCContract.kt
|
${CMAKE_CURRENT_LIST_DIR}/android/src/org/amnezia/vpn/IPCContract.kt
|
||||||
@@ -544,7 +532,7 @@ if(ANDROID)
|
|||||||
)
|
)
|
||||||
|
|
||||||
set_property(TARGET ${PROJECT} PROPERTY
|
set_property(TARGET ${PROJECT} PROPERTY
|
||||||
QT_ANDROID_PACKAGE_SOURCE_DIR
|
QT_ANDROID_PACKAGE_SOURCE_DIR
|
||||||
${CMAKE_CURRENT_LIST_DIR}/android
|
${CMAKE_CURRENT_LIST_DIR}/android
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include "core/servercontroller.h"
|
#include "core/servercontroller.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include <QQuickStyle>
|
#include <QQuickStyle>
|
||||||
|
|
||||||
#include "platforms/ios/QRCodeReaderBase.h"
|
#include "platforms/ios/QRCodeReaderBase.h"
|
||||||
@@ -197,16 +197,27 @@ bool AmneziaApplication::parseCommands()
|
|||||||
m_parser.addHelpOption();
|
m_parser.addHelpOption();
|
||||||
m_parser.addVersionOption();
|
m_parser.addVersionOption();
|
||||||
|
|
||||||
QCommandLineOption c_autostart {{"a", "autostart"}, "System autostart"};
|
m_parser.addOption(m_autoStartOption);
|
||||||
m_parser.addOption(c_autostart);
|
m_parser.addOption(m_cleanUpOption);
|
||||||
|
m_parser.addOption(m_clearProfilesOption);
|
||||||
QCommandLineOption c_cleanup {{"c", "cleanup"}, "Cleanup logs"};
|
|
||||||
m_parser.addOption(c_cleanup);
|
|
||||||
|
|
||||||
m_parser.process(*this);
|
m_parser.process(*this);
|
||||||
|
|
||||||
if (m_parser.isSet(c_cleanup)) {
|
if (m_parser.isSet(m_cleanUpOption)) {
|
||||||
Logger::cleanUp();
|
Logger::cleanUp();
|
||||||
|
QTimer::singleShot(100, this, [this]{
|
||||||
|
quit();
|
||||||
|
});
|
||||||
|
exec();
|
||||||
|
return false;
|
||||||
|
} else if (m_parser.isSet(m_clearProfilesOption)) {
|
||||||
|
for (int i = 0; i < m_settings->serversCount(); i++) {
|
||||||
|
const auto &containers = m_settings->containers(i).keys();
|
||||||
|
for (DockerContainer container : containers) {
|
||||||
|
m_settings->clearLastConnectionConfig(i, container);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QTimer::singleShot(100, this, [this]{
|
QTimer::singleShot(100, this, [this]{
|
||||||
quit();
|
quit();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -55,7 +55,11 @@ private:
|
|||||||
ProtocolProps* m_protocolProps {};
|
ProtocolProps* m_protocolProps {};
|
||||||
|
|
||||||
QTranslator* m_translator;
|
QTranslator* m_translator;
|
||||||
|
|
||||||
QCommandLineParser m_parser;
|
QCommandLineParser m_parser;
|
||||||
|
QCommandLineOption m_autoStartOption {{"a", "autoStart"}, tr("System autostart")};
|
||||||
|
QCommandLineOption m_cleanUpOption {{"c", "cleanUp"}, tr("Cleanup logs")};
|
||||||
|
QCommandLineOption m_clearProfilesOption {"clearProfiles", tr("Clear client cached profile")};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,411 +0,0 @@
|
|||||||
QT += widgets core gui network xml remoteobjects quick svg quickcontrols2
|
|
||||||
equals(QT_MAJOR_VERSION, 6): QT += core5compat
|
|
||||||
|
|
||||||
TARGET = AmneziaVPN
|
|
||||||
TEMPLATE = app
|
|
||||||
|
|
||||||
# silent builds on CI env
|
|
||||||
IS_CI=$$(CI)
|
|
||||||
!isEmpty(IS_CI){
|
|
||||||
message("Detected CI env")
|
|
||||||
CONFIG += silent #ccache
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG += qtquickcompiler
|
|
||||||
|
|
||||||
include("3rd/QtSsh/src/ssh/qssh.pri")
|
|
||||||
include("3rd/QtSsh/src/botan/botan.pri")
|
|
||||||
!android:!ios:include("3rd/SingleApplication/singleapplication.pri")
|
|
||||||
include ("3rd/SortFilterProxyModel/SortFilterProxyModel.pri")
|
|
||||||
|
|
||||||
include("3rd/qrcodegen/qrcodegen.pri")
|
|
||||||
include("3rd/QSimpleCrypto/QSimpleCrypto.pri")
|
|
||||||
include("3rd/qtkeychain/qtkeychain.pri")
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/3rd/QSimpleCrypto/include
|
|
||||||
INCLUDEPATH += $$PWD/3rd/OpenSSL/include
|
|
||||||
DEPENDPATH += $$PWD/3rd/OpenSSL/include
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
../ipc/ipc.h \
|
|
||||||
amnezia_application.h \
|
|
||||||
configurators/cloak_configurator.h \
|
|
||||||
configurators/configurator_base.h \
|
|
||||||
configurators/ikev2_configurator.h \
|
|
||||||
configurators/shadowsocks_configurator.h \
|
|
||||||
configurators/ssh_configurator.h \
|
|
||||||
configurators/vpn_configurator.h \
|
|
||||||
configurators/wireguard_configurator.h \
|
|
||||||
containers/containers_defs.h \
|
|
||||||
core/defs.h \
|
|
||||||
core/errorstrings.h \
|
|
||||||
configurators/openvpn_configurator.h \
|
|
||||||
core/scripts_registry.h \
|
|
||||||
core/server_defs.h \
|
|
||||||
core/servercontroller.h \
|
|
||||||
defines.h \
|
|
||||||
logger.h \
|
|
||||||
managementserver.h \
|
|
||||||
platforms/ios/MobileUtils.h \
|
|
||||||
platforms/linux/leakdetector.h \
|
|
||||||
protocols/protocols_defs.h \
|
|
||||||
secure_qsettings.h \
|
|
||||||
settings.h \
|
|
||||||
ui/notificationhandler.h \
|
|
||||||
ui/models/containers_model.h \
|
|
||||||
ui/models/protocols_model.h \
|
|
||||||
ui/pages.h \
|
|
||||||
ui/pages_logic/AppSettingsLogic.h \
|
|
||||||
ui/pages_logic/GeneralSettingsLogic.h \
|
|
||||||
ui/pages_logic/NetworkSettingsLogic.h \
|
|
||||||
ui/pages_logic/NewServerProtocolsLogic.h \
|
|
||||||
ui/pages_logic/PageLogicBase.h \
|
|
||||||
ui/pages_logic/QrDecoderLogic.h \
|
|
||||||
ui/pages_logic/ServerConfiguringProgressLogic.h \
|
|
||||||
ui/pages_logic/ServerContainersLogic.h \
|
|
||||||
ui/pages_logic/ServerListLogic.h \
|
|
||||||
ui/pages_logic/ServerSettingsLogic.h \
|
|
||||||
ui/pages_logic/ShareConnectionLogic.h \
|
|
||||||
ui/pages_logic/SitesLogic.h \
|
|
||||||
ui/pages_logic/StartPageLogic.h \
|
|
||||||
ui/pages_logic/ViewConfigLogic.h \
|
|
||||||
ui/pages_logic/VpnLogic.h \
|
|
||||||
ui/pages_logic/WizardLogic.h \
|
|
||||||
ui/pages_logic/protocols/CloakLogic.h \
|
|
||||||
ui/pages_logic/protocols/OpenVpnLogic.h \
|
|
||||||
ui/pages_logic/protocols/OtherProtocolsLogic.h \
|
|
||||||
ui/pages_logic/protocols/PageProtocolLogicBase.h \
|
|
||||||
ui/pages_logic/protocols/ShadowSocksLogic.h \
|
|
||||||
ui/pages_logic/protocols/WireGuardLogic.h \
|
|
||||||
ui/property_helper.h \
|
|
||||||
ui/models/servers_model.h \
|
|
||||||
ui/uilogic.h \
|
|
||||||
ui/qautostart.h \
|
|
||||||
ui/models/sites_model.h \
|
|
||||||
utilities.h \
|
|
||||||
vpnconnection.h \
|
|
||||||
protocols/vpnprotocol.h \
|
|
||||||
constants.h \
|
|
||||||
platforms/ios/QRCodeReaderBase.h
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
amnezia_application.cpp \
|
|
||||||
configurators/cloak_configurator.cpp \
|
|
||||||
configurators/configurator_base.cpp \
|
|
||||||
configurators/ikev2_configurator.cpp \
|
|
||||||
configurators/shadowsocks_configurator.cpp \
|
|
||||||
configurators/ssh_configurator.cpp \
|
|
||||||
configurators/vpn_configurator.cpp \
|
|
||||||
configurators/wireguard_configurator.cpp \
|
|
||||||
containers/containers_defs.cpp \
|
|
||||||
core/errorstrings.cpp \
|
|
||||||
configurators/openvpn_configurator.cpp \
|
|
||||||
core/scripts_registry.cpp \
|
|
||||||
core/server_defs.cpp \
|
|
||||||
core/servercontroller.cpp \
|
|
||||||
logger.cpp \
|
|
||||||
main.cpp \
|
|
||||||
managementserver.cpp \
|
|
||||||
platforms/ios/MobileUtils.cpp \
|
|
||||||
platforms/linux/leakdetector.cpp \
|
|
||||||
protocols/protocols_defs.cpp \
|
|
||||||
secure_qsettings.cpp \
|
|
||||||
settings.cpp \
|
|
||||||
ui/notificationhandler.cpp \
|
|
||||||
ui/models/containers_model.cpp \
|
|
||||||
ui/models/protocols_model.cpp \
|
|
||||||
ui/pages_logic/AppSettingsLogic.cpp \
|
|
||||||
ui/pages_logic/GeneralSettingsLogic.cpp \
|
|
||||||
ui/pages_logic/NetworkSettingsLogic.cpp \
|
|
||||||
ui/pages_logic/NewServerProtocolsLogic.cpp \
|
|
||||||
ui/pages_logic/PageLogicBase.cpp \
|
|
||||||
ui/pages_logic/QrDecoderLogic.cpp \
|
|
||||||
ui/pages_logic/ServerConfiguringProgressLogic.cpp \
|
|
||||||
ui/pages_logic/ServerContainersLogic.cpp \
|
|
||||||
ui/pages_logic/ServerListLogic.cpp \
|
|
||||||
ui/pages_logic/ServerSettingsLogic.cpp \
|
|
||||||
ui/pages_logic/ShareConnectionLogic.cpp \
|
|
||||||
ui/pages_logic/SitesLogic.cpp \
|
|
||||||
ui/pages_logic/StartPageLogic.cpp \
|
|
||||||
ui/pages_logic/ViewConfigLogic.cpp \
|
|
||||||
ui/pages_logic/VpnLogic.cpp \
|
|
||||||
ui/pages_logic/WizardLogic.cpp \
|
|
||||||
ui/pages_logic/protocols/CloakLogic.cpp \
|
|
||||||
ui/pages_logic/protocols/OpenVpnLogic.cpp \
|
|
||||||
ui/pages_logic/protocols/OtherProtocolsLogic.cpp \
|
|
||||||
ui/pages_logic/protocols/PageProtocolLogicBase.cpp \
|
|
||||||
ui/pages_logic/protocols/ShadowSocksLogic.cpp \
|
|
||||||
ui/models/servers_model.cpp \
|
|
||||||
ui/pages_logic/protocols/WireGuardLogic.cpp \
|
|
||||||
ui/uilogic.cpp \
|
|
||||||
ui/qautostart.cpp \
|
|
||||||
ui/models/sites_model.cpp \
|
|
||||||
utilities.cpp \
|
|
||||||
vpnconnection.cpp \
|
|
||||||
protocols/vpnprotocol.cpp \
|
|
||||||
platforms/ios/QRCodeReaderBase.cpp
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
resources.qrc
|
|
||||||
|
|
||||||
TRANSLATIONS = \
|
|
||||||
translations/amneziavpn_ru.ts
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
DEFINES += MVPN_WINDOWS
|
|
||||||
|
|
||||||
OTHER_FILES += platforms/windows/amneziavpn.rc
|
|
||||||
RC_FILE = platforms/windows/amneziavpn.rc
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
protocols/ikev2_vpn_protocol_windows.h \
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
protocols/ikev2_vpn_protocol_windows.cpp \
|
|
||||||
|
|
||||||
VERSION = 2.0.0.0
|
|
||||||
QMAKE_TARGET_COMPANY = "AmneziaVPN"
|
|
||||||
QMAKE_TARGET_PRODUCT = "AmneziaVPN"
|
|
||||||
|
|
||||||
|
|
||||||
LIBS += \
|
|
||||||
-luser32 \
|
|
||||||
-lrasapi32 \
|
|
||||||
-lshlwapi \
|
|
||||||
-liphlpapi \
|
|
||||||
-lws2_32 \
|
|
||||||
-lgdi32
|
|
||||||
|
|
||||||
QMAKE_LFLAGS_WINDOWS += /entry:mainCRTStartup
|
|
||||||
|
|
||||||
!contains(QMAKE_TARGET.arch, x86_64) {
|
|
||||||
message("Windows x86 build")
|
|
||||||
LIBS += -L$$PWD/3rd/OpenSSL/lib/windows/x86/ -llibssl -llibcrypto
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
message("Windows x86_64 build")
|
|
||||||
LIBS += -L$$PWD/3rd/OpenSSL/lib/windows/x86_64/ -llibssl -llibcrypto
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
macx {
|
|
||||||
DEFINES += MVPN_MACOS
|
|
||||||
|
|
||||||
ICON = $$PWD/images/app.icns
|
|
||||||
|
|
||||||
HEADERS += ui/macos_util.h
|
|
||||||
SOURCES += ui/macos_util.mm
|
|
||||||
|
|
||||||
LIBS += -framework Cocoa -framework ApplicationServices -framework CoreServices -framework Foundation -framework AppKit -framework Security
|
|
||||||
|
|
||||||
LIBS += $$PWD/3rd/OpenSSL/lib/macos/x86_64/libcrypto.a
|
|
||||||
LIBS += $$PWD/3rd/OpenSSL/lib/macos/x86_64/libssl.a
|
|
||||||
}
|
|
||||||
|
|
||||||
linux:!android {
|
|
||||||
DEFINES += MVPN_LINUX
|
|
||||||
LIBS += /usr/lib/x86_64-linux-gnu/libcrypto.a
|
|
||||||
LIBS += /usr/lib/x86_64-linux-gnu/libssl.a
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/platforms/linux
|
|
||||||
}
|
|
||||||
|
|
||||||
win32|macx|linux:!android {
|
|
||||||
DEFINES += AMNEZIA_DESKTOP
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
core/ipcclient.h \
|
|
||||||
core/privileged_process.h \
|
|
||||||
ui/systemtray_notificationhandler.h \
|
|
||||||
protocols/openvpnprotocol.h \
|
|
||||||
protocols/openvpnovercloakprotocol.h \
|
|
||||||
protocols/shadowsocksvpnprotocol.h \
|
|
||||||
protocols/wireguardprotocol.h \
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
core/ipcclient.cpp \
|
|
||||||
core/privileged_process.cpp \
|
|
||||||
ui/systemtray_notificationhandler.cpp \
|
|
||||||
protocols/openvpnprotocol.cpp \
|
|
||||||
protocols/openvpnovercloakprotocol.cpp \
|
|
||||||
protocols/shadowsocksvpnprotocol.cpp \
|
|
||||||
protocols/wireguardprotocol.cpp \
|
|
||||||
|
|
||||||
REPC_REPLICA += ../ipc/ipc_interface.rep
|
|
||||||
REPC_REPLICA += ../ipc/ipc_process_interface.rep
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
message(Platform: android)
|
|
||||||
message("$$ANDROID_TARGET_ARCH")
|
|
||||||
versionAtLeast(QT_VERSION, 6.0.0) {
|
|
||||||
# We need to include qtprivate api's
|
|
||||||
# As QAndroidBinder is not yet implemented with a public api
|
|
||||||
QT += core-private
|
|
||||||
ANDROID_ABIS = $$ANDROID_TARGET_ARCH
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFINES += MVPN_ANDROID
|
|
||||||
|
|
||||||
INCLUDEPATH += platforms/android
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
platforms/android/android_controller.h \
|
|
||||||
platforms/android/android_notificationhandler.h \
|
|
||||||
protocols/android_vpnprotocol.h \
|
|
||||||
platforms/android/androidutils.h \
|
|
||||||
platforms/android/androidvpnactivity.h
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
platforms/android/android_controller.cpp \
|
|
||||||
platforms/android/android_notificationhandler.cpp \
|
|
||||||
protocols/android_vpnprotocol.cpp \
|
|
||||||
platforms/android/androidutils.cpp \
|
|
||||||
platforms/android/androidvpnactivity.cpp
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
android/AndroidManifest.xml \
|
|
||||||
android/build.gradle \
|
|
||||||
android/gradle/wrapper/gradle-wrapper.jar \
|
|
||||||
android/gradle/wrapper/gradle-wrapper.properties \
|
|
||||||
android/gradlew \
|
|
||||||
android/gradlew.bat \
|
|
||||||
android/gradle.properties \
|
|
||||||
android/res/values/libs.xml \
|
|
||||||
android/res/xml/fileprovider.xml \
|
|
||||||
android/src/org/amnezia/vpn/AuthHelper.java \
|
|
||||||
android/src/org/amnezia/vpn/IPCContract.kt \
|
|
||||||
android/src/org/amnezia/vpn/NotificationUtil.kt \
|
|
||||||
android/src/org/amnezia/vpn/OpenVPNThreadv3.kt \
|
|
||||||
android/src/org/amnezia/vpn/Prefs.kt \
|
|
||||||
android/src/org/amnezia/vpn/VpnLogger.kt \
|
|
||||||
android/src/org/amnezia/vpn/VpnService.kt \
|
|
||||||
android/src/org/amnezia/vpn/VpnServiceBinder.kt \
|
|
||||||
android/src/org/amnezia/vpn/qt/AmneziaApp.kt \
|
|
||||||
android/src/org/amnezia/vpn/qt/PackageManagerHelper.java \
|
|
||||||
android/src/org/amnezia/vpn/qt/VPNActivity.kt \
|
|
||||||
android/src/org/amnezia/vpn/qt/VPNApplication.java \
|
|
||||||
android/src/org/amnezia/vpn/qt/VPNPermissionHelper.kt
|
|
||||||
|
|
||||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
|
||||||
|
|
||||||
for (abi, ANDROID_ABIS): {
|
|
||||||
|
|
||||||
equals(ANDROID_TARGET_ARCH,$$abi) {
|
|
||||||
LIBS += $$PWD/3rd/OpenSSL/lib/android/$${abi}/libcrypto.a
|
|
||||||
LIBS += $$PWD/3rd/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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ios {
|
|
||||||
message("Client iOS build")
|
|
||||||
CONFIG += static
|
|
||||||
CONFIG += file_copies
|
|
||||||
|
|
||||||
# For the authentication
|
|
||||||
LIBS += -framework AuthenticationServices
|
|
||||||
|
|
||||||
# For notifications
|
|
||||||
LIBS += -framework UIKit
|
|
||||||
LIBS += -framework Foundation
|
|
||||||
LIBS += -framework StoreKit
|
|
||||||
LIBS += -framework UserNotifications
|
|
||||||
LIBS += -framework AVFoundation
|
|
||||||
|
|
||||||
DEFINES += MVPN_IOS
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
protocols/ios_vpnprotocol.h \
|
|
||||||
platforms/ios/iosnotificationhandler.h \
|
|
||||||
platforms/ios/json.h \
|
|
||||||
platforms/ios/bigint.h \
|
|
||||||
platforms/ios/bigintipv6addr.h \
|
|
||||||
platforms/ios/ipaddress.h \
|
|
||||||
platforms/ios/ipaddressrange.h \
|
|
||||||
platforms/ios/QtAppDelegate.h \
|
|
||||||
platforms/ios/QtAppDelegate-C-Interface.h
|
|
||||||
|
|
||||||
SOURCES -= \
|
|
||||||
platforms/ios/QRCodeReaderBase.cpp \
|
|
||||||
platforms/ios/MobileUtils.cpp
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
protocols/ios_vpnprotocol.mm \
|
|
||||||
platforms/ios/iosnotificationhandler.mm \
|
|
||||||
platforms/ios/json.cpp \
|
|
||||||
platforms/ios/iosglue.mm \
|
|
||||||
platforms/ios/ipaddress.cpp \
|
|
||||||
platforms/ios/ipaddressrange.cpp \
|
|
||||||
platforms/ios/QRCodeReaderBase.mm \
|
|
||||||
platforms/ios/QtAppDelegate.mm \
|
|
||||||
platforms/ios/MobileUtils.mm
|
|
||||||
|
|
||||||
Q_ENABLE_BITCODE.value = NO
|
|
||||||
Q_ENABLE_BITCODE.name = ENABLE_BITCODE
|
|
||||||
QMAKE_MAC_XCODE_SETTINGS += Q_ENABLE_BITCODE
|
|
||||||
|
|
||||||
# CONFIG(iphoneos, iphoneos|iphonesimulator) {
|
|
||||||
iphoneos {
|
|
||||||
message("Building for iPhone OS")
|
|
||||||
QMAKE_TARGET_BUNDLE_PREFIX = org.amnezia
|
|
||||||
QMAKE_BUNDLE = AmneziaVPN
|
|
||||||
QMAKE_IOS_DEPLOYMENT_TARGET = 13.0
|
|
||||||
QMAKE_APPLE_TARGETED_DEVICE_FAMILY = 1
|
|
||||||
QMAKE_DEVELOPMENT_TEAM = X7UJ388FXK
|
|
||||||
QMAKE_PROVISIONING_PROFILE = f2fefb59-14aa-4aa9-ac14-1d5531b06dcc
|
|
||||||
QMAKE_XCODE_CODE_SIGN_IDENTITY = "Apple Distribution"
|
|
||||||
QMAKE_INFO_PLIST = $$PWD/ios/app/Info.plist
|
|
||||||
|
|
||||||
XCODEBUILD_FLAGS += -allowProvisioningUpdates
|
|
||||||
|
|
||||||
DEFINES += iphoneos
|
|
||||||
|
|
||||||
contains(QT_ARCH, arm64) {
|
|
||||||
message("Building for iOS/ARM v8 64-bit architecture")
|
|
||||||
ARCH_TAG = "ios_armv8_64"
|
|
||||||
|
|
||||||
LIBS += $$PWD/3rd/OpenSSL/lib/ios/iphone/libcrypto.a
|
|
||||||
LIBS += $$PWD/3rd/OpenSSL/lib/ios/iphone/libssl.a
|
|
||||||
} else {
|
|
||||||
message("Building for iOS/ARM v7 (32-bit) architecture")
|
|
||||||
ARCH_TAG = "ios_armv7"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# }
|
|
||||||
|
|
||||||
|
|
||||||
# CONFIG(iphonesimulator, iphoneos|iphonesimulator) {
|
|
||||||
# iphonesimulator {
|
|
||||||
# message("Building for iPhone Simulator")
|
|
||||||
# ARCH_TAG = "ios_x86_64"
|
|
||||||
#
|
|
||||||
# DEFINES += iphonesimulator
|
|
||||||
#
|
|
||||||
# LIBS += $$PWD/3rd/OpenSSL/lib/ios/simulator/libcrypto.a
|
|
||||||
# LIBS += $$PWD/3rd/OpenSSL/lib/ios/simulator/libssl.a
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
|
|
||||||
NETWORKEXTENSION=1
|
|
||||||
# ! 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")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#ifndef DEFINES_H
|
|
||||||
#define DEFINES_H
|
|
||||||
|
|
||||||
#define APPLICATION_NAME "AmneziaVPN"
|
|
||||||
#define SERVICE_NAME "AmneziaVPN-service"
|
|
||||||
#define ORGANIZATION_NAME "AmneziaVPN.ORG"
|
|
||||||
#define APP_MAJOR_VERSION "2.1.2"
|
|
||||||
#define APP_VERSION "2.1.2.0"
|
|
||||||
|
|
||||||
#endif // DEFINES_H
|
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
#ifdef AMNEZIA_DESKTOP
|
#ifdef AMNEZIA_DESKTOP
|
||||||
|
|||||||
+3
-3
@@ -3,7 +3,7 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include "amnezia_application.h"
|
#include "amnezia_application.h"
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include "Windows.h"
|
#include "Windows.h"
|
||||||
@@ -55,9 +55,9 @@ int main(int argc, char *argv[])
|
|||||||
app.loadTranslator();
|
app.loadTranslator();
|
||||||
app.loadFonts();
|
app.loadFonts();
|
||||||
|
|
||||||
bool doExec = app.parseCommands();
|
bool runGuiApplication = app.parseCommands();
|
||||||
|
|
||||||
if (doExec) {
|
if (runGuiApplication) {
|
||||||
app.init();
|
app.init();
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,41 +3,33 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
|
|
||||||
IDI_ICON1 ICON "../../images/app.ico"
|
IDI_ICON1 ICON "../../images/app.ico"
|
||||||
|
|
||||||
#define VER_FILEVERSION 2,0,0,0
|
|
||||||
#define VER_FILEVERSION_STR "2.0.0.0\0"
|
|
||||||
|
|
||||||
#define VER_PRODUCTVERSION 2,0,0,0
|
|
||||||
#define VER_PRODUCTVERSION_STR "2.0.0.0\0"
|
|
||||||
|
|
||||||
#define VER_COMPANYNAME_STR "AmneziaVPN"
|
#define VER_COMPANYNAME_STR "AmneziaVPN"
|
||||||
#define VER_FILEDESCRIPTION_STR "AmneziaVPN"
|
#define VER_FILEDESCRIPTION_STR VER_COMPANYNAME_STR
|
||||||
#define VER_INTERNALNAME_STR "AmneziaVPN"
|
#define VER_INTERNALNAME_STR VER_COMPANYNAME_STR
|
||||||
#define VER_LEGALCOPYRIGHT_STR "AmneziaVPN."
|
#define VER_LEGALCOPYRIGHT_STR "AmneziaVPN."
|
||||||
#define VER_LEGALTRADEMARKS1_STR "All Rights Reserved"
|
#define VER_LEGALTRADEMARKS1_STR "All Rights Reserved"
|
||||||
#define VER_LEGALTRADEMARKS2_STR VER_LEGALTRADEMARKS1_STR
|
#define VER_LEGALTRADEMARKS2_STR VER_LEGALTRADEMARKS1_STR
|
||||||
#define VER_ORIGINALFILENAME_STR "amneziavpn.exe"
|
#define VER_ORIGINALFILENAME_STR "amneziavpn.exe"
|
||||||
#define VER_PRODUCTNAME_STR "AmneziaVPN"
|
#define VER_PRODUCTNAME_STR VER_COMPANYNAME_STR
|
||||||
|
|
||||||
#define VER_COMPANYDOMAIN_STR "https://amnezia.org/"
|
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION VER_FILEVERSION
|
FILEVERSION @CMAKE_PROJECT_VERSION_MAJOR@,@CMAKE_PROJECT_VERSION_MINOR@,@CMAKE_PROJECT_VERSION_PATCH@,@CMAKE_PROJECT_VERSION_TWEAK@
|
||||||
PRODUCTVERSION VER_PRODUCTVERSION
|
PRODUCTVERSION @CMAKE_PROJECT_VERSION_MAJOR@,@CMAKE_PROJECT_VERSION_MINOR@,@CMAKE_PROJECT_VERSION_PATCH@
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "StringFileInfo"
|
BLOCK "StringFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904E4"
|
BLOCK "040904E4"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", VER_COMPANYNAME_STR
|
VALUE "CompanyName", VER_COMPANYNAME_STR
|
||||||
VALUE "FileDescription", VER_FILEDESCRIPTION_STR
|
VALUE "FileDescription", "@CMAKE_PROJECT_DESCRIPTION@"
|
||||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
VALUE "FileVersion", "@CMAKE_PROJECT_VERSION@"
|
||||||
VALUE "InternalName", VER_INTERNALNAME_STR
|
VALUE "InternalName", VER_INTERNALNAME_STR
|
||||||
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
|
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
|
||||||
VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR
|
VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR
|
||||||
VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR
|
VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR
|
||||||
VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
|
VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
|
||||||
VALUE "ProductName", VER_PRODUCTNAME_STR
|
VALUE "ProductName", VER_PRODUCTNAME_STR
|
||||||
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
|
VALUE "ProductVersion", "@CMAKE_PROJECT_VERSION@"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
#include <QRandomGenerator>
|
#include <QRandomGenerator>
|
||||||
|
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
#include "openvpnprotocol.h"
|
#include "openvpnprotocol.h"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "AppSettingsLogic.h"
|
#include "AppSettingsLogic.h"
|
||||||
|
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "ui/qautostart.h"
|
#include "ui/qautostart.h"
|
||||||
#include "ui/uilogic.h"
|
#include "ui/uilogic.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "NetworkSettingsLogic.h"
|
#include "NetworkSettingsLogic.h"
|
||||||
|
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "ServerConfiguringProgressLogic.h"
|
#include "ServerConfiguringProgressLogic.h"
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "core/errorstrings.h"
|
#include "core/errorstrings.h"
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
#include "configurators/ikev2_configurator.h"
|
#include "configurators/ikev2_configurator.h"
|
||||||
#include "configurators/ssh_configurator.h"
|
#include "configurators/ssh_configurator.h"
|
||||||
|
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "core/defs.h"
|
#include "core/defs.h"
|
||||||
#include "core/errorstrings.h"
|
#include "core/errorstrings.h"
|
||||||
#include "core/servercontroller.h"
|
#include "core/servercontroller.h"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include "../uilogic.h"
|
#include "../uilogic.h"
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include <configurators/vpn_configurator.h>
|
#include <configurators/vpn_configurator.h>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
|
||||||
SystemTrayNotificationHandler::SystemTrayNotificationHandler(QObject* parent) :
|
SystemTrayNotificationHandler::SystemTrayNotificationHandler(QObject* parent) :
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include "ui/qautostart.h"
|
#include "ui/qautostart.h"
|
||||||
|
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "uilogic.h"
|
#include "uilogic.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
#include "vpnconnection.h"
|
#include "vpnconnection.h"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
QString Utils::getRandomString(int len)
|
QString Utils::getRandomString(int len)
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
if(WIN32)
|
||||||
|
set(RootDir "@RootDir@")
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/config/windows.xml.in
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/config/windows.xml
|
||||||
|
)
|
||||||
|
elseif(APPLE AND NOT IOS)
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/config/macos.xml.in
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/config/macos.xml
|
||||||
|
)
|
||||||
|
elseif(LINUX)
|
||||||
|
set(ApplicationsDir "@ApplicationsDir@")
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/config/linux.xml.in
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/config/linux.xml
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/packages/org.amneziavpn.package/meta/package.xml.in
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/packages/org.amneziavpn.package/meta/package.xml
|
||||||
|
)
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
var requestToQuitFromApp = false;
|
var requestToQuitFromApp = false;
|
||||||
var updaterCompleted = 0;
|
var updaterCompleted = 0;
|
||||||
var desktopAppProcessRunning = false;
|
var desktopAppProcessRunning = false;
|
||||||
var appInstalledUninstallerPath;
|
|
||||||
var appInstalledUninstallerPath_x86;
|
|
||||||
|
|
||||||
function appName()
|
function appName()
|
||||||
{
|
{
|
||||||
@@ -18,18 +16,20 @@ function appExecutableFileName()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function appInstalled()
|
function pathToMaintenanceTool()
|
||||||
{
|
{
|
||||||
if (runningOnWindows()) {
|
if (runningOnWindows()) {
|
||||||
appInstalledUninstallerPath = installer.value("RootDir") + "Program Files/AmneziaVPN/maintenancetool.exe";
|
return installer.value("TargetDir") + "/maintenancetool.exe";
|
||||||
appInstalledUninstallerPath_x86 = installer.value("RootDir") + "Program Files (x86)/AmneziaVPN/maintenancetool.exe";
|
} else if (runningOnMacOS()) {
|
||||||
} else if (runningOnMacOS()){
|
return installer.value("TargetDir") + "/maintenancetool.app/Contents/MacOS/maintenancetool";
|
||||||
appInstalledUninstallerPath = "/Applications/" + appName() + ".app/maintenancetool.app/Contents/MacOS/maintenancetool";
|
} else if (runningOnLinux()) {
|
||||||
} else if (runningOnLinux()){
|
return installer.value("TargetDir") + "/maintenancetool";
|
||||||
appInstalledUninstallerPath = "/opt/" + appName() + "/maintenancetool";
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return installer.fileExists(appInstalledUninstallerPath) || installer.fileExists(appInstalledUninstallerPath_x86);
|
function appInstalled()
|
||||||
|
{
|
||||||
|
return installer.fileExists(pathToMaintenanceTool());
|
||||||
}
|
}
|
||||||
|
|
||||||
function endsWith(str, suffix)
|
function endsWith(str, suffix)
|
||||||
@@ -259,18 +259,13 @@ function Controller () {
|
|||||||
qsTr("We need to remove the old installation first. Do you wish to proceed?"),
|
qsTr("We need to remove the old installation first. Do you wish to proceed?"),
|
||||||
QMessageBox.Ok | QMessageBox.Cancel)) {
|
QMessageBox.Ok | QMessageBox.Cancel)) {
|
||||||
|
|
||||||
|
|
||||||
if (appInstalled()) {
|
if (appInstalled()) {
|
||||||
var resultArray = [];
|
var resultArray = [];
|
||||||
|
|
||||||
if (installer.fileExists(appInstalledUninstallerPath_x86)) {
|
if (installer.fileExists(pathToMaintenanceTool())) {
|
||||||
console.log("Starting uninstallation " + appInstalledUninstallerPath_x86);
|
console.log("Starting uninstallation " + pathToMaintenanceTool());
|
||||||
resultArray = installer.execute(appInstalledUninstallerPath_x86);
|
var args = ["--sr"];
|
||||||
}
|
resultArray = installer.execute(pathToMaintenanceTool(), args);
|
||||||
|
|
||||||
if (installer.fileExists(appInstalledUninstallerPath)) {
|
|
||||||
console.log("Starting uninstallation " + appInstalledUninstallerPath);
|
|
||||||
resultArray = installer.execute(appInstalledUninstallerPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Uninstaller finished with code: " + resultArray[1])
|
console.log("Uninstaller finished with code: " + resultArray[1])
|
||||||
|
|||||||
@@ -13,15 +13,14 @@
|
|||||||
<AllowSpaceInPath>true</AllowSpaceInPath>
|
<AllowSpaceInPath>true</AllowSpaceInPath>
|
||||||
<AllowNonAsciiCharacters>false</AllowNonAsciiCharacters>
|
<AllowNonAsciiCharacters>false</AllowNonAsciiCharacters>
|
||||||
<ControlScript>controlscript.js</ControlScript>
|
<ControlScript>controlscript.js</ControlScript>
|
||||||
<RepositorySettingsPageVisible>false</RepositorySettingsPageVisible>
|
|
||||||
<DependsOnLocalInstallerBinary>true</DependsOnLocalInstallerBinary>
|
<DependsOnLocalInstallerBinary>true</DependsOnLocalInstallerBinary>
|
||||||
<SupportsModify>false</SupportsModify>
|
<SupportsModify>false</SupportsModify>
|
||||||
<DisableAuthorizationFallback>true</DisableAuthorizationFallback>
|
<DisableAuthorizationFallback>true</DisableAuthorizationFallback>
|
||||||
<RemoteRepositories>
|
<RemoteRepositories>
|
||||||
<Repository>
|
<Repository>
|
||||||
<Url>https://amneziavpn.org/updates/linux</Url>
|
<Url>http://localhost/repository</Url>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<DisplayName>AmneziaVPN - repository for Linux</DisplayName>
|
<DisplayName>AmneziaVPN - repository for Linux</DisplayName>
|
||||||
</Repository>
|
</Repository>
|
||||||
</RemoteRepositories>
|
</RemoteRepositories>
|
||||||
</Installer>
|
</Installer>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Installer>
|
<Installer>
|
||||||
<Name>AmneziaVPN</Name>
|
<Name>AmneziaVPN</Name>
|
||||||
<Version>1.6.0.0</Version>
|
<Version>@CMAKE_PROJECT_VERSION@</Version>
|
||||||
<Title>AmneziaVPN</Title>
|
<Title>AmneziaVPN</Title>
|
||||||
<Publisher>AmneziaVPN</Publisher>
|
<Publisher>AmneziaVPN</Publisher>
|
||||||
<StartMenuDir>AmneziaVPN</StartMenuDir>
|
<StartMenuDir>AmneziaVPN</StartMenuDir>
|
||||||
@@ -13,15 +13,14 @@
|
|||||||
<AllowSpaceInPath>true</AllowSpaceInPath>
|
<AllowSpaceInPath>true</AllowSpaceInPath>
|
||||||
<AllowNonAsciiCharacters>false</AllowNonAsciiCharacters>
|
<AllowNonAsciiCharacters>false</AllowNonAsciiCharacters>
|
||||||
<ControlScript>controlscript.js</ControlScript>
|
<ControlScript>controlscript.js</ControlScript>
|
||||||
<RepositorySettingsPageVisible>false</RepositorySettingsPageVisible>
|
|
||||||
<DependsOnLocalInstallerBinary>true</DependsOnLocalInstallerBinary>
|
<DependsOnLocalInstallerBinary>true</DependsOnLocalInstallerBinary>
|
||||||
<SupportsModify>false</SupportsModify>
|
<SupportsModify>false</SupportsModify>
|
||||||
<DisableAuthorizationFallback>true</DisableAuthorizationFallback>
|
<DisableAuthorizationFallback>true</DisableAuthorizationFallback>
|
||||||
<RemoteRepositories>
|
<RemoteRepositories>
|
||||||
<Repository>
|
<Repository>
|
||||||
<Url>https://amneziavpn.org/updates/macos</Url>
|
<Url>https://amneziavpn.org/updates/macos</Url>
|
||||||
<Enabled>true</Enabled>
|
<Enabled>true</Enabled>
|
||||||
<DisplayName>AmneziaVPN - repository for macOS</DisplayName>
|
<DisplayName>AmneziaVPN - repository for macOS</DisplayName>
|
||||||
</Repository>
|
</Repository>
|
||||||
</RemoteRepositories>
|
</RemoteRepositories>
|
||||||
</Installer>
|
</Installer>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Installer>
|
<Installer>
|
||||||
<Name>AmneziaVPN</Name>
|
<Name>AmneziaVPN</Name>
|
||||||
<Version>2.0.0.0</Version>
|
<Version>@CMAKE_PROJECT_VERSION@</Version>
|
||||||
<Title>AmneziaVPN</Title>
|
<Title>AmneziaVPN</Title>
|
||||||
<Publisher>AmneziaVPN</Publisher>
|
<Publisher>AmneziaVPN</Publisher>
|
||||||
<StartMenuDir>AmneziaVPN</StartMenuDir>
|
<StartMenuDir>AmneziaVPN</StartMenuDir>
|
||||||
@@ -13,8 +13,14 @@
|
|||||||
<AllowSpaceInPath>true</AllowSpaceInPath>
|
<AllowSpaceInPath>true</AllowSpaceInPath>
|
||||||
<AllowNonAsciiCharacters>false</AllowNonAsciiCharacters>
|
<AllowNonAsciiCharacters>false</AllowNonAsciiCharacters>
|
||||||
<ControlScript>controlscript.js</ControlScript>
|
<ControlScript>controlscript.js</ControlScript>
|
||||||
<RepositorySettingsPageVisible>false</RepositorySettingsPageVisible>
|
|
||||||
<DependsOnLocalInstallerBinary>true</DependsOnLocalInstallerBinary>
|
<DependsOnLocalInstallerBinary>true</DependsOnLocalInstallerBinary>
|
||||||
<SupportsModify>false</SupportsModify>
|
<SupportsModify>false</SupportsModify>
|
||||||
<DisableAuthorizationFallback>true</DisableAuthorizationFallback>
|
<DisableAuthorizationFallback>true</DisableAuthorizationFallback>
|
||||||
|
<RemoteRepositories>
|
||||||
|
<Repository>
|
||||||
|
<Url>http://localhost/repository</Url>
|
||||||
|
<Enabled>1</Enabled>
|
||||||
|
<DisplayName>AmneziaVPN - repository for Windows</DisplayName>
|
||||||
|
</Repository>
|
||||||
|
</RemoteRepositories>
|
||||||
</Installer>
|
</Installer>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ClearProfilesCheckboxForm</class>
|
||||||
|
<widget class="QWidget" name="ClearProfilesCheckboxForm">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="ClearProfilesCheckbox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Clear client cached profiles</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@@ -47,7 +47,11 @@ function Component()
|
|||||||
|
|
||||||
Component.prototype.componentLoaded = function ()
|
Component.prototype.componentLoaded = function ()
|
||||||
{
|
{
|
||||||
|
console.log("123");
|
||||||
|
// if (installer.isPackageManager()) {
|
||||||
|
installer.addWizardPageItem( component, "ClearProfilesCheckboxForm", QInstaller.ComponentSelection );
|
||||||
|
console.log("333");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.prototype.installationFinishedPageIsShown = function()
|
Component.prototype.installationFinishedPageIsShown = function()
|
||||||
@@ -62,7 +66,6 @@ Component.prototype.createOperations = function()
|
|||||||
component.createOperations();
|
component.createOperations();
|
||||||
|
|
||||||
if (runningOnWindows()) {
|
if (runningOnWindows()) {
|
||||||
|
|
||||||
component.addOperation("CreateShortcut", "@TargetDir@/" + appExecutableFileName(),
|
component.addOperation("CreateShortcut", "@TargetDir@/" + appExecutableFileName(),
|
||||||
QDesktopServices.storageLocation(QDesktopServices.DesktopLocation) + "/" + appName() + ".lnk",
|
QDesktopServices.storageLocation(QDesktopServices.DesktopLocation) + "/" + appName() + ".lnk",
|
||||||
"workingDirectory=@TargetDir@", "iconPath=@TargetDir@\\" + appExecutableFileName(), "iconId=0");
|
"workingDirectory=@TargetDir@", "iconPath=@TargetDir@\\" + appExecutableFileName(), "iconId=0");
|
||||||
@@ -100,7 +103,6 @@ Component.prototype.createOperations = function()
|
|||||||
Component.prototype.installationFinished = function()
|
Component.prototype.installationFinished = function()
|
||||||
{
|
{
|
||||||
var command = "";
|
var command = "";
|
||||||
var args = [];
|
|
||||||
|
|
||||||
if ((installer.status === QInstaller.Success) && (installer.isInstaller() || installer.isUpdater())) {
|
if ((installer.status === QInstaller.Success) && (installer.isInstaller() || installer.isUpdater())) {
|
||||||
|
|
||||||
@@ -121,11 +123,21 @@ Component.prototype.installationFinished = function()
|
|||||||
} else if (runningOnMacOS()) {
|
} else if (runningOnMacOS()) {
|
||||||
command = "/Applications/" + appName() + ".app/Contents/MacOS/" + appName();
|
command = "/Applications/" + appName() + ".app/Contents/MacOS/" + appName();
|
||||||
} else if (runningOnLinux()) {
|
} else if (runningOnLinux()) {
|
||||||
command = "@TargetDir@/client/" + appName();
|
command = "@TargetDir@/client/" + appName();
|
||||||
}
|
}
|
||||||
|
|
||||||
installer.dropAdminRights()
|
installer.dropAdminRights()
|
||||||
|
|
||||||
|
if (installer.isUninstaller() || installer.isUpdater()) {
|
||||||
|
var checkboxForm = component.userInterface( "ClearProfilesCheckboxForm" );
|
||||||
|
if (checkboxForm && checkboxForm.ClearProfilesCheckbox.checked) {
|
||||||
|
var args = ["--clearProfiles"];
|
||||||
|
processStatus = installer.execute(command, args, installer.value("TargetDir"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var args = [];
|
||||||
processStatus = installer.executeDetached(command, args, installer.value("TargetDir"));
|
processStatus = installer.executeDetached(command, args, installer.value("TargetDir"));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-3
@@ -2,11 +2,13 @@
|
|||||||
<Package>
|
<Package>
|
||||||
<DisplayName>AmneziaVPN</DisplayName>
|
<DisplayName>AmneziaVPN</DisplayName>
|
||||||
<Description>Installation package for AmneziaVPN</Description>
|
<Description>Installation package for AmneziaVPN</Description>
|
||||||
<Version>2.0.0.0</Version>
|
<Version>@CMAKE_PROJECT_VERSION@</Version>
|
||||||
<ReleaseDate>2022-02-02</ReleaseDate>
|
<ReleaseDate>@RELEASE_DATE@</ReleaseDate>
|
||||||
<Default>true</Default>
|
<Default>true</Default>
|
||||||
<ForcedInstallation>true</ForcedInstallation>
|
<ForcedInstallation>true</ForcedInstallation>
|
||||||
<RequiresAdminRights>true</RequiresAdminRights>
|
<RequiresAdminRights>true</RequiresAdminRights>
|
||||||
<Script>componentscript.js</Script>
|
<Script>componentscript.js</Script>
|
||||||
|
<UserInterfaces>
|
||||||
|
<UserInterface>clearProfilesCheckboxForm.ui</UserInterface>
|
||||||
|
</UserInterfaces>
|
||||||
</Package>
|
</Package>
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#exists(config.pri):infile(config.pri, SOLUTIONS_LIBRARY, yes): CONFIG += qtservice-uselib
|
|
||||||
TEMPLATE += fakelib
|
|
||||||
QTSERVICE_LIBNAME = QtSolutions_Service-head
|
|
||||||
CONFIG(debug, debug|release) {
|
|
||||||
mac:QTSERVICE_LIBNAME = $$member(QTSERVICE_LIBNAME, 0)_debug
|
|
||||||
else:win32:QTSERVICE_LIBNAME = $$member(QTSERVICE_LIBNAME, 0)d
|
|
||||||
}
|
|
||||||
TEMPLATE -= fakelib
|
|
||||||
QTSERVICE_LIBDIR = $$PWD/lib
|
|
||||||
unix:qtservice-uselib:!qtservice-buildlib:QMAKE_RPATHDIR += $$QTSERVICE_LIBDIR
|
|
||||||
@@ -9,6 +9,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
find_package(Qt6 REQUIRED COMPONENTS Core Network RemoteObjects Core5Compat)
|
find_package(Qt6 REQUIRED COMPONENTS Core Network RemoteObjects Core5Compat)
|
||||||
qt_standard_project_setup()
|
qt_standard_project_setup()
|
||||||
|
|
||||||
|
configure_file(${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
${CMAKE_CURRENT_LIST_DIR}/../../client/utilities.h
|
${CMAKE_CURRENT_LIST_DIR}/../../client/utilities.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/../../ipc/ipc.h
|
${CMAKE_CURRENT_LIST_DIR}/../../ipc/ipc.h
|
||||||
@@ -18,6 +20,7 @@ set(HEADERS
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/logger.h
|
${CMAKE_CURRENT_LIST_DIR}/logger.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/router.h
|
${CMAKE_CURRENT_LIST_DIR}/router.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/systemservice.h
|
${CMAKE_CURRENT_LIST_DIR}/systemservice.h
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
QFile Logger::m_file;
|
QFile Logger::m_file;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "localserver.h"
|
#include "localserver.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "systemservice.h"
|
#include "systemservice.h"
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
TARGET = AmneziaVPN-service
|
|
||||||
TEMPLATE = app
|
|
||||||
CONFIG += console qt no_batch
|
|
||||||
QT += core network remoteobjects
|
|
||||||
equals(QT_MAJOR_VERSION, 6): QT += core5compat
|
|
||||||
|
|
||||||
HEADERS = \
|
|
||||||
../../client/utilities.h \
|
|
||||||
../../ipc/ipc.h \
|
|
||||||
../../ipc/ipcserver.h \
|
|
||||||
../../ipc/ipcserverprocess.h \
|
|
||||||
localserver.h \
|
|
||||||
logger.h \
|
|
||||||
router.h \
|
|
||||||
systemservice.h
|
|
||||||
|
|
||||||
SOURCES = \
|
|
||||||
../../client/utilities.cpp \
|
|
||||||
../../ipc/ipcserver.cpp \
|
|
||||||
../../ipc/ipcserverprocess.cpp \
|
|
||||||
localserver.cpp \
|
|
||||||
logger.cpp \
|
|
||||||
main.cpp \
|
|
||||||
router.cpp \
|
|
||||||
systemservice.cpp
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
HEADERS += \
|
|
||||||
tapcontroller_win.h \
|
|
||||||
router_win.h
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
tapcontroller_win.cpp \
|
|
||||||
router_win.cpp
|
|
||||||
|
|
||||||
LIBS += \
|
|
||||||
-luser32 \
|
|
||||||
-lrasapi32 \
|
|
||||||
-lshlwapi \
|
|
||||||
-liphlpapi \
|
|
||||||
-lws2_32 \
|
|
||||||
-liphlpapi \
|
|
||||||
-lgdi32 \
|
|
||||||
-lAdvapi32 \
|
|
||||||
-lKernel32
|
|
||||||
}
|
|
||||||
|
|
||||||
macx {
|
|
||||||
HEADERS += \
|
|
||||||
router_mac.h \
|
|
||||||
helper_route_mac.h
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
router_mac.cpp \
|
|
||||||
helper_route_mac.c
|
|
||||||
}
|
|
||||||
|
|
||||||
linux {
|
|
||||||
HEADERS += \
|
|
||||||
router_linux.h
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
router_linux.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
include(../src/qtservice.pri)
|
|
||||||
|
|
||||||
INCLUDEPATH += "$$PWD/../../client"
|
|
||||||
|
|
||||||
REPC_SOURCE += ../../ipc/ipc_interface.rep
|
|
||||||
!ios: REPC_SOURCE += ../../ipc/ipc_process_interface.rep
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "defines.h"
|
#include "version.h"
|
||||||
#include "localserver.h"
|
#include "localserver.h"
|
||||||
#include "systemservice.h"
|
#include "systemservice.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
!ios:!android {
|
|
||||||
TEMPLATE=subdirs
|
|
||||||
CONFIG += ordered
|
|
||||||
include(common.pri)
|
|
||||||
qtservice-uselib:SUBDIRS=buildlib
|
|
||||||
SUBDIRS+=server
|
|
||||||
}
|
|
||||||
win32 {
|
|
||||||
SUBDIRS+=wireguard-service
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
include(../common.pri)
|
|
||||||
INCLUDEPATH += $$PWD
|
|
||||||
DEPENDPATH += $$PWD
|
|
||||||
!win32:QT += network
|
|
||||||
win32:LIBS += -luser32
|
|
||||||
|
|
||||||
qtservice-uselib:!qtservice-buildlib {
|
|
||||||
LIBS += -L$$QTSERVICE_LIBDIR -l$$QTSERVICE_LIBNAME
|
|
||||||
} else {
|
|
||||||
HEADERS += $$PWD/qtservice.h \
|
|
||||||
$$PWD/qtservice_p.h
|
|
||||||
SOURCES += $$PWD/qtservice.cpp
|
|
||||||
win32:SOURCES += $$PWD/qtservice_win.cpp
|
|
||||||
unix:HEADERS += $$PWD/qtunixsocket.h $$PWD/qtunixserversocket.h
|
|
||||||
unix:SOURCES += $$PWD/qtservice_unix.cpp $$PWD/qtunixsocket.cpp $$PWD/qtunixserversocket.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
qtservice-buildlib:shared:DEFINES += QT_QTSERVICE_EXPORT
|
|
||||||
else:qtservice-uselib:DEFINES += QT_QTSERVICE_IMPORT
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
TARGET = wireguard-service
|
|
||||||
TEMPLATE = app
|
|
||||||
CONFIG += console
|
|
||||||
CONFIG -= app_bundle
|
|
||||||
CONFIG -= qt
|
|
||||||
LIBS += \
|
|
||||||
-luser32 \
|
|
||||||
-lrasapi32 \
|
|
||||||
-lshlwapi \
|
|
||||||
-liphlpapi \
|
|
||||||
-lws2_32 \
|
|
||||||
-liphlpapi \
|
|
||||||
-lgdi32 \
|
|
||||||
-lAdvapi32 \
|
|
||||||
-lKernel32
|
|
||||||
|
|
||||||
HEADERS = \
|
|
||||||
wireguardtunnelservice.h
|
|
||||||
|
|
||||||
SOURCES = \
|
|
||||||
main.cpp \
|
|
||||||
wireguardtunnelservice.cpp
|
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#ifndef VERSION_H
|
||||||
|
#define VERSION_H
|
||||||
|
|
||||||
|
#ifndef APP_VERSION
|
||||||
|
#define APP_VERSION "@CMAKE_PROJECT_VERSION@"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef APP_MAJOR_VERSION
|
||||||
|
#define APP_MAJOR_VERSION "@APP_MAJOR_VERSION@"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define APPLICATION_NAME "AmneziaVPN"
|
||||||
|
#define SERVICE_NAME "AmneziaVPN-service"
|
||||||
|
#define ORGANIZATION_NAME "AmneziaVPN.ORG"
|
||||||
|
|
||||||
|
#endif // VERSION_H
|
||||||
Reference in New Issue
Block a user