build(build.sh): add DRAGONX_BUILD_ROOT/DRAGONX_RELEASE_ROOT overrides
The release functions always built in build/<platform> and wrote to
release/<platform>. On Linux and macOS build/<platform> is also the dev
build tree, so a release run reconfigures it (--linux-release turns a
Lite+backend dev tree into a full-node one), and building a baseline to
compare a change against meant overwriting the existing release/
artifacts.
build_release_linux, build_release_win and build_release_mac now take
their build and output roots from DRAGONX_BUILD_ROOT and
DRAGONX_RELEASE_ROOT, defaulting to build/ and release/ as before:
DRAGONX_BUILD_ROOT=/tmp/rel-build DRAGONX_RELEASE_ROOT=/tmp/rel \
./build.sh --win-release
With both unset nothing changes. The dev build (./build.sh) and the lite
backend artifact dir (build/lite-backend/<platform>) do not read them.
A full release set (Linux and Windows, full node and Lite) built into
override roots left the release/ listings (file sizes and timestamps)
and the dev tree's CMakeCache.txt unchanged (same checksums before and
after).
Known gaps:
- the end-of-run summary still prints release/ as the output dir;
- configuring a Windows build still writes res/ObsidianDragon.manifest
into the source tree, so the last configured variant's version ends up
there;
- a fresh build root re-downloads the FetchContent dependencies and
appimagetool, so it needs network access;
- the macOS paths changed the same way but were not run here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -363,8 +363,8 @@ build_dev() {
|
|||||||
# ═══════════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
build_release_linux() {
|
build_release_linux() {
|
||||||
header "Release: Linux x86_64"
|
header "Release: Linux x86_64"
|
||||||
local bd="$SCRIPT_DIR/build/linux"
|
local bd="${DRAGONX_BUILD_ROOT:-$SCRIPT_DIR/build}/linux"
|
||||||
local out="$SCRIPT_DIR/release/linux"
|
local out="${DRAGONX_RELEASE_ROOT:-$SCRIPT_DIR/release}/linux"
|
||||||
|
|
||||||
if $CLEAN; then
|
if $CLEAN; then
|
||||||
info "Cleaning $bd ..."; rm -rf "$bd"
|
info "Cleaning $bd ..."; rm -rf "$bd"
|
||||||
@@ -577,8 +577,8 @@ APPRUN
|
|||||||
# ═══════════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||||||
build_release_win() {
|
build_release_win() {
|
||||||
header "Release: Windows x86_64 (cross-compile)"
|
header "Release: Windows x86_64 (cross-compile)"
|
||||||
local bd="$SCRIPT_DIR/build/windows"
|
local bd="${DRAGONX_BUILD_ROOT:-$SCRIPT_DIR/build}/windows"
|
||||||
local out="$SCRIPT_DIR/release/windows"
|
local out="${DRAGONX_RELEASE_ROOT:-$SCRIPT_DIR/release}/windows"
|
||||||
|
|
||||||
if $CLEAN; then
|
if $CLEAN; then
|
||||||
info "Cleaning $bd ..."; rm -rf "$bd"
|
info "Cleaning $bd ..."; rm -rf "$bd"
|
||||||
@@ -1031,8 +1031,8 @@ build_release_mac() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
header "Release: macOS ($MAC_ARCH$(${IS_CROSS} && echo ' — cross-compile'))"
|
header "Release: macOS ($MAC_ARCH$(${IS_CROSS} && echo ' — cross-compile'))"
|
||||||
local bd="$SCRIPT_DIR/build/mac"
|
local bd="${DRAGONX_BUILD_ROOT:-$SCRIPT_DIR/build}/mac"
|
||||||
local out="$SCRIPT_DIR/release/mac"
|
local out="${DRAGONX_RELEASE_ROOT:-$SCRIPT_DIR/release}/mac"
|
||||||
|
|
||||||
if $CLEAN; then
|
if $CLEAN; then
|
||||||
info "Cleaning $bd ..."; rm -rf "$bd"
|
info "Cleaning $bd ..."; rm -rf "$bd"
|
||||||
|
|||||||
Reference in New Issue
Block a user