2 Commits

Author SHA1 Message Date
aed3b458c3 Bump version to 6.25.3
New patch release covering the macOS build target added in the previous
commit. Updates APP_VERSION, APP_VER_PATCH, package.json, and adds a
CHANGELOG section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 09:09:51 -05:00
de11995a53 Add macOS release build target
Add `./build.sh --macos-release`, producing a portable host-arch macOS
binary (Intel x86_64 or Apple Silicon arm64). libuv, hwloc, and OpenSSL
are linked statically from Homebrew so the result runs on stock macOS
without Homebrew at runtime.

Homebrew's static libhwloc.a is built with the libxml2 and OpenCL
topology plugins, so the link adds `-lxml2 -framework OpenCL` (both
ship with macOS). Brew prefixes are resolved via `brew --prefix`, so
the same target works on Intel (/usr/local) and Apple Silicon
(/opt/homebrew); the package is named by `uname -m`.

Also document the macOS build in README and ignore build-macos/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 09:05:55 -05:00
6 changed files with 89 additions and 8 deletions

1
.gitignore vendored
View File

@@ -39,5 +39,6 @@ Thumbs.db
*~ *~
release/ release/
build-linux/ build-linux/
build-macos/
build-windows/ build-windows/
deps-windows/ deps-windows/

View File

@@ -1,3 +1,8 @@
# drg-xmrig 6.25.3
- Added a macOS release build target: `./build.sh --macos-release` produces a portable host-arch binary (Intel `x86_64` or Apple Silicon `arm64`) with libuv/hwloc/OpenSSL linked statically from Homebrew, so it runs on stock macOS without Homebrew at runtime.
---
# drg-xmrig 6.25.2 # drg-xmrig 6.25.2
- Fixed default pool config: `url` now includes the stratum port `pool.dragonx.is:3433` (was portless, falling back to firewalled 3333) and `algo` defaults to `rx/dragonx`. - Fixed default pool config: `url` now includes the stratum port `pool.dragonx.is:3433` (was portless, falling back to firewalled 3333) and `algo` defaults to `rx/dragonx`.
- Clarified that the pool requires a shielded `zs-address` as the worker name (config/example placeholders updated). - Clarified that the pool requires a shielded `zs-address` as the worker name (config/example placeholders updated).

View File

