chocolatey / ChocolateyGUI

A delicious GUI for Chocolatey
https://docs.chocolatey.org/en-us/chocolatey-gui/
Apache License 2.0
1.61k stars 249 forks source link

Create installer for both Chocolatey and Chocolatey GUI #206

Open MicahZoltu opened 9 years ago

MicahZoltu commented 9 years ago

As a user, I want the ability to use my system without the command line. Currently, if I want to use Chocolatey I have to first install the command line tool (using the command line) and then install Chocolatey GUI (using the command line). Now I am able to leverage Chocolatey from the comfort of my GUI.

It would be nice if I could just run an installer (something most users are familiar with) that would install Chocolatey, Chocolatey GUI, and optionally a desktop icon, start menu entry and taskbar icon. This way I wouldn't be afraid to give Chocolatey a try due to command line voodoo that is frightening to me.

gep13 commented 9 years ago

@Zoltu this is an interesting idea :smile_cat:

Currently Chocolatey GUI detects whether Chocolatey has an available update, so I guess that could be extended to include check for it's existence, and if not, install it. Let me mull this one over.

Thanks for the suggestion!

DarwinCSIWindowscom commented 9 years ago

Gary, I didn't realize your request was to try to install Chocolatey.

You could use a custom action calling a powershell script. The trick is the powershell script must be stored in the binary table so that is available before you have to install.

I guess if you don't strictly have to install chocolatey first, you could also make it one of the files in the actual install - then it could be called by a custom action or a shortcut.

I think trying to run powershell with a the invoke-expression (iex) command line would prove problematic in MSI parsing it properly.

Here are instrutions on PowerShell custom actions http://www.itninja.com/blog/view/how-to-create-powershell-based-custom-action-in-msi-mst This example shows the ps1 as a file in the install - but it could be in the binary table as well.

Fyi, D.

MicahZoltu commented 9 years ago

If Chocolatey can self-update, then it seems like the easiest solution would be to have the installer install some version (current at time of creation of the MSI) of Chocolatey and ChocolateyGUI and then immediately launch ChocolateyGUI which would then self-update Chocolatey and ChocolateyGUI on first run.

Note: I have never actually used Chocolatey, so some of the above may not make perfect sense.

gep13 commented 9 years ago

@zoltu there is a single command that can be executed that will pull the latest version of Chocolatey, and install that. Since we are not currently tied to a specific version of Chocolatey, the intention would just be to run this command, and have Chocolatey be installed.

gep13 commented 9 years ago

@DarwinCSIWindowscom said... Here are instrutions on PowerShell custom actions http://www.itninja.com/blog/view/how-to-create-powershell-based-custom-action-in-msi-mst This example shows the ps1 as a file in the install - but it could be in the binary table as well.

Nice one, thank you!

wjk commented 8 years ago

Just an FYI, I am currently working on a small project that does just this. Here’s the source. (Note that as of when I posted this it’s not quite finished.)

@gep13 Does this at all interest you? I am certainly open to the possibility of upstream Chocolatey forking this and using it to create an “official GUI installer.”

ferventcoder commented 8 years ago

:+1:

gep13 commented 8 years ago

@wjk I haven't had a chance to dig into this yet, but I really like the idea of it. Would it be possible for you to add some screenshots to the repo so that I can get a feel of what the installation process looks like? Is it possible to de-select the installation of ChocolateyGUI during the installation? Not everyone is going to want it, even though obviously, I think they should :smile:

wjk commented 8 years ago

@gep13 Screenshots have been added to the README.

gep13 commented 8 years ago

@wjk that looks really good! You have done some amazing looking stuff there.

From my point of view, the only slight criticism would be the UI elements in the third screenshot don't seem to align correctly, but aside from that, looks really good! Well done! :+1:

wjk commented 8 years ago

Honestly, for that third screenshot, I liked it better with the text-box pushed to the right slightly than if it and the label were aligned. Thanks for the support!

