Merge pull request #1357 from p12tic/2.3-build-fixes
[2.3.x] Backport build fixes
This commit is contained in:
commit
a3a354e664
|
@ -63,9 +63,15 @@ jobs:
|
|||
artifactName: Windows Release Installer
|
||||
|
||||
- job: LinuxBuild
|
||||
strategy:
|
||||
matrix:
|
||||
ubuntu-18.04:
|
||||
imageName: 'ubuntu-18.04'
|
||||
ubuntu-20.04:
|
||||
imageName: 'ubuntu-20.04'
|
||||
displayName: Linux Build
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.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
|
||||
|
@ -75,13 +81,22 @@ jobs:
|
|||
|
||||
- job: MacBuild
|
||||
displayName: Mac Build
|
||||
pool:
|
||||
vmImage: 'macOS-10.14'
|
||||
strategy:
|
||||
matrix:
|
||||
Release:
|
||||
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
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
variables:
|
||||
VERBOSE: 1
|
||||
TERM: xterm-256color
|
||||
|
|
|
@ -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
|
||||
fi
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue