Leon Yu
0f4a41a4ec
core: Make shim support PowerShell 2.0 ( #2562 )
...
PowerShell on Windows comes with both 2.0 and 3.0+ installed. This is a feature inherited from .NET -- PowerShell 2.0 is based on .NET 2.0 which is installed side-by-side with .NET 3.0-4.7. It is possible to run PowerShell 2.0 by invoking the command powershell.exe -Version 2.0 -NoProfile.
This is a fairly useful feature for PowerShell scripters, as one can use PowerShell 2.0 to check for the basic compatibility of scripts without having to run a VM. As such, a user can have scoop apps installed via PowerShell 3.0+, and then launch PowerShell 2.0 for casual testing.
Currently the scoop shims are broken in PowerShell 2.0, as they use $PSScriptRoot. In addition, since PowerShell picks up {command}.ps1 before {command}.exe when looking for {command}, this makes using scoop-installed app difficult in PowerShell 2.0.
While Scoop command itself doesn't support PowerShell 2.0, and there is no point in doing so, it is fairly easy to make the shims support PowerShell 2.0, so this is what this patch does.
2018-09-05 12:14:22 +02:00
Richard Kuhnt
f374924ab6
install/core: add function for extracting magic bytes
2018-09-04 14:34:29 +02:00
Richard Kuhnt
2ad547477b
autoupdate: Fix metalink hash extraction
2018-09-04 14:21:39 +02:00
Richard Kuhnt
fc938db7b1
Save install.json as UTF-8
2018-09-02 16:32:47 +02:00
Grigory
f46131a798
Fix PowerShell core crash due to '-Encoding byte' being replaced with '-AsByteStream' ( #2554 )
2018-09-02 12:27:21 +02:00
Chawye Hsu
7697ba4ba8
feature(scoop-info): support url manifest ( #2538 )
2018-08-27 16:51:18 +02:00
Richard Kuhnt
1a2598bc30
Fix condition for persist_permission() again
2018-08-27 14:15:58 +02:00
Richard Kuhnt
eb7b7cbf4f
Fix condition for persist_permission()
2018-08-27 11:26:05 +02:00
Retia-Adolf
fc1c2a6ac3
Set file write permission to global persist dir ( #2524 )
2018-08-26 15:37:42 +02:00
Richard Kuhnt
ecf627c3b8
Allow simple metalink and meta4 hash extraction
2018-08-14 19:00:58 +02:00
Richard Kuhnt
2224da82f8
Allow extraction of nupkg files with 7zip
2018-08-09 19:23:06 +02:00
x-kej
77a2769ace
Catch unzip failures from bad file names (like ../file.exe) ( #2472 )
2018-08-08 20:36:28 +02:00
Mathias Hermansson
cd33a9e31e
Change sf regex not to break some manifests. Fixes #2474 ( #2476 )
2018-08-08 20:34:54 +02:00
Richard Kuhnt
f3ddf0c0f8
Allow $dir, $original_dir and $persist_dir substitutions for shortcuts
2018-08-08 20:13:03 +02:00
Richard Kuhnt
bf54a978a1
Add option to indent debug output
2018-08-08 11:48:58 +02:00
Richard Kuhnt
55ce0c0b0c
Check if 7zip installed via Scoop instead of using 7z.exe from PATH
2018-08-08 11:06:35 +02:00
Richard Kuhnt
0f4640168d
Refactor aria2_path() to file_path()
2018-08-08 11:06:20 +02:00
Richard Kuhnt
6251b91e8f
Fix aria2c command for path with spaces
2018-08-08 10:56:38 +02:00
Richard Kuhnt
ab5ef333fd
Remove double hash check (bug introduced with aria2 feature)
2018-08-07 22:47:00 +02:00
Richard Kuhnt
ff1d7972ed
Add aria2_enabled function
2018-08-07 20:11:38 +02:00
Richard Kuhnt
70ba901ce7
Add sourceforge fix
2018-08-07 20:11:38 +02:00
Richard Kuhnt
f181ab291b
Move referer and dir option to input file
2018-08-07 20:11:38 +02:00
Richard Kuhnt
ad6b9ccd52
Add aria2 proxy support
2018-08-07 20:11:38 +02:00
Richard Kuhnt
a31fa94b87
Add aria2-options config value for custom options
2018-08-07 20:11:38 +02:00
Richard Kuhnt
3183f0052f
Make aria2 settings configurable and ignore aria2.conf
2018-08-07 20:11:38 +02:00
Richard Kuhnt
23ae5e348e
Add default value to get_config()
2018-08-07 20:11:38 +02:00
Richard Kuhnt
7518646d16
Add referer and cookie support
2018-08-07 20:11:38 +02:00
Richard Kuhnt
75aa99370f
Change color for normal output to gray
2018-08-07 20:11:38 +02:00
Richard Kuhnt
aab922dc07
Add aria2 exit code translation
2018-08-07 20:11:38 +02:00
Richard Kuhnt
609c8f4104
Fix download complete detection for different languages
2018-08-07 20:11:38 +02:00
Richard Kuhnt
f901911132
Fix global aria2 detection
2018-08-07 20:11:38 +02:00
Richard Kuhnt
38bdaec440
Use aria2c to support multi-connection downloads
2018-08-07 20:11:38 +02:00
Richard Kuhnt
ba94d2bc2e
Reshape Sourceforge.net URLs to avoid redirections
2018-08-07 20:11:38 +02:00
Richard Kuhnt
b463b15b8d
Add aria2 helper functions
2018-08-07 20:11:38 +02:00
Richard Kuhnt
4d61905125
Add some colors to installation output
2018-08-07 20:11:38 +02:00
Richard Kuhnt
e8af15cc06
Store last update time as String ( fixes #2239 )
...
Prevents problems with PowerShell 5 and 6 using different methods to store dates in JSON
2018-08-07 19:56:43 +02:00
Chawye Hsu
3201c5714d
Support persisting files without a file extension ( #2408 )
2018-08-05 11:15:31 +02:00
Ardelean Călin Petru
f8c0ca7e9a
Removed the bucket from the app name when checking directories. ( #2435 )
...
* Removed the bucket from the app name when checking directories.
* Smarter solution suggested by the review.
2018-07-29 21:45:53 +02:00
Richard Kuhnt
5d56f8ff57
format_hash(): format hashes to lowercase
2018-07-29 21:36:56 +02:00
Richard Kuhnt
88040972a3
Fix null reference error when no buckets are configured ( fixes #2427 )
2018-07-29 13:50:34 +02:00
Brandon Smith
f011f249e1
Normalize multi-line strings to string arrays on format ( #2444 )
2018-07-29 13:24:28 +02:00
Nick Budidharma
c98fc17479
Update strip_filename skips ( #2401 )
...
Portableapps.com has switched to portableapps.duckduckgo.com as their freeware host and skipping strip_filename is no longer required.
Remove downloads subdomain from sourceforge.net to allow mirror redirect urls (e.g. https://sourceforge.net/projects/phppgadmin/files/latest/download ).
2018-07-18 17:30:31 +02:00
Richard Kuhnt
0c2b3da3ff
Don't send referer to portableapps.com
2018-07-16 14:09:39 +02:00
Richard Kuhnt
7a6218c586
Show message about missing bucket when installing dependencies
2018-07-15 17:57:34 +02:00
Richard Kuhnt
4c9beee8f2
Add filename to warning for files without hash in the manifest
2018-07-13 17:11:26 +02:00
Richard Kuhnt
0b13f37bc1
fix a bug introduced with e2792f2e
...
"break" prevented the extraction of multiple archive files
2018-07-10 21:31:46 +02:00
Richard Kuhnt
360c789965
Fix robocopy parameters (introduced with e2792f2e solving #2305 )
2018-07-09 21:03:31 +02:00
Richard Kuhnt
e4cbb42e64
Show first 8 bytes of file in the hash check error message
2018-07-09 13:14:38 +02:00
Richard Kuhnt
e2792f2e02
Fix robocopy not releasing a directory after moving it ( closes #2305 )
...
- Use System.Diagnostics.Process for better control
- Wait up to 1 second after moving a directory, so robocopy can terminate its threads
2018-07-09 12:34:00 +02:00
Ross Smith II
5e8a0feb6e
Change multiline strings to arrays ( #2363 )
2018-07-07 23:16:09 +02:00