chocolatey-packages icon indicating copy to clipboard operation
chocolatey-packages copied to clipboard

Don't use the Cream installer for Vim

Open mmikeww opened this issue 6 years ago • 9 comments

I'm not sure what the reasoning is behind using the Cream distribution for Vim, rather than the official distribution. I thought maybe the official Vim installer was using some wacko installer method, but I checked and they are both using NSIS. While I do understand the "if it aint broke dont fix it" mindset, however, this is broke:

The Cream distribution includes the windows right click context menu item for "Edit with Vim", however on choco uninstall vim, it doesn't remove that context item.

Further, the official Vim windows installer either from the Vim FTP or from the Vim Github release, includes an additional context menu for "Edit with existing Vim", which is useful if you already have Vim running. The Cream installation lacks this. Plus, its 'official', so why not use it?

mmikeww avatar Oct 28 '17 17:10 mmikeww

It's probably more of a history thing - cream installer was best avail at that point in time

ferventcoder avatar Oct 29 '17 15:10 ferventcoder

Agreed that this should move. How to handle existing installs on the upgrade path?

ferventcoder avatar Oct 29 '17 15:10 ferventcoder

How to handle existing installs on the upgrade path?

Good question. I'm not sure entirely what Cream does different. I know the installer is definitely different than the mainline distro. And sorry I hadn't searched, because Issue #239 also mentions the shell extension not being removed, and suggests having chocolatey manually deleting it. And vim-tux won't uninstall for me either. I'd rather just use the official

mmikeww avatar Oct 29 '17 15:10 mmikeww

Folks want things to not chamge things much past installer defaults without params on the community repo.

Switching out an installer on upgrade could upset some folks so having a good path for them would be kind of important.

ferventcoder avatar Oct 29 '17 16:10 ferventcoder

Maybe just move that to vim-cream or something?

jacktose avatar Mar 14 '18 17:03 jacktose

I just became aware of this myself. For an upgrade path, maybe consider the following: deprecate vim, pointing to vim-cream as a dependency. Perhaps add an extra warning that the user should really remove the vim package from chocolatey's installation. After enough time has passed (a few months?), revive vim as its own package using upstream builds. That should spare 99% of users any sudden changes. Would that be acceptable?

My install scripts for vim-tux could mostly be copy-pasted for dealing with the official upstream zips. https://github.com/AeliusSaionji/chocopkgs/blob/master/vim-tux.install/tools/chocolateyinstall.ps1 https://github.com/AeliusSaionji/chocopkgs/blob/master/vim-tux.portable/tools/chocolateyinstall.ps1

@mmikeww fwiw I recently fixed up the vim-tux package. It should uninstall fine now, as well as be much quicker to install. The upstream builder isn't including diff.exe, though... so vimdiff won't work unless you happen to already have diff on PATH. I've sent them two emails over this, still awaiting a response.

AeliusSaionji avatar May 04 '18 05:05 AeliusSaionji

Thanks AeliusSaionji, your scripts should work for the official vim release from github, with the one exception that there is no x64 executable installer, only an x86 executable and an x64.zip. So chocolately would probably just always use the x86 (which is what i use on my x64 system anyway without any issues)

mmikeww avatar May 04 '18 12:05 mmikeww

@mmikeww

I would not be pleased at all with the exclusion of x64. Luckily, my scripts are written for the zip distributions, not for exe installers. Vim includes an install.exe which I manually invoke after extracting. I had intended to share my scripts to demonstrate that there is no need to rely on an exe installer. This will do:

Start-ChocolateyProcessAsAdmin "-create-batfiles vim gvim evim view gview vimdiff gvimdiff -install-popup -install-openwith -add-start-menu" "$destDir\install.exe" -validExitCodes '0'

The downloaded filetype in my script is only exe because vim-tux provides self extracting exe releases. I switched to those because I was having troubles with chocolateyunzip taking upwards of 10 minutes, often failing validation because extraction was so slow it would exceed the validator's timeout! Which is an issue I fear we might run into again here.

Aside, vim-tux dev got back to me and tells me he intentionally excludes diff and patch from his builds so I guess I'll just fix his wrong decisions on my end :wink:.

AeliusSaionji avatar May 04 '18 15:05 AeliusSaionji

it looks like this was changed at some point?

i cant seem to check the history of the vim package, but chocolatey doesnt look like its using the cream version anymore

edit: found this: https://github.com/chocolatey-community/chocolatey-packages/commit/6f5bf8702fdf3944c2d2c26454d531e32dc7d272

mmikeww avatar May 24 '22 04:05 mmikeww