# ---------------------------------------------------------------------------
# NOTE ON STYLE: rules here are deliberately ANCHORED (leading "/") wherever
# possible. Unanchored rules like "build/" or "*.png" match at every depth and
# would silently gut the vendored trees -- upstream lz4 and zstd both ship a
# real source directory named build/, and Dolphin ships ~1200 .png resources.
# A missing file in a vendored GPL tree is a compliance problem, not a typo.
# ---------------------------------------------------------------------------

# ---------------------------------------------------------------------------
# Game-derived data -- NEVER commit. Users supply their own disc; nothing
# copyrighted ships with this project.
# ---------------------------------------------------------------------------
*.iso
*.nkit.iso
*.gcm
*.rvz
*.wbfs
*.gcz
*.7z
# ...except the Windows runtime PGO profile: a .pgd and .pgc counts, no game data.
!/ModernGekko/pgo/runtime-windows/profile.7z
*.olk
*.dol
*.xbe
*_recomp.so
# extracted character packages (copyrighted asset data)
*_g22_*.bin
# ROM-site drop, not ours to publish
/Soulcalibur II (USA)/

# ---------------------------------------------------------------------------
# work/ -- scratch space. Everything is excluded; the GRSEAF cheat file is the
# single deliberate exception, whitelisted directory by directory (git does not
# look inside an excluded directory, so each level must be re-included).
# In particular this keeps out work/portlab/ -- the character-porting tooling
# is deliberately unpublished.
# ---------------------------------------------------------------------------
/work/*
!/work/mg_userdir/
/work/mg_userdir/*
!/work/mg_userdir/GameSettings/
/work/mg_userdir/GameSettings/*
!/work/mg_userdir/GameSettings/GRSEAF.ini
# The Japanese list, authored here the same way. Whitelisted BY NAME like the
# USA one: everything else under this directory is the developer's own Dolphin
# state, so the default stays "ignore" and each authored file is an exception.
!/work/mg_userdir/GameSettings/GRSJAF.ini

# ---------------------------------------------------------------------------
# Abandoned runtime experiments -- not part of the shipped build.
# ---------------------------------------------------------------------------
/RecompCore/
/GXRuntime/

# ---------------------------------------------------------------------------
# Nested upstream git stores, parked by scratchpad/disable_nested_git.sh so the
# vendored trees commit as plain files instead of empty gitlinks.
# ---------------------------------------------------------------------------
.git-disabled

# ---------------------------------------------------------------------------
# Build output -- anchored to OUR build trees only.
# ---------------------------------------------------------------------------
/ModernGekko/build/
/DolRecomp/build/
/ModernGekko/.cache/
/DolRecomp/.cache/
# container build trees from .github/scripts/build-deck.sh. They live at the
# repo root rather than under ModernGekko/ because the script bind-mounts the
# whole repo as /src and CMake writes the build dir relative to that.
/build-deck/
/build-deck-module/
# native build trees from setup.sh / a local dolrecomp build, same placement
# reason as the container ones above.
/build-dist-native/
# The Windows cross-build tree. Added 2026-09-11 after `git add -A` committed
# 4429 of its files, including a CMake log carrying the builder's home path --
# every other build-* directory here was already ignored, this one was new and
# nobody had named it yet.
/build-win/
/build-dolrecomp-static/
/build-dolrecomp/
# root-level ccache/CMake cache written by those trees -- 700 MB+ and never
# wanted. The per-project /*/.cache/ rules above do not reach the repo root.
/.cache/
compile_commands.json
*.gch

# ---------------------------------------------------------------------------
# Release artifacts -- attach to GitHub Releases, do not commit (50MB+ each)
#
# WHITELIST, not a blocklist. Naming each unwanted folder did not survive
# contact: downloaded-and-extracted bundles land here as "RingOut-1 (3).0" and
# similar, and a single `git add -A dist` staged an entire 450 MB toolchain plus
# a 104 MB installer -- rejected only because GitHub caps files at 100 MB.
# Everything under dist/ is now excluded except the scaffolding we actually
# ship, which is small and hand-maintained.
# ---------------------------------------------------------------------------
/dist.zip
/dist/*
# Shared scaffolding both packaging scripts install from. Source, not payload:
# without this the scripts fail on a fresh clone, because /dist/* would hide it.
!/dist/shared/
!/dist/RingOut-1.0-dist/
# redistributable: ship the scaffolding, never the built payload
/dist/RingOut-1.0-dist/bin/
/dist/RingOut-1.0-dist/lib/
/dist/RingOut-1.0-dist/libc-fallback/
/dist/RingOut-1.0-dist/game/
/dist/RingOut-1.0-dist/userdata/
# prebuilt dolrecomp binary (unstripped, leaks build paths) -- setup.sh builds it
/dist/RingOut-1.0-dist/tools/
# DISC-DERIVED. tools/gc-art.py extracts the banner, icon frames and title text
# from the user's own game disc; the launcher regenerates them whenever
# art/icon.png is absent, so nothing needs them in git and they must never be
# published from here.
/dist/RingOut-1.0-dist/art/
# written at install time with an absolute Exec= path to one machine
/dist/RingOut-1.0-dist/RingOut.desktop
# setup.sh's build tree: where the user's own ISO is extracted and recompiled.
# CMake/ninja output plus compiler-probe binaries, regenerated on every run.
/dist/RingOut-1.0-dist/work/
# GPL corresponding-source tarballs -- redundant now the source is in the repo
/dist/RingOut-1.0-dist/source/
# Steam Deck package: same rule, scaffolding only. It has no setup.sh, no
# tools/ and no module-src/ -- the runtime and the module are both prebuilt
# elsewhere against an old glibc -- so what is left to track is the launcher,
# the bundled filters and the text.
!/dist/RingOut-1.0-deck/
/dist/RingOut-1.0-deck/bin/
/dist/RingOut-1.0-deck/lib/
/dist/RingOut-1.0-deck/game/
/dist/RingOut-1.0-deck/userdata/

# ---------------------------------------------------------------------------
# Local / personal
# ---------------------------------------------------------------------------
/.claude/
*.log
# Core dumps -- ROOT ONLY. Unanchored, "core" matches every directory named
# core (SDL's src/core/, ...) and "core.*" matches core.h / core.c, which
# silently dropped 171 vendored source files from the first commit and broke
# the Windows build at CMake configure time.
/core
/core.*
# stray captures at the workspace root only -- docs/ screenshots are wanted
/*.png
/*.obj

# Disc-derived and personal build artifacts. Never publishable: the extracted
# game, the recompiled module, and memory-card saves. Kept out of dist/ so
# nothing globbing dist/*.zip can upload them.
/private-artifacts/

# Deck-targeted module build tree (clang + PGO + -march=znver2), like /build-dolrecomp/
/build-module-deck/
/build-module-aug12/

# Python build output. A committed .pyc carried an upstream author's macOS
# home path into the GPL source tarball that ships in the desktop package, and
# the privacy scan could not see it because it was inside a .tar.gz.
__pycache__/
*.pyc
