Skip to content

Commit 592c449

Browse files
authored
Merge branch 'develop' into another-search-improvement
2 parents 14566fe + acc271d commit 592c449

7 files changed

Lines changed: 151 additions & 59 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
### Bug Fixes
1212

13+
- **shim:** Remove console window for GUI applications ([#5559](https://github.com/ScoopInstaller/Scoop/issues/5559))
1314
- **decompress:** Exclude '*.nsis' that may cause error ([#5294](https://github.com/ScoopInstaller/Scoop/issues/5294))
1415
- **autoupdate:** Fix file hash extraction ([#5295](https://github.com/ScoopInstaller/Scoop/issues/5295))
1516
- **getopt:** Stop split arguments in `getopt()` and ensure array by explicit arguments type ([#5326](https://github.com/ScoopInstaller/Scoop/issues/5326))
@@ -18,19 +19,24 @@
1819
- **core:** Fix `is_in_dir` under Unix ([#5391](https://github.com/ScoopInstaller/Scoop/issues/5391))
1920
- **core:** Rewrite config file when needed ([#5439](https://github.com/ScoopInstaller/Scoop/issues/5439))
2021
- **core:** Prevents leaking HTTP(S)_PROXY env vars to current sessions after Invoke-Git in parallel execution ([#5436](https://github.com/ScoopInstaller/Scoop/pull/5436))
21-
- **env:** Avoid automatic expansion of `%%` in env ([#5395](https://github.com/ScoopInstaller/Scoop/issues/5395), [#5452](https://github.com/ScoopInstaller/Scoop/pull/5452))
22+
- **core:** Handle scoop aliases and broken(edited,copied) shim ([#5551](https://github.com/ScoopInstaller/Scoop/issues/5551))
23+
- **env:** Avoid automatic expansion of `%%` in env ([#5395](https://github.com/ScoopInstaller/Scoop/issues/5395), [#5452](https://github.com/ScoopInstaller/Scoop/pull/5452), [#5631](https://github.com/ScoopInstaller/Scoop/pull/5631))
2224
- **install:** Fix download from private GitHub repositories ([#5361](https://github.com/ScoopInstaller/Scoop/issues/5361))
25+
- **install:** Avoid error when unlinking non-existent junction/hardlink ([#5552](https://github.com/ScoopInstaller/Scoop/issues/5552))
2326
- **scoop-info:** Fix errors in file size collection when `--verbose` ([#5352](https://github.com/ScoopInstaller/Scoop/pull/5352))
2427
- **shim:** Use bash executable directly ([#5433](https://github.com/ScoopInstaller/Scoop/issues/5433))
28+
- **core:** Avoid error messages when deleting non-existent environment variable ([#5547](https://github.com/ScoopInstaller/Scoop/issues/5547))
29+
- **core:** Use relative path as fallback of `$scoopdir` ([#5544](https://github.com/ScoopInstaller/Scoop/issues/5544))
2530
- **scoop-checkup:** Skip defender check in Windows Sandbox ([#5519](https://github.com/ScoopInstaller/Scoop/issues/5519))
2631
- **buckets:** Avoid error messages for unexpected dir ([#5549](https://github.com/ScoopInstaller/Scoop/issues/5549))
2732
- **scoop-virustotal:** Fix `scoop-virustotal` when `--all` has been passed without app ([#5593](https://github.com/ScoopInstaller/Scoop/pull/5593))
2833
- **scoop-checkup:** Change the message level of helpers from ERROR to WARN ([#5549](https://github.com/ScoopInstaller/Scoop/issues/5614))
29-
- **scoop-search:** Improve performance for local search ([#5324](https://github.com/ScoopInstaller/Scoop/issues/5324))
34+
- **scoop-(un)hold:** Correct output the messages when manifest not found, (already|not) held ([#5519](https://github.com/ScoopInstaller/Scoop/issues/5519))
3035

3136
### Performance Improvements
3237

3338
- **decompress:** Disable progress bar to improve `Expand-Archive` performance ([#5410](https://github.com/ScoopInstaller/Scoop/issues/5410))
39+
- **scoop-search:** Improve performance for local search ([#5324](https://github.com/ScoopInstaller/Scoop/issues/5324))
3440

3541
### Code Refactoring
3642

@@ -52,6 +58,7 @@
5258
### Documentation
5359

5460
- **scoop-info:** Fix help message([#5445](https://github.com/ScoopInstaller/Scoop/issues/5445))
61+
- **readme:** Improve documentation language ([#5638](https://github.com/ScoopInstaller/Scoop/issues/5638))
5562

5663
## [v0.3.1](https://github.com/ScoopInstaller/Scoop/compare/v0.3.0...v0.3.1) - 2022-11-15
5764

README.md

Lines changed: 54 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
<p align="center">
1+
<h1 align="center">Scoop</h1>
2+
23
<!--<img src="scoop.png" alt="Long live Scoop!"/>-->
3-
<h1 align="center">Scoop</h1>
4-
</p>
54
<p align="center">
6-
<b><a href="https://github.com/ScoopInstaller/Scoop#what-does-scoop-do">Features</a></b>
7-
|
8-
<b><a href="https://github.com/ScoopInstaller/Scoop#installation">Installation</a></b>
9-
|
10-
<b><a href="https://github.com/ScoopInstaller/Scoop/wiki">Documentation</a></b>
5+
<a href="https://github.com/ScoopInstaller/Scoop#what-does-scoop-do">Features</a>
6+
|
7+
<a href="https://github.com/ScoopInstaller/Scoop#installation">Installation</a>
8+
|
9+
<a href="https://github.com/ScoopInstaller/Scoop/wiki">Documentation</a>
1110
</p>
1211

13-
- - -
14-
<p align="center" >
12+
---
13+
14+
<p align="center">
1515
<a href="https://github.com/ScoopInstaller/Scoop">
1616
<img src="https://img.shields.io/github/languages/code-size/ScoopInstaller/Scoop.svg" alt="Code Size" />
1717
</a>
@@ -36,43 +36,48 @@ Scoop is a command-line installer for Windows.
3636

3737
## What does Scoop do?
3838

39-
Scoop installs programs from the command line with a minimal amount of friction. It:
39+
Scoop installs apps from the command line with a minimal amount of friction. It:
4040

41-
- Eliminates permission popup windows
42-
- Hides GUI wizard-style installers
43-
- Prevents PATH pollution from installing lots of programs
44-
- Avoids unexpected side-effects from installing and uninstalling programs
45-
- Finds and installs dependencies automatically
46-
- Performs all the extra setup steps itself to get a working program
41+
- Eliminates [User Account Control](https://learn.microsoft.com/windows/security/application-security/application-control/user-account-control/) (UAC) prompt notifications.
42+
- Hides the graphical user interface (GUI) of wizard-style installers.
43+
- Prevents polluting the `PATH` environment variable. Normally, this variable gets cluttered as different apps are installed on the device.
44+
- Avoids unexpected side effects from installing and uninstalling apps.
45+
- Resolves and installs dependencies automatically.
46+
- Performs all the necessary steps to get an app to a working state.
4747

48-
Scoop is very scriptable, so you can run repeatable setups to get your environment just the way you like, e.g.:
48+
Scoop is quite script-friendly. Your environment can become the way you like by using repeatable setups. For example:
4949

50-
```powershell
50+
```console
5151
scoop install sudo
5252
sudo scoop install 7zip git openssh --global
5353
scoop install aria2 curl grep sed less touch
5454
scoop install python ruby go perl
5555
```
5656

57-
If you've built software that you'd like others to use, Scoop is an alternative to building an installer (e.g. MSI or InnoSetup) — you just need to zip your program and provide a JSON manifest that describes how to install it.
57+
If you have built software that you would like others to use, Scoop is an alternative to building an installer (like MSI or InnoSetup). You just need to compress your app to a `.zip` file and provide a JSON manifest that describes how to install it.
5858

5959
## Installation
6060

61-
Run the following command from a **non-admin** PowerShell to install scoop to its default location `C:\Users\<YOUR USERNAME>\scoop`.
61+
Run the following commands from a regular (non-admin) PowerShell terminal to install Scoop:
6262

6363
```powershell
64-
iwr -useb get.scoop.sh | iex
64+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
65+
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
6566
```
6667

67-
Advanced installation instruction and full documentation of the installer are available in [ScoopInstaller/Install](https://github.com/ScoopInstaller/Install). Please create new issues there if you have questions about the installation.
68+
**Note**: The first command makes your device allow running the installation and management scripts. This is necessary because Windows 10 client devices restrict execution of any PowerShell scripts by default.
6869

69-
## [Documentation](https://github.com/ScoopInstaller/Scoop/wiki)
70+
It will install Scoop to its default location:
71+
72+
`C:\Users\<YOUR USERNAME>\scoop`
73+
74+
You can find the complete documentation about the installer, including advanced installation configurations, in [ScoopInstaller/Install](https://github.com/ScoopInstaller/Install). Please create new issues there if you have questions about the installation.
7075

7176
## Multi-connection downloads with `aria2`
7277

7378
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.
7479

75-
```powershell
80+
```console
7681
scoop install aria2
7782
```
7883

@@ -90,54 +95,54 @@ You can tweak the following `aria2` settings with the `scoop config` command:
9095

9196
## Inspiration
9297

93-
- [Homebrew](http://mxcl.github.io/homebrew/)
94-
- [sub](https://github.com/37signals/sub#readme)
98+
- [Homebrew](https://brew.sh/)
99+
- [Sub](https://signalvnoise.com/posts/3264-automating-with-convention-introducing-sub)
95100

96101
## What sort of apps can Scoop install?
97102

98-
The apps that install best with Scoop are commonly called "portable" apps: i.e. compressed program files that run stand-alone when extracted and don't have side-effects like changing the registry or putting files outside the program directory.
99-
100-
Since installers are common, Scoop supports them too (and their uninstallers).
103+
The apps that are most likely to get installed fine with Scoop are those referred to as "portable" apps. These apps are compressed files which can run standalone after being extracted. This type of apps does not produce side effects like changing the Windows Registry or placing files outside the app directory.
101104

102-
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/ScoopInstaller/Main/blob/master/bucket/runat.json) package for an example: it's really just a GitHub gist.
105+
Scoop also supports installer files and their uninstallation methods. Likewise, it can handle single-file apps and PowerShell scripts. These do not even need to be compressed. See the [runat](https://github.com/ScoopInstaller/Main/blob/master/bucket/runat.json) package for an example: it is simply a GitHub gist.
103106

104107
### Contribute to this project
105108

106-
If you'd like to improve Scoop by adding features or fixing bugs, please read our [Contributing Guide](https://github.com/ScoopInstaller/.github/blob/main/.github/CONTRIBUTING.md).
109+
If you would like to improve Scoop by adding features or fixing bugs, please read our [Contributing Guide](https://github.com/ScoopInstaller/.github/blob/main/.github/CONTRIBUTING.md).
107110

108111
### Support this project
109112

110-
If you find Scoop useful and would like to support ongoing development and maintenance, here's how:
113+
If you find Scoop useful and would like to support the ongoing development and maintenance of this project, you can donate here:
111114

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

114117
## Known application buckets
115118

116-
The following buckets are known to scoop:
119+
The following buckets are known to Scoop:
117120

118-
- [main](https://github.com/ScoopInstaller/Main) - Default bucket for the most common (mostly CLI) apps
119-
- [extras](https://github.com/ScoopInstaller/Extras) - Apps that don't fit the main bucket's [criteria](https://github.com/ScoopInstaller/Scoop/wiki/Criteria-for-including-apps-in-the-main-bucket)
120-
- [games](https://github.com/Calinou/scoop-games) - Open source/freeware games and game-related tools
121-
- [nerd-fonts](https://github.com/matthewjberger/scoop-nerd-fonts) - Nerd Fonts
122-
- [nirsoft](https://github.com/ScoopInstaller/Nirsoft) - Almost all of the 280+ apps from [Nirsoft](https://nirsoft.net)
123-
- [sysinternals](https://github.com/niheaven/scoop-sysinternals) - Sysinternals Suite and all individual applications from [Microsoft](https://learn.microsoft.com/sysinternals/)
124-
- [java](https://github.com/ScoopInstaller/Java) - A collection of Java development kits (JDKs), Java runtime engines (JREs), Java's virtual machine debugging tools and Java based runtime engines.
125-
- [nonportable](https://github.com/ScoopInstaller/Nonportable) - Non-portable apps (may require UAC/Administrator rights)
126-
- [php](https://github.com/ScoopInstaller/PHP) - Installers for most versions of PHP
127-
- [versions](https://github.com/ScoopInstaller/Versions) - Alternative versions of apps found in other buckets
121+
- [main](https://github.com/ScoopInstaller/Main) - Default bucket which contains popular non-GUI apps.
122+
- [extras](https://github.com/ScoopInstaller/Extras) - Apps that do not fit the main bucket's [criteria](https://github.com/ScoopInstaller/Scoop/wiki/Criteria-for-including-apps-in-the-main-bucket).
123+
- [games](https://github.com/Calinou/scoop-games) - Open-source and freeware video games and game-related tools.
124+
- [nerd-fonts](https://github.com/matthewjberger/scoop-nerd-fonts) - Nerd Fonts.
125+
- [nirsoft](https://github.com/ScoopInstaller/Nirsoft) - A collection of over 250+ apps from [Nirsoft](https://nirsoft.net).
126+
- [sysinternals](https://github.com/niheaven/scoop-sysinternals) - The Sysinternals suite from [Microsoft](https://learn.microsoft.com/sysinternals/).
127+
- [java](https://github.com/ScoopInstaller/Java) - A collection of Java development kits (JDKs) and Java runtime engines (JREs), Java's virtual machine debugging tools and Java based runtime engines.
128+
- [nonportable](https://github.com/ScoopInstaller/Nonportable) - Non-portable apps (may trigger UAC prompts).
129+
- [php](https://github.com/ScoopInstaller/PHP) - Installers for most versions of PHP.
130+
- [versions](https://github.com/ScoopInstaller/Versions) - Alternative versions of apps found in other buckets.
128131

129-
The main bucket is installed by default. To add any of the other buckets, type:
132+
The `main` bucket is installed by default. You can make use of more buckets by typing:
130133

131134
```console
132-
scoop bucket add bucketname
135+
scoop bucket add <name>
133136
```
134137

135-
For example, to add the extras bucket, type:
138+
For example, to add the `extras` bucket, type:
136139

137140
```console
138141
scoop bucket add extras
139142
```
140143

144+
You would be able to install apps from the `extras` bucket now.
145+
141146
## Other application buckets
142147

143-
Many other application buckets hosted on Github can be found in the [Scoop Directory](https://rasa.github.io/scoop-directory/) or via [other search engines](https://rasa.github.io/scoop-directory/#other-search-engines).
148+
Many other application buckets hosted on GitHub can be found on [ScoopSearch](https://scoop.sh/) or via [other search engines](https://rasa.github.io/scoop-directory/#other-search-engines).

lib/core.ps1

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
# Returns the subsystem of the EXE
2+
function Get-Subsystem($filePath) {
3+
try {
4+
$fileStream = [System.IO.FileStream]::new($filePath, [System.IO.FileMode]::Open, [System.IO.FileAccess]::Read)
5+
$binaryReader = [System.IO.BinaryReader]::new($fileStream)
6+
} catch {
7+
return -1 # leave the subsystem part silently
8+
}
9+
10+
try {
11+
$fileStream.Seek(0x3C, [System.IO.SeekOrigin]::Begin) | Out-Null
12+
$peOffset = $binaryReader.ReadInt32()
13+
14+
$fileStream.Seek($peOffset, [System.IO.SeekOrigin]::Begin) | Out-Null
15+
$fileHeaderOffset = $fileStream.Position
16+
17+
$fileStream.Seek(18, [System.IO.SeekOrigin]::Current) | Out-Null
18+
$fileStream.Seek($fileHeaderOffset + 0x5C, [System.IO.SeekOrigin]::Begin) | Out-Null
19+
20+
return $binaryReader.ReadInt16()
21+
} finally {
22+
$binaryReader.Close()
23+
$fileStream.Close()
24+
}
25+
}
26+
27+
function Change-Subsystem($filePath, $targetSubsystem) {
28+
try {
29+
$fileStream = [System.IO.FileStream]::new($filePath, [System.IO.FileMode]::Open, [System.IO.FileAccess]::ReadWrite)
30+
$binaryReader = [System.IO.BinaryReader]::new($fileStream)
31+
$binaryWriter = [System.IO.BinaryWriter]::new($fileStream)
32+
} catch {
33+
Write-Output "Error opening File:'$filePath'"
34+
return
35+
}
36+
37+
try {
38+
$fileStream.Seek(0x3C, [System.IO.SeekOrigin]::Begin) | Out-Null
39+
$peOffset = $binaryReader.ReadInt32()
40+
41+
$fileStream.Seek($peOffset, [System.IO.SeekOrigin]::Begin) | Out-Null
42+
$fileHeaderOffset = $fileStream.Position
43+
44+
$fileStream.Seek(18, [System.IO.SeekOrigin]::Current) | Out-Null
45+
$fileStream.Seek($fileHeaderOffset + 0x5C, [System.IO.SeekOrigin]::Begin) | Out-Null
46+
47+
$binaryWriter.Write([System.Int16] $targetSubsystem)
48+
} finally {
49+
$binaryReader.Close()
50+
$fileStream.Close()
51+
}
52+
}
53+
154
function Optimize-SecurityProtocol {
255
# .NET Framework 4.7+ has a default security protocol called 'SystemDefault',
356
# which allows the operating system to choose the best protocol to use.
@@ -416,7 +469,10 @@ function Get-CommandPath {
416469
} catch {
417470
return $null
418471
}
419-
$commandPath = if ($comm.Path -like "$userShims*" -or $comm.Path -like "$globalShims*") {
472+
$commandPath = if ($comm.Path -like "$userShims\scoop-*.ps1") {
473+
# Scoop aliases
474+
$comm.Source
475+
} elseif ($comm.Path -like "$userShims*" -or $comm.Path -like "$globalShims*") {
420476
Get-ShimTarget ($comm.Path -replace '\.exe$', '.shim')
421477
} elseif ($comm.CommandType -eq 'Application') {
422478
$comm.Source
@@ -698,7 +754,8 @@ function env($name, $global, $val = '__get') {
698754
$RegistryValueOption = [Microsoft.Win32.RegistryValueOptions]::DoNotExpandEnvironmentNames
699755
$EnvRegisterKey.GetValue($name, $null, $RegistryValueOption)
700756
} elseif ($val -eq $null) {
701-
$EnvRegisterKey.DeleteValue($name)
757+
try { $EnvRegisterKey.DeleteValue($name) } catch { }
758+
Publish-Env
702759
} else {
703760
$RegistryValueKind = if ($val.Contains('%')) {
704761
[Microsoft.Win32.RegistryValueKind]::ExpandString
@@ -793,7 +850,7 @@ function Get-ShimTarget($ShimPath) {
793850
if (!$shimTarget) {
794851
$shimTarget = ((Select-String -Path $ShimPath -Pattern '[''"]([^@&]*?)[''"]' -AllMatches).Matches.Groups | Select-Object -Last 1).Value
795852
}
796-
$shimTarget | Convert-Path
853+
$shimTarget | Convert-Path -ErrorAction SilentlyContinue
797854
}
798855
}
799856

@@ -838,6 +895,13 @@ function shim($path, $global, $name, $arg) {
838895
if ($arg) {
839896
Write-Output "args = $arg" | Out-UTF8File "$shim.shim" -Append
840897
}
898+
899+
$target_subsystem = Get-Subsystem $resolved_path
900+
901+
if (($target_subsystem -ne 3) -and ($target_subsystem -ge 0)) { # Subsystem -eq 3 means `Console`, -ge 0 to ignore
902+
Write-Output "Making $shim.exe a GUI binary."
903+
Change-Subsystem "$shim.exe" $target_subsystem
904+
}
841905
} elseif ($path -match '\.(bat|cmd)$') {
842906
# shim .bat, .cmd so they can be used by programs with no awareness of PSH
843907
warn_on_overwrite "$shim.cmd" $path
@@ -1382,7 +1446,7 @@ if ($scoopConfig -and $scoopConfig.PSObject.Properties.Name -contains 'lastUpdat
13821446
# END NOTE
13831447

13841448
# Scoop root directory
1385-
$scoopdir = $env:SCOOP, (get_config ROOT_PATH), "$([System.Environment]::GetFolderPath('UserProfile'))\scoop" | Where-Object { -not [String]::IsNullOrEmpty($_) } | Select-Object -First 1
1449+
$scoopdir = $env:SCOOP, (get_config ROOT_PATH), (Resolve-Path "$PSScriptRoot\..\..\..\.."), "$([System.Environment]::GetFolderPath('UserProfile'))\scoop" | Where-Object { -not [String]::IsNullOrEmpty($_) } | Select-Object -First 1
13861450

13871451
# Scoop global apps directory
13881452
$globaldir = $env:SCOOP_GLOBAL, (get_config GLOBAL_PATH), "$([System.Environment]::GetFolderPath('CommonApplicationData'))\scoop" | Where-Object { -not [String]::IsNullOrEmpty($_) } | Select-Object -First 1

lib/install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ function unlink_persist_data($manifest, $dir) {
11851185
if ($persist) {
11861186
@($persist) | ForEach-Object {
11871187
$source, $null = persist_def $_
1188-
$source = Get-Item "$dir\$source"
1188+
$source = Get-Item "$dir\$source" -ErrorAction SilentlyContinue
11891189
if ($source.LinkType) {
11901190
$source_path = $source.FullName
11911191
# directory (junction)

0 commit comments

Comments
 (0)