From 5c594e2763622a0bc1ee5712922dbf69c35478eb Mon Sep 17 00:00:00 2001 From: Stefan Kebekus Date: Thu, 30 Nov 2023 20:53:52 +0100 Subject: [PATCH 1/6] Update README.md --- README.md | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 76 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4348159..5a40d16 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # enrouteDependencies -This repository hosts build scripts for the dependencies of Enroute Flight Navigation. Currently, this is the maplibre port for Qt, [maplibre-native-qt](https://github.com/maplibre/maplibre-native-qt). +This repository hosts build scripts for the dependencies of Enroute Flight Navigation. Currently, this is the maplibre port for Qt, [maplibre-native-qt](https://github.com/maplibre/maplibre-native-qt). On iOS, these are a universal static libraries for libzip and zlib. ## Cloning this repository @@ -12,14 +12,12 @@ git submodule update --init --recursive ``` -## Using the build script +## Using the build scripts -At present, there is one build script. +### buildscript-android.sh -### buildscript-maplibre-linux.sh - -This build script runs on a Linux host. It compiles maplibre-native-qt for the following platforms and installs the binaries directly into the Qt development tree. +This build script runs on a Linux or macOS host. It compiles maplibre-native-qt and installs the binaries directly into the Qt development tree. #### Prerequisites @@ -36,7 +34,6 @@ The script expects to find the Qt development files in the typical layout provid |Platform | Path |-------------------|--------------------------------- -|Linux/Desktop | $Qt6_DIR_BASE/gcc_64 |Android/armv7 | $Qt6_DIR_BASE/android_armv7 |Android/arm64_v8a | $Qt6_DIR_BASE/android_arm64_v8a |Android/x86 | $Qt6_DIR_BASE/android_x86 @@ -53,3 +50,75 @@ export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/25.1.8937393 export Qt6_DIR_BASE=/home/kebekus/Software/buildsystems/Qt/6.6.0 ./buildscript-maplibre-linux.sh ``` + + +### buildscript-ios.sh + +This build script runs on a macOS host. It compiles universal static libraries for libzip and zlib, and installs the binaries directly into the Qt development tree. + + +#### Prerequisites + +The script expects that the following environment variables are set. + +| Variable | Content +|-------------------|--------------------------------- +| Qt6_DIR_BASE | path to the Qt installation tree, as downloaded with the Qt Online installer. + + +#### Typical invocation + +On the author's machine, the following will work. + +``` +export Qt6_DIR_BASE=/Users/kebekus/Software/buildsystems/Qt/6.4.3 +./buildscript-ios.sh +``` + + +### buildscript-linux.sh + +This build script runs on a Linux host. It compiles maplibre-native-qt for the following platforms and installs the binaries directly into the Qt development tree. + + +#### Prerequisites + +The script expects that the following environment variables are set. + +| Variable | Content +|-------------------|--------------------------------- +| Qt6_DIR_BASE | path to the Qt installation tree, as downloaded with the Qt Online installer. + + +#### Typical invocation + +On the author's machine, the following will work. + +``` +export Qt6_DIR_BASE=/home/kebekus/Software/buildsystems/Qt/6.6.0 +./buildscript-linux.sh +``` + + +### buildscript-macos.sh + +This build script runs on a macOS host. It compiles maplibre-native-qt for the following platforms and installs the binaries directly into the Qt development tree. + + +#### Prerequisites + +The script expects that the following environment variables are set. + +| Variable | Content +|-------------------|--------------------------------- +| Qt6_DIR_BASE | path to the Qt installation tree, as downloaded with the Qt Online installer. + + +#### Typical invocation + +On the author's machine, the following will work. + +``` +export Qt6_DIR_BASE=/Users/kebekus/Software/buildsystems/Qt/6.6.0 +./buildscript-macos.sh +``` From bb77493adb6ae035f9421586644f1ce8c0f80623 Mon Sep 17 00:00:00 2001 From: Stefan Kebekus Date: Fri, 1 Dec 2023 07:52:04 +0100 Subject: [PATCH 2/6] Add action --- .github/workflows/linux.yml | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/linux.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..22fd332 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,48 @@ +name: Compile on Linux + +on: + push: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: true + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + cache: 'true' + version: '6.*.*' + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: linux + - name: Compile + run: | + $Qt6_DIR/bin/qt-cmake \ + -S maplibre-native-qt \ + -B build \ + -G Ninja \ + -DMLN_QT_WITH_INTERNAL_ICU=ON \ + -DBUILD_TESTING=OFF \ + -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \ + -DCMAKE_INSTALL_PREFIX=gcc_64 + - name: Compile and Install + run: | + cmake --build build + cmake --build build --target install + - name: Package + run: | + tar cvfz enrouteDependencies_linux.tar.gz gcc_64 + - name: Upload to developerBuilds + run: | + gh release upload --clobber developerBuilds *.tar.gz + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 08d27fe9edcffa126456ead674f78c907e2b98e4 Mon Sep 17 00:00:00 2001 From: Stefan Kebekus Date: Fri, 1 Dec 2023 07:55:34 +0100 Subject: [PATCH 3/6] Fix action --- .github/workflows/linux.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 22fd332..94ccfac 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -28,7 +28,6 @@ jobs: $Qt6_DIR/bin/qt-cmake \ -S maplibre-native-qt \ -B build \ - -G Ninja \ -DMLN_QT_WITH_INTERNAL_ICU=ON \ -DBUILD_TESTING=OFF \ -DCMAKE_C_COMPILER_LAUNCHER="ccache" \ From d2bc29f9f3b87db53155a08bd15a0e3c5a93278b Mon Sep 17 00:00:00 2001 From: Stefan Kebekus Date: Fri, 1 Dec 2023 07:59:12 +0100 Subject: [PATCH 4/6] Fix action --- .github/workflows/linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 94ccfac..1843419 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,6 +18,7 @@ jobs: uses: jurplel/install-qt-action@v3 with: cache: 'true' + modules: 'qtlocation' version: '6.*.*' - name: ccache uses: hendrikmuhs/ccache-action@v1.2 From 4cab919d4c6d016922be58b8c9d35f6bc4a8847b Mon Sep 17 00:00:00 2001 From: Stefan Kebekus Date: Fri, 1 Dec 2023 08:01:22 +0100 Subject: [PATCH 5/6] Fix action --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1843419..1807d0a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,7 +18,7 @@ jobs: uses: jurplel/install-qt-action@v3 with: cache: 'true' - modules: 'qtlocation' + modules: 'qtlocation qtpositioning' version: '6.*.*' - name: ccache uses: hendrikmuhs/ccache-action@v1.2 From ccac11ee9660f4bd1648c3339508a72d13cf0636 Mon Sep 17 00:00:00 2001 From: Stefan Kebekus Date: Fri, 1 Dec 2023 08:06:52 +0100 Subject: [PATCH 6/6] Fix action --- .github/workflows/linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1807d0a..124342d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -11,9 +11,9 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - submodules: true + submodules: recursive - name: Install Qt uses: jurplel/install-qt-action@v3 with: