From: Shane Jaroch Date: Mon, 12 Jan 2026 20:52:19 +0000 (-0500) Subject: more updates X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=7e6d4892f50e5fc48fbb9ac2eeccfeba39e48755;p=gamesguru%2Ffeather.git more updates --- diff --git a/docs/CROSS_COMPILATION.md b/docs/CROSS_COMPILATION.md new file mode 100644 index 00000000..0979c8d1 --- /dev/null +++ b/docs/CROSS_COMPILATION.md @@ -0,0 +1,68 @@ +# Cross-Compilation Guide + +This document outlines how to cross-compile Feather Wallet for **Windows** and **macOS** from a Linux host. + +## 1. Official Release Builds (Guix) + +Feather uses **[Guix](https://guix.gnu.org/)** for reproducible release builds. This is the **recommended** method for producing binaries that match official releases. + +### Requirements +* A Linux distribution (Debian/Ubuntu recommended) +* ~50GB free disk space +* [Guix installed](https://guix.gnu.org/manual/en/html_node/Binary-Installation.html) + +### Windows Build +From the repository root: +```bash +HOSTS="x86_64-w64-mingw32" make build +``` +* **Result**: `feather.exe` (and installer if specified) will be in `contrib/guix/guix-build-/output/`. + +### macOS Build +From the repository root: +```bash +HOSTS="x86_64-apple-darwin arm64-apple-darwin" make build +``` +* **Result**: `.dmg` or `.app` bundles for Intel and Apple Silicon. + +### Notes +* The first run will take a significant amount of time to download and bootstrap the toolchain. +* See `contrib/guix/README.md` for advanced configuration (`JOBS`, `SUBSTITUTE_URLS`, etc.). + +--- + +## 2. Development Builds (Depends) + +For faster, non-reproducible development builds, you can use the `contrib/depends` system. + +### Prerequisites +* `build-essential`, `cmake`, `git` +* **Windows**: `g++-mingw-w64-x86-64` (Debian/Ubuntu) or equivalent. +* **macOS**: `clang`, `libtapi-dev` (or a mac SDK). + +### Windows (MinGW) +1. **Build Dependencies**: + ```bash + make -C contrib/depends HOST=x86_64-w64-mingw32 + ``` +2. **Configure and Build**: + ```bash + mkdir build-win + cd build-win + cmake -DCMAKE_TOOLCHAIN_FILE=../contrib/depends/x86_64-w64-mingw32/share/toolchain.cmake .. + make + ``` + +### macOS +1. **Get SDK**: You may need to provide a macOS SDK tarball in `contrib/depends/SDKs`. +2. **Build Dependencies**: + ```bash + make -C contrib/depends HOST=x86_64-apple-darwin + ``` +3. **Configure and Build**: + ```bash + mkdir build-mac + cd build-mac + cmake -DCMAKE_TOOLCHAIN_FILE=../contrib/depends/x86_64-apple-darwin/share/toolchain.cmake .. + make + ``` diff --git a/docs/LIFECYCLE_WALLET_FUNCTIONS.md b/docs/LIFECYCLE_WALLET_FUNCTIONS.md index f7e21a5e..21eae087 100644 --- a/docs/LIFECYCLE_WALLET_FUNCTIONS.md +++ b/docs/LIFECYCLE_WALLET_FUNCTIONS.md @@ -80,6 +80,38 @@ These functions control the core synchronization logic, blockchain scanning, and - Clears `m_rangeSyncActive`. - Triggers rescan. +### `set_refresh_from_block_height(uint64_t height)` +**Class:** `tools::wallet2` (via `m_walletImpl` in `Wallet.cpp`) +**Role:** Sets the starting block height for the wallet refresh synchronization. +**Details:** +- Crucial for "Skip Sync" or restoring from a specific date. +- Instructs the lower-level wallet library to ignore blocks before `height`. + +### `daemonBlockChainHeight()` +**Class:** `Wallet` (`src/libwalletqt/Wallet.cpp`) +**Role:** Returns the current block height of the connected daemon (node). +**Usage:** +- Used to calculate "blocks behind" (Daemon Height - Wallet Height). +- Fetched during the refresh loop or immediately after `initAsync`. + +### `daemonBlockChainTargetHeight()` +**Class:** `Wallet` (`src/libwalletqt/Wallet.cpp`) +**Role:** Returns the target height the daemon is syncing towards. +**Usage:** +- If the daemon itself is still syncing, this will be > `daemonBlockChainHeight()`. +- Used to show the true "Network Tip" in tooltips. + +### Debug Log: Refresh Loop +**Location:** `src/libwalletqt/Wallet.cpp` (inside `startRefreshThread`) +**Code:** +```cpp +qInfo() << "Calling m_walletImpl->refresh(). Wallet height:" << walletHeight << "Daemon height:" << daemonHeight << "Target:" << targetHeight; +``` +**Purpose:** +- Provides visibility into the background refresh cycle. +- Logs the exact state *before* triggering the potentially blocking `refresh()` call. +- **Info Level:** Escalated from Debug to Info to allow users to verify sync progress without a debug build. + ## UI Tweaks & Event Handling These functions handle user interaction, window management, and visual feedback based on backend state. diff --git a/setup_flags.sh b/setup_flags.sh deleted file mode 100644 index 9112cf76..00000000 --- a/setup_flags.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# Configure CMake with custom flags -# - FEATHER_VERSION_DEBUG_BUILD=ON : Use git describe for version string -# - CHECK_UPDATES=OFF : Disable built-in update checker -# - USE_DEVICE_TREZOR=OFF : Disable Trezor hardware wallet support -# - WITH_SCANNER=OFF : Disable webcam QR scanner support - -cmake \ - -DCMAKE_BUILD_TYPE=Debug \ - -DFEATHER_VERSION_DEBUG_BUILD=ON \ - -DCHECK_UPDATES=OFF \ - -DUSE_DEVICE_TREZOR=OFF \ - -DWITH_SCANNER=OFF \ - ..