Skip to content

build(deps): use pre-compiled boost#4132

Open
ReenigneArcher wants to merge 10 commits intomasterfrom
build/deps/use-pre-compiled-boost
Open

build(deps): use pre-compiled boost#4132
ReenigneArcher wants to merge 10 commits intomasterfrom
build/deps/use-pre-compiled-boost

Conversation

@ReenigneArcher
Copy link
Copy Markdown
Member

@ReenigneArcher ReenigneArcher commented Aug 5, 2025

Description

This PR will attempt to use the new boost pre-compiled libraries with a fallback to use CPM.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@ReenigneArcher ReenigneArcher force-pushed the build/deps/use-pre-compiled-boost branch 2 times, most recently from 6546cb1 to a8dd4b9 Compare September 1, 2025 22:42
@ReenigneArcher ReenigneArcher force-pushed the build/deps/use-pre-compiled-boost branch from a8dd4b9 to 5df577c Compare October 6, 2025 21:34
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 54.54545% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.57%. Comparing base (ba1f3bb) to head (cdec316).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/input/inputtino_keyboard.cpp 0.00% 8 Missing ⚠️
src/platform/utf_utils.cpp 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4132      +/-   ##
==========================================
- Coverage   17.98%   15.57%   -2.42%     
==========================================
  Files         108       74      -34     
  Lines       23420    16009    -7411     
  Branches    10337     7381    -2956     
==========================================
- Hits         4212     2493    -1719     
+ Misses      14224    12719    -1505     
+ Partials     4984      797    -4187     
Flag Coverage Δ
Archlinux ?
FreeBSD-14.3-aarch64 ?
FreeBSD-14.3-amd64 13.64% <47.61%> (+0.06%) ⬆️
Homebrew-ubuntu-22.04 ?
Linux-AppImage 12.27% <50.00%> (+0.05%) ⬆️
Windows-AMD64 ?
Windows-ARM64 ?
macOS-arm64 ?
macOS-x86_64 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/linux/input/inputtino_common.h 0.00% <ø> (ø)
src/platform/linux/input/inputtino_gamepad.cpp 2.80% <ø> (ø)
src/platform/linux/input/inputtino_mouse.cpp 0.00% <ø> (ø)
src/platform/linux/input/inputtino_pen.cpp 0.00% <ø> (ø)
src/platform/linux/input/inputtino_touch.cpp 0.00% <ø> (ø)
src/process.cpp 8.06% <ø> (-0.99%) ⬇️
src/platform/utf_utils.cpp 85.71% <85.71%> (ø)
src/platform/linux/input/inputtino_keyboard.cpp 74.05% <0.00%> (-2.93%) ⬇️

... and 83 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba1f3bb...cdec316. Read the comment docs.

@LizardByte-bot

This comment was marked as resolved.

@ReenigneArcher ReenigneArcher force-pushed the build/deps/use-pre-compiled-boost branch from 5df577c to 18b1f57 Compare February 15, 2026 14:34
@ReenigneArcher ReenigneArcher marked this pull request as ready for review February 15, 2026 14:35
@LizardByte LizardByte deleted a comment from sonarqubecloud bot Feb 15, 2026
@LizardByte LizardByte deleted a comment from sonarqubecloud bot Feb 15, 2026
@ReenigneArcher ReenigneArcher force-pushed the build/deps/use-pre-compiled-boost branch from 18b1f57 to e598ce8 Compare February 15, 2026 14:39
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 15, 2026

Bundle Report

Bundle size has no change ✅

