feat(version): V4 beta-in-isolation channel via -DREASAMPLER_CHANNEL
Compile-time channel flag forks a fully isolated reaper_reasampler_beta (namespace, command-id prefix, action names, dock ident, -beta render) from one auditable app_version definition. Stable identity byte-unchanged.
This commit is contained in:
+32
-3
@@ -18,8 +18,33 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# Generate version_generated.h from the one REASAMPLER_VERSION variable. Regenerated at
|
||||
# configure time whenever the variable changes; the exact string is substituted verbatim.
|
||||
# ---------------------------------------------------------------------------
|
||||
# Channel — SINGLE SOURCE OF TRUTH for beta-in-isolation (Phase V, V4). One flag,
|
||||
# `-DREASAMPLER_CHANNEL=beta`, forks the whole channel identity from one build tree:
|
||||
# absent (or `stable`) = today's build with BYTE-IDENTICAL identity (binary name,
|
||||
# ext-state namespace, command-id strings, version render); `beta` = a fully isolated
|
||||
# `reaper_reasampler_beta` that coexists with stable in one REAPER. The flag reduces to
|
||||
# ONE bit (REASAMPLER_CHANNEL_IS_BETA) threaded through the SAME configure_file'd header
|
||||
# as the version string, so the pure app_version module derives every channel-qualified
|
||||
# identity from it — no scattered #ifdefs. Any value other than exactly `beta` is treated
|
||||
# as stable (a typo must not silently produce a half-forked build), and we hard-error on
|
||||
# an unrecognized non-empty value so a misspelled `-DREASAMPLER_CHANNEL=betaa` is caught
|
||||
# at configure time rather than shipping stable identity under a beta intent.
|
||||
set(REASAMPLER_CHANNEL "stable" CACHE STRING "Build channel: stable (default) or beta")
|
||||
if(REASAMPLER_CHANNEL STREQUAL "beta")
|
||||
set(REASAMPLER_CHANNEL_IS_BETA 1)
|
||||
set(REASAMPLER_OUTPUT_NAME "reaper_reasampler_beta")
|
||||
elseif(REASAMPLER_CHANNEL STREQUAL "stable")
|
||||
set(REASAMPLER_CHANNEL_IS_BETA 0)
|
||||
set(REASAMPLER_OUTPUT_NAME "reaper_reasampler")
|
||||
else()
|
||||
message(FATAL_ERROR
|
||||
"REASAMPLER_CHANNEL must be 'stable' or 'beta' (got '${REASAMPLER_CHANNEL}')")
|
||||
endif()
|
||||
|
||||
# Generate version_generated.h from the one REASAMPLER_VERSION variable + the channel bit.
|
||||
# Regenerated at configure time whenever either changes; the exact string is substituted
|
||||
# verbatim and the channel bit fans out through app_version.
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/version_generated.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/generated/version_generated.h
|
||||
@@ -343,7 +368,11 @@ add_library(reaper_reasampler MODULE
|
||||
)
|
||||
target_link_libraries(reaper_reasampler PRIVATE bank_model capture_paths peaks bank_grid mode_switch tab_strip view_mode_model insert_plan render_settings tail_control realtime_record bank_book wav_trim owned_manifest app_version)
|
||||
target_include_directories(reaper_reasampler PRIVATE ${SDK_INC} ${WDL_INC})
|
||||
set_target_properties(reaper_reasampler PROPERTIES PREFIX "" OUTPUT_NAME "reaper_reasampler")
|
||||
# OUTPUT_NAME is channel-derived (Phase V, V4): "reaper_reasampler" (stable, default) or
|
||||
# "reaper_reasampler_beta" (beta). REAPER dlopen's any reaper_* module, so both channels'
|
||||
# artifacts load side-by-side. The CMake TARGET name stays "reaper_reasampler" for both
|
||||
# configs — one source tree, one target; only the emitted file name forks by channel.
|
||||
set_target_properties(reaper_reasampler PROPERTIES PREFIX "" OUTPUT_NAME "${REASAMPLER_OUTPUT_NAME}")
|
||||
|
||||
if(WIN32)
|
||||
# Native Win32. REAPER provides nothing extra to link. The bank_panel dialog
|
||||
|
||||
Reference in New Issue
Block a user