TASEmulators / TASEmulators/BizHawk

Environment variables should be expanded by the OS

Open
#1,574 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

App: EmuHawk Request: Feature/Enhancement
Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

We manually substitute %varname% in strings:
https://github.com/TASEmulators/BizHawk/blob/5bae4961a6cad04984eccad092d089a09ee22f81/BizHawk.Client.Common/PathManager.cs#L113-L116

Users should be free to write e.g. %USERPROFILE%\Documents\Roms in the Paths config window, using any vars set in the executable's environment. Also, Unix users should be free to use $HOME/Documents/Roms or similar.

Surely there's some way to set these variables at launch so later IO calls can use them?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with BizHawk.Client.Common/PathManager.cs at the linked lines, then inspect the Paths config window to understand how configured strings reach path handling. Verify the finished behavior with environment variables from the executable on Windows and Unix, including %USERPROFILE%\Documents\Roms and $HOME/Documents/Roms.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.