Skip to content

Releases: ianrastall/StockfishCompiler

2.1.0

10 Dec 10:24

Choose a tag to compare

Full Changelog: 2.0.0...2.1.0

2.0.0

23 Nov 04:17

Choose a tag to compare

Full Changelog: 1.3.0...2.0.0

New Features

  • Historical Version Support: You can now select and compile specific versions of Stockfish going back to Stockfish 12. The application automatically fetches available tags (e.g., sf_17, sf_16.1, sf_15) from GitHub.

  • Smart Classification: The UI now displays critical information for each version, including:

    • Era: Neural (SF 16+), Hybrid (SF 12–15), or Classical.
    • Requirements: Minimum C++ standard (C++11 through C++20).
    • Network: Automatically detects if an NNUE network download is required or optional.
  • Intelligent Compatibility Checks: The compiler now analyzes the selected version against your build tools. It will warn you if you attempt to compile a legacy version (pre-SF 12) that is incompatible with modern build scripts, or if a specific version requires special handling.

  • Custom Dark Mode Dialogs: Alerts, confirmations, and errors now blend seamlessly with the rest of the application's dark theme.

Improvements

  • Enhanced MSYS2 Detection: The compiler detection logic has been rewritten to better handle different MSYS2 environments. It now intelligently prioritizes and detects UCRT64, CLANG64, and MINGW64 environments, improving reliability during the build toolchain setup.

  • Startup Performance: Added a background task to clean up stale temporary directories from previous sessions, ensuring the application starts quickly without accumulating disk clutter over time.

  • Input Validation: Added strict validation rules for the "Parallel Jobs" setting to prevent invalid thread counts from crashing the build process.

  • Network Management: Improved logic for detecting and downloading the correct Neural Network (NNUE) files for older Stockfish versions where naming conventions differed from the current standards.

Fixes

  • Security: Implemented checks against "Zip Slip" vulnerabilities when extracting downloaded source archives.

  • Build Stability: Fixed an issue where the application would not correctly identify existing NNUE files in the source directory, leading to unnecessary re-downloads.

  • UI State: Fixed validation state handling to ensure the "Build" button is only enabled when valid configuration parameters are set.

1.3.0

21 Nov 13:43

Choose a tag to compare

Full Changelog: 1.2.0...1.3.0


Screenshot-1 3 0

This release brings significant improvements to the build process stability, UI responsiveness during compilation, and automated version detection.

New Features & UI Changes

  • Copy Build Output: Added a "Copy Output" button to the main interface, allowing users to easily export compilation logs to the clipboard for troubleshooting.
  • UI Responsiveness: Implemented output throttling (limiting updates to ~4 times per second) to prevent UI freezing during high-speed compilation logs.
  • Version Display: The application now correctly displays the detected version number in the UI header.

Improvements

  • Robust Downloads: Increased the download timeout to 10 minutes to handle slower connections or large source files and added a specific User-Agent (StockfishCompiler/1.0) to comply with request standards.
  • Security: Added SHA256 hash verification for downloaded source files to ensure integrity and prevent tampering.
  • Temp File Cleanup: Completely refactored how temporary build directories are handled. The system now uses "sentinel" files and process locking checks to safely identify and remove stale stockfish_build_* directories, preventing disk clutter.
  • Parallel Jobs: Improved logic for clamping the number of parallel jobs, ensuring it stays within a safe range relative to the user's processor count.
  • Settings: Added "debouncing" to user settings persistence to prevent excessive disk writes when toggling options rapidly.

Technical & Build System

  • CI/CD Pipeline: Major updates to the GitHub Actions workflow (build.yml) to automatically detect versions from Git tags, strip prefixes (e.g., v1.2.0 -> 1.2.0), and inject NuGetVersion, FileVersion, and AssemblyVersion into the build artifacts.
  • Architecture Detection: Added CancellationToken support to the architecture detection logic, allowing for graceful cancellation of the detection process.
  • MSYS2 Detection: Improved validation logic for finding MSYS2 installations (IsValidMSYS2Installation) to ensure the environment is correctly set up before attempting a build.

1.2.0

21 Nov 04:32

Choose a tag to compare

Full Changelog: 1.1.0...1.2.0

New Features

Application Icon: Added a dedicated application icon (App.ico) to the project and main window.

Improvements & Fixes

Security: Strengthened path traversal checks in the build service to ensure executable output paths are strictly validated.

Installer Reliability: Improved argument passing for the MSYS2 installer by switching to argument lists, ensuring more reliable installation paths.

Path Handling: Enhanced directory path normalization during source code extraction to prevent potential path issues.

1.1.0

21 Nov 01:48

Choose a tag to compare

Full Changelog: 1.0.0...1.1.0

Stockfish Compiler v1.1.0

This release brings significant improvements to the reliability of the MSYS2 installation process, adds support for Profile-Guided Optimization (PGO), and introduces a completely refactored architecture detection system for optimal performance.

New Features

  • Profile-Guided Optimization (PGO): Added a toggle to enable PGO during compilation. This compiles Stockfish, runs a benchmark to profile execution, and then recompiles using that profile for maximum performance.
  • Source Version Selection: Users can now choose between compiling the stable release or the master (development) branch of Stockfish.
  • Smart Architecture Detection:
    • The system now intelligently parses GCC/Clang output to detect supported CPU features (AVX2, BMI2, VNNI, etc.).
    • Added robust fallback logic: if feature detection fails, the system gracefully defaults to a safe architecture (x86-64 or armv8) rather than crashing.
  • Custom Parallelization: Added a configuration option to set the number of parallel compilation jobs (defaults to logical processor count).

Security & Reliability

  • Secure MSYS2 Installation:
    • The installer now validates the SHA256 checksum of the MSYS2 installer before execution to ensure file integrity.
    • Added fallback URLs for the MSYS2 installer in case the primary GitHub API is unreachable.
  • Validated Downloads:
    • NNUE (Neural Network) files are now validated via SHA256 checksums immediately after download.
    • Added file size limits and timeout protections to prevent hanging downloads.
  • Graceful Cancellation: Implemented CancellationToken support across the entire stack. Builds, downloads, and installations can now be cancelled instantly via the UI.

Performance & Polish

  • Throttled Build Logs: The build output window now uses a queued dispatch timer. This prevents the UI from freezing/lagging when the compiler outputs text at high speed.
  • Automatic Cleanup: The application now scans for and removes stale temporary build directories (stockfish_build_*) older than 24 hours on startup.
  • MSYS2 Discovery: Improved the MSYS2Helper to automatically find MSYS2 installations across different drives (C:, D:) and common paths (User directory, Program Files).

Maintenance

  • Refactored StockfishDownloader and CompilerInstallerService for better modularity.
  • Removed legacy scripts (Export-FullContext.ps1).
  • Updated DarkTheme resources for better contrast in the log window.

Visualizing the Logic

To help visualize the new, more robust Architecture Detection logic introduced in this version, here is a flow representation of how the compiler now decides which architecture to target:


Raw Changelog

  • Add PGO build option and improve MSYS2 installer
  • Refactor build and download services for reliability
  • Improve build output handling and installer security
  • Improve error handling and validation in build workflow
  • Improve temp cleanup and MSYS2 installer handling
  • Add Stockfish compilation instructions
  • Remove Export-FullContext.ps1 script

1.0.0

20 Nov 19:55

Choose a tag to compare