包管理
theme blank
Chocolatey && Scoop
PackageManagement (OneGet)
PackageManagement (formerly OneGet, est. 2014) is a unified manager that does not have its own repository.
It relies on other providers instead (for example ChocolateyGet, PowerShellGet).
Since it is all PowerShell, it offers good CLI and scripting experience.
WinGet
WinGet is still in preview. It will be part of App Installer app distributed through Microsoft Store.
WinGet has a repository of packages maintained on GitHub. The client is written as native C++ console application.
All output is text-only and lacks all the nice things PowerShell gives us.
There is a third-party OneGet provider for Winget and also quite strong user voice to add official PowerShell support.
Chocolatey
打包更复杂
自建仓库更复杂
Scoop
用类似mainifest而不是包
自建仓库只需git仓库
repository: https://github.com/ScoopInstaller/Scoop
docs:
https://github.com/ScoopInstaller/Scoop/wiki
Chocolatey Comparison
https://github.com/ScoopInstaller/Scoop/wiki/Chocolatey-Comparison
1.My practice
# Install Scoop to a Custom Directory
$env:SCOOP='D:\portable\scoop'
[environment]::setEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
# Configure Scoop to install global programs to a Custom Directory
$env:SCOOP_GLOBAL='D:\portable\scoop\global'
[environment]::setEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')
# Configure Scoop to store downloads to a Custom Directory
$env:SCOOP_CACHE='D:\portable\scoop\cache'
[Environment]::SetEnvironmentVariable('SCOOP_CACHE', $env:SCOOP_CACHE, 'Machine')
# Install Scoop
iwr -useb get.scoop.sh | iex
# add my bucket
# git clone to %SCOOP%\bucket\mybucket is equivalent
scoop bucket add mybucket https://gitee.com/xxy1991/scoop-bucket.git
scoop install sudo
sudo scoop install 7zip git --global
sudo scoop install go --global
scoop bucket add extras
scoop install vscode2.Scoop Folder Layout
%USERPROFILE%\scoop - per user root location (default)
%SCOOP_GLOBAL% - root location of apps installed for all users, %SYSTEMDRIVE%\ProgramData\scoop
...\scoop\buckets - manifests of installable apps (also a git clone of the bucket source repositories)
...\scoop\cache - the downloaded installers
...\scoop\persist - ...?
...\scoop\shims - added to PATH, wrappers that point to the installed applications
%USERPROFILE%\.config\scoop - (?) seems to be where network path to primary Scoop repository is definedref: https://github.com/ScoopInstaller/Scoop/wiki/Scoop-Folder-Layout
3.customize bucket
Testing and running autoupdate
cd <bucket repository>
scoop config debug $true
.\bin\checkver.ps1 <app> -u