Skip to content

Commit

Permalink
Merge pull request #4917 from opengisch/linux_stat_o_dynamic
Browse files Browse the repository at this point in the history
Linux workflow stat-o-dynamic
  • Loading branch information
nirvn authored Jan 6, 2024
2 parents 684f8cc + a2e87a4 commit 3393abb
Show file tree
Hide file tree
Showing 105 changed files with 22 additions and 3,179 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
- name: 🔨 Prepare build env
run: |
sudo apt-get update
sudo apt-get install -y gperf autopoint '^libxcb.*-dev' libx11-xcb-dev libegl1-mesa libegl1-mesa-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf-archive libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libfuse2 nasm
sudo apt-get install -y gperf autopoint '^libxcb.*-dev' libx11-xcb-dev libegl1-mesa libegl1-mesa-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf-archive libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libfuse2 libcups2-dev nasm
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
echo "BUILD_ROOT=${BUILD_ROOT}" >> $GITHUB_ENV
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
echo "CMAKE_BUILD_DIR=${BUILD_ROOT}/builddir" >> $GITHUB_ENV
echo "INSTALL_QT_VERSION=6.6.1" >> $GITHUB_ENV
- name: 💎 Setup ruby
uses: ruby/setup-ruby@v1
Expand All @@ -44,16 +43,8 @@ jobs:
- name: 🔨 Prepare build env
run: |
sudo apt-get update
sudo apt-get install -y gperf autopoint '^libxcb.*-dev' libx11-xcb-dev libegl1-mesa libegl1-mesa-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libxrandr-dev libxxf86vm-dev autoconf-archive libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libfuse2 nasm
sudo apt-get install -y gperf autopoint '^libxcb.*-dev' libx11-xcb-dev libegl1-mesa libegl1-mesa-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libxrandr-dev libxxf86vm-dev autoconf-archive libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0 libfuse2 libpulse-dev libcups2-dev nasm
# Required to run unit tests on linux
echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV
- name: 💐 Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.INSTALL_QT_VERSION }}
modules: 'qt5compat qtcharts qtpositioning qtserialport qtconnectivity qtimageformats qtmultimedia qtwebview qtsensors'
target: desktop
- name: Install linuxdeploy
uses: miurahr/install-linuxdeploy-action@v1
Expand All @@ -73,7 +64,6 @@ jobs:
-D WITH_VCPKG=ON \
-D WITH_SPIX=ON \
-D WITH_NFC=OFF \
-D SYSTEM_QT=ON \
-D APP_VERSION="${APP_VERSION}" \
-D APP_VERSION_STR="${APP_VERSION_STR}" \
-D APP_PACKAGE_NAME="${APP_PACKAGE_NAME}" \
Expand All @@ -95,11 +85,10 @@ jobs:
- name: 🌋 Build
run: |
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --config ${{ env.BUILD_TYPE }}
xvfb-run cmake --build "${{ env.CMAKE_BUILD_DIR }}" --config ${{ env.BUILD_TYPE }}
- name: Package
run: |
rm /home/runner/work/QField/Qt/${{ env.INSTALL_QT_VERSION }}/gcc_64/plugins/sqldrivers/libqsqlmimer.so
export LD_LIBRARY_PATH="${{ env.CMAKE_BUILD_DIR }}/vcpkg_installed/x64-linux/lib/":${LD_LIBRARY_PATH}
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target bundle --config ${{ env.BUILD_TYPE }}
echo "ARTIFACT_PATHNAME=${{ env.CMAKE_BUILD_DIR }}/QField-x86_64.AppImage" >> $GITHUB_ENV
Expand Down
5 changes: 0 additions & 5 deletions cmake/VcpkgToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,6 @@ if(NOT "${NUGET_TOKEN}" STREQUAL "" AND (_HOST_IS_WINDOWS OR EXISTS "${_VCPKG_MO
set(ENV{VCPKG_BINARY_SOURCES} "$ENV{VCPKG_BINARY_SOURCES};nugetconfig,${_CONFIG_PATH_NATIVE},readwrite")
endif()

set(SYSTEM_QT OFF CACHE BOOL "Determines if system Qt libraries should be used or Qt should be built from source. If enabled, the 'Qt6_DIR' environment variable can be used to specify the Qt installation to use.")
if(SYSTEM_QT)
list(APPEND VCPKG_OVERLAY_PORTS "${CMAKE_SOURCE_DIR}/vcpkg/overlay_system_qt6")
set($ENV{VCPKG_KEEP_ENV_VARS} "$ENV{VCPKG_KEEP_ENV_VARS};Qt6_DIR")
endif()
list(APPEND VCPKG_OVERLAY_PORTS "${CMAKE_SOURCE_DIR}/vcpkg/overlay")
list(APPEND VCPKG_OVERLAY_TRIPLETS "${CMAKE_SOURCE_DIR}/vcpkg/triplets")

Expand Down
3 changes: 1 addition & 2 deletions doc/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export Qt6_DIR=6.5.0/ios
### Configure

```sh
cmake -S . -B build-x64-ios -DVCPKG_TARGET_TRIPLET=x64-ios -GXcode -DWITH_VCPKG=ON -DSYSTEM_QT=ON -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_FIND_ROOT_PATH=$Qt6_DIR
cmake -S . -B build-x64-ios -DVCPKG_TARGET_TRIPLET=x64-ios -GXcode -DWITH_VCPKG=ON -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_FIND_ROOT_PATH=$Qt6_DIR
cmake --build build-x64-ios
```

Expand Down Expand Up @@ -222,7 +222,6 @@ export Qt6_DIR=$QT_ROOT/6.5.0/ios/
cmake -S . -B build-arm64-ios \
-DCMAKE_PREFIX_PATH=$QT_ROOT/6.5.0/ios/lib/cmake/Qt6 \
-DCMAKE_FIND_ROOT_PATH=$QT_ROOT/6.5.0/ios/ \
-DSYSTEM_QT=ON \
-DVCPKG_TARGET_TRIPLET=arm64-ios \
-DWITH_VCPKG=ON \
-DVCPKG_BUILD_TYPE=release \
Expand Down
1 change: 0 additions & 1 deletion scripts/build-vcpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ cmake -S "${SOURCE_DIR}" \
-B "${CMAKE_BUILD_DIR}" \
-G Ninja \
-D VCPKG_TARGET_TRIPLET="${triplet}" \
-D SYSTEM_QT=OFF \
-D ANDROID_NDK_VERSION="${ANDROID_NDK_VERSION}" \
-D ANDROID_SDK_ROOT="${ANDROID_SDK_ROOT}" \
-D ANDROID_BUILD_TOOLS_VERSION="${ANDROID_BUILD_TOOLS_VERSION}" \
Expand Down
16 changes: 2 additions & 14 deletions vcpkg/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
# VCPKG based ports

# base

The subfolder `base` is a submodule from microsoft/vcpkg. It contains the base ports.

# overlay
## overlay

The subfolder `overlay` contains specific patches required for certain ports
which are not compatible enough.

# overlay\_system\_qt

The subfolder `overlay_system_qt` contains empty qt ports to allow installing
qt via aqtinstall. This avoids having to compile the complete qt dependency
which is a costly operation and takes a long time.
It also contains patches for qt based ports to make sure they pick up
qt installed this way.
which have been customized to build QField.
8 changes: 7 additions & 1 deletion vcpkg/overlay/qtbase/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,13 @@ endforeach()
# printsupport features:
# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_PRINTSUPPORT_OPTIONS
# )
list(APPEND FEATURE_PRINTSUPPORT_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_CUPS:BOOL=ON)

if(VCPKG_TARGET_IS_LINUX)
list(APPEND FEATURE_PRINTSUPPORT_OPTIONS -DFEATURE_printsupport=ON)
list(APPEND FEATURE_PRINTSUPPORT_OPTIONS -DFEATURE_cups=ON)
else()
list(APPEND FEATURE_PRINTSUPPORT_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_CUPS:BOOL=ON)
endif()

# widgets features:
# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_WIDGETS_OPTIONS
Expand Down
175 changes: 0 additions & 175 deletions vcpkg/overlay_system_qt6/qt/copyright

This file was deleted.

3 changes: 0 additions & 3 deletions vcpkg/overlay_system_qt6/qt/portfile.cmake

This file was deleted.

1 change: 0 additions & 1 deletion vcpkg/overlay_system_qt6/qt/vcpkg-cmake-wrapper.cmake

This file was deleted.

18 changes: 0 additions & 18 deletions vcpkg/overlay_system_qt6/qt/vcpkg.json

This file was deleted.

2 changes: 0 additions & 2 deletions vcpkg/overlay_system_qt6/qt3d/portfile.cmake

This file was deleted.

Loading

1 comment on commit 3393abb

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.