Skip to content

Commit

Permalink
(alldup) embed package
Browse files Browse the repository at this point in the history
closes #1363
  • Loading branch information
majkinetor committed Oct 21, 2019
1 parent 7a6716b commit 71905ad
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 17 deletions.
3 changes: 3 additions & 0 deletions automatic/alldup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ AllDup is a freeware tool for searching and removing file duplicates on your com
- Search through an unlimited number of files and folders
- Convenient search result list
- Fast search algorithm


![screenshot](https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/master/automatic/alldup/screenshot.png)
1 change: 1 addition & 0 deletions automatic/alldup/alldup.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ AllDup is a freeware tool for searching and removing file duplicates on your com
</metadata>
<files>
<file src="tools\**" target="tools" />
<file src="legal\**" target="legal" />
</files>
</package>
Binary file added automatic/alldup/legal/Redistribution.pdf
Binary file not shown.
20 changes: 20 additions & 0 deletions automatic/alldup/legal/VERIFICATION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
VERIFICATION

Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.

Package can be verified like this:

1. Go to

x32: http://www.alldup.info/download/AllDupSetup.exe

to download the installer.

2. You can use one of the following methods to obtain the SHA256 checksum:
- Use powershell function 'Get-FileHash'
- Use Chocolatey utility 'checksum.exe'

checksum32: 752D8E76F6E50731A9863DF35C5AC8B5C11CF371092807A9028E7B42E1B9A8BF

File 'Redistribution.pdf' is from personal email communication
Binary file added automatic/alldup/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 17 additions & 9 deletions automatic/alldup/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
$ErrorActionPreference = 'Stop'
$ErrorActionPreference = 'Stop'

$toolsPath = Split-Path $MyInvocation.MyCommand.Definition

$packageArgs = @{
packageName = $env:ChocolateyPackageName
fileType = 'exe'
url = 'http://www.alldup.info/download/AllDupSetup.exe'
softwareName = 'AllDup*'
checksum = '752d8e76f6e50731a9863df35c5ac8b5c11cf371092807a9028e7b42e1b9a8bf'
checksumType = 'sha256'
silentArgs = "/VERYSILENT /NORESTART /SUPPRESSMSGBOXES /SP- /LOG=`"$($env:TEMP)\$($env:chocolateyPackageName).$($env:chocolateyPackageVersion).InnoInstall.log`""
packageName = $Env:ChocolateyPackageName
fileType = $fileType
file = gi $toolsPath\*.exe
silentArgs = '/VERYSILENT /NORESTART /SUPPRESSMSGBOXES /SP- /LOG="{0}/InnoInstall.log"' -f (Get-PackageCacheLocation)
validExitCodes = @(0)
softwareName = 'AllDup*'
}
Install-ChocolateyInstallPackage @packageArgs
ls $toolsPath\*.exe | % { rm $_ -ea 0; if (Test-Path $_) { sc "$_.ignore" "" }}

$packageName = $packageArgs.packageName
$installLocation = Get-AppInstallLocation "$packageName*"
if (!$installLocation) { Write-Warning "Can't find $packageName install location"; return }
Write-Host "$packageName installed to '$installLocation'"

Install-ChocolateyPackage @packageArgs
Register-Application "$installLocation\$packageName.exe"
Write-Host "$packageName registered as $packageName"
17 changes: 9 additions & 8 deletions automatic/alldup/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@ import-module au

$releases = 'http://www.alldup.de/en_download_alldup.php'


function global:au_SearchReplace {
@{
".\tools\chocolateyInstall.ps1" = @{
"(?i)^(\s*url\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'"
"(?i)^(\s*checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'"
"(?i)^(\s*checksumType\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType32)'"
".\legal\VERIFICATION.txt" = @{
"(?i)(\s+x32:).*" = "`${1} $($Latest.URL32)"
"(?i)(checksum32:).*" = "`${1} $($Latest.Checksum32)"
}
}
}

function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix }

function global:au_GetLatest {
$download_page = Invoke-WebRequest -Uri $releases

$re = 'alldup.*\.exe$'
$url = $download_page.links | ? href -match $re | select -First 1 -expand href

$url = $download_page.links | ? href -match $re | select -First 1 -expand href
$version = $download_page.links | ? href -match "alldup_version\.php$" | select -first 1 -expand innerText

return @{ URL32 = $url; Version = $version }
@{ URL32 = $url; Version = $version }
}

update -ChecksumFor 32
update -ChecksumFor none

0 comments on commit 71905ad

Please sign in to comment.