wjk commented 8 years ago

@gep13 @ferventcoder And it is complete! :clap: :tada: Download it from the link above, build it, and try it out! Again, if you want to create an official GUI Chocolatey installer, feel free to fork my code.

ayurmedia commented 7 years ago

what' going on in this thread, why is this not finished? chocolatey is the perfect package manager for beginner users which need apps and don't know how to install them. looking in google for an app will result in lot of malware sites. cocolatey would be like an app-store. but starting it is very difficult and techno-babble with cmd.exe and powershell etc. (i am a programmer and can install it, but my friends with less knowledge need lot of support even get it running)

easy solution and suggestion (maybe i do it myself to show a proof of concept). 1) use a tool to convert this scripts into a normal .exe (or .msi) a) step one in this script is to install the choko.exe as admin (installer forces you to use admin) b) step two is to run the installer for chocolatey gui c) put shortcut to chock-gui on desktop d) ask user to open chock-gui on exit

viola very simple installer, you now have choco.exe and choco-gui.exe just click on the desktop icon and install and update apps with choco-gui very easily.

i know this is meant for IT-Admins and scripting stuff. but it can also be a very nice app-store for laymen users.

wjk commented 7 years ago

@ayurmedia I totally agree with your app-store opinion! That is exactly what I thought when I first stumbled upon Chocolatey several years ago.

As for your idea re the installer, I could well try to write something like this, perhaps as an extension of my existing installer, perhaps as an MSI using Wix. Either way, I am certainly willing to help.

ayurmedia commented 7 years ago

EDIT: keeping for initial idea, see my next post for a initial implementation much easier with bat2exe.

@wjk cool, is your installer still working and using latest chock-version ? i was more thinking in using something like this: http://www.jrsoftware.org/isinfo.php and simply implement the 4 steps. (maybe there are better installer-creator, but this one is free and looks easy)

main features for the installer-creator is:

thats it.

seems jr-installer can do it:

forcing admin is a nice to have, if the script is not running then just put in the instructions, please run as admin.

ayurmedia commented 7 years ago

ok, i have now a simplified version, which should still be easy to use for beginners. i even reduced the steps to keep it simple:

https://github.com/ayurmedia/ChocolateyAndGUI

Compiled Exe Here: https://github.com/ayurmedia/ChocolateyAndGUI/blob/master/installChocolateyAndGUI.exe?raw=true

(Or Alternative .cmd which combines choco + GUI, might be easier than unblocking file. ) https://raw.githubusercontent.com/ayurmedia/ChocolateyAndGUI/master/installChocolateyAndGUI.cmd (you need to download with right-click save-as, then run with right-click "run as admin")

Whats in it: i took the .cmd for installing Chocolatey (which will download and install latest version from website) and the line for installing ChocolateyGUI and put them in one big .cmd script and added a few echo for instruction and a pause so one can read what happened.

Then i Converted it to .exe with "bat2exe" (see my github readme)

Running this exe will simply run the cmd script, but will be more familiar with beginners which either look for setup.exe setup.msi or similar.

Chocolatey-Gui already creates a Icon in the Start-Menu, so i skipped the step of adding an icon/shortcut.

i only added an echo to inform the user where to look next.

maybe somebody can recreate the .exe and verify that it's exactly the .cmd in .exe format and publish it on the chocolatey website as "easy install" or in downloads.

i was looking for it on the downloads, but was smashed in the face with some cryptic shell scripts.

