TASEmulators / TASEmulators/BizHawk

Port shell scripts to PowerShell, merging w/ Batch scripts where possible

Open
#3,013 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I've come around to the idea of PowerShell on Linux after getting a working Nix expression into the repo. After all, if I make Nix a requirement for Linux devs (as I plan to), what harm is another dependency?

Since c6270241f55b77a26dfb28c54a822b9269e47ec2, PowerShell is a soft builddep for BizHawk, and it will automatically installed with dotnet tool restore.

A note re: Git pre-commit hooks; apparently there's a new way to add those which makes using PowerShell simpler than the mess we ended up with, see PowerShell issue 16480.

If an OS-specific call needs to be made (considering all of the .NET BCL is available, unlikely) it may be easier to use a polyglot hack in a separate script than to conditionally invoke the relevant programs. I'm not familiar enough with PowerShell to say.

notes:


It might be worth extracting shell scripts from the GitLab CI config and porting them as well. For the most part they just call the scripts in /Dist. (See also my notes on dotnet publish.)

If MSBuild can run PowerShell scripts (I haven't checked), we can replace everything in /Build and the target in BizHawk.Version.csproj with PowerShell too. Replaced w/ Source Generator.

see also #2073

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 by inventorying the shell scripts in /Dist and /Build, then inspect the shell fragments in the GitLab CI configuration and the target formerly mentioned in BizHawk.Version.csproj. Check the relationship to #2073 and the linked notes before defining the scope. Done means the agreed scripts and CI/build paths have PowerShell equivalents and continue to work across the supported environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, shell
Domain
build-system, ci-cd, devops
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.