Skip to content

Release v5.2.0 - Add shared library support (Unity DLL) #41

Merged
Gogoshika-ga merged 16 commits intomainfrom
improve_unity_dll_support
Mar 13, 2026
Merged

Release v5.2.0 - Add shared library support (Unity DLL) #41
Gogoshika-ga merged 16 commits intomainfrom
improve_unity_dll_support

Conversation

@Gogoshika-ga
Copy link
Member

@Gogoshika-ga Gogoshika-ga commented Feb 19, 2026

Added

  • Shared library build via -DGA_SHARED_LIB=ON / setup.py --shared
  • All GameAnalyticsExtern functions now carry correct GA_API export attributes (__declspec(dllexport) on Windows, visibility("default") on Linux/macOS)
  • New exported C API: gameAnalytics_configureBuildPlatform, gameAnalytics_configureCustomLogHandler (GALogHandler + GALoggerMessageType), gameAnalytics_disableDeviceInfo
  • sample_shared/ — sample project for shared lib usage
  • safeString() helper — null-safe const char* handling for managed runtimes (Unity P/Invoke)
  • Cross-platform ga_strndup — replaces POSIX-only strndup, fixes MSVC builds
  • setup.py --shared and --compiler (Linux: gcc/clang) flags

Fixed

  • Linux/macOS: infinite signal loop freeze — per-signal handler array prevents re-entrant signal delivery looping on exception
  • Windows MSVC runtime — use CMAKE_MSVC_RUNTIME_LIBRARY instead of manual /MD//MT flags; shared lib correctly uses /MD (DLL runtime) required for Unity

Changed

  • CI matrix now builds both static and shared lib types
  • Unit tests skipped for shared builds (internal symbols not exported)
  • CI artifact names include -static/-shared suffix

@github-actions
Copy link

github-actions bot commented Feb 19, 2026

LCOV of commit 990bf7c during Test Coverage #103

Summary coverage rate:
  lines......: 50.4% (1416 of 2811 lines)
  functions..: 59.9% (236 of 394 functions)
  branches...: no data found

Files changed coverage rate: n/a

@dorin-ga dorin-ga self-requested a review February 24, 2026 12:41
@Gogoshika-ga Gogoshika-ga changed the title Add Shared Lib support (mostly for unity) Release v5.2.0 - Add shared library support (Unity DLL) Mar 13, 2026
@Gogoshika-ga Gogoshika-ga merged commit 2ab91ae into main Mar 13, 2026
25 checks passed
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