diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index 5a690e9a9..5f99dbfd2 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -1,8 +1,7 @@ self-hosted-runner: # Labels of self-hosted runner in array of strings. labels: - - macos-14 # can be removed once actionlint is updated - - ubuntu-24.04 # can be removed once actionlint is updated + - windows-11-arm # can be removed once actionlint is updated - MapLibre_Native_Ubuntu_22_04_ARM_8_core - MapLibre_Native_Ubuntu_24_04_x84_16_core # Configuration variables in array of strings defined in your repository or diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 8e2c8280c..4de3103ed 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -74,16 +74,18 @@ jobs: fail-fast: false matrix: include: - - runs-on: ubuntu-22.04 + - runs-on: ubuntu-24.04 arch: x86_64 - - runs-on: ubuntu-22.04-arm - arch: arm64 - - runs-on: macos-14 + - runs-on: ubuntu-24.04-arm arch: arm64 - runs-on: macos-13 arch: x86_64 + - runs-on: macos-14 + arch: arm64 - runs-on: windows-2022 arch: x86_64 + - runs-on: windows-11-arm + arch: arm64 continue-on-error: true env: BUILDTYPE: "Release" @@ -147,24 +149,21 @@ jobs: working-directory: platform/node run: npm ci --ignore-scripts - - name: Set up msvc dev cmd (Windows) - if: runner.os == 'Windows' - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + - name: Set up msvc dev cmd (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1 - # Fixes an issue with the image causing builds to fail - https://github.com/actions/runner-images/issues/8598 - - name: Remove Strawberry Perl from PATH (Windows) - if: runner.os == 'Windows' - shell: pwsh - run: | - $env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", "" - "PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Setup cmake - # linux arm not supported https://github.com/jwlawson/actions-setup-cmake/issues/79 - if: ${{contains(runner.name, 'GitHub Actions') && matrix.runs-on != 'ubuntu-22.04-arm' }} - uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2 + - name: Set up msvc dev cmd (Windows ARM64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1 with: - cmake-version: '3.31' + arch: amd64_arm64 + + - name: Test VSCMD_ARG_TGT_ARCH Environment + if: runner.os == 'Windows' + run: | + echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" + shell: cmd - name: cmake version run: | @@ -174,22 +173,24 @@ jobs: if: runner.os == 'MacOS' || runner.os == 'Linux' uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19 with: - key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }} restore-keys: | - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }} - name: Set up ccache (Windows) if: runner.os == 'Windows' uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19 with: variant: "sccache" - key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }} restore-keys: | - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }} - name: Cache cmake-node-module deps uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 @@ -201,18 +202,12 @@ jobs: - name: Configure maplibre-native (MacOS) if: runner.os == 'MacOS' run: | - cmake --preset macos-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset macos-metal-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Configure maplibre-native (Linux) if: runner.os == 'Linux' run: | - cmake . -B build \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_C_COMPILER=gcc-12 \ - -DMLN_WITH_NODE=ON \ - -DMLN_WITH_OPENGL=ON + cmake --preset linux-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Get vcpkg commit id if: runner.os == 'Windows' @@ -228,19 +223,23 @@ jobs: path: ${{ github.workspace }}\platform\windows\vendor\vcpkg\archives key: vcpkg-${{ env.VCPKG_COMMIT_ID }} - - name: Configure maplibre-native (Windows) - if: runner.os == 'Windows' + - name: Configure maplibre-native (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' shell: pwsh env: VCPKG_INSTALL_OPTIONS: "--debug" VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" run: | - cmake . -B build ` - -G Ninja ` - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` - -DMLN_WITH_NODE=ON ` - -DMLN_WITH_OPENGL=ON + cmake --preset windows-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + + - name: Configure maplibre-native (Windows arm64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' + shell: pwsh + env: + VCPKG_INSTALL_OPTIONS: "--debug" + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" + run: | + cmake --preset windows-arm64-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' @@ -276,8 +275,8 @@ jobs: working-directory: platform/node run: npm test - - name: Test (Windows) - if: runner.os == 'Windows' + - name: Test (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' shell: pwsh working-directory: platform/node env: @@ -285,9 +284,20 @@ jobs: GALLIUM_DRIVER: llvmpipe run: | (Invoke-WebRequest https://api.github.com/repos/pal1000/mesa-dist-win/releases -Headers @{ Authorization = ('Bearer {0}' -f '${{ secrets.GITHUB_TOKEN }}') } | ConvertFrom-Json)[0].assets | Where-Object name -match 'mesa3d-.+-release-msvc\.7z' | foreach { Invoke-WebRequest $_.browser_download_url -OutFile mesa3d.7z } - & 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v131 .\mesa3d.7z x64\opengl32.dll x64\libgallium_wgl.dll x64\libGLESv2.dll + & 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v137 .\mesa3d.7z x64\opengl32.dll x64\libgallium_wgl.dll x64\libGLESv2.dll npm test + - name: Test (Windows ARM64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' + shell: pwsh + working-directory: platform/node + env: + LIBGL_ALWAYS_SOFTWARE: true + GALLIUM_DRIVER: llvmpipe + run: | + (Invoke-WebRequest https://api.github.com/repos/mmozeiko/build-mesa/releases -Headers @{ Authorization = ('Bearer {0}' -f '${{ secrets.GITHUB_TOKEN }}') } | ConvertFrom-Json)[0].assets | Where-Object name -match 'mesa-llvmpipe-arm64-.+\.7z' | foreach { Invoke-WebRequest $_.browser_download_url -OutFile mesa3d.7z } + & 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v137 .\mesa3d.7z opengl32.dll libGLESv2.dll + npm test # On PRs make sure that the npm package can be packaged. - name: Pack working-directory: platform/node diff --git a/.github/workflows/node-release.yml b/.github/workflows/node-release.yml index c92243a43..0f5a4087e 100644 --- a/.github/workflows/node-release.yml +++ b/.github/workflows/node-release.yml @@ -44,16 +44,18 @@ jobs: fail-fast: false matrix: include: - - runs-on: ubuntu-22.04 + - runs-on: ubuntu-24.04 arch: x86_64 - - runs-on: ubuntu-22.04-arm - arch: arm64 - - runs-on: macos-14 + - runs-on: ubuntu-24.04-arm arch: arm64 - runs-on: macos-13 arch: x86_64 + - runs-on: macos-14 + arch: arm64 - runs-on: windows-2022 arch: x86_64 + - runs-on: windows-11-arm + arch: arm64 continue-on-error: true env: BUILDTYPE: "Release" @@ -64,10 +66,13 @@ jobs: shell: bash steps: + - if: runner.os == 'Windows' + run: git config --global core.longpaths true + - name: Checkout uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 with: - submodules: true + submodules: recursive persist-credentials: false - name: Get OS Architecture @@ -114,23 +119,21 @@ jobs: working-directory: platform/node run: npm ci --ignore-scripts - - name: Set up msvc dev cmd (Windows) - if: runner.os == 'Windows' - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + - name: Set up msvc dev cmd (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1 - # Fixes an issue with the image causing builds to fail - https://github.com/actions/runner-images/issues/8598 - - name: Remove Strawberry Perl from PATH (Windows) - if: runner.os == 'Windows' - shell: pwsh - run: | - $env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", "" - "PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Setup cmake - if: ${{contains(runner.name, 'GitHub Actions')}} - uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2 + - name: Set up msvc dev cmd (Windows ARM64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1 with: - cmake-version: '3.31' + arch: amd64_arm64 + + - name: Test VSCMD_ARG_TGT_ARCH Environment + if: runner.os == 'Windows' + run: | + echo "VSCMD_ARG_TGT_ARCH=%VSCMD_ARG_TGT_ARCH%" + shell: cmd - name: cmake version run: | @@ -140,22 +143,24 @@ jobs: if: runner.os == 'MacOS' || runner.os == 'Linux' uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19 with: - key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }} restore-keys: | - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }} - name: Set up ccache (Windows) if: runner.os == 'Windows' uses: hendrikmuhs/ccache-action@bfa03e1de4d7f7c3e80ad9109feedd05c4f5a716 # v1.2.19 with: variant: "sccache" - key: ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }} + key: ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.sha }} restore-keys: | - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ github.ref }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }}-${{ github.job }} + ${{ matrix.runs-on }}-${{ matrix.arch }}-${{ env.BUILDTYPE }} - name: Cache cmake-node-module deps uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 @@ -167,47 +172,44 @@ jobs: - name: Configure maplibre-native (MacOS) if: runner.os == 'MacOS' run: | - cmake --preset macos-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + cmake --preset macos-metal-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Configure maplibre-native (Linux) if: runner.os == 'Linux' run: | - cmake . -B build \ - -G Ninja \ - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_C_COMPILER=gcc-12 \ - -DMLN_WITH_NODE=ON \ - -DMLN_WITH_OPENGL=ON + cmake --preset linux-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - - name: "Create directory '${{ github.workspace }}/platform/windows/vendor/vcpkg/bincache' (Windows)" - if: runner.os == 'Windows' - run: mkdir -p ${{ github.workspace }}/platform/windows/vendor/vcpkg/bincache - shell: bash - - - name: Restore vcpkg cache (Windows) - if: runner.os == 'Windows' - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 - with: - path: | - ${{ github.workspace }}/platform/windows/vendor/vcpkg - !${{ github.workspace }}/platform/windows/vendor/vcpkg/buildtrees - !${{ github.workspace }}/platform/windows/vendor/vcpkg/packages - !${{ github.workspace }}/platform/windows/vendor/vcpkg/downloads - !${{ github.workspace }}/platform/windows/vendor/vcpkg/installed - key: | - ${{ matrix.runs-on }}-${{ env.BUILDTYPE }}-${{ github.job }}-${{ hashFiles( '.git/modules/platform/windows/vendor/vcpkg/HEAD' ) }}-${{ hashFiles( 'platform/windows/Get-VendorPackages.ps1' ) }} - - - name: Configure maplibre-native (Windows) + - name: Get vcpkg commit id if: runner.os == 'Windows' shell: pwsh run: | - cmake . -B build ` - -G Ninja ` - -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} ` - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` - -DMLN_WITH_NODE=ON \ - -DMLN_WITH_OPENGL=ON + $vcpkg_commit_id = ($(git submodule status .\platform\windows\vendor\vcpkg).Trim() -split ' ')[0] + Add-Content -Path $env:GITHUB_ENV -Value "VCPKG_COMMIT_ID=${vcpkg_commit_id}" + + - name: Restore vcpkg binary cache + if: runner.os == 'Windows' + uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 + with: + path: ${{ github.workspace }}\platform\windows\vendor\vcpkg\archives + key: vcpkg-${{ env.VCPKG_COMMIT_ID }} + + - name: Configure maplibre-native (Windows x64) + if: runner.os == 'Windows' && matrix.arch == 'x86_64' + shell: pwsh + env: + VCPKG_INSTALL_OPTIONS: "--debug" + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" + run: | + cmake --preset windows-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} + + - name: Configure maplibre-native (Windows arm64) + if: runner.os == 'Windows' && matrix.arch == 'arm64' + shell: pwsh + env: + VCPKG_INSTALL_OPTIONS: "--debug" + VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}\\platform\\windows\\vendor\\vcpkg\\archives,readwrite" + run: | + cmake --preset windows-arm64-opengl-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} - name: Build maplibre-native (MacOS/Linux) if: runner.os == 'MacOS' || runner.os == 'Linux' diff --git a/CMakePresets.json b/CMakePresets.json index 98fac0774..c685117d1 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -63,9 +63,11 @@ "inherits": "macos-vulkan" }, { - "name": "macos-node", + "name": "macos-metal-node", "inherits": "macos", "binaryDir": "${sourceDir}/build", + "displayName": "MacOS Node", + "description": "MacOS Node build (Metal renderer)", "cacheVariables": { "MLN_WITH_NODE": "ON", "MLN_WITH_WERROR": "OFF", @@ -111,6 +113,20 @@ "MLN_WITH_X11": "ON" } }, + { + "name": "linux-opengl-node", + "inherits": "linux", + "binaryDir": "${sourceDir}/build", + "displayName": "Linux Node", + "description": "Linux Node build (OpenGL renderer)", + "cacheVariables": { + "MLN_WITH_NODE": "ON", + "MLN_WITH_OPENGL": "ON", + "MLN_WITH_WAYLAND": "OFF", + "MLN_WITH_X11": "ON", + "CMAKE_CXX_COMPILER_LAUNCHER": "ccache" + } + }, { "name": "windows", "hidden": true, @@ -140,6 +156,18 @@ "MLN_USE_BUILTIN_ICU": "ON" } }, + { + "name": "windows-opengl-node", + "inherits": "windows", + "binaryDir": "${sourceDir}/build", + "displayName": "Windows Node", + "description": "Windows Node build (OpenGL renderer)", + "cacheVariables": { + "MLN_WITH_NODE": "ON", + "MLN_WITH_OPENGL": "ON", + "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" + } + }, { "name": "windows-egl", "binaryDir": "${sourceDir}/build-windows-egl", @@ -175,6 +203,59 @@ "MLN_CORE_INCLUDE_DEPS": "ON", "MLN_USE_BUILTIN_ICU": "ON" } + }, + { + "name": "windows-arm64", + "hidden": true, + "generator": "Visual Studio 17 2022", + "architecture": { + "value": "ARM64", + "strategy": "set" + }, + "environment": { + "VSCMD_ARG_TGT_ARCH": "arm64" + }, + "cacheVariables": { + "CMAKE_SYSTEM_NAME": "Windows", + "MLN_WITH_OPENGL": "OFF", + "MLN_WITH_EGL": "OFF", + "MLN_WITH_VULKAN": "OFF", + "MLN_WITH_GLFW": "OFF" + } + }, + { + "name": "windows-arm64-opengl", + "hidden": false, + "inherits": "windows-arm64", + "displayName": "Windows ARM64 OpenGL", + "description": "Windows ARM64 build (OpenGL renderer)", + "cacheVariables": { + "MLN_WITH_OPENGL": "ON", + "MLN_WITH_GLFW": "ON" + } + }, + { + "name": "windows-arm64-opengl-node", + "binaryDir": "${sourceDir}/build", + "inherits": "windows-arm64", + "displayName": "Windows ARM64 Node", + "description": "Windows ARM64 Node build (OpenGL renderer)", + "cacheVariables": { + "MLN_WITH_NODE": "ON", + "MLN_WITH_OPENGL": "ON", + "CMAKE_CXX_COMPILER_LAUNCHER": "sccache" + } + }, + { + "name": "windows-arm64-vulkan", + "hidden": false, + "inherits": "windows-arm64", + "displayName": "Windows ARM64 Vulkan", + "description": "Windows ARM64 build (Vulkan renderer)", + "cacheVariables": { + "MLN_WITH_VULKAN": "ON", + "MLN_WITH_GLFW": "ON" + } } ], "buildPresets": [ diff --git a/docs/mdbook/src/platforms/windows/build-msvc-arm64.md b/docs/mdbook/src/platforms/windows/build-msvc-arm64.md new file mode 100644 index 000000000..2a204468d --- /dev/null +++ b/docs/mdbook/src/platforms/windows/build-msvc-arm64.md @@ -0,0 +1,272 @@ +# Build Windows ARM64 with MSCV for MapLibre Native + +This guide provides step-by-step instructions for building MapLibre Native on Windows ARM64 systems. + +## Prerequisites + +1. **Visual Studio 2022** with ARM64 build tools + - Install "Desktop development with C++" workload + - Include "MSVC v143 - VS 2022 C++ ARM64 build tools" + +2. **CMake** (3.20 or higher) + - Download from https://cmake.org/download/ + +3. **Git** + - Download from https://git-scm.com/download/win + +4. **Python** (for build scripts) + - Download from https://www.python.org/downloads/ + +## Step 1: Clone the Repository + +```bash +git clone https://github.com/maplibre/maplibre-native.git +cd maplibre-native +git submodule update --init --recursive +``` + +## Step 2: Bootstrap vcpkg and Install Dependencies + +Open a **VS2022 PowerShell for ARM64** and run: + +```powershell +# Navigate to your maplibre-native directory +cd maplibre-native + +# Bootstrap vcpkg if needed +if (!(Test-Path platform\windows\vendor\vcpkg\vcpkg.exe)) { + cd platform\windows\vendor\vcpkg + .\bootstrap-vcpkg.bat -disableMetrics + cd ..\..\..\.. +} + +# Install required dependencies for ARM64 +.\platform\windows\vendor\vcpkg\vcpkg.exe install curl:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install libpng:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install libjpeg-turbo:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install libwebp:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install libuv:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install icu:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install glfw3:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install dlfcn-win32:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install zlib:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install egl-registry:arm64-windows +.\platform\windows\vendor\vcpkg\vcpkg.exe install opengl-registry:arm64-windows + +# Note: If vcpkg fails with compiler detection errors, see troubleshooting section +``` + +### Step 2.1: Copy OpenGL Headers (Required) + +The OpenGL headers are platform-independent and need to be copied from x86: + +```powershell +# Copy GLES3 headers from x86 to ARM64 (if they exist) +if (Test-Path platform\windows\vendor\vcpkg\installed\x86-windows\include\GLES3) { + Copy-Item -Path platform\windows\vendor\vcpkg\installed\x86-windows\include\GLES3 ` + -Destination platform\windows\vendor\vcpkg\installed\arm64-windows\include\ ` + -Recurse -Force +} +``` + +## Step 3: Configure and Build + +You can build MapLibre Native with either OpenGL or Vulkan renderer. The Vulkan renderer provides significantly better performance on ARM64 devices. + +### Option A: Build with OpenGL (Default) + +```powershell +# Clean any previous CMake artifacts: +powershell -Command "Remove-Item -Path CMakeCache.txt, CMakeFiles, DartConfiguration.tcl, build-windows-arm64-opengl -Force -Recurse -ErrorAction SilentlyContinue" + +# Configure the project with explicit build directory +# IMPORTANT: You must explicitly set CMAKE_PREFIX_PATH for ARM64 builds +cmake -S . -B build-windows-arm64-opengl --preset windows-arm64-opengl -DCMAKE_PREFIX_PATH="C:/Users/$env:USERNAME/source/repos/maplibre-native-cleanup/platform/windows/vendor/vcpkg/installed/arm64-windows" + +# Build the core library +cmake --build build-windows-arm64-opengl --config Release --target mbgl-core + +# Build the render executable +cmake --build build-windows-arm64-opengl --config Release --target mbgl-render + +# Build the test runner +cmake --build build-windows-arm64-opengl --config Release --target mbgl-test-runner + +# Build the GLFW example (if you want to test with a GUI) +cmake --build build-windows-arm64-opengl --config Release --target mbgl-glfw +``` + +### Option B: Build with Vulkan (Better Performance) + +```powershell +# Clean any previous CMake artifacts: +powershell -Command "Remove-Item -Path CMakeCache.txt, CMakeFiles, DartConfiguration.tcl, build-windows-arm64-vulkan -Force -Recurse -ErrorAction SilentlyContinue" + +# Configure the project with Vulkan preset +# IMPORTANT: You must explicitly set CMAKE_PREFIX_PATH for ARM64 builds +cmake -S . -B build-windows-arm64-vulkan --preset windows-arm64-vulkan -DCMAKE_PREFIX_PATH="C:/Users/$env:USERNAME/source/repos/maplibre-native-cleanup/platform/windows/vendor/vcpkg/installed/arm64-windows" + +# Build the core library +cmake --build build-windows-arm64-vulkan --config Release --target mbgl-core + +# Build the render executable +cmake --build build-windows-arm64-vulkan --config Release --target mbgl-render + +# Build the test runner +cmake --build build-windows-arm64-vulkan --config Release --target mbgl-test-runner + +# Build the GLFW example (if you want to test with a GUI) +cmake --build build-windows-arm64-vulkan --config Release --target mbgl-glfw +``` + +## Step 4: Copy Required DLLs + +The executables need access to vcpkg DLLs at runtime. Copy them to the output directories: + +### For OpenGL Build: +```powershell +# Copy DLLs for mbgl-render +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-opengl\bin\Release\ -Force + +# Copy DLLs for mbgl-test-runner +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-opengl\Release\ -Force + +# Copy DLLs for mbgl-glfw +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-opengl\platform\glfw\Release\ -Force +``` + +### For Vulkan Build: +```powershell +# Copy DLLs for mbgl-render +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-vulkan\bin\Release\ -Force + +# Copy DLLs for mbgl-test-runner +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-vulkan\Release\ -Force + +# Copy DLLs for mbgl-glfw +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination build-windows-arm64-vulkan\platform\glfw\Release\ -Force +``` + +## Step 5: Test the Build + +Test commands are the same for both OpenGL and Vulkan builds, just adjust the directory path accordingly. + +### Test mbgl-render +```powershell +# For OpenGL: +cd build-windows-arm64-opengl\bin\Release +.\mbgl-render.exe --style https://raw.githubusercontent.com/maplibre/demotiles/gh-pages/style.json --output test.png + +# For Vulkan: +cd build-windows-arm64-vulkan\bin\Release +.\mbgl-render.exe --style https://raw.githubusercontent.com/maplibre/demotiles/gh-pages/style.json --output test.png +``` + +### Run Tests +```powershell +# For OpenGL: +cd build-windows-arm64-opengl\Release +.\mbgl-test-runner.exe + +# For Vulkan: +cd build-windows-arm64-vulkan\Release +.\mbgl-test-runner.exe +``` + +### Run GLFW Example +```powershell +# For OpenGL: +cd build-windows-arm64-opengl\platform\glfw\Release +.\mbgl-glfw.exe --style https://raw.githubusercontent.com/maplibre/demotiles/gh-pages/style.json + +# For Vulkan: +cd build-windows-arm64-vulkan\platform\glfw\Release +.\mbgl-glfw.exe --style https://raw.githubusercontent.com/maplibre/demotiles/gh-pages/style.json +``` + + +## Build Outputs + +After a successful build, you'll find: +- `mbgl-core.lib` - The core MapLibre library (~107 MB) +- `mbgl-render.exe` - Command-line renderer +- `mbgl-test-runner.exe` - Test suite executable +- `mbgl-glfw.exe` - Interactive map viewer using GLFW + +## Troubleshooting + +### vcpkg warnings about mismatched VCPKG_ROOT +This warning can be safely ignored, or you can unset the VCPKG_ROOT environment variable: +```powershell +$env:VCPKG_ROOT = "" +``` + +### "In-source builds are not permitted" error +This occurs if CMake files were created in the wrong location. Clean up and try again: +```powershell +# From the root directory +Remove-Item -Recurse -Force CMakeCache.txt -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force CMakeFiles -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force vendor\freetype\CMakeCache.txt -ErrorAction SilentlyContinue +Remove-Item -Recurse -Force vendor\freetype\CMakeFiles -ErrorAction SilentlyContinue + +# Then reconfigure with explicit directories +cmake -S . -B build-windows-arm64-opengl --preset windows-arm64-opengl +``` + +### vcpkg fails with "No CMAKE_C_COMPILER could be found" +This is a known vcpkg bug with ARM64. The custom triplet file in `platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake` forces the Visual Studio generator to work around this issue. If you still encounter problems: +1. Ensure you're using the custom triplet by setting `VCPKG_OVERLAY_TRIPLETS` +2. Try using x64 Native Tools Command Prompt instead of ARM64 +3. Copy already-built packages from another installation + +### CMake Error: Could NOT find CURL (or other packages) +This happens when vcpkg packages are installed but CMake can't find them. Solution: +- Always pass `-DCMAKE_PREFIX_PATH` explicitly when configuring for ARM64 +- Use the full path to your vcpkg ARM64 installation directory +- Example: `-DCMAKE_PREFIX_PATH="C:/path/to/maplibre-native/platform/windows/vendor/vcpkg/installed/arm64-windows"` + +### Missing GLES3/gl3.h header +This header is platform-independent. If not installed by vcpkg: +```powershell +# First, install opengl-registry for x86 if not present +.\platform\windows\vendor\vcpkg\vcpkg.exe install opengl-registry:x86-windows + +# Then copy the headers +Copy-Item -Path platform\windows\vendor\vcpkg\installed\x86-windows\include\GLES3 ` + -Destination platform\windows\vendor\vcpkg\installed\arm64-windows\include\ ` + -Recurse -Force +``` + +### CMake Error: Target "mbgl-core" links to ICU::data but the target was not found +This is automatically handled by the ARM64 fixes integrated into `platform/windows/windows.cmake`. + +### Build times out in command line +The mbgl-core build can take 10-15 minutes on ARM64. If using a CI/CD system, increase timeout limits. + +### Executable won't start or exits immediately +This usually means missing DLL dependencies. Make sure you've copied the vcpkg DLLs: +```powershell +# Check what DLLs are required +dumpbin /dependents path\to\your.exe + +# Copy all ARM64 DLLs to the executable's directory +Copy-Item -Path platform\windows\vendor\vcpkg\installed\arm64-windows\bin\*.dll ` + -Destination path\to\executable\directory\ -Force +``` + +## Known Issues + +### OpenGL Build +- 4 tests fail out of 1001 (TileLOD-related) +- These failures don't affect normal usage + +### Vulkan Build +- Only 1 test fails out of 966 (Map.SetStyleInvalidJSON) +- "Vulkan layers not found" warnings can be ignored (validation layers) diff --git a/platform/node/.nvmrc b/platform/node/.nvmrc index 409940768..a45fd52cc 100644 --- a/platform/node/.nvmrc +++ b/platform/node/.nvmrc @@ -1 +1 @@ -23 +24 diff --git a/platform/node/CHANGELOG.md b/platform/node/CHANGELOG.md index f5d64c471..3739a4a9f 100644 --- a/platform/node/CHANGELOG.md +++ b/platform/node/CHANGELOG.md @@ -1,5 +1,12 @@ ## main +## 6.3.0-pre.0 +* Updated supported node versions to v20, v22, and v24. Support for node v18 has been removed. +* Updated the linux binary to be built on Ubuntu 24.04 +* Updated NAN to v2.23.0 to support node v24 +* Moved node-pre-gyp back to @acalcutt/node-pre-gyp to support node v24. There is currently an issue with releases of @mapbox/node-pre-gyp which is preventing using it. +* Add Windows arm64 binary build to ci and release workflows. + ## 6.2.0 * Fix freezing in macos/metal after ~32 renders ([Issue](https://github.com/maplibre/maplibre-native/issues/2928), [PR](https://github.com/maplibre/maplibre-native/pull/3673)). * Add HarfBuzz Text Shaping and Font Fallback Support ([#3611](https://github.com/maplibre/maplibre-native/pull/3611)). diff --git a/platform/node/CMakeLists.txt b/platform/node/CMakeLists.txt index 311bfc96a..31eb7fbb7 100644 --- a/platform/node/CMakeLists.txt +++ b/platform/node/CMakeLists.txt @@ -1,4 +1,4 @@ -set(NODE_MODULE_MINIMUM_ABI 83) # Minimum supported Node.js version: 14 +set(NODE_MODULE_MINIMUM_ABI 115) # Minimum supported Node.js version: 20 set(NODE_MODULE_CACHE_DIR ${CMAKE_BINARY_DIR}/headers) if(DEFINED ENV{MSYSTEM}) @@ -10,13 +10,12 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/module.cmake) add_node_module( mbgl-node INSTALL_PATH ${PROJECT_SOURCE_DIR}/platform/node/lib/{node_abi}/mbgl.node - NAN_VERSION 2.22.2 + NAN_VERSION 2.23.0 EXCLUDE_NODE_ABIS 46 47 48 51 - 137 ) if(WIN32) diff --git a/platform/node/README.md b/platform/node/README.md index 2e61182b1..d73a633ad 100644 --- a/platform/node/README.md +++ b/platform/node/README.md @@ -8,10 +8,10 @@ Binaries are available and downloaded during install for the following platforms: - Operating systems: - - Ubuntu 22.04 (amd64/arm64) - - macOS 12 (amd64/arm64) - - Windows (amd64) -- Node.js 18, 20, 22 + - Ubuntu 24.04 (amd64/arm64) + - macOS (amd64/arm64) + - Windows (amd64/arm64) +- Node.js 20, 22, 24 Run: diff --git a/platform/node/cmake/module.cmake b/platform/node/cmake/module.cmake index e6443e2e4..36450cc4a 100644 --- a/platform/node/cmake/module.cmake +++ b/platform/node/cmake/module.cmake @@ -1,6 +1,6 @@ -# We need CMake 3.9 because the Xcode generator doesn't know about systems include paths before 3.9. +# We need CMake 3.10 because the Xcode generator doesn't know about systems include paths before 3.9, and the minimum required version has been increased to 3.10. # See https://gitlab.kitware.com/cmake/cmake/issues/16795 -cmake_minimum_required(VERSION 3.9) +cmake_minimum_required(VERSION 3.10) if (NOT NODE_MODULE_MINIMUM_ABI) set(NODE_MODULE_MINIMUM_ABI 46) # Don't build node modules for versions earlier than Node 4 @@ -121,7 +121,10 @@ function(add_node_module NAME) endif() if(WIN32) - if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # Determine Windows architecture + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" OR CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") + set(_ARCH arm64) + elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) set(_ARCH x64) else() set(_ARCH x86) diff --git a/platform/node/package-lock.json b/platform/node/package-lock.json index 9b69efc35..d5a7a645f 100644 --- a/platform/node/package-lock.json +++ b/platform/node/package-lock.json @@ -1,17 +1,17 @@ { "name": "@maplibre/maplibre-gl-native", - "version": "6.2.0", + "version": "6.3.0-pre.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@maplibre/maplibre-gl-native", - "version": "6.2.0", + "version": "6.3.0-pre.0", "hasInstallScript": true, "license": "BSD-2-Clause", "dependencies": { + "@acalcutt/node-pre-gyp": "2.0.1", "@acalcutt/node-pre-gyp-github": "2.0.1", - "@mapbox/node-pre-gyp": "2.0.0", "minimatch": "^9.0.4", "npm-run-all": "^4.1.5" }, @@ -47,6 +47,27 @@ "node": ">=18" } }, + "node_modules/@acalcutt/node-pre-gyp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@acalcutt/node-pre-gyp/-/node-pre-gyp-2.0.1.tgz", + "integrity": "sha512-iwAjNkgAdO2wCdKTGDtTcDhev2DXkQELb7JAxjltfR/3ryKWIdR2fQla/T6APrY8N3SisA11Why9X8NyJafhpQ==", + "license": "BSD-3-Clause", + "dependencies": { + "consola": "^3.2.3", + "detect-libc": "^2.0.0", + "https-proxy-agent": "^7.0.5", + "node-fetch": "^2.6.7", + "nopt": "^8.0.0", + "semver": "^7.5.3", + "tar": "^7.4.0" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@acalcutt/node-pre-gyp-github": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@acalcutt/node-pre-gyp-github/-/node-pre-gyp-github-2.0.1.tgz", @@ -1050,15 +1071,6 @@ "node": ">=18.0.0" } }, - "node_modules/@isaacs/fs-minipass/node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/@ljharb/resumer": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@ljharb/resumer/-/resumer-0.1.3.tgz", @@ -1113,144 +1125,6 @@ "protocol-buffers-schema": "^3.3.2" } }, - "node_modules/@mapbox/node-pre-gyp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-2.0.0.tgz", - "integrity": "sha512-llMXd39jtP0HpQLVI37Bf1m2ADlEb35GYSh1SDSLsBhR+5iCxiNGlT31yqbNtVHygHAtMy6dWFERpU2JgufhPg==", - "license": "BSD-3-Clause", - "dependencies": { - "consola": "^3.2.3", - "detect-libc": "^2.0.0", - "https-proxy-agent": "^7.0.5", - "node-fetch": "^2.6.7", - "nopt": "^8.0.0", - "semver": "^7.5.3", - "tar": "^7.4.0" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/abbrev": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz", - "integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==", - "license": "ISC", - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/chownr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/minizlib": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", - "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", - "license": "MIT", - "dependencies": { - "minipass": "^7.1.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "license": "MIT", - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/nopt": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", - "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", - "license": "ISC", - "dependencies": { - "abbrev": "^3.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/tar": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", - "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", - "license": "ISC", - "dependencies": { - "@isaacs/fs-minipass": "^4.0.0", - "chownr": "^3.0.0", - "minipass": "^7.1.2", - "minizlib": "^3.0.1", - "mkdirp": "^3.0.1", - "yallist": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@mapbox/node-pre-gyp/node_modules/yallist": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, "node_modules/@mapbox/point-geometry": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", @@ -2437,6 +2311,15 @@ "undici-types": "~6.21.0" } }, + "node_modules/abbrev": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-3.0.1.tgz", + "integrity": "sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==", + "license": "ISC", + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -2450,6 +2333,15 @@ "node": ">= 0.6" } }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -2773,6 +2665,15 @@ "node": ">=4" } }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -3820,6 +3721,19 @@ "node": ">= 0.8" } }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -4541,6 +4455,42 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", + "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mock-property": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/mock-property/-/mock-property-1.0.3.tgz", @@ -4615,6 +4565,21 @@ "node": ">=0.10.0" } }, + "node_modules/nopt": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-8.1.0.tgz", + "integrity": "sha512-ieGu42u/Qsa4TFktmaKEwM6MQH0pOWnaB3htzh0JRtx84+Mebc0cbZYN5bC+6WTZ4+77xrL9Pn5m7CV6VIkV7A==", + "license": "ISC", + "dependencies": { + "abbrev": "^3.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -5515,6 +5480,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -5808,6 +5790,15 @@ "bin": { "uuid": "dist/bin/uuid" } + }, + "node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } } } } diff --git a/platform/node/package.json b/platform/node/package.json index 2ff8e32f0..f73aa5b00 100644 --- a/platform/node/package.json +++ b/platform/node/package.json @@ -1,6 +1,6 @@ { "name": "@maplibre/maplibre-gl-native", - "version": "6.2.0", + "version": "6.3.0-pre.0", "description": "Renders map tiles with MapLibre Native", "keywords": [ "maplibre", @@ -21,7 +21,7 @@ }, "license": "BSD-2-Clause", "dependencies": { - "@mapbox/node-pre-gyp": "2.0.0", + "@acalcutt/node-pre-gyp": "2.0.1", "@acalcutt/node-pre-gyp-github": "2.0.1", "minimatch": "^9.0.4", "npm-run-all": "^4.1.5" @@ -55,7 +55,7 @@ "xcode": "^3.0.1" }, "engines": { - "node": ">=18" + "node": ">=20" }, "scripts": { "install": "node-pre-gyp install --fallback-to-build=false", diff --git a/platform/node/scripts/publish.sh b/platform/node/scripts/publish.sh index 5cd2dd8be..6a032716e 100755 --- a/platform/node/scripts/publish.sh +++ b/platform/node/scripts/publish.sh @@ -9,15 +9,15 @@ if [[ "${CIRCLE_TAG}" == "node-v${PACKAGE_JSON_VERSION}" ]] || [[ "${PUBLISH:-}" # Changes to the version targets here should happen in tandem with updates to the # EXCLUDE_NODE_ABIS property in cmake/node.cmake and the "node" engines property in # package.json. - for TARGET in 18.0.0 20.0.0 22.0.0; do + for TARGET in 20.0.0 22.0.0 24.0.0; do rm -rf build/stage if [[ "${BUILDTYPE}" == "RelWithDebInfo" ]]; then ./node_modules/.bin/node-pre-gyp package --target="${TARGET}" $@ - ./node_modules/.bin/node-pre-gyp-github publish --release + ./node_modules/.bin/node-pre-gyp-github publish elif [[ "${BUILDTYPE}" == "Debug" ]]; then ./node_modules/.bin/node-pre-gyp package --target="${TARGET}" --debug $@ - ./node_modules/.bin/node-pre-gyp-github publish --release + ./node_modules/.bin/node-pre-gyp-github publish else echo "error: must provide either Debug or RelWithDebInfo for BUILDTYPE" exit 1 diff --git a/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake new file mode 100644 index 000000000..f6c53e07a --- /dev/null +++ b/platform/windows/vendor/vcpkg-custom-triplets/arm64-windows.cmake @@ -0,0 +1,22 @@ +message(STATUS "=== ARM64 TRIPLET LOADED ===") +message(STATUS "Loading custom ARM64 triplet from: ${CMAKE_CURRENT_LIST_FILE}") + +set(VCPKG_TARGET_ARCHITECTURE arm64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) + +# Force Visual Studio generator instead of Ninja for ARM64 +set(VCPKG_CMAKE_GENERATOR "Visual Studio 17 2022") +set(VCPKG_CMAKE_GENERATOR_PLATFORM "ARM64") + +# Explicitly set the platform toolset +set(VCPKG_PLATFORM_TOOLSET v143) + +message(STATUS "ARM64 Triplet Settings:") +message(STATUS " VCPKG_TARGET_ARCHITECTURE: ${VCPKG_TARGET_ARCHITECTURE}") +message(STATUS " VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}") +message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") +message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") +message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") +message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") +message(STATUS "=== ARM64 TRIPLET LOADED ===") diff --git a/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake index 7f709cad6..bc75f8ab7 100644 --- a/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake +++ b/platform/windows/vendor/vcpkg-custom-triplets/x64-windows.cmake @@ -1,4 +1,16 @@ +message(STATUS "=== x64 TRIPLET LOADED ===") +message(STATUS "Loading custom x64 triplet from: ${CMAKE_CURRENT_LIST_FILE}") + set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) #set(VCPKG_BUILD_TYPE release) + +message(STATUS "x64 Triplet Settings:") +message(STATUS " VCPKG_TARGET_ARCHITECTURE: ${VCPKG_TARGET_ARCHITECTURE}") +message(STATUS " VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}") +message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") +message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") +message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") +message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") +message(STATUS "=== x64 TRIPLET LOADED ===") diff --git a/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake b/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake index 79f48d963..b976f9868 100644 --- a/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake +++ b/platform/windows/vendor/vcpkg-custom-triplets/x86-windows.cmake @@ -1,4 +1,16 @@ +message(STATUS "=== x86 TRIPLET LOADED ===") +message(STATUS "Loading custom x86 triplet from: ${CMAKE_CURRENT_LIST_FILE}") + set(VCPKG_TARGET_ARCHITECTURE x86) set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) #set(VCPKG_BUILD_TYPE release) + +message(STATUS "x86 Triplet Settings:") +message(STATUS " VCPKG_TARGET_ARCHITECTURE: ${VCPKG_TARGET_ARCHITECTURE}") +message(STATUS " VCPKG_CRT_LINKAGE: ${VCPKG_CRT_LINKAGE}") +message(STATUS " VCPKG_LIBRARY_LINKAGE: ${VCPKG_LIBRARY_LINKAGE}") +message(STATUS " VCPKG_CMAKE_GENERATOR: ${VCPKG_CMAKE_GENERATOR}") +message(STATUS " VCPKG_CMAKE_GENERATOR_PLATFORM: ${VCPKG_CMAKE_GENERATOR_PLATFORM}") +message(STATUS " VCPKG_PLATFORM_TOOLSET: ${VCPKG_PLATFORM_TOOLSET}") +message(STATUS "=== x86 TRIPLET LOADED ===") diff --git a/platform/windows/windows.cmake b/platform/windows/windows.cmake index 24ebae32a..b4a3aba62 100644 --- a/platform/windows/windows.cmake +++ b/platform/windows/windows.cmake @@ -187,7 +187,7 @@ target_include_directories( PRIVATE ${PROJECT_SOURCE_DIR}/platform/windows/include ${CURL_INCLUDE_DIRS} - ${DLFCN_INCLUDE_DIRS} + ${DLFCN_INCLUDE_DIRS} ${JPEG_INCLUDE_DIRS} ${LIBUV_INCLUDE_DIRS} ${WEBP_INCLUDE_DIRS} @@ -234,7 +234,7 @@ if(MSVC) mbgl-core PRIVATE ${CURL_LIBRARIES} - dlfcn-win32::dl + dlfcn-win32::dl ) elseif(MSYS) target_link_libraries( diff --git a/vendor/boost b/vendor/boost index 805bc2ee7..cd47f999e 160000 --- a/vendor/boost +++ b/vendor/boost @@ -1 +1 @@ -Subproject commit 805bc2ee74cc06d7159ec9ac9bf56072c16a2389 +Subproject commit cd47f999e365875e7b4eeeb8f85667d7be57a446