-
Notifications
You must be signed in to change notification settings - Fork 385
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
Conversation
majkinetor
commented
Dec 21, 2016
•
edited
Loading
edited
- Package source: (7zip*) migrated to coreteam repository ferventcoder/chocolatey-packages#223
- 3 open issues
@majkinetor Will you change this also to an embedded package? Based on the license I think this should be possible. |
Yes, this should be embedded. You, rather then me, should do it, since you are migrating it now. Its easier then creating online installer and people should get used to it. See vlc as an example or any other that uses it. In short:
|
Ah, sorry, I thought I was writting on Git PR. Yes, I will embedd this one. |
@majkinetor |
This ready? |
@ferventcoder doesn't look like it, looks like it's currently just the same code as in your repo EDIT: |
Right on. |
I believe this is done now, could someone please review it? All issues at @ferventcoder is fixed except for ferventcoder/chocolatey-packages#82 which I couldn't reproduce, making me think it have been fixed upstream |
<title>7-Zip (Portable, CommandLine)</title> | ||
<version>0.0</version> | ||
<authors>Igor Pavlov</authors> | ||
<owners>Rob Reynolds, chocolatey</owners> |
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.
List chocolatey
first as per §1.2.4
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.
ah thanks, I forgot about that one.
Don't know why it's in there though, as the owners element isn't used on chocolatey.org as far as I know.
<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> | ||
</metadata> |
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)
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.
thanks, I wasn't able to find the changelog for 7zip
<?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.commandline</id> |
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.
Shouldn't we take the oppertunity and rename this to 7zip.portable?
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.
sure, we can do that.
I just didn't have that as a priority at the moment
$packageArgs.file = $filePathExtra | ||
Get-ChocolateyUnzip @packageArgs | ||
|
||
Remove-Item -Path "$toolsDir\Uninstall.exe",$filePath32,$filePath64,$filePathExtra -Force |
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 -ea 0
to avoid install failing in case this fails, like it was done in other packages
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.
will do
$Latest.ChecksumType = 'sha256' | ||
|
||
try { | ||
$client = New-Object System.Net.WebClient |
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.
Should be outside of the try, since in case this throws an exception you don't want the finally block to be run, since it would throw another exception.
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.
this isn't .NET, so it don't matter if it's outside or inside the try/catch. (as far as I know)
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.
but I'll change it anyhow
Start-Process explorer.exe | ||
} | ||
|
||
Remove-Item "$filePath32*","$filePath64*" -Force -ErrorAction SilentlyContinue |
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.
-ea 0
instead of -ErrorAction SilentlyContinue
to be consistent with other packages
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 comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO using $Latest.RemoteVersion
is not 100% acurrate. It makes sense as long as the already installed version is the previous version, but what if I skip versions? But currently also don't have a better idea :(
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.
Actually, in this case it will be accurate.
The software name should be part of or equal to the name displayed in program and features
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.
Minus the version IMHO as well. If need be the major version.
"(?i)(^\s*softwareName\s*=\s*)'.*'" = "`$1'$softwareNamePrefix $($Latest.RemoteVersion)*'" | ||
} | ||
".\tools\chocolateyUninstall.ps1" = @{ | ||
"(?i)(\s*\-SoftwareName\s+)'.*'" = "`$1'$softwareNamePrefix $($Latest.RemoteVersion)*'" |
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.
Shouldn't it be $Latest.Version
here?
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Why the version here?
<title>7-Zip</title> | ||
<version>0.0</version> | ||
<authors>Igor Pavlov</authors> | ||
<owners>Rob Reynolds, chocolatey</owners> |
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.
List chocolatey
first as per §1.2.4
<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> |
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)
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.
although it doesn't show up, I've added the release notes below this line
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.
@AdmiringWorm Where and why doesn't it show up? Should be shown on chocolatey.org...
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.
sorry, I meant it doesn't show where just commented as it was added on the line below
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.
Ah, comments in GitHub can be confusing :) I think I commented the closing metadata tag
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.
you did for the other two packages.
@pascalberger |
I believe the 7zip packages is now finally done. |
Thanks, LGTM |
I'm just looking for a 👍 from @ferventcoder before this can be merged. |
I noticed the following packages need to be unrejected. Not sure about 7zip.commandline v16.04 needs to unrejected though, as we're deprecating it. /cc @chocolatey/community-moderators |
@AdmiringWorm I have unrejected the first two packages. For the last one, I would be tempted to push out a package fix notation version, that way it is clear that it isn't an "official" release. |
$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 comment
The 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 comment
The 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.
I'll change it back to not pass the version.
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.
Version 9.x and 15/16.x can be installed separately.
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<metadata> | ||
<id>7zip.commandline</id> | ||
<title>[Deprecated]7-Zip (Portable, CommandLine)</title> |
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.
Can we get a space after "]"? It should always be "[Deprecated] Title"
Looks great. Just a few minor issues... |
@ferventcoder I've made the requested changes, if there isn't anything else I believe this can now be merged. |
LGTM |
👍 |