File tree Expand file tree Collapse file tree 7 files changed +67
-17
lines changed Expand file tree Collapse file tree 7 files changed +67
-17
lines changed Original file line number Diff line number Diff line change 3636
3737 - name : Install Chocolatey Core Extensions
3838 run : |
39- choco install chocolatey-core.extension
39+ choco install -y chocolatey-core.extension
40+
41+ - name : Install Megatools
42+ run : |
43+ choco install -y megatools
4044
4145 - name : Install AU
4246 run : |
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ VERIFICATION
2+ Verification is intended to assist the Chocolatey moderators and community
3+ in verifying that the contents of this package is trustworthy.
4+
5+ The installer has been downloaded from the official download link listed on <https://jdownloader.org/jdownloader2>
6+ and can be verified like this:
7+
8+ 1. Download the following installers:
9+ url: EMPTY
10+ 2. You can use one of the following methods to obtain the checksum
11+ - Use powershell function 'Get-Filehash'
12+ - Use chocolatey utility 'checksum.exe'
13+
14+ checksum type: sha256
15+ checksum64: EMPTY
Original file line number Diff line number Diff line change 1+ $ErrorActionPreference = ' Stop'
2+ $toolsDir = " $ ( Split-Path - parent $MyInvocation.MyCommand.Definition ) "
3+
4+ $packageArgs = @ {
5+ packageName = $env: ChocolateyPackageName
6+ fileType = ' EXE'
7+ file = Get-Item " $toolsDir \*.exe"
8+ silentArgs = " -q"
9+ validExitCodes = @ (0 )
10+ }
11+
12+ Install-ChocolateyPackage @packageArgs
Original file line number Diff line number Diff line change 1+ $ErrorActionPreference = ' Stop'
2+ Import-Module - Name ' au'
3+
4+ function global :au_SearchReplace {
5+ @ {
6+ ' .\tools\VERIFICATION.txt' = @ {
7+ ' (?i)(\s+url:).*' = " `$ {1} $ ( $Latest.URL ) "
8+ ' (?i)(\s+checksum64:).*' = " `$ {1} $ ( $Latest.Checksum64 ) "
9+ }
10+ }
11+ }
12+
13+ function global :au_AfterUpdate {
14+ Set-DescriptionFromReadme - SkipFirst 2
15+ }
16+
17+ function global :au_GetLatest {
18+
19+ $DownloadsPage = Invoke-WebRequest - UseBasicParsing - Uri ' https://jdownloader.org/jdownloader2'
20+ $MegaLink = ($DownloadsPage.Links | Where-Object - Property ' href' -Match ' https://mega.nz/file/' )[0 ]
21+
22+ $InstallerPath = ' .\tools\JDownloader2Setup.exe'
23+ $TempPath = $InstallerPath + ' .tmp'
24+ megatools dl -- no- progress -- path= " $TempPath " $MegaLink.href
25+ Move-Item - Path $TempPath - Destination $InstallerPath - Force
26+ $latestVersion = (Get-Item $InstallerPath ).VersionInfo.ProductVersion
27+ $latestChecksum64 = (Get-FileHash - Path $InstallerPath - Algorithm ' SHA256' ).Hash
28+
29+ return @ {
30+ Version = $latestVersion
31+ Checksum64 = $latestChecksum64
32+ }
33+ }
34+
35+ update - ChecksumFor none
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments