igneum-common.ps1 uses igneum-worker-cuda.exe (with nvrtc64_*_0.dll next to it) and igneum-worker-opencl.exe when they are in the folder, passes the exported pack with --pack, and only surveys the toolchain (Find-Toolchain) when a worker is missing or FORCE_BUILD=1; the dashboard and the status block name the path per card; a prebuilt worker that is not ready after 150 s falls back to the build path once when a toolchain exists; 90 s of seed mismatch errors re-export the pack and restart the vendor; WORKER_ARCH overrides the NVRTC target. make-package.sh ships the two exes, the two NVRTC DLLs, the licence texts, THIRD-PARTY.md and TEST.md (what the first RTX 5090 run should print and what to send back). README.txt, the bats, proto-cuda/README.md (nvrtc/ section), WINDOWS-MINER.md and the bench log updated with what the Mac measured. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
64 lines
5.1 KiB
Bash
Executable file
64 lines
5.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Builds igneum-windows-v4.zip (the node and the miners in one window on a Windows PC) on the Mac.
|
|
# Contents: the launchers and igneum-common.ps1 from this directory, upload-log.bat, the firewall scripts, igneumd.exe
|
|
# with its three mingw runtime DLLs, igneum-miner.exe (the one that prints blue= and synced= in `watch`, needed for the
|
|
# sync wait), the two prebuilt one-click workers (package 0.3.0, 4 October 2026: igneum-worker-cuda.exe with NVIDIA's
|
|
# redistributable nvrtc64_120_0.dll and nvrtc-builtins64_128.dll, igneum-worker-opencl.exe; built by
|
|
# proto-cuda/nvrtc/build-windows.sh after fetch-redist.sh; THIRD-PARTY.md and the two licence texts go with them),
|
|
# TEST.md, and the worker sources from proto-cuda/ and proto-opencl/ for the build path. No src.zip: the node exe ships prebuilt.
|
|
# Default exes (4 Oct 2026, devnet v4): the devnet-v4 cross-build in vendor/igneum-node/target-integration/
|
|
# x86_64-pc-windows-gnu/release/ (built from vendor/igneum-node-v4 at dc749905 by proto-cuda/windows-node/cross-build.sh
|
|
# with CARGO_TARGET_DIR=target-integration). IGNEUM_WIN_RELEASE points at another release directory.
|
|
# Usage: windows-app/make-package.sh [output zip, default ~/Desktop/igneum-windows-v4.zip]
|
|
set -euo pipefail
|
|
HERE="$(cd "$(dirname "$0")" && pwd)"
|
|
ROOT="$(cd "$HERE/../.." && pwd)"
|
|
OUT="${1:-$HOME/Desktop/igneum-windows-v4.zip}"
|
|
REL="${IGNEUM_WIN_RELEASE:-$ROOT/vendor/igneum-node/target-integration/x86_64-pc-windows-gnu/release}"
|
|
NODE_EXE="${IGNEUMD_EXE:-$REL/igneumd.exe}"
|
|
MINER_EXE="${IGNEUM_MINER_EXE:-$REL/igneum-miner.exe}"
|
|
DLL_DIR="${IGNEUM_DLL_DIR:-}" # a directory holding the three DLLs; empty = the Homebrew mingw toolchain
|
|
NVRTC_DIR="$ROOT/proto-cuda/nvrtc"
|
|
CUDA_WORKER="$NVRTC_DIR/igneum-worker-cuda.exe"
|
|
CL_WORKER="$ROOT/proto-opencl/igneum-worker-opencl.exe"
|
|
[ -f "$CUDA_WORKER" ] && [ -f "$CL_WORKER" ] || { echo "no prebuilt workers; run $NVRTC_DIR/fetch-redist.sh then $NVRTC_DIR/build-windows.sh" >&2; exit 1; }
|
|
for f in bin/nvrtc64_120_0.dll bin/nvrtc-builtins64_128.dll LICENSE-NVIDIA-CUDA-EULA.txt LICENSE-Khronos-OpenCL-Headers.txt; do
|
|
[ -f "$NVRTC_DIR/redist/$f" ] || { echo "no $NVRTC_DIR/redist/$f; run $NVRTC_DIR/fetch-redist.sh" >&2; exit 1; }
|
|
done
|
|
[ -f "$NODE_EXE" ] || { echo "no $NODE_EXE; cross-compile the node first or set IGNEUMD_EXE" >&2; exit 1; }
|
|
[ -f "$MINER_EXE" ] || { echo "no $MINER_EXE; cross-compile the miner first or set IGNEUM_MINER_EXE" >&2; exit 1; }
|
|
# no grep -q here: pipefail would turn the early exit into a miss (strings gets SIGPIPE)
|
|
SYNCED="$(strings -n 6 "$MINER_EXE" | grep -c '^ synced=$' || true)"
|
|
if [ "$SYNCED" = "0" ]; then echo "warning: $MINER_EXE does not print synced= in watch; the sync wait falls back to blocks >= headers with a peer" >&2; fi
|
|
STAGE="$(mktemp -d)/igneum-windows"
|
|
mkdir -p "$STAGE/proto-cuda/packs" "$STAGE/proto-opencl"
|
|
cp "$HERE/START-IGNEUM.bat" "$HERE/start-igneum.ps1" "$HERE/START-NODE.bat" "$HERE/start-node.ps1" \
|
|
"$HERE/START-MINING.bat" "$HERE/start-mining.ps1" "$HERE/STOP-IGNEUM.bat" "$HERE/stop-igneum.ps1" \
|
|
"$HERE/ALLOW-FIREWALL.bat" "$HERE/allow-firewall.ps1" "$HERE/igneum-common.ps1" "$HERE/upload-log.bat" "$HERE/README.txt" "$HERE/TEST.md" "$STAGE/"
|
|
cp "$NODE_EXE" "$STAGE/igneumd.exe"
|
|
cp "$MINER_EXE" "$STAGE/igneum-miner.exe"
|
|
# The one-click workers and what they need next to them (the exes are static: KERNEL32 and the Universal CRT only)
|
|
cp "$CUDA_WORKER" "$STAGE/igneum-worker-cuda.exe"
|
|
cp "$CL_WORKER" "$STAGE/igneum-worker-opencl.exe"
|
|
cp "$NVRTC_DIR/redist/bin/nvrtc64_120_0.dll" "$NVRTC_DIR/redist/bin/nvrtc-builtins64_128.dll" "$STAGE/"
|
|
cp "$NVRTC_DIR/redist/LICENSE-NVIDIA-CUDA-EULA.txt" "$NVRTC_DIR/redist/LICENSE-Khronos-OpenCL-Headers.txt" "$NVRTC_DIR/THIRD-PARTY.md" "$STAGE/"
|
|
MINGW=/opt/homebrew/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32
|
|
for dll in lib/libstdc++-6.dll lib/libgcc_s_seh-1.dll bin/libwinpthread-1.dll; do
|
|
name="$(basename "$dll")"
|
|
if [ -n "$DLL_DIR" ] && [ -f "$DLL_DIR/$name" ]; then cp "$DLL_DIR/$name" "$STAGE/"
|
|
elif [ -f "$MINGW/$dll" ]; then cp "$MINGW/$dll" "$STAGE/"; x86_64-w64-mingw32-strip "$STAGE/$name" 2>/dev/null || true
|
|
else echo "missing $name (set IGNEUM_DLL_DIR to a folder holding the three DLLs)" >&2; exit 1; fi
|
|
done
|
|
# The worker sources: this repository, or (IGNEUM_WORKER_SRC) a folder with the same proto-cuda/ and proto-opencl/ layout,
|
|
# such as an extracted igneum-mine-test package, when the repository's working tree carries unreleased edits.
|
|
SRC="${IGNEUM_WORKER_SRC:-$ROOT}"
|
|
cp "$SRC/proto-cuda/host.cu" "$SRC/proto-cuda/build.bat" "$SRC/proto-cuda/README.md" "$STAGE/proto-cuda/"
|
|
cp "$SRC/proto-opencl/host.c" "$SRC/proto-opencl/build.bat" "$SRC/proto-opencl/README.md" "$SRC/proto-opencl/WAVEFRONT.md" "$STAGE/proto-opencl/"
|
|
# CRLF for the files Windows tools read as text
|
|
for f in "$STAGE"/*.bat "$STAGE/README.txt" "$STAGE/TEST.md" "$STAGE/THIRD-PARTY.md" "$STAGE/proto-cuda/build.bat" "$STAGE/proto-opencl/build.bat"; do
|
|
perl -pi -e 's/\r?\n/\r\n/' "$f"
|
|
done
|
|
rm -f "$OUT"
|
|
(cd "$(dirname "$STAGE")" && zip -qr "$OUT" "$(basename "$STAGE")")
|
|
ls -la "$OUT"
|
|
unzip -l "$OUT" | tail -n +4 | awk '{print $1, $4}' | sed '/^ *$/d'
|