Add persistent directory overrides, Windows engine locality, and Games/Doom defaults - #53
Merged
Conversation
…s/Doom defaults Fix Windows source port config locality by deploying autoexec.cfg and dsda-doom.cfg directly to BinDir and setting engine process working directory to binary parent folder. Fix archive extraction matching in extractZipBinary to prevent uzdoom.sf2 from matching uzdoom.exe and recursively extract companion files. Add persistent configuration and CLI flags for wads-dir, bin-dir, and soundfonts-dir in config.json and CLI hierarchy. Migrate Windows default paths from dynamic drive root guessing to %USERPROFILE%\Games\Doom\ (bin, wads, soundfonts). Refactor path mutators on config.Paths, canonicalize config keys in config.go, and streamline flag extraction in play.go. Update documentation in README.md and encode architecture principles in AGENTS.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces persistent directory overrides, resolves Windows engine configuration locality and companion asset extraction, standardizes Windows defaults to
%USERPROFILE%\Games\Doom\, and performs a code refactoring pass for path and configuration handling:Windows Engine Configuration Locality & Working Directory:
$PROGDIR/BinDir), not%LOCALAPPDATA%. Deploysdsda-doom.cfgandautoexec.cfgdirectly toBinDir.cmd.Dir = filepath.Dir(plan.EngineBin)inengine/runner.goso executed portable engines read local assets and configurations correctly.Zip Slip Hardened Extraction & Companion File Discovery:
extractZipBinaryinengine/installer.gowhereuzdoom.sf2matcheduzdoom.exedue to prefix matching..wad,.pk3,.dll,.sf2,.wopl,.wopn) preserving directory structure.Persistent Asset Directory Hierarchy:
config.json) and CLI flags for--wads-dir,--bin-dir, and--soundfonts-dir.doom config get,set, andshowto manage all three asset locations with support for short and long environment variable fallbacks (DOOM_*and short forms).Standardized Windows Default Layout:
Refactoring & Hygiene:
paths.SetBinDir()andpaths.SetSoundFontsDir()ininternal/config.canonicalConfigKey()incmd/doom/config.go.cmd/doom/play.gousingstrings.Cut(arg, "=")against known flag maps.internal/engine/installer.go.Type of Change
data/presets.json)dsda-doom.cfgorautoexec.cfg)README.md,CONTRIBUTING.md,AGENTS.md)Repository Design & Architecture Checklist
data/presets.json; generated files were compiled viadoom presets build.__HOME__,__RESOLUTION__,__REFRESH_RATE__, and__SOUNDFONT__placeholders used where appropriate..bak.<timestamp>).Verification & Testing
make format-check(orgofmt -s -w .).make tidy-check(go.modandgo.sumverified).make lint(go vetandrevivepass with zero warnings).make check(all unit tests pass with-raceand-shuffle=on, preset parity, path invariant audit).README.md,CONTRIBUTING.md,AGENTS.md) is updated and synchronized.