Closed blakeNaccarato closed 5 months ago
The default installation isn't really appropriate, you can't configure anything. Will need to pass git
executable the --override
string from winget
something like /components ...
look at /verysilent
flag and others, and this.
Python default install is also not appropriate. It's added to PATH which is risky.
Also need to override PowerShell install to add context menu entries.
The proper command to install PowerShell with all the options enabled is below. ~The /quiet
install option had to be omitted due to Installer failed with exit code: 1603
, which suggests that the app is already installed, even though it isn't.~ Omitting /quiet
ticks all the appropriate boxes, and the user can be instructed to just click "Next" through the process.
Actually, /quiet
is fine as long as the prompt used to install this is elevated. Be sure to indicate a "Run as administrator" prompt to bootstrap all this software with winget
!
winget install --id Microsoft.PowerShell -s winget --override @'
/quiet
ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1
ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1
ADD_PATH=1
ENABLE_MU=1
ENABLE_PSREMOTING=1
REGISTER_MANIFEST=1
USE_MU=1
'@
Need to see when winget upgrade
is run whether override
is necessary on upgrading, if context menu options will disappear, etc.
Here's the proper command to install Terminal.
winget install --id Microsoft.WindowsTerminal -s winget
This text file was created by Git<...>.exe /SAVEINF
and can be loaded from a file with /LOADINF
. Should add /VERYSILENT
to the args, then try it from invoking the EXE directly. Then, see if it can be done with a here-string. Then, try that with a winget
override. I don't think this needs to update gracefully with overrides, since we have elected for it to try updating it self daily.
This accomplishes a silent install with the Git installer progress bar showing, /VERYSILENT
suppresses even that.
@'
[Setup]
Lang=default
Dir=C:\Program Files\Git
Group=Git
NoIcons=0
SetupType=default
Components=ext,ext\shellhere,ext\guihere,gitlfs,assoc,assoc_sh,autoupdate,windowsterminal,scalar
Tasks=
EditorOption=VisualStudioCode
CustomEditorPath=
DefaultBranchOption=main
PathOption=Cmd
SSHOption=OpenSSH
TortoiseOption=false
CURLOption=OpenSSL
CRLFOption=CRLFAlways
BashTerminalOption=MinTTY
GitPullBehaviorOption=Merge
UseCredentialManager=Enabled
PerformanceTweaksFSCache=Enabled
EnableSymlinks=Disabled
EnablePseudoConsoleSupport=Disabled
EnableFSMonitor=Enabled
'@ > ($inf = New-TemporaryFile)
winget install --id Git.Git -s winget --override "/SILENT /LOADINF=$inf"
Need to document installing winget
first-of-all, by trying to install from Microsoft Store first and, failing that, installing from the GitHub Releases. For instance, the installer for the latest winget
at time of writing is available at this URL.
Depending on the user's computer policy, App Installer may not be installable or runnable. So even though it is the recommended method for installing winget
, it seems flaky.
Need to work on installing C++ build tools while we're at it. Maybe not for default install, but an extended option?
winget search --id Microsoft.VisualStudio.2022.BuildTools -s winget
Will leave a stub for equivalent Linux and Mac setup, and link to an issue to develop it later, or request help.
Python install (e.g. Python 3.11) looks like this.
winget install -e --id Python.Python.3.11 --override "/quiet PrependPath=0"
Bypass remote script signing requirement by having the user copy/paste the setup script into a file they've created themselves. Also discuss Developer setup.
Alright, this is done now that the contributing guide details ground-up machine setup. Some more detail for non-Windows setups may be useful to add in the future, but this part is done.
The built-in Windows package manager
winget
is stable as of two weeks ago. Python and PowerShell 7 are available on it, as well as Git.