Skip to content

ci_cd_pipeline

runner edited this page Oct 5, 2026 · 14 revisions

Endfield_FineWine Development Documentation

1. Development Environment Setup

Prerequisites

  • Apple Silicon Mac (M-series chips: M1, M2, M3, M4, etc.)
  • macOS 15 (Sequoia) or newer — tested on macOS 27.0 and 26.5
  • Rosetta 2 required for x86_64 Wine builds: softwareupdate --install-rosetta --agree-to-license
  • Xcode Command Line Tools: xcode-select --install
  • Homebrew at /opt/homebrew/bin/brew — for dependencies

Required Tools Installation

# Install core build dependencies

brew install bison flex mingw-w64 pkg-config git make

# Verify Rosetta 2 is installed

softwareupdate --install-rosetta --agree-to-license

# Verify Xcode CLT

xcode-select --install

# Verify architecture

uname -m  # Should output arm64 for Apple Silicon
```bash

### Project Cloning

```bash

# Clone your fork (replace with your actual fork URL)

git clone <your-fork-url> Endfield_FineWine
cd Endfield_FineWine

# Verify structure

ls -la

# Expected: docs/, patches/, scripts/, patcher-app/, project-information/

```bash

### Development Environment Verification

```bash

# Check CrossOver availability

/Applications/CrossOver.app/Contents/SharedSupport/CrossOver/bin/wine --version

# Check macOS version

sw_vers

# Check hardware

sysctl -n machdep.cpu.brand_string
```bash

## 2. Coding Standards and Guidelines

### General Conventions

- **Markdown heading hierarchy**: `##` for main sections, `###` for subsections, `####` for sub-subsections
- **Code blocks**: Use triple backticks with language specification
- **Inline code**: Use single backticks for filenames, commands, and variables
- **Confidence tags**: `[confidence: high/medium/low]` on claims where it matters
- **VERIFIER CAUTION**: Marks where adversarial fact-checking corrected original findings

### Shell Script Standards

```bash

# !/usr/bin/env bash

set -euo pipefail  # Strict error handling

# Variable naming: SCREAMING_SNAKE_CASE for constants, camelCase for variables

# All paths should be absolute or properly resolved

# Example from the project

./scripts/build-wine.sh all  # Full build (deps -> fetch -> patch -> configure -> build)
```python

### Python Script Standards

- Follow **PEP 8** style guide
- Type hints where appropriate
- Docstrings for all functions using Google style
- Error handling with `try/except` blocks
- Clear separation of concerns

### Documentation Standards

- All documentation lives in `docs/` directory
- User guides in `installation.md`, `graphics-performance.md`, `troubleshooting.md`
- Engineering write-ups in `project-information/`
- Code follows the conventions documented in per-subsystem docs
- Confidence tags inline on claims

## 3. Project Structure and Architecture

```text
Endfield_FineWine/
├── docs/                    # User guides and engineering documentation
│   ├── installation.md      # Full build, deploy, and launch instructions
│   ├── graphics-performance.md  # D3DMetal, DXMT, DXVK, GPTK4 details
│   ├── troubleshooting.md   # Common failures and fixes
│   ├── performance.md       # Hardware specs and real-world performance
│   └── ...
├── patches/                 # Wine module patches
│   ├── stage1-macos/        # Rosetta 2 bug fixes (our discoveries)
│   │   └── signal_x86_64.c  # Two Rosetta signal handling fixes
│   └── stage2-dwproton/     # dw-proton anti-cheat patches
│       ├── ntoskrnl.exe/    # 17 kernel backports
│       ├── kernel32/        # int3 dispatcher spoof
│       └── sync.c           # NtDelayExecution QPC timing
├── scripts/                 # Build, deploy, and launch automation
│   ├── build-wine.sh        # Full Wine build pipeline
│   ├── swap-into-crossover.sh  # Module swap and re-signing
│   ├── create-bottle.sh     # Bottle creation and Gryphline install
│   ├── launch-endfield.sh   # Game launch with debug options
│   └── ...
├── patcher-app/             # GUI application (SwiftPM)
│   ├── FineWinePatcher/     # Main patcher logic
│   │   ├── ModChain.swift   # Mod chain integration
│   │   └── PatcherEngine.swift # Core patching engine
│   └── ContentView.swift    # UI configuration

Clone this wiki locally