diff --git a/build.sh b/build.sh index 6bdbe08..ac781e2 100755 --- a/build.sh +++ b/build.sh @@ -911,9 +911,14 @@ HDR info "Lite mode: skipping daemon and Sapling/asmap assets in Windows zip" fi - # Bundle xmrig for mining support - local XMRIG_WIN="$SCRIPT_DIR/prebuilt-binaries/drg-xmrig/xmrig.exe" - [[ -f "$XMRIG_WIN" ]] && { cp "$XMRIG_WIN" "$dist_dir/"; info "Bundled xmrig.exe"; } || warn "xmrig.exe not found — mining unavailable in zip" + # The exe embeds xmrig (HAS_EMBEDDED_XMRIG) and getXmrigPath() always prefers / re-extracts the copy in + # %APPDATA%\\dragonx, so a loose exe-dir xmrig.exe is never used. Ship it loose only when not embedded. + if grep -q '^#define HAS_EMBEDDED_XMRIG 1' "$GEN/embedded_data.h" 2>/dev/null; then + info "xmrig.exe is embedded in the exe — not copied loose into the zip" + else + local XMRIG_WIN="$SCRIPT_DIR/prebuilt-binaries/drg-xmrig/xmrig.exe" + [[ -f "$XMRIG_WIN" ]] && { cp "$XMRIG_WIN" "$dist_dir/"; info "Bundled xmrig.exe"; } || warn "xmrig.exe not found — mining unavailable in zip" + fi cp -r bin/res "$dist_dir/" 2>/dev/null || true