@@ -35,8 +35,12 @@ Based on XMRig v6.25.
``` ```
./build.sh --linux-release # Linux x86_64 static release ./build.sh --linux-release # Linux x86_64 static release
./build.sh --win-release # Windows x86_64 (MinGW cross-compile) ./build.sh --win-release # Windows x86_64 (MinGW cross-compile)
./build.sh --macos-release # macOS release for the host arch (Intel or Apple Silicon)
``` ```
Dependencies are built by `scripts/build_deps.sh` on first run. Linux/Windows dependencies are built by `scripts/build_deps.sh` on first run.
The macOS build uses Homebrew dependencies — install them once with
`brew install libuv hwloc openssl@3`. libuv/hwloc/OpenSSL are linked statically,
so the resulting binary runs on stock macOS without Homebrew.
## Usage ## Usage
``` ```

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# DRG-XMRig (DragonX miner) Release Build Script # DRG-XMRig (DragonX miner) Release Build Script
# Usage: ./build.sh [--linux-release] [--win-release] # Usage: ./build.sh [--linux-release] [--win-release] [--macos-release]
set -e set -e
@@ -10,24 +10,27 @@ VERSION=$(grep '#define APP_VERSION' "$ROOT_DIR/src/version.h" | sed 's/.*"\(.*\
BUILD_LINUX=false BUILD_LINUX=false
BUILD_WIN=false BUILD_WIN=false
BUILD_MACOS=false
for arg in "$@"; do for arg in "$@"; do
case "$arg" in case "$arg" in
--linux-release) BUILD_LINUX=true ;; --linux-release) BUILD_LINUX=true ;;
--win-release) BUILD_WIN=true ;; --win-release) BUILD_WIN=true ;;
--macos-release) BUILD_MACOS=true ;;
*) *)
echo "Usage: $0 [--linux-release] [--win-release]" echo "Usage: $0 [--linux-release] [--win-release] [--macos-release]"
exit 1 exit 1
;; ;;
esac esac
done done
if ! $BUILD_LINUX && ! $BUILD_WIN; then if ! $BUILD_LINUX && ! $BUILD_WIN && ! $BUILD_MACOS; then
echo "Usage: $0 [--linux-release] [--win-release]" echo "Usage: $0 [--linux-release] [--win-release] [--macos-release]"
echo "" echo ""
echo "Flags:" echo "Flags:"
echo " --linux-release Build Linux x86_64 release" echo " --linux-release Build Linux x86_64 release"
echo " --win-release Build Windows x86_64 release (cross-compile with MinGW)" echo " --win-release Build Windows x86_64 release (cross-compile with MinGW)"
echo " --macos-release Build macOS release for the host architecture (uses Homebrew deps)"
exit 1 exit 1
fi fi
@@ -113,9 +116,77 @@ build_windows() {
echo "Windows release: release/${PKG_NAME}.zip" echo "Windows release: release/${PKG_NAME}.zip"
} }
build_macos() {
echo ""
echo "========================================="
echo " Building macOS Release"
echo "========================================="
if ! command -v brew >/dev/null 2>&1; then
echo "ERROR: Homebrew is required. Install from https://brew.sh and run:"
echo " brew install libuv hwloc openssl@3"
exit 1
fi
# Resolve Homebrew dependency prefixes (works on Intel /usr/local and Apple Silicon /opt/homebrew)
local OPENSSL_PREFIX UV_PREFIX HWLOC_PREFIX
OPENSSL_PREFIX=$(brew --prefix openssl@3 2>/dev/null) || true
UV_PREFIX=$(brew --prefix libuv 2>/dev/null) || true
HWLOC_PREFIX=$(brew --prefix hwloc 2>/dev/null) || true
if [ ! -f "$OPENSSL_PREFIX/lib/libssl.a" ] || [ ! -f "$UV_PREFIX/lib/libuv.a" ] || [ ! -f "$HWLOC_PREFIX/lib/libhwloc.a" ]; then
echo "ERROR: missing static dependencies. Install them with:"
echo " brew install libuv hwloc openssl@3"
exit 1
fi
local BUILD_DIR="$ROOT_DIR/build-macos"
local ARCH; ARCH=$(uname -m) # x86_64 or arm64
local JOBS; JOBS=$(sysctl -n hw.ncpu)
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
# Statically link libuv/hwloc/openssl so the binary is portable (no Homebrew needed at runtime).
# Homebrew's static libhwloc.a pulls in libxml2 and the OpenCL framework, both shipped with macOS.
cmake "$ROOT_DIR" \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_OPENCL=OFF \
-DWITH_CUDA=OFF \
-DWITH_HWLOC=ON \
-DWITH_TLS=ON \
-DXMRIG_DEPS="$OPENSSL_PREFIX" \
-DUV_LIBRARY="$UV_PREFIX/lib/libuv.a" \
-DUV_INCLUDE_DIR="$UV_PREFIX/include" \
-DHWLOC_LIBRARY="$HWLOC_PREFIX/lib/libhwloc.a" \
-DHWLOC_INCLUDE_DIR="$HWLOC_PREFIX/include" \
-DCMAKE_EXE_LINKER_FLAGS="-lxml2 -framework OpenCL"
make -j"$JOBS"
# Package
local PKG_NAME="drg-xmrig-${VERSION}-macos-${ARCH}"
local PKG_DIR="$RELEASE_DIR/$PKG_NAME"
rm -rf "$PKG_DIR"
mkdir -p "$PKG_DIR"
cp "$BUILD_DIR/xmrig" "$PKG_DIR/"
cp "$ROOT_DIR/src/config.example.json" "$PKG_DIR/config.json"
cp "$ROOT_DIR/README.md" "$PKG_DIR/"
cd "$RELEASE_DIR"
rm -f "${PKG_NAME}.zip"
zip -r "${PKG_NAME}.zip" "$PKG_NAME"
rm -rf "$PKG_DIR"
echo ""
echo "macOS release: release/${PKG_NAME}.zip"
}
# Run selected builds # Run selected builds
$BUILD_LINUX && build_linux $BUILD_LINUX && build_linux
$BUILD_WIN && build_windows $BUILD_WIN && build_windows
$BUILD_MACOS && build_macos
echo "" echo ""
echo "=========================================" echo "========================================="

View File

@@ -1,6 +1,6 @@
{ {
"name": "drg-xmrig", "name": "drg-xmrig",
"version": "6.25.2", "version": "6.25.3",
"description": "DragonX RandomX (rx/dragonx) CPU miner", "description": "DragonX RandomX (rx/dragonx) CPU miner",
"main": "index.js", "main": "index.js",
"directories": { "directories": {

View File

@@ -11,7 +11,7 @@
#define APP_ID "drg-xmrig" #define APP_ID "drg-xmrig"
#define APP_NAME "DRG-XMRig" #define APP_NAME "DRG-XMRig"
#define APP_DESC "DragonX RandomX miner (rx/dragonx)" #define APP_DESC "DragonX RandomX miner (rx/dragonx)"
#define APP_VERSION "6.25.2" #define APP_VERSION "6.25.3"
#define APP_DOMAIN "dragonx.is" #define APP_DOMAIN "dragonx.is"
#define APP_SITE "www.dragonx.is" #define APP_SITE "www.dragonx.is"
#define APP_COPYRIGHT "Copyright (C) 2026 dragonx.is" #define APP_COPYRIGHT "Copyright (C) 2026 dragonx.is"
@@ -19,7 +19,7 @@
#define APP_VER_MAJOR 6 #define APP_VER_MAJOR 6
#define APP_VER_MINOR 25 #define APP_VER_MINOR 25
#define APP_VER_PATCH 2 #define APP_VER_PATCH 3
#ifdef _MSC_VER #ifdef _MSC_VER
# if (_MSC_VER >= 1950) # if (_MSC_VER >= 1950)