diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..124342d --- /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@v4 + with: + submodules: recursive + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + cache: 'true' + modules: 'qtlocation qtpositioning' + 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 \ + -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 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 +```