Skip to content

Is it possible to remove the PowerShell dependency in both updater.bat and prefsCleaner.bat? #1912

@9ao9ai9ar

Description

@9ao9ai9ar

In the process of rewriting updater.sh and prefsCleaner.sh (#1908), I'm pondering if the same thing can be done to their sister batch files, i.e. is there a POSIX-equivalent in the DOS world with a common set of batch file commands that would work in most operating systems that support running batch files as scripts? Currently, the PowerShell dependency breaks that "pure batch files" contract.

I know that the DOS family of operating systems, pretty much only OS/2 and ArcaOS (not sure about AmigaOS) remaining by now, is as dead as a doornail, and they only have a port of an ancient version of Firefox available at https://github.com/bitwiseworks/mozilla-os2, which saw no activity for the past 8 years, so it is moot to make the batch scripts "portable" with Windows NT being the only viable platform, probably forever. However, there are versions of Windows, like WinPE and Nano Server, that do not have PowerShell installed by default, not that I know if it is possible or advisable to run Firefox with arkenfox in those environments, but at least it is a reason behind my proposing for the removal of the PowerShell dependency if possible, all the more so when it's just three or four lines of PowerShell used in those scripts.

The other reason is complexity. I've only a brief exposure to batch files, but I can already tell it is an abyss of pitfalls and limitations. I'm relatively comfortable with PowerShell, but I can say that despite it being objectively better in almost every way over batch files, or at least appears to be, it is also a cesspool of mess when you get to the nitty-gritty. #1909 is just scratching the surface, and even with so few lines of PowerShell written, we managed to find at least 1 bug, so don't underestimate complexity. By keeping the scripts "pure batch files", we can go by with just an expert in batch file programming, without bringing on board an expert in PowerShell programming.

But if someone does port the scripts to PowerShell, maybe out of boredom, I do want to let them know that I might be able to review them if requested.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions