diff --git a/CMakeLists.txt b/CMakeLists.txt index 084a6cb0..53319b00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR) set(PROJECT AmneziaVPN) -project(${PROJECT} VERSION 3.0.7.2 +project(${PROJECT} VERSION 3.0.7.4 DESCRIPTION "AmneziaVPN" HOMEPAGE_URL "https://amnezia.org/" ) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index fad1b67e..1d6b3e0d 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -214,7 +214,11 @@ if(APPLE) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15) add_compile_definitions(MVPN_MACOS) - # ICON = $$PWD/images/app.icns + + set(ICON_FILE ${CMAKE_CURRENT_SOURCE_DIR}/images/app.icns) + set(MACOSX_BUNDLE_ICON_FILE app.icns) + set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) + set(SOURCES ${SOURCES} ${ICON_FILE}) find_library(FW_COCOA Cocoa) find_library(FW_APPLICATIONSERVICES ApplicationServices) diff --git a/client/ui/pages_logic/StartPageLogic.h b/client/ui/pages_logic/StartPageLogic.h index bfca6e60..9025a052 100644 --- a/client/ui/pages_logic/StartPageLogic.h +++ b/client/ui/pages_logic/StartPageLogic.h @@ -23,7 +23,7 @@ class StartPageLogic : public PageLogicBase AUTO_PROPERTY(QString, labelWaitInfoText) AUTO_PROPERTY(bool, pushButtonBackFromStartVisible) - AUTO_PROPERTY(QString, privateKeyPassphrase); + AUTO_PROPERTY(QString, privateKeyPassphrase) READONLY_PROPERTY(QRegularExpression, ipAddressPortRegex) public: diff --git a/client/ui/qml/Pages/PageStart.qml b/client/ui/qml/Pages/PageStart.qml index 85c63b4d..a752817f 100644 --- a/client/ui/qml/Pages/PageStart.qml +++ b/client/ui/qml/Pages/PageStart.qml @@ -233,9 +233,8 @@ PageBase { anchors.top: label_server_ip.bottom anchors.horizontalCenter: parent.horizontalCenter text: StartPageLogic.lineEditIpText - onEditingFinished: { - StartPageLogic.lineEditIpText = text - } + onEditingFinished: { StartPageLogic.lineEditIpText = text } + onTextEdited: { StartPageLogic.lineEditIpText = text } validator: RegularExpressionValidator { regularExpression: StartPageLogic.ipAddressPortRegex @@ -253,9 +252,8 @@ PageBase { anchors.top: label_login.bottom anchors.horizontalCenter: parent.horizontalCenter text: StartPageLogic.lineEditLoginText - onEditingFinished: { - StartPageLogic.lineEditLoginText = text - } + onEditingFinished: { StartPageLogic.lineEditLoginText = text } + onTextEdited: { StartPageLogic.lineEditLoginText = text } } LabelType { @@ -268,25 +266,29 @@ PageBase { id: new_server_password anchors.top: label_new_server_password.bottom anchors.horizontalCenter: parent.horizontalCenter + + inputMethodHints: Qt.ImhSensitiveData echoMode: TextInput.Password text: StartPageLogic.lineEditPasswordText - onEditingFinished: { - StartPageLogic.lineEditPasswordText = text - } + onEditingFinished: { StartPageLogic.lineEditPasswordText = text } + onTextEdited: { StartPageLogic.lineEditPasswordText = text } + onAccepted: { StartPageLogic.onPushButtonConnect() } } TextFieldType { id: new_server_ssh_key anchors.top: label_new_server_password.bottom anchors.horizontalCenter: parent.horizontalCenter + visible: false height: 71 font.pixelSize: 10 verticalAlignment: Text.AlignTop + inputMethodHints: Qt.ImhSensitiveData + text: StartPageLogic.textEditSshKeyText - onEditingFinished: { - StartPageLogic.textEditSshKeyText = text - } - visible: false + onEditingFinished: { StartPageLogic.textEditSshKeyText = text } + onTextEdited: { StartPageLogic.textEditSshKeyText = text } + onAccepted: { StartPageLogic.onPushButtonConnect() } } LabelType { diff --git a/client/ui/qml/main.qml b/client/ui/qml/main.qml index 0c909650..8dc5adca 100644 --- a/client/ui/qml/main.qml +++ b/client/ui/qml/main.qml @@ -354,7 +354,7 @@ Window { } textArea.wrapMode: cbLogWrap.checked ? TextEdit.WordWrap: TextEdit.NoWrap - Keys.onPressed: { + Keys.onPressed: function(event) { UiLogic.keyPressEvent(event.key) event.accepted = true } diff --git a/deploy/build_macos.sh b/deploy/build_macos.sh index 170f2237..7e58db41 100755 --- a/deploy/build_macos.sh +++ b/deploy/build_macos.sh @@ -66,11 +66,9 @@ echo "____________________________________" echo "............Deploy.................." echo "____________________________________" -# Package +# Package echo "Packaging ..." -#cd $DEPLOY_DIR - $QT_BIN_DIR/macdeployqt $OUT_APP_DIR/$APP_FILENAME -always-overwrite -qmldir=$PROJECT_DIR cp -av $BUILD_DIR/service/server/$APP_NAME-service $BUNDLE_DIR/Contents/macOS cp -Rv $PROJECT_DIR/deploy/data/macos/* $BUNDLE_DIR/Contents/macOS @@ -147,7 +145,7 @@ if [ "${MAC_CERT_PW+x}" ]; then fi echo "Building DMG installer..." -hdiutil create -volname $APP_NAME -srcfolder $BUILD_DIR/installer/$APP_NAME.app -ov -format UDZO $DMG_FILENAME +hdiutil create -volname Amnezia -srcfolder $BUILD_DIR/installer/$APP_NAME.app -ov -format UDZO $DMG_FILENAME if [ "${MAC_CERT_PW+x}" ]; then echo "Signing DMG installer..." diff --git a/service/CMakeLists.txt b/service/CMakeLists.txt index 567e9d49..cfb3beb2 100644 --- a/service/CMakeLists.txt +++ b/service/CMakeLists.txt @@ -7,10 +7,6 @@ set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) if(NOT IOS AND NOT ANDROID) - #include(common.cmake) -#if (qtservice-uselib) -# add_subdirectory(buildlib) -#endif() add_subdirectory(server) endif() diff --git a/service/server/CMakeLists.txt b/service/server/CMakeLists.txt index c68a1dd9..f63834d1 100644 --- a/service/server/CMakeLists.txt +++ b/service/server/CMakeLists.txt @@ -94,11 +94,16 @@ include_directories( add_executable(${PROJECT} ${SOURCES} ${HEADERS}) target_link_libraries(${PROJECT} PRIVATE Qt6::Core Qt6::Network Qt6::RemoteObjects Qt6::Core5Compat ${LIBS}) -qt_add_repc_sources(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}/../../ipc/ipc_interface.rep) -if(NOT IOS) - qt_add_repc_sources(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}/../../ipc/ipc_process_interface.rep) +if(APPLE) + set_target_properties(${PROJECT} PROPERTIES + INSTALL_RPATH "@executable_path/../Frameworks" + BUILD_WITH_INSTALL_RPATH TRUE + ) endif() +qt_add_repc_sources(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}/../../ipc/ipc_interface.rep) +qt_add_repc_sources(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}/../../ipc/ipc_process_interface.rep) + # deploy artifacts required to run the application to the debug build folder if(WIN32) if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") @@ -112,12 +117,10 @@ elseif(APPLE AND NOT IOS) set(DEPLOY_ARTIFACT_PATH "macos") endif() -if(NOT IOS AND NOT ANDROID) - add_custom_command( - TARGET ${PROJECT} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E $,copy_directory,true> - ${CMAKE_SOURCE_DIR}/deploy/data/${DEPLOY_ARTIFACT_PATH} - $ - COMMAND_EXPAND_LISTS - ) -endif() +add_custom_command( + TARGET ${PROJECT} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E $,copy_directory,true> + ${CMAKE_SOURCE_DIR}/deploy/data/${DEPLOY_ARTIFACT_PATH} + $ + COMMAND_EXPAND_LISTS +)