From 85020270d57eee07775776a5290ed79faca2bf34 Mon Sep 17 00:00:00 2001 From: pokamest Date: Sun, 8 Jan 2023 17:21:51 -0800 Subject: [PATCH] MacOS deploy fix --- .github/workflows/deploy.yml | 8 -------- client/CMakeLists.txt | 8 +++++--- deploy/build_macos.sh | 10 ++++------ 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 187150da..a5d2359e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -166,14 +166,6 @@ jobs: team-id: 'X7UJ388FXK' configuration: Release - - - - - - - - # ------------------------------------------------------ Build-MacOS: diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 8aeddc32..1a1f052d 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -292,8 +292,6 @@ endif() if(IOS) message("Client iOS build") - - find_package(Qt6 REQUIRED COMPONENTS ShaderTools) set(LIBS ${LIBS} Qt6::ShaderTools) @@ -346,7 +344,11 @@ qt_add_executable(${PROJECT} ${SOURCES} ${HEADERS} ${RESOURCES} ${QRC}) qt_add_translations(${PROJECT} TS_FILES ${CMAKE_CURRENT_LIST_DIR}/translations/amneziavpn_ru.ts) -# NETWORKEXTENSION=1 +if(APPLE AND NOT IOS) + set_target_properties(AmneziaVPN PROPERTIES + MACOSX_BUNDLE TRUE + ) +endif() if(IOS) enable_language(OBJC) diff --git a/deploy/build_macos.sh b/deploy/build_macos.sh index 869a1ccc..9b80a958 100755 --- a/deploy/build_macos.sh +++ b/deploy/build_macos.sh @@ -38,9 +38,9 @@ DMG_FILENAME=$PROJECT_DIR/${APP_NAME}.dmg # Seacrh Qt if [ -z "${QT_VERSION+x}" ]; then -QT_VERSION=5.15.2; +QT_VERSION=6.4.1; QIF_VERSION=4.1 -QT_BIN_DIR=$HOME/Qt/$QT_VERSION/clang_64/bin +QT_BIN_DIR=$HOME/Qt/$QT_VERSION/macos/bin QIF_BIN_DIR=$QT_BIN_DIR/../../../Tools/QtInstallerFramework/$QIF_VERSION/bin fi @@ -58,9 +58,7 @@ echo "Building App..." cd $BUILD_DIR $QT_BIN_DIR/qt-cmake -S $PROJECT_DIR -B $BUILD_DIR -cmake --build . --config release -# $QT_BIN_DIR/qmake $PROJECT_DIR/AmneziaVPN.pro 'CONFIG+=release CONFIG+=x86_64' -# make -j `sysctl -n hw.ncpu` +cmake --build . --config release --target all # Build and run tests here @@ -74,7 +72,7 @@ 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.app/Contents/macOS/$APP_NAME-service $BUNDLE_DIR/Contents/macOS +cp -av $BUILD_DIR/service/server/$APP_NAME-service $BUNDLE_DIR/Contents/macOS cp -Rv $PROJECT_DIR/deploy/data/macos/* $BUNDLE_DIR/Contents/macOS rm -f $BUNDLE_DIR/Contents/macOS/post_install.sh $BUNDLE_DIR/Contents/macOS/post_uninstall.sh