From 2930637c716c6818d211f230da51723cbcca3863 Mon Sep 17 00:00:00 2001 From: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> Date: Tue, 14 Dec 2021 21:24:11 +0530 Subject: [PATCH 1/6] chore(config): Document all configuration options --- libexec/scoop-config.ps1 | 79 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 5 deletions(-) diff --git a/libexec/scoop-config.ps1 b/libexec/scoop-config.ps1 index c0fb6b39c5..0afd16fdad 100644 --- a/libexec/scoop-config.ps1 +++ b/libexec/scoop-config.ps1 @@ -18,13 +18,82 @@ # -------- # # proxy: [username:password@]host:port +# By default, Scoop will use the proxy settings from Internet Options, but with anonymous authentication. # -# By default, Scoop will use the proxy settings from Internet Options, but with anonymous authentication. +# * To use the credentials for the current logged-in user, use 'currentuser' in place of username:password +# * To use the system proxy settings configured in Internet Options, use 'default' in place of host:port +# * An empty or unset value for proxy is equivalent to 'default' (with no username or password) +# * To bypass the system proxy and connect directly, use 'none' (with no username or password) # -# * To use the credentials for the current logged-in user, use 'currentuser' in place of username:password -# * To use the system proxy settings configured in Internet Options, use 'default' in place of host:port -# * An empty or unset value for proxy is equivalent to 'default' (with no username or password) -# * To bypass the system proxy and connect directly, use 'none' (with no username or password) +# default-architecture: 64bit|32bit +# Allow to configure preferred architecture for application installation. +# If not specified, architecture is determined be system. +# +# 7ZIPEXTRACT_USE_EXTERNAL: $true|$false +# External 7zip (from path) will be used for archives extraction. +# +# MSIEXTRACT_USE_LESSMSI: $true|$false +# Prefer lessmsi utility over native msiexec. +# +# NO_JUNCTIONS: $true|$false +# The 'Current' version alias will not be used. Shims and shortcuts will point to specific version instead. +# +# debug: $true|$false +# Additional and detailed output will be shown. +# +# SCOOP_REPO: http://github.com/ScoopInstaller/Scoop +# Git repository containining scoop source code. +# This configuration is useful for custom forks. +# +# SCOOP_BRANCH: master|develop +# Allow to use different branch than master. +# Could be used for testing specific functionalities before released into all users. +# If you want to receive updates earlier to test new functionalities use develop (see: 'https://github.com/ScoopInstaller/Scoop/issues/2939') +# +# show_update_log: $true|$false +# Do not show changed commits on 'scoop update' +# +# manifest_review: $true|$false +# Displays the manifest of every app that's about to +# be installed, then asks user if they wish to proceed. +# +# checkver_token: +# GitHub API token used to make authenticated requests. +# This is essential for checkver and similar functions +# to run without incurring rate limits. +# +# virustotal_api_key: +# API key used for uploading/scanning files using virustotal. +# See: 'https://support.virustotal.com/hc/en-us/articles/115002088769-Please-give-me-an-API-key' +# +# ARIA2 configuration +# ------------------- +# +# aria2-enabled: $true|$false +# Aria2c will be used for downloading of artifacts. +# +# aria2-warning-enabled: $true|$false +# Disable Aria2c warning which is shown while downloading. +# +# aria2-retry-wait: 2 +# Number of seconds to wait between retries. +# See: 'https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-retry-wait' +# +# aria2-split: 5 +# Number of connections used for downlaod. +# See: 'https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-s' +# +# aria2-max-connection-per-server: 5 +# The maximum number of connections to one server for each download. +# See: 'https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-x' +# +# aria2-min-split-size: 5M +# Downloaded files will be splitted by this configured size and downloaded using multiple connections. +# See: 'https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-k' +# +# aria2-options: +# Array of additional aria2 options. +# See: 'https://aria2.github.io/manual/en/html/aria2c.html#options' param($name, $value) From 1ac77e5ff1219e8ab9ffbdc30a102c6a65fb87ca Mon Sep 17 00:00:00 2001 From: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> Date: Tue, 14 Dec 2021 21:26:24 +0530 Subject: [PATCH 2/6] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index fdb3a5eccf..904f296763 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,7 @@ You can tweak the following `aria2` settings with the `scoop config` command: - [aria2-split](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-s) (default: 5) - [aria2-max-connection-per-server](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-x) (default: 5) - [aria2-min-split-size](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-k) (default: 5M) +- [aria2-options](https://aria2.github.io/manual/en/html/aria2c.html#options) (default: ) ## Inspiration From 2092b3cfbc092e56bbf2de772ebf6cbb50ff2e2b Mon Sep 17 00:00:00 2001 From: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> Date: Wed, 15 Dec 2021 12:23:33 +0530 Subject: [PATCH 3/6] Update scoop-config.ps1 --- libexec/scoop-config.ps1 | 47 ++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/libexec/scoop-config.ps1 b/libexec/scoop-config.ps1 index 0afd16fdad..f498a7d847 100644 --- a/libexec/scoop-config.ps1 +++ b/libexec/scoop-config.ps1 @@ -17,18 +17,6 @@ # Settings # -------- # -# proxy: [username:password@]host:port -# By default, Scoop will use the proxy settings from Internet Options, but with anonymous authentication. -# -# * To use the credentials for the current logged-in user, use 'currentuser' in place of username:password -# * To use the system proxy settings configured in Internet Options, use 'default' in place of host:port -# * An empty or unset value for proxy is equivalent to 'default' (with no username or password) -# * To bypass the system proxy and connect directly, use 'none' (with no username or password) -# -# default-architecture: 64bit|32bit -# Allow to configure preferred architecture for application installation. -# If not specified, architecture is determined be system. -# # 7ZIPEXTRACT_USE_EXTERNAL: $true|$false # External 7zip (from path) will be used for archives extraction. # @@ -36,10 +24,7 @@ # Prefer lessmsi utility over native msiexec. # # NO_JUNCTIONS: $true|$false -# The 'Current' version alias will not be used. Shims and shortcuts will point to specific version instead. -# -# debug: $true|$false -# Additional and detailed output will be shown. +# The 'current' version alias will not be used. Shims and shortcuts will point to specific version instead. # # SCOOP_REPO: http://github.com/ScoopInstaller/Scoop # Git repository containining scoop source code. @@ -50,6 +35,24 @@ # Could be used for testing specific functionalities before released into all users. # If you want to receive updates earlier to test new functionalities use develop (see: 'https://github.com/ScoopInstaller/Scoop/issues/2939') # +# proxy: [username:password@]host:port +# By default, Scoop will use the proxy settings from Internet Options, but with anonymous authentication. +# +# * To use the credentials for the current logged-in user, use 'currentuser' in place of username:password +# * To use the system proxy settings configured in Internet Options, use 'default' in place of host:port +# * An empty or unset value for proxy is equivalent to 'default' (with no username or password) +# * To bypass the system proxy and connect directly, use 'none' (with no username or password) +# +# default-architecture: 64bit|32bit +# Allow to configure preferred architecture for application installation. +# If not specified, architecture is determined be system. +# +# debug: $true|$false +# Additional and detailed output will be shown. +# +# force-update: $true|$false +# Force apps updating to bucket's version. +# # show_update_log: $true|$false # Do not show changed commits on 'scoop update' # @@ -57,6 +60,18 @@ # Displays the manifest of every app that's about to # be installed, then asks user if they wish to proceed. # +# shim: kiennq|scoopcs|71 +# Choose scoop shim build. +# +# rootPath: +# Root path of scoop, default '$env:USERPROFILE\scoop'. +# +# globalPath: +# Global root path of scoop, default '$env:ProgramData\scoop'. +# +# cachePath: +# Cache path for downloads, default '$rootPath\cache'. +# # checkver_token: # GitHub API token used to make authenticated requests. # This is essential for checkver and similar functions From bf3ef9e7d2458da549147fc8f1f7943e1df198f4 Mon Sep 17 00:00:00 2001 From: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> Date: Sun, 19 Dec 2021 09:46:39 +0530 Subject: [PATCH 4/6] Update scoop-config.ps1 --- libexec/scoop-config.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/scoop-config.ps1 b/libexec/scoop-config.ps1 index f498a7d847..66cf06cbd8 100644 --- a/libexec/scoop-config.ps1 +++ b/libexec/scoop-config.ps1 @@ -70,7 +70,7 @@ # Global root path of scoop, default '$env:ProgramData\scoop'. # # cachePath: -# Cache path for downloads, default '$rootPath\cache'. +# For downloads, defaults to 'cache' folder under Scoop root directory. # # checkver_token: # GitHub API token used to make authenticated requests. From 2b844c732bf865bb7a23bb32c38c06c29d58447c Mon Sep 17 00:00:00 2001 From: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> Date: Mon, 20 Dec 2021 00:39:08 +0530 Subject: [PATCH 5/6] Update scoop-config.ps1 --- libexec/scoop-config.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/scoop-config.ps1 b/libexec/scoop-config.ps1 index 66cf06cbd8..c71e46498e 100644 --- a/libexec/scoop-config.ps1 +++ b/libexec/scoop-config.ps1 @@ -63,11 +63,11 @@ # shim: kiennq|scoopcs|71 # Choose scoop shim build. # -# rootPath: -# Root path of scoop, default '$env:USERPROFILE\scoop'. +# rootPath: $Env:UserProfile\scoop +# Path to Scoop root directory. # -# globalPath: -# Global root path of scoop, default '$env:ProgramData\scoop'. +# globalPath: $Env:ProgramData\scoop +# Path to Scoop root directory for global apps. # # cachePath: # For downloads, defaults to 'cache' folder under Scoop root directory. From 5e3dd663f8cac03fd573404350673e8a81e9309a Mon Sep 17 00:00:00 2001 From: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com> Date: Mon, 20 Dec 2021 12:33:28 +0530 Subject: [PATCH 6/6] Add env vars --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 904f296763..5565c7bf8d 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,22 @@ $env:SCOOP_GLOBAL='F:\GlobalScoopApps' # run the installer ``` +### Configure Scoop to store downloads to a Custom Directory by changing `SCOOP_CACHE` + +```powershell +$env:SCOOP_CACHE='F:\ScoopCache' +[Environment]::SetEnvironmentVariable('SCOOP_CACHE', $env:SCOOP_CACHE, 'Machine') +# run the installer +``` + +### Configure Scoop to use a GitHub API token during searching and checkver by setting `SCOOP_CHECKVER_TOKEN` + +```powershell +$env:SCOOP_CHECKVER_TOKEN='' +[Environment]::SetEnvironmentVariable('SCOOP_CHECKVER_TOKEN', $env:SCOOP_CHECKVER_TOKEN, 'Machine') +# search for an app +``` + ## [Documentation](https://github.com/ScoopInstaller/Scoop/wiki) ## Multi-connection downloads with `aria2`