cmderdev / cmder

Lovely console emulator package for Windows
https://cmder.app
MIT License
25.69k stars 2.02k forks source link

[Feature Request] Add Cmder to Winget #2552

Open prickett opened 3 years ago

prickett commented 3 years ago

With Winget starting to officially roll out it'd be great to see Cmder added to its repository. Is there a reason it couldn't be?

daxgames commented 3 years ago

It most definitely could be, have at it!

edrohler commented 3 years ago

This is a fantastic idea.

edrohler commented 3 years ago

I have been looking at this the last few days and I am not sure that it is possible with a portable exe. Also, I think it needs a proper code signing certificate for the Cmder org/publishers.

prickett commented 3 years ago

I don't know if a different architecture allows something that Winget doesn't - but Chocolatey is able to install CMDER.

edrohler commented 3 years ago

I believe that since the project is portable, we can target AnyCpu for winget. The main issue I was running into is including the vendor and other folders with the MSIX packager. There isn't really an option to do this or if there is I don't know it.

However, I made a cmder-installer repo and have started building a basic installer using NSIS.

The installer installs to the user profile directory but can be changed by the user. For updates, it would basically overwrite the distributed files if newer and not touch any custom config, bin or opt files. Then on uninstall it remove everything but would omit deleting those custom files and the install directory just in case users don't want to lose their customizations.

The idea is to do a quick process for each release. I'm still working out the steps but it would be something like download both full and mini, extract them into a non-tracked Versions folder, update the version variable in the script, run the installer script with NSIS and then create the winget package and publish it.

The only thing that is really a blocker is the code signing. I am not sure we can contribute to the public winget repo without it.

daxgames commented 3 years ago

Current rule is to not touch anything in the %cmder_root%\config folder after initial install unless we can apply a backwards compatibility fix using %cmder_root%\vendor\init.bat or %cmder_root%\vendor\profile.ps1 when starting Cmder.

edrohler commented 3 years ago

If I understand what you mean then the installer does follow this rule. Nothing is installed or overwritten in the config folder except the readme.md files included in the bin, opt and config folders.

Basically, everything that is distributed with the .zip archive will be overwritten. I believe it follows the update process or the update process I have been following. haha I just extract the zip and copy over everything into my cmder folder.

Also, I did include an uninstall and the uninstall also leaves the config, bin and opt folders with the exception of the readme's. I considered doing this just in case there are customizations that the user wants to keep.

edrohler commented 3 years ago

All right. I have tested both installers (full and mini) using the silentmode required for winget and it does what it's supposed to. I don't have any issues with my Cmder customizations or keybindings.

I think I can create a release on my repo for additional testing.

@daxgames Can you try running the installers and see if it meets your needs?

daxgames commented 3 years ago

I don't know anything about winget and more than lokely this woulf be an effort maintained outside the Cmder repo.

I can try and confirm functionality if you want tpnoint me in the right direction and pish me down the hill.

:-)

edrohler commented 3 years ago

No problem. I don't mind being a maintener. :)

Basically, I have created 2 installer packages. 1 for the full install and 1 for the mini install.

I have ran both of them locally and didn't have an issue with my Cmder configurations. My aliases and symlinks were still intact.

I guess the best thing would be to do is make a back up of your current cmder try installing both or use a VM. I just want to make sure that it works per the Cmderdev team's needs.

edrohler commented 3 years ago

I did some additional testing using winget install -m <manifest file> on a clean environment and everything seems to work ok. I may need to change the uninstall to include more files but these are not related to the files in the config, opt or bin folder.

Here are the manifests for the two winget installs for tracking: Cmder Winget Manifest

daxgames commented 3 years ago

I noticed architecture was neutral in the manifests. I do not know what the choices are but I know Cmder Full distributes Git for Windows 64 bit binaries.

edrohler commented 3 years ago

Ah, that is good to know. I used neutral only because the Cmder binaries were portable but the git for windows couldn't install on a 32-bit system.

However, I have been considering maybe we only distribute the mini version through winget. With winget it's quite easy to install git and it can be scripted. See my personal msaliases repository for an example.

What are your thoughts on this? Should we only distribute the mini version through winget or limit the full version to 64-bit and distribute both?

daxgames commented 3 years ago

Its not up to me/us if if the Cmder team is not maintaining it but since you asked.

I would recommend doing both both to avoid confusion and fill the demand that will likely end up coming from users once this becomes more mainstream.

edrohler commented 3 years ago

Sounds good and that works for me. I will change the architecture on the full version to x64 to cover the git-for-windows distribution.

edrohler commented 3 years ago

All right. Well, it turns out that after all that work they would prefer that the distribution be from the official source. I suppose this is understandable from a security perspective.

Anyway, this will be possible once they support installing zip archive.

chuim commented 3 weeks ago

Anyway, this will be possible once they support installing zip archive.

It seems that winget now supports installing from ZIP files: that issue is now marked as resolved by pull request #2500