Skip to content

0.3.0 (RC1) - Config Update

Choose a tag to compare

@doccy-doc doccy-doc released this 09 Apr 02:30
· 18 commits to master since this release
f9407e0

🚀 Release 0.3.0 - Config Update (1.0.0 Release Candidate)

This release marks the most significant evolution to date. We have moved away from the "hardcoded script" model toward a professional, portable Linux utility that follows modern standards and priorities data integrity. If no changes are needed, this will become the base for the 1.0.0 stable release.

🛠️ Dynamic Configuration System

The biggest change in 0.3.0 is the removal of all hardcoded environment variables.

  • CLI Management: Use the new config command to update your Wine prefix or toggle debug mode without ever touching the source code.
  • Persistent Storage: Settings are now saved to a dedicated configuration file, making the tool portable across different Linux setups.

🐧 XDG Base Directory Compliance

Following the standard Linux filesystem hierarchy, epic-switcher now neatly categorises its files to keep your $HOME clean:

  • Config: ~/.config/egswitcher/egswitcher.conf
  • Data: ~/.local/share/egswitcher/accounts.state
  • Cache: ~/.cache/egswitcher/ (Auto-cleaned via EXIT traps)

🛡️ Hardened Security & Execution Guards

To prevent the common "sudo trap" that ruins file permissions in WINE prefixes, we’ve added strict execution checks:

  • Root Block: The script will refuse to run as root or via sudo.
  • User Match: Ensures the executing user matches the owner of the environment to prevent permission corruption.
  • File Security: The account database is now provisioned with 600 permissions (Owner Read/Write only) to protect your launcher identifiers.

🧪 Path Handling

We implemented a specialised path encoding engine designed to survive the "backslash hell" of Linux/WINE paths in CLI.

  • Injection-Proof: Safely handles paths containing spaces, quotes, ampersands, dollar signs, and all known injection vectors.
  • Variable Storage: Config values are stored as single-quote literals to prevent unintended shell expansion when the config is sourced.
  • Cleanup: Integrated EXIT traps to ensure all temporary files and named pipes are purged, regardless of how the script ends.

Note: The trade-off of this is you cannot use shell shortcuts like ~/path or global variable like $HOME/path for config values.

⚠️ Breaking Changes

  • File Locations: If you are upgrading from 0.2.3 or lower, your old accounts.txt data must be moved to the new XDG path: ~/.local/share/egswitcher/accounts.state.

  • Variable Names: Internal config variables have been standardised to the EGS_ (e.g. EGS_PFX) prefix for better environment clarity. Single-run config overrides are standardised to have no _ (e.g. EGSPFX). This made dynamic implementation of single-run overrides for all config variables much simpler.

Developer's Note: This refactor was a deep dive into the darker corners of sed and bash quoting. The result is a utility that should be indestructible regardless of how complex your Wine prefix pathing is. Enjoy the stability!

Note

Upcoming Breaking Change: CLI Renaming in 1.0.0
Please be advised that starting with the 1.0.0 stable release, the executable will be renamed from epic-switcher to egs for brevity and to reflect the evolution of this project from a simple bash script to a CLI tool.

  • What to expect: In 1.0.0, the epic-switcher naming will be removed entirely (hard cut-off).
  • Internal API: All flags, commands, and arguments will remain identical; only the filename of the tool is changing.
  • Action: We recommend reviewing your CI/CD pipelines, shell scripts, and aliases now to ensure a smooth transition when 1.0.0 is released. If you wish to revert to using the old name, you can use mv ./egs ./epic-switcher or alias the new filename.