From 4e0081ef21eb36bf6c5abd51eff6b42fb567b006 Mon Sep 17 00:00:00 2001 From: Tomoya Tanjo Date: Wed, 23 Jun 2021 06:42:28 +0900 Subject: [PATCH 1/7] Update azure-pipelines.yml to use Ubuntu 20.04 (cherry picked from commit 695a737a89604cce2857acea5640ff2f8db19d95) --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e12cdd60..7c1a838c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -65,7 +65,7 @@ jobs: - job: LinuxBuild displayName: Linux Build pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-20.04' steps: - script: sudo apt-get update -y - script: sudo apt-get install -y libxtst-dev qtdeclarative5-dev libavahi-compat-libdnssd-dev libcurl4-openssl-dev From 00c29b80a61e765aed46d49d97e0c4559b7b8b8d Mon Sep 17 00:00:00 2001 From: Tomoya Tanjo Date: Tue, 29 Jun 2021 00:00:04 +0900 Subject: [PATCH 2/7] Attempt to support several Ubuntu LTSs to CI (cherry picked from commit 57463a31f87252419ef57dab7d29422fe3f692b3) --- azure-pipelines.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7c1a838c..1ef9a7e0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -63,9 +63,17 @@ jobs: artifactName: Windows Release Installer - job: LinuxBuild + strategy: + matrix: + ubuntu-16.04: + imageName: 'ubuntu-16.04' + ubuntu-18.04: + imageName: 'ubuntu-18.04' + ubuntu-20.04: + imageName: 'ubuntu-20.04' displayName: Linux Build pool: - vmImage: 'ubuntu-20.04' + vmImage: $(imageName) steps: - script: sudo apt-get update -y - script: sudo apt-get install -y libxtst-dev qtdeclarative5-dev libavahi-compat-libdnssd-dev libcurl4-openssl-dev From 15202b4b852f0e8c711ecf73da202107deedaa78 Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Sat, 23 Oct 2021 19:27:00 +0100 Subject: [PATCH 3/7] Pipelines: Remove Ubuntu 16.04 agent Azure Pipelines no longer supports Ubuntu 16.04, so to remove the error, this commit removes it from the cross-platform matrix. Signed-off-by: Dom Rodriguez (cherry picked from commit 2877e6cb174b980258dd5866fe333f187ee7b905) --- azure-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1ef9a7e0..1a759963 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -65,8 +65,6 @@ jobs: - job: LinuxBuild strategy: matrix: - ubuntu-16.04: - imageName: 'ubuntu-16.04' ubuntu-18.04: imageName: 'ubuntu-18.04' ubuntu-20.04: From b633f34adc60a531ae7d833ddfb902c61dd06dd7 Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Sat, 23 Oct 2021 18:43:36 +0100 Subject: [PATCH 4/7] Initial test of multi-macOS builds This is an initial test of building Barrier for multiple macOS versions. For: - Big Sur - Moja\ve - Catalina I think there's an indentation issue somewhere, but VS Code isn't 'seeing' it... let's hope this works. If it does, we can proceed to merge. Signed-off-by: Dom Rodriguez (cherry picked from commit 59d076988f5bb894c64a993ba8dc3aa7984243b4) --- azure-pipelines.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1a759963..90634e32 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -81,11 +81,18 @@ jobs: - job: MacBuild displayName: Mac Build - pool: - vmImage: 'macOS-10.14' strategy: matrix: - Release: + big-sur-Release: + imageName: "macOS-11" + B_BUILD_TYPE: Release + BARRIER_VERSION_STAGE: Release + catalina-Release: + imageName: "macOS-10.15" + B_BUILD_TYPE: Release + BARRIER_VERSION_STAGE: Release + mojave-Release: + imageName: "macOS-10.14" B_BUILD_TYPE: Release BARRIER_VERSION_STAGE: Release variables: From cc3be8162ab40f9569f41f1563243af29faf7a28 Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Sat, 23 Oct 2021 18:50:18 +0100 Subject: [PATCH 5/7] Fix indentation on macOS matrix Turns out VS Code handled the YAML indentation.... badly. This should fix it. Signed-off-by: Dom Rodriguez (cherry picked from commit 907bcdcfea9d952868eddb3021ac50431f89c0a2) --- azure-pipelines.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 90634e32..31f6269f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -83,18 +83,18 @@ jobs: displayName: Mac Build strategy: matrix: - big-sur-Release: - imageName: "macOS-11" - B_BUILD_TYPE: Release - BARRIER_VERSION_STAGE: Release - catalina-Release: - imageName: "macOS-10.15" - B_BUILD_TYPE: Release - BARRIER_VERSION_STAGE: Release - mojave-Release: - imageName: "macOS-10.14" - B_BUILD_TYPE: Release - BARRIER_VERSION_STAGE: Release + big-sur-Release: + imageName: "macOS-11" + B_BUILD_TYPE: Release + BARRIER_VERSION_STAGE: Release + catalina-Release: + imageName: "macOS-10.15" + B_BUILD_TYPE: Release + BARRIER_VERSION_STAGE: Release + mojave-Release: + imageName: "macOS-10.14" + B_BUILD_TYPE: Release + BARRIER_VERSION_STAGE: Release variables: VERBOSE: 1 TERM: xterm-256color From 61ac3793e05931b41b6d8b06a412a556d02491a8 Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Sat, 23 Oct 2021 19:04:10 +0100 Subject: [PATCH 6/7] Fix missing VM parameter, matrix doesn't select automatically Signed-off-by: Dom Rodriguez (cherry picked from commit a53380de4fcf62f9cd89a0e1398d0c6e0f44540f) --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 31f6269f..2b42fc1d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -95,6 +95,8 @@ jobs: imageName: "macOS-10.14" B_BUILD_TYPE: Release BARRIER_VERSION_STAGE: Release + pool: + vmImage: $(imageName) variables: VERBOSE: 1 TERM: xterm-256color From 34f03b689c6d325cdaf538482d25392f2b5f161a Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Mon, 1 Nov 2021 19:55:41 +0200 Subject: [PATCH 7/7] Sync OSX build environment with current master This synchronizes the contents of the files with fc6d4e41d811237159f3e83024ca9ab0e9d1712f. --- dist/macos/bundle/build_dist.sh.in | 20 ++++++++++---------- osx_environment.sh | 19 ++++++++----------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/dist/macos/bundle/build_dist.sh.in b/dist/macos/bundle/build_dist.sh.in index c96da790..26a93201 100755 --- a/dist/macos/bundle/build_dist.sh.in +++ b/dist/macos/bundle/build_dist.sh.in @@ -1,7 +1,7 @@ #!/bin/sh # Use the same verbose variable as CMake -[ "$VERBOSE" == "1" ] && set -x +[ "$VERBOSE" = "1" ] && set -x # Exit on unset variables or pipe errors set -uo pipefail @@ -14,10 +14,10 @@ B_BARRIERC="Barrier.app/Contents/MacOS/barrierc" B_BARRIERS="Barrier.app/Contents/MacOS/barriers" # Colorized output -function info() { tput bold; echo "$@" ; tput sgr0 ;} -function error() { tput bold; tput setaf 1; echo "$@"; tput sgr0 ; } -function success() { tput bold; tput setaf 2; echo "$@"; tput sgr0 ; } -function warn() { tput bold; tput setaf 3; echo "$@"; tput sgr0 ; } +info() { tput bold; echo "$@"; tput sgr0 ; } +error() { tput bold; tput setaf 1; echo "$@"; tput sgr0 ; } +success() { tput bold; tput setaf 2; echo "$@"; tput sgr0 ; } +warn() { tput bold; tput setaf 3; echo "$@"; tput sgr0 ; } info "Checking for bundle contents" if [ ! -d "Barrier.app/Contents" ]; then @@ -40,7 +40,7 @@ if which -s port ; then info "MacPorts found, searching for macdeployqt" DEPLOYQT="$(port contents qt5-qttools | grep --only --max-count 1 '/.*macdeployqt')" if [ ! -x "$DEPLOYQT" ]; then - error Please install package qt5-qttools + error "Please install package qt5-qttools" exit 1 fi fi @@ -48,15 +48,15 @@ fi # Check for macdeployqt on Homebrew if which -s brew ; then info "Homebrew found, searching for macdeployqt" - DEPLOYQT="$(brew list qt | grep --only '/.*macdeployqt' | head -1)" + DEPLOYQT="$(brew list qt@5 | grep --only '/.*macdeployqt' | head -1)" if [ ! -x "$DEPLOYQT" ]; then - error Please install package qt + error "Please install package qt" exit 1 fi fi # Use macdeployqt to include libraries and create dmg -if [ "$B_BUILDTYPE" == "Release" ]; then +if [ "$B_BUILDTYPE" = "Release" ]; then info "Building Release disk image (dmg)" "$DEPLOYQT" Barrier.app -dmg \ -executable="$B_BARRIERC" \ @@ -70,4 +70,4 @@ else -executable="$B_BARRIERC" \ -executable="$B_BARRIERS" || exit 1 success "Bundle created successfully" -fi \ No newline at end of file +fi diff --git a/osx_environment.sh b/osx_environment.sh index 09fa3479..2ee886da 100644 --- a/osx_environment.sh +++ b/osx_environment.sh @@ -1,7 +1,7 @@ #!/bin/bash # Checks if directory exists, otherwise asks to install package. -function check_dir_exists() { +check_dir_exists() { local path=$1 local package=$2 @@ -11,7 +11,7 @@ function check_dir_exists() { fi } -if [ ! $BARRIER_BUILD_ENV ]; then +if [ -z "$BARRIER_BUILD_ENV" ]; then check_dir_exists '/Applications/Xcode.app' 'Xcode' printf "Modifying environment for Barrier build...\n" @@ -29,18 +29,15 @@ if [ ! $BARRIER_BUILD_ENV ]; then elif command -v brew; then printf "Detected Homebrew\n" - QT_PATH=$(brew --prefix qt) - OPENSSL_PATH=$(brew --prefix openssl) + QT_PATH=$(brew --prefix qt@5) - check_dir_exists "$QT_PATH" 'qt' - check_dir_exists "$OPENSSL_PATH" 'openssl' + check_dir_exists "$QT_PATH" 'qt5' export BARRIER_BUILD_BREW=1 - export CMAKE_PREFIX_PATH="$QT_PATH:$CMAKE_PREFIX_PATH" - export LD_LIBRARY_PATH="$OPENSSL_PATH/lib:$LD_LIBRARY_PATH" - export CPATH="$OPENSSL_PATH/include:$CPATH" - export PKG_CONFIG_PATH="$OPENSSL_PATH/lib/pkgconfig:$PKG_CONFIG_PATH" - + export CMAKE_PREFIX_PATH="/opt/procursus:$QT_PATH:$CMAKE_PREFIX_PATH" + export LD_LIBRARY_PATH="/opt/procursus/lib:$LD_LIBRARY_PATH" + export CPATH="/opt/procursus/include:$CPATH" + export PKG_CONFIG_PATH="/opt/procursus/lib/pkgconfig:$PKG_CONFIG_PATH" else printf "Neither Homebrew nor Macports is installed. Can't get dependency paths\n" exit 1