build: bump full-node to 1.3.0 + give ObsidianDragonLite an independent version (1.0.0)
The full-node app and ObsidianDragonLite are now versioned separately: - project() VERSION -> 1.3.0 (suffix cleared); DRAGONX_LITE_VERSION -> 1.0.0. - A DRAGONX_APP_VERSION* set (resolved per variant in the lite/full block) feeds the generated header (version.h.in), the Windows VERSIONINFO/.rc + manifest, and the build summary — so each variant reports its own version. The .rc/manifest name fields also follow DRAGONX_APP_NAME so a lite .exe's properties read "ObsidianDragonLite". - build.sh resolves the release-filename version per variant by parsing CMakeLists (single source of truth) instead of a hardcoded string. Also fixes a latent variant-bleed: build.sh now passes DRAGONX_BUILD_LITE and DRAGONX_ENABLE_LITE_BACKEND explicitly (ON *and* OFF), so switching variants in a shared build dir can't reuse a stale cached value (a prior --lite build was making a subsequent full-node build produce the lite name/version). Both variants build + report the right version (full 1.3.0, lite 1.0.0); suite passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
28
build.sh
28
build.sh
@@ -20,7 +20,9 @@
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
VERSION="1.2.0-rc1"
|
||||
# VERSION is resolved per-variant from CMakeLists.txt (the single source of truth) after arg
|
||||
# parsing — see the APP_BASENAME block below. Placeholder until then.
|
||||
VERSION=""
|
||||
|
||||
# ── Colours ──────────────────────────────────────────────────────────────────
|
||||
RED='\033[0;31m'
|
||||
@@ -109,12 +111,32 @@ fi
|
||||
|
||||
APP_BASENAME="ObsidianDragon"
|
||||
CMAKE_LITE_ARGS=()
|
||||
# Always set the variant flag EXPLICITLY (ON and OFF) so switching variants in a shared build dir
|
||||
# can't reuse a stale cached value (e.g. a prior --lite build leaving DRAGONX_BUILD_LITE=ON).
|
||||
if $DO_LITE; then
|
||||
APP_BASENAME="ObsidianDragonLite"
|
||||
CMAKE_LITE_ARGS+=("-DDRAGONX_BUILD_LITE=ON")
|
||||
info "Lite mode enabled: building ${APP_BASENAME}"
|
||||
else
|
||||
CMAKE_LITE_ARGS+=("-DDRAGONX_BUILD_LITE=OFF")
|
||||
fi
|
||||
|
||||
# Resolve the release version string for the active variant from CMakeLists.txt (single source of
|
||||
# truth): the full-node app uses project() VERSION + DRAGONX_VERSION_SUFFIX; ObsidianDragonLite uses
|
||||
# DRAGONX_LITE_VERSION + DRAGONX_LITE_VERSION_SUFFIX.
|
||||
_cml="$SCRIPT_DIR/CMakeLists.txt"
|
||||
_full_ver=$(sed -n 's/^[[:space:]]*VERSION[[:space:]]\+\([0-9][0-9.]*\).*/\1/p' "$_cml" | head -1)
|
||||
_full_suffix=$(sed -n 's/^set(DRAGONX_VERSION_SUFFIX[[:space:]]*"\([^"]*\)").*/\1/p' "$_cml" | head -1)
|
||||
_lite_ver=$(sed -n 's/^set(DRAGONX_LITE_VERSION[[:space:]]*"\([^"]*\)").*/\1/p' "$_cml" | head -1)
|
||||
_lite_suffix=$(sed -n 's/^set(DRAGONX_LITE_VERSION_SUFFIX[[:space:]]*"\([^"]*\)").*/\1/p' "$_cml" | head -1)
|
||||
if $DO_LITE; then
|
||||
VERSION="${_lite_ver}${_lite_suffix}"
|
||||
else
|
||||
VERSION="${_full_ver}${_full_suffix}"
|
||||
fi
|
||||
[ -n "$_full_ver" ] && [ -n "$VERSION" ] || { err "Could not parse version from CMakeLists.txt"; exit 1; }
|
||||
info "Release version: ${VERSION} (${APP_BASENAME})"
|
||||
|
||||
# ── Lite backend (real SDXL litelib) linking ─────────────────────────────────
|
||||
# Enables DRAGONX_ENABLE_LITE_BACKEND with an imported artifact produced by
|
||||
# scripts/build-lite-backend-artifact.sh. Auto-discovers build/lite-backend/<platform>/;
|
||||
@@ -157,6 +179,10 @@ if $DO_LITE_BACKEND; then
|
||||
CMAKE_LITE_ARGS+=("-DDRAGONX_LITE_BACKEND_EXTRA_LIBS=advapi32;ws2_32;kernel32;bcrypt;cfgmgr32;credui;crypt32;cryptnet;fwpuclnt;gdi32;msimg32;ncrypt;ntdll;ole32;opengl32;secur32;shell32;synchronization;user32;winspool;userenv")
|
||||
fi
|
||||
info "Lite backend enabled ($lb_platform): $lb_lib"
|
||||
else
|
||||
# Explicit OFF so a prior --lite-backend configure in a shared build dir can't leave it ON
|
||||
# (which would then fail the BUILD_LITE=OFF guard in CMake).
|
||||
CMAKE_LITE_ARGS+=("-DDRAGONX_ENABLE_LITE_BACKEND=OFF")
|
||||
fi
|
||||
|
||||
should_bundle_full_node_assets() {
|
||||
|
||||
Reference in New Issue
Block a user