.exe tested on Windows-10, works nicely. (maybe needs to be "right-click run as admin", but on my pc the icon already has the small shield on the icon for admin-privileges.

see instructions in github page, you need to unblock it after download.

Alt text

EDIT: for a beginner it might be quite difficult to unblock a file, and signing a exe is quite difficult also. Seems the only option is to use the .cmd with right-click "run as admin" approach, or somebody has to find out how to create a exe which runs without trouble.

asmarkis commented 7 years ago

Nice work here ayurmedia. I've noticed the same thing myself.

I realize that the tool is for system admins, but why? Everyone should know that if it is easy enough even for somewhat tech-savy users, it will have more of a userbase and more developers interested in contributing.

Even so, right now Chocolatey GUI is too buggy, confusing, and not functional enough for me to recommend it. Hopefully it goes through some updates soon, this feature being an essential one.

ayurmedia commented 7 years ago

@asmarkis the GUI looks ok to me. Sure it's very simple also showing the batch commands is confusing. this could be hidden, because that's the point of using the nice GUI, i don't care about too much details. There are nicer Package-Managers, but on Windows it's already a good one, as the new Windows-10 App-Store is also crap. Could have some Potential.

I will test my new installer script with a friend tomorrow, and see if you manages to do it. He is a musician and only computer beginner.

ayurmedia commented 7 years ago

Ninite is similar to Chocolatey but soo much easier for beginners 100% foolproof. they only have less apps in the directory. But a beginner can install most popular apps easily. I guess i just recomend ninite computer beginners, and let the grown up play with terminal and ugly scripts ;) https://ninite.com/

RichiCoder1 commented 7 years ago

Likely going to revisit this issue here soon. Did you ever give any thoughts to producing an MSI or exe @ferventcoder? If not, I'll go the powershell-execution route mentioned above. Thinking about actually adding a UI too rather than the current UX when installing ChocolateyGUI (for interactive users).

@ayurmedia @asmarkis While I absolutely agree with the sentiment, and I developed ChocoPM and the later update to ChocolateyGUI to provide a simpler interface for Chocolatey, specifically adding "app store"-esque features is a non-goal for the foreseeable future. The assumption that I'm developing with for now is that the intended user is somewhat technically inclined, and my focus as a project lead and developer is stability, security, and providing complete coverage for Chocolatey's functionality. Most anything that stray's beyond that will likely not be considered for a very long time.

MicahZoltu commented 7 years ago

@RichiCoder1 While that is not the direction I was hoping Chocolatey to go, I am very happy to see an OSS developer openly state their plans/roadmap and constrain feature creep away from that. It is so common for OSS projects to die because the maintainers accept every pull request and feature request and end up with nothing really working quite right. So kudos to you!

ferventcoder commented 7 years ago

@RichiCoder1 producing an MSI or Installer and not using a PowerShell bootstrap followed by installing a Chocolatey package for Chocolatey feels a bit wrong to me. Of course that is a matter of opinion and others probably want an MSI.

vertigo220 commented 6 years ago

I hate to raise this from the dead, but I was going to create a thread similar to this, but for different reasons. While it would certainly be nice to have an actual installer for less tech-savvy people, that's not the issue I have. I personally had no problem using the PowerShell script to install it; however, it took me a while to even figure out there was a GUI option, since it's not mentioned anywhere on the installation page. So at the very least, it would be nice to have a short bit added about installing the GUI once Chocolatey is installed added to that page.

gep13 commented 6 years ago

@vertigo220 Chocolatey GUI is mentioned on the home page for Chocolatey: https://chocolatey.org/ scroll down just a little.

However, a mention of Chocolatey GUI on the installation page would make sense to me. Could I ask that you raise an issue here:

https://github.com/chocolatey/choco-wiki

So that this doesn't get forgotten about, and if you are able to help out by submitting a PR, that would be much appreciated!

vertigo220 commented 6 years ago

See https://github.com/chocolatey/choco-wiki/issues/88

vertigo220 commented 5 years ago

@watercolorhearts - did you install chocolatey following the instructions here first? You have to install it before you can use it to install the GUI.

watercolorhearts commented 5 years ago

Can you remove that? I don't want my throwaway connected to my main account, due to harassment/death threats in the past. Thanks.

pauby commented 5 years ago

@watercolorhearts I've removed the comment at both sides (GitHub and Reddit). Can you confirm if the suggestions have resolved your issue?