@ReenigneArcher ReenigneArcher marked this pull request as draft March 23, 2026 17:09
@ReenigneArcher ReenigneArcher force-pushed the build/deps/use-pre-compiled-boost branch 2 times, most recently from 16835b9 to c44c2ba Compare April 11, 2026 01:41
@ReenigneArcher ReenigneArcher marked this pull request as ready for review April 11, 2026 17:18
@ReenigneArcher ReenigneArcher changed the title build(deps): use pre-compiled boost build(deps): use pre-compiled boost, drop boost locale Apr 11, 2026
Eliminates the conditional manual declarations for HSYNTHETICPOINTERDEVICE and the Create/Inject/DestroySyntheticPointerDevice APIs in src/platform/windows/input.cpp. These guarded declarations (for __MINGW32__ && SUNSHINE_PREBUILT_BOOST) caused header conflicts with system Boost/WinUser headers on MinGW/MSYS2; removing them defers to the platform/system headers instead.
Bump Boost source artifacts for flatpak packaging to the build-deps release v2026.221.143859. Updated the download URLs and SHA256 checksums for both x86_64 and aarch64 tarballs so the flatpak build uses the new prebuilt Boost artifacts.
Fetch build-deps tags for CI shallow clones; detect and prefer relocatable Boost package configs when available (find_package CONFIG) and fall back to creating manual imported Boost targets with proper include/libs and inter-target link properties. Add headers and log_setup components, expose Boost_INCLUDE_DIRS/Boost_LIBRARIES, and normalize Boost::boost/headers targets. Fix Windows compile definitions by removing ".lib" suffix from synchronization and add bcrypt to FFMPEG platform libraries (two locations) to ensure required Windows crypto dependency is linked.
Simplify cmake/prep/options.cmake by removing the APPLE-specific conditional and setting BOOST_USE_STATIC to ON unconditionally. Previously macOS defaulted to OFF; this change makes static Boost the default on all platforms.
Update cmake/dependencies/Boost_Sunshine.cmake to ensure Boost::locale links its required system libraries on UNIX. Initialize a _boost_locale_link_libraries list with Boost::headers, find and append Iconv and ICU (components: data, i18n, uc) on UNIX, and set Boost::locale's INTERFACE_LINK_LIBRARIES to that list instead of the previous hard-coded value. Unset the temporary variable afterward. This ensures locale has proper dependencies when using prepared Boost binaries on UNIX.
Remove dependency on boost::locale/ICU and replace runtime conversion with an internal UTF-8→UTF-32 decoder. Changes:

- Implement utf8_to_utf32 in src/platform/linux/input/inputtino_keyboard.cpp and use it in unicode(), logging on decode failure instead of using boost::locale conversions.
- Remove #include <boost/locale.hpp> from all inputtino_* headers and sources under src/platform/linux/input.
- Update cmake/dependencies/Boost_Sunshine.cmake to drop Boost.Locale component and related ICU/Iconv linkage and remove Boost::locale from Boost_LIBRARIES and component lists.
- Update packaging/sunshine.rb to remove static-boost options, boost and icu4c dependencies, and the static-boost configuration and add_boost_args usage.
- Remove icu4c@78 from the macOS CI workflow (.github/workflows/ci-macos.yml).

This reduces external ICU/Boost.Locale coupling and avoids requiring ICU for static Boost linking by using a lightweight built-in UTF-8 decoder for keyboard input handling.
Introduce a unified UTF utility module (src/platform/utf_utils.h/.cpp) implementing utf8_to_utf32 and platform helpers, and centralize UTF conversions for all platforms. Replace many local include paths to use the new header, remove the old platform/windows/utf_utils.h header, and update the Windows utf_utils implementation to use the new public header. Wire the new sources into CMake and tools (common and tools CMakeLists), add unit tests for utf8 decoding, and update linux keyboard input to call utf_utils::utf8_to_utf32 with additional input validation. This consolidates UTF handling and improves validation of UTF-8 inputs.
@ReenigneArcher ReenigneArcher force-pushed the build/deps/use-pre-compiled-boost branch from d9a9811 to 5cef857 Compare April 13, 2026 00:46
@ReenigneArcher ReenigneArcher changed the title build(deps): use pre-compiled boost, drop boost locale build(deps): use pre-compiled boost Apr 13, 2026
@ReenigneArcher ReenigneArcher force-pushed the build/deps/use-pre-compiled-boost branch from 5cef857 to cdec316 Compare April 13, 2026 01:37
@sonarqubecloud
Copy link
Copy Markdown

@LizardByte LizardByte deleted a comment from sonarqubecloud bot Apr 13, 2026
@ReenigneArcher
Copy link
Copy Markdown
Member Author

Cannot use boost locale as is, because it will opportunistically link against icu and iconv and expects the same version that was available when boost was compiled. See LizardByte/build-deps#654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants