- 本组织是 github.com/ScoopInstaller 的只读镜像
- 这里拒绝 fork,issue,pr 等变更操作,以确保镜像的纯净性和一致性
- 所有问题或贡献请直接提交给 github.com/ScoopInstaller
打开 PowerShell 7.0+ (Core) 或 Windows PowerShell 5.1 (Desktop)
设置执行策略
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
下载安装脚本
Invoke-RestMethod https://gitee.com/scoop-installer-mirrors/Install/releases/download/archive/install.ps1 -OutFile install.ps1
执行安装脚本 (请先查看下方的 其他注意事项)
.\install.ps1 -ScoopDir "D:\scoop" -AddAbyssBucket
设置 scoop 仓库
scoop config scoop_repo https://gitee.com/scoop-installer-mirrors/Scoop
使用 develop 分支以获取及时的快速修复和更新
scoop config scoop_branch develop
添加 bucket
main
scoop bucket add main https://gitee.com/scoop-installer-mirrors/Main
extras
scoop bucket add extras https://gitee.com/scoop-installer-mirrors/Extras
versions
scoop bucket add versions https://gitee.com/scoop-installer-mirrors/Versions
nerd-fonts
scoop bucket add nerd-fonts https://gitee.com/scoop-installer-mirrors/scoop-nerd-fonts
java
scoop bucket add java https://gitee.com/scoop-installer-mirrors/Java
php
scoop bucket add php https://gitee.com/scoop-installer-mirrors/PHP
nirsoft
scoop bucket add nirsoft https://gitee.com/scoop-installer-mirrors/Nirsoft
sysinternals
scoop bucket add sysinternals https://gitee.com/scoop-installer-mirrors/scoop-sysinternals
games
scoop bucket add games https://gitee.com/scoop-installer-mirrors/scoop-games
优化 scoop search 的性能,它是非常快的,不需要第三方搜索工具
scoop config use_sqlite_cache true
使用 abgox/PSCompletions 添加 scoop 命令补全
scoop install abyss/abgox.PSCompletions
Import-Module PSCompletions
psc add scoop scoop-install scoop-update
添加 i18n 支持 (由 abgox/scoop-i18n 提供)
scoop install abyss/abgox.scoop-i18n
- 如果网络条件有限,无法正常访问 Github 上的软件资源
- 可以使用 abgox/scoop-tools
安装 scoop-install 和 scoop-update
scoop install abyss/abgox.scoop-install
scoop install abyss/abgox.scoop-update
后续使用 scoop-install 和 scoop-update 命令安装和更新软件即可
scoop 是依赖 git 的,包括更新 scoop 自身、添加和更新 bucket,都需要 git 来完成
如果在安装 scoop 时,还没有 git 命令,scoop 会自动安装 main bucket 中的 git
但遗憾的是,这需要你有特殊的网络环境,能够正常访问 Github 上的软件资源
否则,你可能需要手动安装 git
或者使用 abyss 中的 abgox/scoop-tools: scoop-install 和 scoop-update
但同样遗憾的是,没有 git,你无法添加 abyss
对此,install.ps1 提供了 -AddAbyssBucket 参数,它会自动添加 abyss 为临时的 bucket,和 main 一样
.\install.ps1 -ScoopDir "D:\scoop" -AddAbyssBucket
这样,你就可以先安装 scoop-install
scoop install abyss/abgox.scoop-install
然后,使用 scoop-install 安装 git
scoop-install abyss/Git.Git
同时,你还需要重新添加 main 和 abyss 这两个 bucket 以转换为 git 仓库
scoop bucket add main https://gitee.com/scoop-installer-mirrors/Main
scoop bucket add abyss https://gitee.com/abgox/abyss
然后,更新 bucket
scoop update
除了 git,scoop 还需要 7z 命令才能正常工作
当需要解压软件包时,如果没有 7z 命令,scoop 会自动安装 main bucket 中的 7zip
但遗憾的是,普通的网络环境有可能无法正常下载 https://www.7-zip.org 中的安装包
这里比较推荐使用 NanaZip,它在 Github 中发布,提供了 7z 命令,且更现代化、更美观
你可以使用 scoop-install 安装它
scoop-install abyss/M2Team.NanaZip
然后,启用外部的 7z 命令
scoop config use_external_7zip true
Important
Scoop 对 global 的处理仍然存在一些问题
对于普通用户,不建议使用它,也不需要使用它
在运行 install.ps1 时,可以使用 -ScoopGlobalDir 参数指定全局安装目录
设置环境变量
[Environment]::SetEnvironmentVariable("SCOOP_GLOBAL", "D:\scoop-global", "Machine")
执行安装脚本
.\install.ps1 -ScoopDir "D:\scoop" -ScoopGlobalDir "D:\scoop-global"
这样,当你使用 -g 或 --global 参数时,scoop 会在 D:\scoop-global 中安装软件
scoop install -g <app>