Skip to content

contributing

runner edited this page Oct 5, 2026 · 15 revisions

Endfield_FineWine Development Documentation

Project Overview

Endfield_FineWine provides patches to CrossOver's Wine to enable Arknights: Endfield to run on Apple Silicon Macs. This project does not redistribute CrossOver, Wine, Apple's Game Porting Toolkit, or the game—users must bring their own licensed copies of each. The solution focuses on compatibility work similar to Valve's Proton on Linux, providing necessary patches to allow the game's anti-cheat and rendering systems to function properly under Rosetta 2 translation.

Key Features:

  • Patches CrossOver Wine to bypass VMProtect/TenProtect protection
  • Implements dw-proton anti-cheat patches for ACE compatibility
  • Enables DirectX 11 rendering via Apple's D3DMetal
  • Provides automated build and deployment scripts
  • Includes troubleshooting guidance for common issues

Development Environment Setup

System Requirements

  • Mac: Apple Silicon (M-series) only; Intel Macs not supported
  • macOS: 15 (Sequoia) or newer; tested on 27.0 and 26.5
  • Rosetta 2: Required (softwareupdate --install-rosetta --agree-to-license)
  • CrossOver: Version 26.3 specifically (licensed copy from codeweavers.com)
  • Development Tools:
    • Xcode Command Line Tools (xcode-select --install)
    • Homebrew (brew.sh)

Dependencies (Homebrew)

# Toolchain

brew install bison gcenx/wine/cx-llvm flex mingw-w64 pkgconfig

# Runtime libraries

brew install freetype gnutls molten-vk sdl2
brew install gphoto2 gst-plugins-base krb5 sane-backends  # Workflow dependencies

# For DXVK support (if needed)

brew install meson glslang  # DXVK (v21+)
```bash

### Environment Configuration

```bash

# Set up build environment (from GabLeRoux build_local.sh)

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin"
export CC="$(brew --prefix cx-llvm)/bin/clang"
export CXX="${CC}++"
export BISON="$(brew --prefix bison)/bin/bison"
export MACOSX_DEPLOYMENT_TARGET=10.14  # Prevents segment DLL/linker errors
export BUILDROOT="$PWD/build"
export INSTALLROOT="$PWD/install"
```bash

### Disk and Time Requirements

- Approximately 5 GB disk space for the build tree
- Build time: ~10 minutes on a 10-core M4 processor
- Longer build times on fewer cores (1.5–2.5 hours on CI runners with limited resources)

## Project Structure and Architecture

### Directory Layout

```yaml
Endfield_FineWine/
├── .github/
│   ├── scripts/
│   │   ├── generate-wiki.py          # Wiki generation script
│   │   └── generate-release-notes.py # Release notes generation
│   └── workflows/                    # GitHub Actions CI/CD
│       ├── build.yml
│       ├── nightly.yml
│       └── update-wiki.yml
├── patches/                          # Wine patches (LGPL-2.1-or-later)
│   ├── stage1-macos/                 # Rosetta 2 fixes
│   ├── stage2-dwproton/              # dw-proton anti-cheat ports
│   └── moltenvk/                     # MoltenVK patches
├── scripts/                          # Build and deployment scripts
│   ├── build-wine.sh                 # Wine build orchestration
│   ├── swap-into-crossover.sh        # Deploy into CrossOver
│   ├── create-bottle.sh              # Create game bottle
│   ├── launch-endfield.sh            # Launch the game
│   ├── 01-capture-failure.sh         # Debug logging helper
│   └── ...                           # Additional utility scripts
├── docs/                             # Documentation
│   ├── installation.md               # Setup instructions
│   ├── graphics-performance.md       # Graphics backend details
│   ├── troubleshooting.md            # Common issues and fixes
│   ├── performance.md                # Hardware specs and performance
│   └── technical.md                  # Architecture deep dive

Clone this wiki locally