-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(7zip*) migrated from ferventcoder #488
Changes from 19 commits
dbedb56
a271934
1174267
b8d3e2b
c633732
fe4c5a4
e66c143
798cb01
bb5fd6c
7940972
17e2b62
27c7455
6621cc0
b982905
bc5193d
a2643d7
eec0f5a
c6a31e9
85b0a46
90407d0
ada3ad4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<metadata> | ||
<id>7zip.install</id> | ||
<title>7-Zip (Install)</title> | ||
<version>0.0</version> | ||
<authors>Igor Pavlov</authors> | ||
<owners>chocolatey,Rob Reynolds</owners> | ||
<summary>7-Zip is a file archiver with a high compression ratio.</summary> | ||
<description>7-Zip is a file archiver with a high compression ratio. | ||
|
||
## Features | ||
- High compression ratio in [7z format](http://www.7-zip.org/7z.html) with **LZMA** and **LZMA2** compression | ||
- Supported formats: | ||
- Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM | ||
- Unpacking only: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT, GPT, HFS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RPM, SquashFS, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR and Z. | ||
- For ZIP and GZIP formats, **7-Zip** provides a compression ratio that is 2-10 % better than the ratio provided by PKZip and WinZip | ||
- Strong AES-256 encryption in 7z and ZIP formats | ||
- Self-extracting capability for 7z format | ||
- Integration with Windows Shell | ||
- Powerful File Manager | ||
- Powerful command line version | ||
- Plugin for FAR Manager | ||
- Localizations for 87 languages | ||
|
||
## Notes | ||
- The installer for 7-Zip is known to close the explorer process. | ||
This means you may lose current work. If it doesn't automatically restart explorer, type `explorer` on the command shell to restart it. | ||
</description> | ||
<projectUrl>http://www.7-zip.org/</projectUrl> | ||
<packageSourceUrl>https://github.com/chocolatey/chocolatey-coreteampackages/tree/master/automatic/7zip</packageSourceUrl> | ||
<tags>7zip zip archiver admin foss</tags> | ||
<licenseUrl>http://www.7-zip.org/license.txt</licenseUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<iconUrl>https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/dbedb56d5ff709cd37f4abecc736d4a9e6400da8/icons/7zip.svg</iconUrl> | ||
<docsUrl>http://www.7-zip.org/faq.html</docsUrl> | ||
<mailingListUrl>https://sourceforge.net/p/sevenzip/discussion/45797/</mailingListUrl> | ||
<bugTrackerUrl>https://sourceforge.net/p/sevenzip/_list/tickets?source=navbar</bugTrackerUrl> | ||
<releaseNotes>http://www.7-zip.org/history.txt</releaseNotes> | ||
<dependencies> | ||
<dependency id="chocolatey-core.extension" version="1.0.4" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="tools\**" target="tools" /> | ||
<file src="legal\**" target="legal" /> | ||
</files> | ||
</package> | ||
<!-- character encoding: “UTF-8” --> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
7-Zip | ||
~~~~~ | ||
License for use and distribution | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
7-Zip Copyright (C) 1999-2016 Igor Pavlov. | ||
|
||
Licenses for files are: | ||
|
||
1) 7z.dll: GNU LGPL + unRAR restriction | ||
2) All other files: GNU LGPL | ||
|
||
The GNU LGPL + unRAR restriction means that you must follow both | ||
GNU LGPL rules and unRAR restriction rules. | ||
|
||
|
||
Note: | ||
You can use 7-Zip on any computer, including a computer in a commercial | ||
organization. You don't need to register or pay for 7-Zip. | ||
|
||
|
||
GNU LGPL information | ||
-------------------- | ||
|
||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation; either | ||
version 2.1 of the License, or (at your option) any later version. | ||
|
||
This library is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details. | ||
|
||
You can receive a copy of the GNU Lesser General Public License from | ||
http://www.gnu.org/ | ||
|
||
|
||
unRAR restriction | ||
----------------- | ||
|
||
The decompression engine for RAR archives was developed using source | ||
code of unRAR program. | ||
All copyrights to original unRAR code are owned by Alexander Roshal. | ||
|
||
The license for original unRAR code has the following restriction: | ||
|
||
The unRAR sources cannot be used to re-create the RAR compression algorithm, | ||
which is proprietary. Distribution of modified unRAR sources in separate form | ||
or as a part of other software is permitted, provided that it is clearly | ||
stated in the documentation and source comments that the code may | ||
not be used to develop a RAR (WinRAR) compatible archiver. | ||
|
||
|
||
-- | ||
Igor Pavlov |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
VERIFICATION | ||
Verification is intended to assist the Chocolatey moderators and community | ||
in verifying that this package's contents are trustworthy. | ||
|
||
The installer have been downloaded from their official download link listed on <http://www.7-zip.org/download.html> | ||
and can be verified like this: | ||
|
||
1. Download the following installers: | ||
32-Bit: <http://www.7-zip.org/a/7z1604.exe> | ||
64-Bit: <http://www.7-zip.org/a/7z1604-x64.exe> | ||
2. You can use one of the following methods to obtain the checksum | ||
- Use powershell function 'Get-Filehash' | ||
- Use chocolatey utility 'checksum.exe' | ||
|
||
checksum type: sha256 | ||
checksum32: DBB2B11DEA9F4432291E2CBEFE14EBE05E021940E983A37E113600EEE55DAA95 | ||
checksum64: 9BB4DC4FAB2A2A45C15723C259DC2F7313C89A5AC55AB7C3F76BBA26EDC8BCAA | ||
|
||
File 'LICENSE.txt' is obtained from <http://www.7-zip.org/license.txt> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" | ||
. "$toolsDir\helpers.ps1" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was sure I had it added, but will fix that one too. |
||
$initialProcessCount = Get-ExplorerProcessCount | ||
Write-Warning "This installer is known to close the explorer process. This means `nyou may lose current work. `nIf it doesn't automatically restart explorer, type 'explorer' on the `ncommand shell to restart it." | ||
|
||
$filePath32 = "$toolsDir\7zip_x32.exe" | ||
$filePath64 = "$toolsDir\7zip_x64.exe" | ||
|
||
$filePath = if ((Get-ProcessorBits 64) -and $env:chocolateyForceX86 -ne $true) { | ||
Write-Host "Installing 64 bit version" ; $filePath64 | ||
} else { Write-Host "Installing 32 bit version" ; $filePath32 } | ||
|
||
$packageArgs = @{ | ||
packageName = '7zip.install' | ||
fileType = 'exe' | ||
softwareName = '7-zip 16.04*' | ||
file = "$filePath" | ||
silentArgs = '/S' | ||
validExitCodes = @(0) | ||
} | ||
|
||
# To prevent shimming of installers | ||
"" | Out-File "$filePath32.ignore" | ||
"" | Out-File "$filePath64.ignore" | ||
|
||
Install-ChocolateyInstallPackage @packageArgs | ||
|
||
$finalProcessCount = Get-ExplorerProcessCount | ||
if($initialProcessCount -lt $finalProcessCount) | ||
{ | ||
Start-Process explorer.exe | ||
} | ||
|
||
Remove-Item "$filePath32*","$filePath64*" -Force -ea 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
$ErrorActionPreference = 'Stop'; | ||
|
||
$packageName = '7zip.install' | ||
|
||
$uninstalled = $false | ||
[array]$key = Get-UninstallRegistryKey -SoftwareName '7-zip 16.04*' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Never a fan of passing the version. It doesn't upgrade well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Originally my reason for passing the version was to allow users to install multiple 7zip versions side-by-side, but noticed now that it doesn't matter since the registry key is overwritten anyhow. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Version 9.x and 15/16.x can be installed separately. |
||
|
||
if ($key.Count -eq 1) { | ||
$key | % { | ||
$packageArgs = @{ | ||
packageName = $packageName | ||
fileType = 'EXE' | ||
silentArgs = '/S' | ||
validExitCodes = @(0) | ||
file = "$($_.UninstallString)" | ||
} | ||
|
||
Uninstall-ChocolateyPackage @packageArgs | ||
} | ||
} elseif ($key.Count -eq 0) { | ||
Write-Warning "$packageName has already been uninstalled by other means." | ||
} elseif ($key.Count -gt 1) { | ||
Write-Warning "$($key.Count) matches found!" | ||
Write-Warning "To prevent accidental data loss, no programs will be uninstalled." | ||
Write-Warning "Please alert package maintainer the following keys were matched:" | ||
$key | % {Write-Warning "- $($_.DisplayName)"} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Function Get-ExplorerProcessCount | ||
{ | ||
$process = Get-Process explorer -ErrorAction SilentlyContinue | ||
$processCount = ($process | Measure-Object).Count | ||
return $processCount | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
. "$PSScriptRoot\..\7zip\update.ps1" | ||
|
||
$softwareNamePrefix = '7-zip' | ||
|
||
function global:au_BeforeUpdate { | ||
Get-RemoteFiles -Purge -FileNameBase '7zip' | ||
$Latest.ChecksumType = 'sha256' | ||
} | ||
|
||
function global:au_SearchReplace { | ||
@{ | ||
".\tools\chocolateyInstall.ps1" = @{ | ||
"(?i)(^\s*softwareName\s*=\s*)'.*'" = "`$1'$softwareNamePrefix $($Latest.RemoteVersion)*'" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, in this case it will be accurate. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minus the version IMHO as well. If need be the major version. |
||
} | ||
".\tools\chocolateyUninstall.ps1" = @{ | ||
"(?i)(\s*\-SoftwareName\s+)'.*'" = "`$1'$softwareNamePrefix $($Latest.RemoteVersion)*'" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't it be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, $Latest.Version will be changed if there is a fix version, which will make the uninstall script unusable since it won't be able to find the uninstall key There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the version here? |
||
} | ||
".\legal\verification.txt" = @{ | ||
"(?i)(listed on\s*)\<.*\>" = "`${1}<$releases>" | ||
"(?i)(32-Bit.+)\<.*\>" = "`${1}<$($Latest.URL32)>" | ||
"(?i)(64-Bit.+)\<.*\>" = "`${1}<$($Latest.URL64)>" | ||
"(?i)(checksum type:).*" = "`${1} $($Latest.ChecksumType)" | ||
"(?i)(checksum32:).*" = "`${1} $($Latest.Checksum32)" | ||
"(?i)(checksum64:).*" = "`${1} $($Latest.Checksum64)" | ||
} | ||
} | ||
} | ||
|
||
update -ChecksumFor none |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<metadata> | ||
<id>7zip.portable</id> | ||
<title>7-Zip (Portable, CommandLine)</title> | ||
<version>0.0</version> | ||
<authors>Igor Pavlov</authors> | ||
<owners>chocolatey,Rob Reynolds</owners> | ||
<summary>7-Zip is a file archiver with a high compression ratio.</summary> | ||
<description>7-Zip is a file archiver with a high compression ratio. | ||
|
||
## Features | ||
- High compression ratio in [7z format](http://www.7-zip.org/7z.html) with **LZMA** and **LZMA2** compression | ||
- Supported formats: | ||
- Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM | ||
- Unpacking only: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT, GPT, HFS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RPM, SquashFS, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR and Z. | ||
- For ZIP and GZIP formats, **7-Zip** provides a compression ratio that is 2-10 % better than the ratio provided by PKZip and WinZip | ||
- Strong AES-256 encryption in 7z and ZIP formats | ||
- Self-extracting capability for 7z format | ||
- Powerful command line version | ||
- Localizations for 87 languages | ||
</description> | ||
<projectUrl>http://www.7-zip.org/</projectUrl> | ||
<packageSourceUrl>https://github.com/chocolatey/chocolatey-coreteampackages/tree/master/automatic/7zip</packageSourceUrl> | ||
<tags>7zip zip archiver foss</tags> | ||
<licenseUrl>http://www.7-zip.org/license.txt</licenseUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<iconUrl>https://cdn.rawgit.com/chocolatey/chocolatey-coreteampackages/dbedb56d5ff709cd37f4abecc736d4a9e6400da8/icons/7zip.svg</iconUrl> | ||
<docsUrl>http://www.7-zip.org/faq.html</docsUrl> | ||
<mailingListUrl>https://sourceforge.net/p/sevenzip/discussion/45797/</mailingListUrl> | ||
<bugTrackerUrl>https://sourceforge.net/p/sevenzip/_list/tickets?source=navbar</bugTrackerUrl> | ||
<releaseNotes>http://www.7-zip.org/history.txt</releaseNotes> | ||
</metadata> | ||
<files> | ||
<file src="tools\**" target="tools" /> | ||
<file src="legal\**" target="legal" /> | ||
</files> | ||
</package> | ||
<!-- character encoding: “UTF-8” --> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
7-Zip | ||
~~~~~ | ||
License for use and distribution | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
7-Zip Copyright (C) 1999-2016 Igor Pavlov. | ||
|
||
Licenses for files are: | ||
|
||
1) 7z.dll: GNU LGPL + unRAR restriction | ||
2) All other files: GNU LGPL | ||
|
||
The GNU LGPL + unRAR restriction means that you must follow both | ||
GNU LGPL rules and unRAR restriction rules. | ||
|
||
|
||
Note: | ||
You can use 7-Zip on any computer, including a computer in a commercial | ||
organization. You don't need to register or pay for 7-Zip. | ||
|
||
|
||
GNU LGPL information | ||
-------------------- | ||
|
||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation; either | ||
version 2.1 of the License, or (at your option) any later version. | ||
|
||
This library is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details. | ||
|
||
You can receive a copy of the GNU Lesser General Public License from | ||
http://www.gnu.org/ | ||
|
||
|
||
unRAR restriction | ||
----------------- | ||
|
||
The decompression engine for RAR archives was developed using source | ||
code of unRAR program. | ||
All copyrights to original unRAR code are owned by Alexander Roshal. | ||
|
||
The license for original unRAR code has the following restriction: | ||
|
||
The unRAR sources cannot be used to re-create the RAR compression algorithm, | ||
which is proprietary. Distribution of modified unRAR sources in separate form | ||
or as a part of other software is permitted, provided that it is clearly | ||
stated in the documentation and source comments that the code may | ||
not be used to develop a RAR (WinRAR) compatible archiver. | ||
|
||
|
||
-- | ||
Igor Pavlov |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
VERIFICATION | ||
Verification is intended to assist the Chocolatey moderators and community | ||
in verifying that this package's contents are trustworthy. | ||
|
||
The installer have been downloaded from their official download link listed on <http://www.7-zip.org/download.html> | ||
and can be verified like this: | ||
|
||
1. Download the following installers: | ||
32-Bit: <http://www.7-zip.org/a/7z1604.exe> | ||
64-Bit: <http://www.7-zip.org/a/7z1604-x64.exe> | ||
Extra : <http://www.7-zip.org/a/7z1604-extra.7z> | ||
2. You can use one of the following methods to obtain the checksum | ||
- Use powershell function 'Get-Filehash' | ||
- Use chocolatey utility 'checksum.exe' | ||
|
||
checksum type: sha256 | ||
checksum32 : DBB2B11DEA9F4432291E2CBEFE14EBE05E021940E983A37E113600EEE55DAA95 | ||
checksum64 : 9BB4DC4FAB2A2A45C15723C259DC2F7313C89A5AC55AB7C3F76BBA26EDC8BCAA | ||
checksumExtra: 59F41025ACC40CF2E0B30B5CC6E4BCB1E07573201E256FBE8EDB3C9C514DD251 | ||
|
||
File 'LICENSE.txt' is obtained from <http://www.7-zip.org/license.txt> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
$ErrorActionPreference = 'Stop' | ||
|
||
$toolsDir = $(Split-Path -parent $MyInvocation.MyCommand.Definition) | ||
|
||
$filePath32 = "$toolsDir\7zip_x32.exe" | ||
$filePath64 = "$toolsDir\7zip_x64.exe" | ||
$filePathExtra = "$toolsDir\7zip_extra.7z" | ||
|
||
$packageArgs = @{ | ||
packageName = '7zip.portable' | ||
destination = "$toolsDir" | ||
file = if ((Get-ProcessorBits 64) -and $env:chocolateyForceX86 -ne $true) { | ||
Write-Host "Installing 64 bit version" ; $filePath64 | ||
} else { | ||
Write-Host "Installing 32 bit version" ; $filePath32 | ||
} | ||
} | ||
Get-ChocolateyUnzip @packageArgs | ||
|
||
$packageArgs.packageName = '7zip.portable Extras' | ||
$packageArgs.destination = "$toolsDir\7z-extra" | ||
$packageArgs.file = $filePathExtra | ||
Get-ChocolateyUnzip @packageArgs | ||
|
||
Remove-Item -Path "$toolsDir\Uninstall.exe",$filePath32,$filePath64,$filePathExtra -Force -ea 0 | ||
|
||
if ((Get-ProcessorBits 64) -and $env:chocolateyForceX86 -ne $true) { | ||
#generate ignore for 7za.exe and let x64 version pick up and shim | ||
New-Item "$($packageArgs.destination)\7za.exe.ignore" -Type file -Force | Out-Null | ||
} else { | ||
# generate ignore for x64\7za.exe | ||
New-Item "$($packageArgs.destination)\x64\7za.exe.ignore" -Type file -Force | Out-Null | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
<releaseNotes>
(http://www.7-zip.org/history.txt)