Skip to content

Commit 71f5044

Browse files
r15ch13niheavenChawye HsuAsh258
authored
Bucket extraction and refactoring (#3449)
- The main bucket of Scoop has been separated to https://github.com/ScoopInstaller/Main - Requires PowerShell 5 and newer #3330 - Improve and refactor decompression functions #3204 #3409 #3411 - Move scoop config from `~\.scoop` to `~\.config\scoop\config.json` #3242 - Add `scoop hold` and `scoop unhold` for excluding programs from updates #3444 - Refactored some Core functions #3314 #3416 - Small fix for starting processes on Windows 7 #3415 Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com> Co-authored-by: Chawye Hsu <h404bi@outlook.com> Co-authored-by: Jakub Čábera <cabera.jakub@gmail.com>
2 parents f1f8649 + d006fb9 commit 71f5044

File tree

506 files changed

+827
-14524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

506 files changed

+827
-14524
lines changed

README.md

+22-17
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ Scoop is a command-line installer for Windows.
3737
## What does Scoop do?
3838

3939
Scoop installs programs from the command line with a minimal amount of friction. It tries to eliminate things like:
40-
* Permission popup windows
41-
* GUI wizard-style installers
42-
* Path pollution from installing lots of programs
43-
* Unexpected side-effects from installing and uninstalling programs
44-
* The need to find and install dependencies
45-
* The need to perform extra setup steps to get a working program
40+
41+
- Permission popup windows
42+
- GUI wizard-style installers
43+
- Path pollution from installing lots of programs
44+
- Unexpected side-effects from installing and uninstalling programs
45+
- The need to find and install dependencies
46+
- The need to perform extra setup steps to get a working program
4647

4748
Scoop is very scriptable, so you can run repeatable setups to get your environment just the way you like, e.g.:
4849

@@ -57,13 +58,14 @@ If you've built software that you'd like others to use, Scoop is an alternative
5758

5859
## Requirements
5960

60-
* Windows 7 SP1+ / Windows Server 2008+
61-
* [PowerShell 3](https://www.microsoft.com/en-us/download/details.aspx?id=34595) (or later) and [.NET Framework 4.5+](https://www.microsoft.com/net/download)
62-
* PowerShell must be enabled for your user account e.g. `set-executionpolicy remotesigned -s currentuser`
61+
- Windows 7 SP1+ / Windows Server 2008+
62+
- [PowerShell 5](https://aka.ms/wmf5download) (or later, include [PowerShell Core](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-6)) and [.NET Framework 4.5](https://www.microsoft.com/net/download) (or later)
63+
- PowerShell must be enabled for your user account e.g. `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`
6364

6465
## Installation
6566

6667
Run this command from your PowerShell to install scoop to its default location (`C:\Users\<user>\scoop`)
68+
6769
```powershell
6870
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
6971
```
@@ -74,23 +76,27 @@ The default setup is configured so all user installed programs and Scoop itself
7476
Globally installed programs (`--global`) live in `C:\ProgramData\scoop`.
7577
These settings can be changed through environment variables.
7678

77-
#### Install Scoop to a Custom Directory
79+
### Install Scoop to a Custom Directory
80+
7881
```powershell
79-
[environment]::setEnvironmentVariable('SCOOP','D:\Applications\Scoop','User')
8082
$env:SCOOP='D:\Applications\Scoop'
83+
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
8184
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
8285
```
8386

84-
#### Configure Scoop to install global programs to a Custom Directory
87+
### Configure Scoop to install global programs to a Custom Directory
88+
8589
```powershell
86-
[environment]::setEnvironmentVariable('SCOOP_GLOBAL','F:\GlobalScoopApps','Machine')
8790
$env:SCOOP_GLOBAL='F:\GlobalScoopApps'
91+
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')
8892
```
8993

9094
## [Documentation](https://github.com/lukesampson/scoop/wiki)
9195

9296
## Multi-connection downloads with `aria2`
97+
9398
Scoop can utilize [`aria2`](https://github.com/aria2/aria2) to use multi-connection downloads. Simply install `aria2` through Scoop and it will be used for all downloads afterward.
99+
94100
```powershell
95101
scoop install aria2
96102
```
@@ -105,8 +111,8 @@ You can tweak the following `aria2` settings with the `scoop config` command:
105111

106112
## Inspiration
107113

108-
* [Homebrew](http://mxcl.github.io/homebrew/)
109-
* [sub](https://github.com/37signals/sub#readme)
114+
- [Homebrew](http://mxcl.github.io/homebrew/)
115+
- [sub](https://github.com/37signals/sub#readme)
110116

111117
## What sort of apps can Scoop install?
112118

@@ -116,9 +122,8 @@ Since installers are common, Scoop supports them too (and their uninstallers).
116122

117123
Scoop is also great at handling single-file programs and Powershell scripts. These don't even need to be compressed. See the [runat](https://github.com/lukesampson/scoop/blob/master/bucket/runat.json) package for an example: it's really just a GitHub gist.
118124

119-
120125
### Support this project
121126

122127
If you find Scoop useful and would like to support ongoing development and maintenance, here's how:
123128

124-
* [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DM2SUH9EUXSKJ) (one-time donation)
129+
- [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DM2SUH9EUXSKJ) (one-time donation)

appveyor.yml

+22-23
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
11
version: "{build}-{branch}"
2-
32
branches:
43
except:
54
- gh-pages
6-
75
build: off
86
deploy: off
97
clone_depth: 49
10-
118
image:
12-
- Visual Studio 2017
13-
9+
- Visual Studio 2017
1410
environment:
11+
scoop: C:\projects\scoop
12+
scoop_home: C:\projects\scoop
13+
scoop_helpers: C:\projects\helpers
14+
lessmsi: '%scoop_helpers%\lessmsi\lessmsi.exe'
15+
innounp: '%scoop_helpers%\innounp\innounp.exe'
1516
matrix:
1617
- PowerShell: 5
1718
- PowerShell: 6
18-
1919
cache:
20-
- '%USERPROFILE%\Documents\WindowsPowerShell\Modules -> appveyor.yml'
21-
20+
- '%USERPROFILE%\Documents\WindowsPowerShell\Modules -> appveyor.yml, test\bin\*.ps1'
21+
- C:\projects\helpers -> appveyor.yml, test\bin\*.ps1
2222
matrix:
2323
fast_finish: true
24-
2524
for:
26-
- matrix:
27-
only:
28-
- PowerShell: 5
29-
install:
30-
- ps: .\test\bin\init.ps1
31-
test_script:
32-
- ps: .\test\bin\test.ps1
33-
- matrix:
34-
only:
35-
- PowerShell: 6
36-
install:
37-
- pwsh: .\test\bin\init.ps1
38-
test_script:
39-
- pwsh: .\test\bin\test.ps1
25+
- matrix:
26+
only:
27+
- PowerShell: 5
28+
install:
29+
- ps: . "$env:SCOOP_HOME\test\bin\init.ps1"
30+
test_script:
31+
- ps: . "$env:SCOOP_HOME\test\bin\test.ps1" -TestPath "$env:APPVEYOR_BUILD_FOLDER"
32+
- matrix:
33+
only:
34+
- PowerShell: 6
35+
install:
36+
- pwsh: . "$env:SCOOP_HOME\test\bin\init.ps1"
37+
test_script:
38+
- pwsh: . "$env:SCOOP_HOME\test\bin\test.ps1" -TestPath "$env:APPVEYOR_BUILD_FOLDER"

bin/checkhashes.ps1

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ param(
4242

4343
. "$PSScriptRoot\..\lib\core.ps1"
4444
. "$PSScriptRoot\..\lib\manifest.ps1"
45-
. "$PSScriptRoot\..\lib\config.ps1"
4645
. "$PSScriptRoot\..\lib\buckets.ps1"
4746
. "$PSScriptRoot\..\lib\autoupdate.ps1"
4847
. "$PSScriptRoot\..\lib\json.ps1"

bin/checkurls.ps1

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ param(
2828

2929
. "$PSScriptRoot\..\lib\core.ps1"
3030
. "$PSScriptRoot\..\lib\manifest.ps1"
31-
. "$PSScriptRoot\..\lib\config.ps1"
3231
. "$PSScriptRoot\..\lib\install.ps1"
3332

3433
$Dir = Resolve-Path $Dir

bin/checkver.ps1

+14-15
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,32 @@
1919
PS BUCKETROOT > .\bin\checkver.ps1
2020
Check all manifest inside default directory.
2121
.EXAMPLE
22-
PS BUCKETROOT > .\bin\checkver.ps1 -s
22+
PS BUCKETROOT > .\bin\checkver.ps1 -SkipUpdated
2323
Check all manifest inside default directory (list only outdated manifests).
2424
.EXAMPLE
25-
PS BUCKETROOT > .\bin\checkver.ps1 -u
25+
PS BUCKETROOT > .\bin\checkver.ps1 -Update
2626
Check all manifests and update All outdated manifests.
2727
.EXAMPLE
28-
PS BUCKETROOT > .\bin\checkver.ps1 MAN
29-
Check manifest MAN.json inside default directory.
28+
PS BUCKETROOT > .\bin\checkver.ps1 APP
29+
Check manifest APP.json inside default directory.
3030
.EXAMPLE
31-
PS BUCKETROOT > .\bin\checkver.ps1 MAN -u
32-
Check manifest MAN.json and update, if there is newer version.
31+
PS BUCKETROOT > .\bin\checkver.ps1 APP -Update
32+
Check manifest APP.json and update, if there is newer version.
3333
.EXAMPLE
34-
PS BUCKETROOT > .\bin\checkver.ps1 MAN -f
35-
Check manifest MAN.json and update, even if there is no new version.
34+
PS BUCKETROOT > .\bin\checkver.ps1 APP -ForceUpdate
35+
Check manifest APP.json and update, even if there is no new version.
3636
.EXAMPLE
37-
PS BUCKETROOT > .\bin\checkver.ps1 MAN -u -v VER
38-
Check manifest MAN.json and update, using version VER
37+
PS BUCKETROOT > .\bin\checkver.ps1 APP -Update -Version VER
38+
Check manifest APP.json and update, using version VER
3939
.EXAMPLE
40-
PS BUCKETROOT > .\bin\checkver.ps1 MAN DIR
41-
Check manifest MAN.json inside ./DIR directory.
40+
PS BUCKETROOT > .\bin\checkver.ps1 APP DIR
41+
Check manifest APP.json inside ./DIR directory.
4242
.EXAMPLE
4343
PS BUCKETROOT > .\bin\checkver.ps1 -Dir DIR
4444
Check all manifests inside ./DIR directory.
4545
.EXAMPLE
46-
PS BUCKETROOT > .\bin\checkver.ps1 MAN DIR -u
47-
Check manifest MAN.json inside ./DIR directory and update if there is newer version.
46+
PS BUCKETROOT > .\bin\checkver.ps1 APP DIR -Update
47+
Check manifest APP.json inside ./DIR directory and update if there is newer version.
4848
#>
4949
param(
5050
[String] $App = '*',
@@ -65,7 +65,6 @@ param(
6565

6666
. "$psscriptroot\..\lib\core.ps1"
6767
. "$psscriptroot\..\lib\manifest.ps1"
68-
. "$psscriptroot\..\lib\config.ps1"
6968
. "$psscriptroot\..\lib\buckets.ps1"
7069
. "$psscriptroot\..\lib\autoupdate.ps1"
7170
. "$psscriptroot\..\lib\json.ps1"

bin/install.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#Requires -Version 3
1+
#Requires -Version 5
22

33
# remote install:
44
# iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
55
$old_erroractionpreference = $erroractionpreference
66
$erroractionpreference = 'stop' # quit if anything goes wrong
77

8-
if(($PSVersionTable.PSVersion.Major) -lt 3) {
9-
Write-Output "PowerShell 3 or greater is required to run Scoop."
8+
if(($PSVersionTable.PSVersion.Major) -lt 5) {
9+
Write-Output "PowerShell 5 or later is required to run Scoop."
1010
Write-Output "Upgrade PowerShell: https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell"
1111
break
1212
}

bin/scoop.ps1

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ param($cmd)
33

44
set-strictmode -off
55

6-
. "$psscriptroot\..\lib\config.ps1"
76
. "$psscriptroot\..\lib\core.ps1"
87
. "$psscriptroot\..\lib\git.ps1"
98
. "$psscriptroot\..\lib\buckets.ps1"

bucket/7zip.json

-41
This file was deleted.

bucket/ack.json

-18
This file was deleted.

bucket/acmesharp.json

-11
This file was deleted.

bucket/adb.json

-18
This file was deleted.

bucket/ag.json

-31
This file was deleted.

bucket/ahoy.json

-15
This file was deleted.

0 commit comments

Comments
 (0)