Rename hush→dragonx across wallet codebase
- Rename RESOURCE_HUSHD/HUSH_CLI/HUSH_TX to RESOURCE_DRAGONXD/DRAGONX_CLI/DRAGONX_TX - Remove unused .bat resource constants (DRAGONXD_BAT, DRAGONX_CLI_BAT) - Update INCBIN symbols: g_hushd_exe → g_dragonxd_exe, etc. - Update daemon search paths, removing hush-arrakis-chain fallbacks - Update process detection (Windows findProcessByName, Linux /proc/comm, macOS pgrep) - Update build.sh: embed dragonxd.exe/dragonx-cli.exe/dragonx-tx.exe - Overhaul setup.sh: fix binary names, release paths, add -j passthrough - Update getDaemonPath/needsDaemonExtraction/hasDaemonAvailable for new names
This commit is contained in:
78
build.sh
78
build.sh
@@ -122,10 +122,10 @@ find_sapling_params() {
|
||||
|
||||
find_asmap() {
|
||||
local paths=(
|
||||
"$SCRIPT_DIR/external/hush3/asmap.dat"
|
||||
"$SCRIPT_DIR/external/hush3/contrib/asmap/asmap.dat"
|
||||
"$HOME/hush3/asmap.dat"
|
||||
"$HOME/hush3/contrib/asmap/asmap.dat"
|
||||
"$SCRIPT_DIR/external/dragonx/asmap.dat"
|
||||
"$SCRIPT_DIR/external/dragonx/contrib/asmap/asmap.dat"
|
||||
"$HOME/dragonx/asmap.dat"
|
||||
"$HOME/dragonx/contrib/asmap/asmap.dat"
|
||||
"$SCRIPT_DIR/../asmap.dat"
|
||||
"$SCRIPT_DIR/asmap.dat"
|
||||
"$SCRIPT_DIR/../SilentDragonX/asmap.dat"
|
||||
@@ -147,37 +147,37 @@ bundle_linux_daemon() {
|
||||
local dest="$1"
|
||||
local found=0
|
||||
|
||||
local launcher_paths=(
|
||||
"$SCRIPT_DIR/prebuilt-binaries/dragonxd-linux/hush-arrakis-chain"
|
||||
"$SCRIPT_DIR/../hush-arrakis-chain"
|
||||
"$SCRIPT_DIR/external/hush3/src/hush-arrakis-chain"
|
||||
"$HOME/hush3/src/hush-arrakis-chain"
|
||||
local daemon_paths=(
|
||||
"$SCRIPT_DIR/prebuilt-binaries/dragonxd-linux/dragonxd"
|
||||
"$SCRIPT_DIR/../dragonxd"
|
||||
"$SCRIPT_DIR/external/dragonx/src/dragonxd"
|
||||
"$HOME/dragonx/src/dragonxd"
|
||||
)
|
||||
for p in "${launcher_paths[@]}"; do
|
||||
for p in "${daemon_paths[@]}"; do
|
||||
if [[ -f "$p" ]]; then
|
||||
cp "$p" "$dest/hush-arrakis-chain"; chmod +x "$dest/hush-arrakis-chain"
|
||||
info " Bundled hush-arrakis-chain"; found=1; break
|
||||
cp "$p" "$dest/dragonxd"; chmod +x "$dest/dragonxd"
|
||||
info " Bundled dragonxd"; found=1; break
|
||||
fi
|
||||
done
|
||||
|
||||
local hushd_paths=(
|
||||
"$SCRIPT_DIR/prebuilt-binaries/dragonxd-linux/hushd"
|
||||
"$SCRIPT_DIR/../hushd"
|
||||
"$SCRIPT_DIR/external/hush3/src/hushd"
|
||||
"$HOME/hush3/src/hushd"
|
||||
local cli_paths=(
|
||||
"$SCRIPT_DIR/prebuilt-binaries/dragonxd-linux/dragonx-cli"
|
||||
"$SCRIPT_DIR/../dragonx-cli"
|
||||
"$SCRIPT_DIR/external/dragonx/src/dragonx-cli"
|
||||
"$HOME/dragonx/src/dragonx-cli"
|
||||
)
|
||||
for p in "${hushd_paths[@]}"; do
|
||||
for p in "${cli_paths[@]}"; do
|
||||
if [[ -f "$p" ]]; then
|
||||
cp "$p" "$dest/hushd"; chmod +x "$dest/hushd"
|
||||
info " Bundled hushd"; break
|
||||
cp "$p" "$dest/dragonx-cli"; chmod +x "$dest/dragonx-cli"
|
||||
info " Bundled dragonx-cli"; break
|
||||
fi
|
||||
done
|
||||
|
||||
local dragonxd_paths=(
|
||||
"$SCRIPT_DIR/prebuilt-binaries/dragonxd-linux/dragonxd"
|
||||
"$SCRIPT_DIR/../dragonxd"
|
||||
"$SCRIPT_DIR/external/hush3/src/dragonxd"
|
||||
"$HOME/hush3/src/dragonxd"
|
||||
"$SCRIPT_DIR/external/dragonx/src/dragonxd"
|
||||
"$HOME/dragonx/src/dragonxd"
|
||||
)
|
||||
for p in "${dragonxd_paths[@]}"; do
|
||||
if [[ -f "$p" ]]; then
|
||||
@@ -254,9 +254,8 @@ build_release_linux() {
|
||||
mkdir -p "$out"
|
||||
|
||||
cp bin/ObsidianDragon "$out/"
|
||||
[[ -f bin/hush-arrakis-chain ]] && cp bin/hush-arrakis-chain "$out/"
|
||||
[[ -f bin/hushd ]] && cp bin/hushd "$out/"
|
||||
[[ -f bin/dragonxd ]] && cp bin/dragonxd "$out/"
|
||||
[[ -f bin/dragonx-cli ]] && cp bin/dragonx-cli "$out/"
|
||||
[[ -f bin/asmap.dat ]] && cp bin/asmap.dat "$out/"
|
||||
cp -r bin/res "$out/" 2>/dev/null || true
|
||||
|
||||
@@ -273,9 +272,8 @@ build_release_linux() {
|
||||
cp -r bin/res/* "$APPDIR/usr/share/ObsidianDragon/res/" 2>/dev/null || true
|
||||
|
||||
# Daemon inside AppImage
|
||||
[[ -f bin/hush-arrakis-chain ]] && cp bin/hush-arrakis-chain "$APPDIR/usr/bin/"
|
||||
[[ -f bin/hushd ]] && cp bin/hushd "$APPDIR/usr/bin/"
|
||||
[[ -f bin/dragonxd ]] && cp bin/dragonxd "$APPDIR/usr/bin/"
|
||||
[[ -f bin/dragonx-cli ]] && cp bin/dragonx-cli "$APPDIR/usr/bin/"
|
||||
[[ -f bin/asmap.dat ]] && cp bin/asmap.dat "$APPDIR/usr/share/ObsidianDragon/"
|
||||
|
||||
# Desktop entry
|
||||
@@ -467,10 +465,10 @@ HDR
|
||||
|
||||
# ── Daemon binaries ──────────────────────────────────────────────
|
||||
local DD="$SCRIPT_DIR/prebuilt-binaries/dragonxd-win"
|
||||
if [[ -d "$DD" && -f "$DD/hushd.exe" ]]; then
|
||||
if [[ -d "$DD" && -f "$DD/dragonxd.exe" ]]; then
|
||||
info "Embedding daemon binaries ..."
|
||||
echo -e "\n#define HAS_EMBEDDED_DAEMON 1\n" >> "$GEN/embedded_data.h"
|
||||
for f in hushd.exe hush-cli.exe hush-tx.exe dragonxd.bat dragonx-cli.bat; do
|
||||
for f in dragonxd.exe dragonx-cli.exe dragonx-tx.exe; do
|
||||
local sym=$(echo "$f" | sed 's/[^a-zA-Z0-9]/_/g')
|
||||
if [[ -f "$DD/$f" ]]; then
|
||||
cp -f "$DD/$f" "$RES/$f"
|
||||
@@ -583,7 +581,7 @@ HDR
|
||||
cp bin/ObsidianDragon.exe "$dist_dir/"
|
||||
|
||||
local DD="$SCRIPT_DIR/prebuilt-binaries/dragonxd-win"
|
||||
for f in dragonxd.bat dragonx-cli.bat hushd.exe hush-cli.exe hush-tx.exe; do
|
||||
for f in dragonxd.exe dragonx-cli.exe dragonx-tx.exe; do
|
||||
[[ -f "$DD/$f" ]] && cp "$DD/$f" "$dist_dir/"
|
||||
done
|
||||
|
||||
@@ -836,24 +834,24 @@ TOOLCHAIN
|
||||
# Daemon binaries (macOS native, from dragonxd-mac/)
|
||||
local daemon_dir="$SCRIPT_DIR/prebuilt-binaries/dragonxd-mac"
|
||||
if [[ -d "$daemon_dir" ]]; then
|
||||
for f in hush-arrakis-chain hushd hush-cli hush-tx dragonxd; do
|
||||
for f in dragonxd dragonx-cli dragonx-tx; do
|
||||
[[ -f "$daemon_dir/$f" ]] && { cp "$daemon_dir/$f" "$MACOS/"; chmod +x "$MACOS/$f"; info " Bundled $f"; }
|
||||
done
|
||||
elif ! $IS_CROSS; then
|
||||
# Native macOS: try standard paths
|
||||
local launcher_paths=(
|
||||
"$SCRIPT_DIR/../hush-arrakis-chain"
|
||||
"$HOME/hush3/src/hush-arrakis-chain"
|
||||
local daemon_paths=(
|
||||
"$SCRIPT_DIR/../dragonxd"
|
||||
"$HOME/dragonx/src/dragonxd"
|
||||
)
|
||||
for p in "${launcher_paths[@]}"; do
|
||||
[[ -f "$p" ]] && { cp "$p" "$MACOS/hush-arrakis-chain"; chmod +x "$MACOS/hush-arrakis-chain"; info " Bundled hush-arrakis-chain"; break; }
|
||||
for p in "${daemon_paths[@]}"; do
|
||||
[[ -f "$p" ]] && { cp "$p" "$MACOS/dragonxd"; chmod +x "$MACOS/dragonxd"; info " Bundled dragonxd"; break; }
|
||||
done
|
||||
local hushd_paths=(
|
||||
"$SCRIPT_DIR/../hushd"
|
||||
"$HOME/hush3/src/hushd"
|
||||
local cli_paths=(
|
||||
"$SCRIPT_DIR/../dragonx-cli"
|
||||
"$HOME/dragonx/src/dragonx-cli"
|
||||
)
|
||||
for p in "${hushd_paths[@]}"; do
|
||||
[[ -f "$p" ]] && { cp "$p" "$MACOS/hushd"; chmod +x "$MACOS/hushd"; info " Bundled hushd"; break; }
|
||||
for p in "${cli_paths[@]}"; do
|
||||
[[ -f "$p" ]] && { cp "$p" "$MACOS/dragonx-cli"; chmod +x "$MACOS/dragonx-cli"; info " Bundled dragonx-cli"; break; }
|
||||
done
|
||||
else
|
||||
warn "prebuilt-binaries/dragonxd-mac/ not found — place macOS daemon binaries there for bundling"
|
||||
|
||||
Reference in New Issue
Block a user