mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
Two related fixes to the embedded-addon precedence so users stop running a stale/mismatched on-disk !!!ClassicAPI without realizing it, while keeping the developer's disk-wins workflow intact. Version is now a pure build-flag artifact. The embedded copy's `## Version:` is stamped from CLASSICAPI_TAG at embed time (cmake/embed_addon.cmake rewrites the line in-memory before hex encoding, portable via a temp-file round-trip). The committed source toc stays `## Version: DEV` and is never edited, so a release build is `-DCLASSICAPI_TAG=vX.Y.Z` and nothing else. Dropped the CI sed step that previously mutated the source toc. Moved the version-derivation block above the embed step so CLASSICAPI_TOC_VERSION is available to it. Dev override moved from the toc version to an explicit marker. A `.classicapi-dev` file in the on-disk addon folder now forces the disk copy to win regardless of version (checked via the original FUN_FILE_READ, so it reflects a real on-disk file). Consequently `DEV` no longer sorts as "newer than any release" in CompareVersions — it sorts oldest — so a stray `DEV` source/clone copy on a user's disk no longer silently shadows a newer embedded release. The normal local loop still works without the marker (local DEV DLL + DEV disk = tie = disk wins); the marker is only needed to prefer disk against a released DLL. The marker is gitignored and excluded from the embed (both globs), and the release ships only the DLL, so it can exist only in a developer working tree.