Skip to content

Bundle native runtime libraries and notices#39

Merged
QiuYe-123 merged 1 commit into
mainfrom
build/bundle-native-runtime-licenses
May 3, 2026
Merged

Bundle native runtime libraries and notices#39
QiuYe-123 merged 1 commit into
mainfrom
build/bundle-native-runtime-licenses

Conversation

@QiuYe-123
Copy link
Copy Markdown
Member

Description

Bundle redistributable native runtime dependencies for non-Android platforms and stage the corresponding notices alongside the packaged libraries.

This change addresses the gap found in the latest pre-release jar, where:

  • Windows x86-64 was self-contained, but Linux and macOS still shipped only the primary bigmath_ffm library
  • Windows ARM64 still depended on Microsoft VC++ runtime DLLs that were not bundled
  • third-party license texts and runtime notices were documented centrally, but were not staged next to each classifier payload

Changes in this PR:

  • add a Unix staging script that copies bundled GMP/MPFR runtime libraries into native/<classifier>/
  • rewrite macOS runtime references to @loader_path so bundled GMP/MPFR libraries are used after extraction
  • add a Windows staging script that preserves MinGW runtime DLL packaging and stages Microsoft VC++ runtime DLLs for ARM64 builds when present
  • stage a per-classifier licenses/ directory alongside bundled native libraries
  • update snapshot, release, and PR native workflows to use the new staging scripts before uploading artifacts
  • expand THIRD_PARTY_NOTICES.md to document Microsoft VC++ runtime redistribution and classifier-local notice staging

Type of Change

  • New feature (type: feature)
  • Bug fix (type: bugfix)
  • Build/CI (type: build)
  • Refactoring (type: refactor)
  • Documentation (type: docs)
  • Tests (type: tests)

Native Changes

  • This PR changes native C++ code (requires ci:native label for full platform testing)
  • No native C++ source changes, but native packaging/workflows are affected

Testing

Local validation focused on workflow and staging script correctness.

./gradlew.bat spotlessCheck -x buildNative -x cmakeConfigure
git diff --check
bash -n .github/scripts/stage-native-runtime-unix.sh
powershell parse check for .github/scripts/stage-native-runtime-windows.ps1

Verified locally:

  • spotlessCheck passes after the workflow and notice changes
  • shell and PowerShell staging scripts parse successfully
  • the new logic keeps Android unchanged while preparing non-Android runtime staging
  • unpack inspection of the latest pre-release jar confirms the packaging gaps this change is targeting

Checklist

  • My code follows the project's code style
  • I have added tests that prove my fix/feature works
  • ./gradlew spotlessCheck passes

@QiuYe-123 QiuYe-123 requested a review from a team as a code owner May 3, 2026 04:36
@QiuYe-123 QiuYe-123 added type: bugfix Bug fix type: build Build system or dependency changes ci:native Run full native build matrix (5 platforms) labels May 3, 2026
@QiuYe-123 QiuYe-123 self-assigned this May 3, 2026
@QiuYe-123 QiuYe-123 added Release: Major - 0.X.0 Releases focused on Content, changes to gameplay; While maintaining mostly API stability. type: ci CI/CD pipeline changes labels May 3, 2026
@github-actions github-actions Bot added Tests: Failed One or more tests failed Tests: Passed All tests passed and removed Tests: Failed One or more tests failed labels May 3, 2026
@QiuYe-123 QiuYe-123 merged commit 1db7620 into main May 3, 2026
40 of 62 checks passed
@QiuYe-123 QiuYe-123 deleted the build/bundle-native-runtime-licenses branch May 3, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:native Run full native build matrix (5 platforms) Release: Major - 0.X.0 Releases focused on Content, changes to gameplay; While maintaining mostly API stability. Tests: Passed All tests passed type: bugfix Bug fix type: build Build system or dependency changes type: ci CI/CD pipeline changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant