-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to remove the PowerShell dependency in both updater.bat and prefsCleaner.bat? #1912
Comments
I'm only going to support win10+ now that older windows are not supported in FF128 or higher winPE is not an everyday OS, it's a windows deployment tool Nano Server .. likewise |
Coincidentally I'm actually typing this from a WinPE environment lol |
Also the batch scripts used to be pure batch until recently, because powershell get-date is better at getting current date/time than wmic (locale-independent time format). |
Mull from DivestOS uses Arkenfox. |
WMIC is deprecated and not installed by default in Windows 11 24H2 (optional component). That was the main reason for replacing it with PowerShell. |
Using WMIC to get locale-independent time seems overkill to me, as there are myriad ways to do this without requiring PowerShell. In my opinion, if we're calling PowerShell in the batch files, we might as well go all-in with PowerShell and benefit from the better readability and flexibility, with the only caveat being that some Windows users need to change their default execution policy to be able to run the scripts. Linux users would also gain an additional shell option if they so wish to install the proprietary pwsh. |
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.
The text was updated successfully, but these errors were encountered: