From 28fe45696152a853b6514c0f28f48def69ed373c Mon Sep 17 00:00:00 2001 From: Tal Regev Date: Mon, 18 Apr 2022 21:24:27 +0300 Subject: [PATCH] Compile linux manager with vcpkg --- .github/workflows/linux.yml | 8 ++++++-- configure.ac | 2 +- deploy/prepare_deployment.py | 4 ++++ linux/ci_configure_manager.sh | 17 +++++++++++++++++ linux/update_vcpkg_manager.sh | 22 ++++++++++++++++++++++ 5 files changed, 50 insertions(+), 3 deletions(-) create mode 100755 linux/ci_configure_manager.sh create mode 100755 linux/update_vcpkg_manager.sh diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a8775e13e7a..65ca427a13b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - type: [libs, client, apps, libs-vcpkg, client-vcpkg, apps-vcpkg, libs-cmake, server, manager-with-webview, manager-without-webview, unit-test, integration-test] + type: [libs, client, apps, libs-vcpkg, client-vcpkg, apps-vcpkg, libs-cmake, manager-with-webview-vcpkg, server, manager-with-webview, manager-without-webview, unit-test, integration-test] fail-fast: false steps: - uses: actions/checkout@v2 @@ -29,7 +29,7 @@ jobs: run: | sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu bionic main universe' sudo apt-get -qq update - sudo apt-get install -y libftgl-dev freeglut3-dev libcurl4-openssl-dev libxmu-dev libxi-dev libfcgi-dev libxss-dev libnotify-dev libxcb-util0-dev libgtk2.0-dev libwebkitgtk-dev p7zip-full libxxf86vm-dev ocl-icd-opencl-dev zip + sudo apt-get install -y libftgl-dev freeglut3-dev libcurl4-openssl-dev libxmu-dev libxi-dev libfcgi-dev libxss-dev libnotify-dev libxcb-util0-dev libgtk2.0-dev libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev libwebkitgtk-dev p7zip-full libxxf86vm-dev ocl-icd-opencl-dev zip - name: Install dependencies for integration testing if: matrix.type == 'integration-test' @@ -88,6 +88,10 @@ jobs: if: success() && matrix.type == 'libs-cmake' run: linux/ci_configure_libs_cmake.sh + - name: Configure manager with webview and vcpkg + if: success() && matrix.type == 'manager-with-webview-vcpkg' + run: linux/ci_configure_manager.sh + - name: Configure server if: success() && matrix.type == 'server' run: ./configure --enable-server --disable-client --disable-manager diff --git a/configure.ac b/configure.ac index 863f3baca63..87a9f89925e 100644 --- a/configure.ac +++ b/configure.ac @@ -1286,7 +1286,7 @@ else CLIENTGUIFLAGS="${CLIENTGUIFLAGS} -DNDEBUG" fi -CLIENTGUILIBS="${WX_LIBS}" +CLIENTGUILIBS="${WX_LIBS} -lX11" if test "${enable_client_release}" = "yes" ; then if test "x${WX_LIBS_STATIC}" = "x" ; then diff --git a/deploy/prepare_deployment.py b/deploy/prepare_deployment.py index e82370afa2d..821f746d17f 100644 --- a/deploy/prepare_deployment.py +++ b/deploy/prepare_deployment.py @@ -209,6 +209,9 @@ def prepare_linux_apps_vcpkg(target_directory): def prepare_linux_manager_with_webview(target_directory): prepare_7z_archive('linux_manager-with-webview', target_directory, linux_manager_list) +def prepare_linux_manager_with_webview_vcpkg(target_directory): + prepare_7z_archive('linux_manager-with-webview-vcpkg', target_directory, linux_manager_list) + def prepare_linux_manager_without_webview(target_directory): prepare_7z_archive('linux_manager-without-webview', target_directory, linux_manager_list) @@ -249,6 +252,7 @@ def prepare_win_manager(target_directory): 'linux_apps': prepare_linux_apps, 'linux_apps-vcpkg': prepare_linux_apps_vcpkg, 'linux_manager-with-webview': prepare_linux_manager_with_webview, + 'linux_manager-with-webview-vcpkg': prepare_linux_manager_with_webview_vcpkg, 'linux_manager-without-webview': prepare_linux_manager_without_webview, 'win_apps-mingw': prepare_win_apps_mingw, 'win_apps-mingw-vcpkg': prepare_win_apps_mingw_vcpkg, diff --git a/linux/ci_configure_manager.sh b/linux/ci_configure_manager.sh new file mode 100755 index 00000000000..508be360106 --- /dev/null +++ b/linux/ci_configure_manager.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +if [ ! -d "linux" ]; then + echo "start this script in the source root directory" + exit 1 +fi + +CACHE_DIR="$PWD/3rdParty/buildCache/linux" +BUILD_DIR="$PWD/3rdParty/linux" +VCPKG_ROOT="$BUILD_DIR/vcpkg" +export VCPKG_DIR="$VCPKG_ROOT/installed/x64-linux" + +linux/update_vcpkg_manager.sh + +export _libcurl_pc="$VCPKG_DIR/lib/pkgconfig/libcurl.pc" +./configure --enable-vcpkg --disable-server --disable-client --with-wx-config=$VCPKG_DIR/tools/wxwidgets/wx-config diff --git a/linux/update_vcpkg_manager.sh b/linux/update_vcpkg_manager.sh new file mode 100755 index 00000000000..5adccb02361 --- /dev/null +++ b/linux/update_vcpkg_manager.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +if [ ! -d "linux" ]; then + echo "start this script in the source root directory" + exit 1 +fi + +CACHE_DIR="$PWD/3rdParty/buildCache/linux" +BUILD_DIR="$PWD/3rdParty/linux" +VCPKG_PORTS="$PWD/3rdParty/vcpkg_ports" +VCPKG_ROOT="$BUILD_DIR/vcpkg" + +if [ ! -d $VCPKG_ROOT ]; then + mkdir -p $BUILD_DIR + git -C $BUILD_DIR clone https://github.com/microsoft/vcpkg +fi + +git -C $VCPKG_ROOT pull +$VCPKG_ROOT/bootstrap-vcpkg.sh +$VCPKG_ROOT/vcpkg install curl[core,openssl] wxwidgets --clean-after-build --overlay-triplets=$VCPKG_PORTS/triplets/ci +$VCPKG_ROOT/vcpkg install freetype[core,bzip2,png] freeglut ftgl --clean-after-build --overlay-triplets=$VCPKG_PORTS/triplets/ci