Skip to content

Commit

Permalink
Bucket extraction and refactoring (ScoopInstaller#3449)
Browse files Browse the repository at this point in the history
- The main bucket of Scoop has been separated to https://github.com/ScoopInstaller/Main
- Requires PowerShell 5 and newer ScoopInstaller#3330
- Improve and refactor decompression functions ScoopInstaller#3204 ScoopInstaller#3409 ScoopInstaller#3411
- Move scoop config from `~\.scoop` to `~\.config\scoop\config.json` ScoopInstaller#3242
- Add `scoop hold` and `scoop unhold` for excluding programs from updates ScoopInstaller#3444
- Refactored some Core functions ScoopInstaller#3314 ScoopInstaller#3416
- Small fix for starting processes on Windows 7 ScoopInstaller#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>
  • Loading branch information
4 people authored May 12, 2019
2 parents f1f8649 + d006fb9 commit 71f5044
Show file tree
Hide file tree
Showing 506 changed files with 827 additions and 14,524 deletions.
39 changes: 22 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ Scoop is a command-line installer for Windows.
## What does Scoop do?

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

- Permission popup windows
- GUI wizard-style installers
- Path pollution from installing lots of programs
- Unexpected side-effects from installing and uninstalling programs
- The need to find and install dependencies
- The need to perform extra setup steps to get a working program

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

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

## Requirements

* Windows 7 SP1+ / Windows Server 2008+
* [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)
* PowerShell must be enabled for your user account e.g. `set-executionpolicy remotesigned -s currentuser`
- Windows 7 SP1+ / Windows Server 2008+
- [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)
- PowerShell must be enabled for your user account e.g. `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`

## Installation

Run this command from your PowerShell to install scoop to its default location (`C:\Users\<user>\scoop`)

```powershell
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
```
Expand All @@ -74,23 +76,27 @@ The default setup is configured so all user installed programs and Scoop itself
Globally installed programs (`--global`) live in `C:\ProgramData\scoop`.
These settings can be changed through environment variables.

#### Install Scoop to a Custom Directory
### Install Scoop to a Custom Directory

```powershell
[environment]::setEnvironmentVariable('SCOOP','D:\Applications\Scoop','User')
$env:SCOOP='D:\Applications\Scoop'
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
```

#### Configure Scoop to install global programs to a Custom Directory
### Configure Scoop to install global programs to a Custom Directory

```powershell
[environment]::setEnvironmentVariable('SCOOP_GLOBAL','F:\GlobalScoopApps','Machine')
$env:SCOOP_GLOBAL='F:\GlobalScoopApps'
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')
```

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

## Multi-connection downloads with `aria2`

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.

```powershell
scoop install aria2
```
Expand All @@ -105,8 +111,8 @@ You can tweak the following `aria2` settings with the `scoop config` command:

## Inspiration

* [Homebrew](http://mxcl.github.io/homebrew/)
* [sub](https://github.com/37signals/sub#readme)
- [Homebrew](http://mxcl.github.io/homebrew/)
- [sub](https://github.com/37signals/sub#readme)

## What sort of apps can Scoop install?

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

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.


### Support this project

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

* [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DM2SUH9EUXSKJ) (one-time donation)
- [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DM2SUH9EUXSKJ) (one-time donation)
45 changes: 22 additions & 23 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
version: "{build}-{branch}"

branches:
except:
- gh-pages

build: off
deploy: off
clone_depth: 49

image:
- Visual Studio 2017

- Visual Studio 2017
environment:
scoop: C:\projects\scoop
scoop_home: C:\projects\scoop
scoop_helpers: C:\projects\helpers
lessmsi: '%scoop_helpers%\lessmsi\lessmsi.exe'
innounp: '%scoop_helpers%\innounp\innounp.exe'
matrix:
- PowerShell: 5
- PowerShell: 6

cache:
- '%USERPROFILE%\Documents\WindowsPowerShell\Modules -> appveyor.yml'

- '%USERPROFILE%\Documents\WindowsPowerShell\Modules -> appveyor.yml, test\bin\*.ps1'
- C:\projects\helpers -> appveyor.yml, test\bin\*.ps1
matrix:
fast_finish: true

for:
- matrix:
only:
- PowerShell: 5
install:
- ps: .\test\bin\init.ps1
test_script:
- ps: .\test\bin\test.ps1
- matrix:
only:
- PowerShell: 6
install:
- pwsh: .\test\bin\init.ps1
test_script:
- pwsh: .\test\bin\test.ps1
- matrix:
only:
- PowerShell: 5
install:
- ps: . "$env:SCOOP_HOME\test\bin\init.ps1"
test_script:
- ps: . "$env:SCOOP_HOME\test\bin\test.ps1" -TestPath "$env:APPVEYOR_BUILD_FOLDER"
- matrix:
only:
- PowerShell: 6
install:
- pwsh: . "$env:SCOOP_HOME\test\bin\init.ps1"
test_script:
- pwsh: . "$env:SCOOP_HOME\test\bin\test.ps1" -TestPath "$env:APPVEYOR_BUILD_FOLDER"
1 change: 0 additions & 1 deletion bin/checkhashes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ param(

. "$PSScriptRoot\..\lib\core.ps1"
. "$PSScriptRoot\..\lib\manifest.ps1"
. "$PSScriptRoot\..\lib\config.ps1"
. "$PSScriptRoot\..\lib\buckets.ps1"
. "$PSScriptRoot\..\lib\autoupdate.ps1"
. "$PSScriptRoot\..\lib\json.ps1"
Expand Down
1 change: 0 additions & 1 deletion bin/checkurls.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ param(

. "$PSScriptRoot\..\lib\core.ps1"
. "$PSScriptRoot\..\lib\manifest.ps1"
. "$PSScriptRoot\..\lib\config.ps1"
. "$PSScriptRoot\..\lib\install.ps1"

$Dir = Resolve-Path $Dir
Expand Down
29 changes: 14 additions & 15 deletions bin/checkver.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,32 @@
PS BUCKETROOT > .\bin\checkver.ps1
Check all manifest inside default directory.
.EXAMPLE
PS BUCKETROOT > .\bin\checkver.ps1 -s
PS BUCKETROOT > .\bin\checkver.ps1 -SkipUpdated
Check all manifest inside default directory (list only outdated manifests).
.EXAMPLE
PS BUCKETROOT > .\bin\checkver.ps1 -u
PS BUCKETROOT > .\bin\checkver.ps1 -Update
Check all manifests and update All outdated manifests.
.EXAMPLE
PS BUCKETROOT > .\bin\checkver.ps1 MAN
Check manifest MAN.json inside default directory.
PS BUCKETROOT > .\bin\checkver.ps1 APP
Check manifest APP.json inside default directory.
.EXAMPLE
PS BUCKETROOT > .\bin\checkver.ps1 MAN -u
Check manifest MAN.json and update, if there is newer version.
PS BUCKETROOT > .\bin\checkver.ps1 APP -Update
Check manifest APP.json and update, if there is newer version.
.EXAMPLE
PS BUCKETROOT > .\bin\checkver.ps1 MAN -f
Check manifest MAN.json and update, even if there is no new version.
PS BUCKETROOT > .\bin\checkver.ps1 APP -ForceUpdate
Check manifest APP.json and update, even if there is no new version.
.EXAMPLE
PS BUCKETROOT > .\bin\checkver.ps1 MAN -u -v VER
Check manifest MAN.json and update, using version VER
PS BUCKETROOT > .\bin\checkver.ps1 APP -Update -Version VER
Check manifest APP.json and update, using version VER
.EXAMPLE
PS BUCKETROOT > .\bin\checkver.ps1 MAN DIR
Check manifest MAN.json inside ./DIR directory.
PS BUCKETROOT > .\bin\checkver.ps1 APP DIR
Check manifest APP.json inside ./DIR directory.
.EXAMPLE
PS BUCKETROOT > .\bin\checkver.ps1 -Dir DIR
Check all manifests inside ./DIR directory.
.EXAMPLE
PS BUCKETROOT > .\bin\checkver.ps1 MAN DIR -u
Check manifest MAN.json inside ./DIR directory and update if there is newer version.
PS BUCKETROOT > .\bin\checkver.ps1 APP DIR -Update
Check manifest APP.json inside ./DIR directory and update if there is newer version.
#>
param(
[String] $App = '*',
Expand All @@ -65,7 +65,6 @@ param(

. "$psscriptroot\..\lib\core.ps1"
. "$psscriptroot\..\lib\manifest.ps1"
. "$psscriptroot\..\lib\config.ps1"
. "$psscriptroot\..\lib\buckets.ps1"
. "$psscriptroot\..\lib\autoupdate.ps1"
. "$psscriptroot\..\lib\json.ps1"
Expand Down
6 changes: 3 additions & 3 deletions bin/install.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#Requires -Version 3
#Requires -Version 5

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

if(($PSVersionTable.PSVersion.Major) -lt 3) {
Write-Output "PowerShell 3 or greater is required to run Scoop."
if(($PSVersionTable.PSVersion.Major) -lt 5) {
Write-Output "PowerShell 5 or later is required to run Scoop."
Write-Output "Upgrade PowerShell: https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell"
break
}
Expand Down
1 change: 0 additions & 1 deletion bin/scoop.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ param($cmd)

set-strictmode -off

. "$psscriptroot\..\lib\config.ps1"
. "$psscriptroot\..\lib\core.ps1"
. "$psscriptroot\..\lib\git.ps1"
. "$psscriptroot\..\lib\buckets.ps1"
Expand Down
41 changes: 0 additions & 41 deletions bucket/7zip.json

This file was deleted.

18 changes: 0 additions & 18 deletions bucket/ack.json

This file was deleted.

11 changes: 0 additions & 11 deletions bucket/acmesharp.json

This file was deleted.

18 changes: 0 additions & 18 deletions bucket/adb.json

This file was deleted.

31 changes: 0 additions & 31 deletions bucket/ag.json

This file was deleted.

15 changes: 0 additions & 15 deletions bucket/ahoy.json

This file was deleted.

Loading

0 comments on commit 71f5044

Please sign in to comment.