-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Chocolatey Package #17
Comments
If you create a chocolatey package, I'd be happy to maintain it. Feel free to submit a pull request to my chocolatey repository. |
Here's a starter file: <?xml version="1.0"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<metadata>
<id>nvm</id>
<title>NVM for Windows</title>
<version>1.0.6</version>
<authors>Corey Butler</authors>
<owners>Corey Butler</owners>
<summary>Node.js Version Management</summary>
<description>Manage the installation and configuration of multiple versions of Node.js simultaneously.</description>
<projectUrl>http://github.com/coreybutler/nvm-windows</projectUrl>
<tags>nodejs,node</tags>
<licenseUrl>https://raw.githubusercontent.com/coreybutler/nvm-windows/master/LICENSE</licenseUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance> <!-- or true if you require the user to accept the License before installing -->
<iconUrl>https://cdn2.iconfinder.com/data/icons/nodejs-1/32/nodejs-32.png</iconUrl>
<language>en-us</language>
<copyright>2014 Corey Butler</copyright>
</metadata>
</package> Modify as necessary... |
++++++++++++++++++++++++1 |
+1 |
+1 if this is closed, there should be a link to the chocolatey package. I can't find it on chocolatey - a search returns 0 results. |
Should this be closed? |
There is no chocolatey package for this yet, so it should not be closed. The issue that was closed above was only closed because it was a duplicate of this issue. The code I provided above was for anyone who wanted to create a package, but I don't have time to do it right now. My hope is to release a chocolatey package with the new version, but I don't have a timeline for the next version yet (see the Gitter chat for more details). Installation has been one of the key issues across all node managers. Since this project is growing beyond just Windows, I'd love to see it delivered in convenient ways for everyone, i.e. standard installer, chocolatey, homebrew, yum/apt-get/rpm, etc. I am still working in the weeds of the new version, but I'll eventually reach a point where it would help to have collaborators/maintainers for the different installers. Get in touch if you know of anyone who might be interested. |
@coreybutler I'm happy to help with the Chocolatey script. I've been maintaining the TortoiseGit package on choc so i know how to As for choc.org .. you should create the initial account there and add me to as a contributor so u have god mode and can bitch me around. The main thing with chocolatey is that a BINARY is needed somewhere, which choc downloads and silent installs. THAT'S hard :/ i hate frickin' installers and crap and I have -zero- experience with those. So if the installer that you've done here can take a SILENT arg, then we're good to roll!! sounds like a plan? |
Thanks @PureKrome! I haven't really done anything "chocolatey" other than setting up an account and what you see above (i.e. nothing of any real value), so the script is the perfect place to help. The silent install will go hand in hand with the regular installer, so I can provide that. The "gotcha" is I need to build the new installer. I built the last installer by hand, which sucked. I spent more time on the installer than I did on NVM. The good news is BitRock granted me a full OSS license, and in going through it I've found options to make it "silent friendly". I have some long flights next week. I'll see how far I can get with BtiRock during that time... my initial reaction is it will not really take that long to do. I'll post back here when that's all done. I assume I'll need your email address to add you as a contributor. |
You just need my Choclatey login: PureKrome. I'll also need the url's of the installer(s) when they are avail. Choc can handle x32 and x64 versions ... but I'm not sure if that applies here? everything is just 32 bit..? Finally, if there's any command line args (like default settings or locations) .. tell me those too. The |
Do you want help on this? |
ping |
I'm not sure what the right action should be, from here.
|
I haven't move forward on this for a couple of reasons. The main reason is the installer doesn't work very well in the context chocolatey expects... there are no command line arguments, no silent mode, nada. What really needs to happen is the creation of a new installer. This has pretty much taken a back seat to new development though. With all the movement between io.js/node, a lot has changed... and frankly, most of my time has been consumed by the upcoming NGN effort. I'm hoping to get a new release out this month... but I also have a couple of talks to give this month, so it might spill into early Feb. @PureKrome - I granted you access to the choc.org account back in April. |
Installer is subpar - Ok then. Well, I'll chill on this until the installer comes back to the modern era and accepts silent mode/cli args etc. once that's workin', I can do the rest and then use your repo to drop in the few files. |
The installer does support silent mode. Here's what I'm doing: $installDir = $env:temp + "\win-install"
New-Item -ItemType Directory -Force -Path $installDir
#install nvm
$nvmUrl = "https://api.github.com/repos/coreybutler/nvm-windows/releases/latest"
$response = Invoke-RestMethod -Uri $nvmUrl -ContentType 'application/json'
$nvmDownloadUrl = $response.assets | Where-Object {$_.name -eq "nvm-setup.zip"} | Select-Object -first 1 | select -exp browser_download_url
Invoke-WebRequest $nvmDownloadUrl -OutFile $installDir\nvm.zip
Expand-Archive $installDir\nvm.zip -dest $installDir -Force
Start-Process $installDir\nvm-setup.exe -ArgumentList '/silent' | Wait-Process |
@luisrudge - That won't work on all systems since PowerShell isn't available in older environments. However; I have a practice of only officially supporting operating systems that haven't reached EOL (i.e. Win 8/10, not XP)... so this might work. |
/__ important bit? (ignore the PS stuff) |
Right, you could run this om |
Sure you can.. after downloading the latest release and extracting the zip file, which the powershell script does automagically |
This would be great to have! A few thoughts (forgive me if I missed something in the convo above):
Thanks, |
The installer basically collects information to help customize the experience, like determining an alternative installation root. It also serves as a warning, like telling people their existing version of Node will be overwritten. The logic is pretty simple, so it could be maintained separately. This is why the "no-setup" versions exists in the releases. If someone wants to write a pure powershell installer, that is fine by me. Keep in mind the registry needs to be edited. I don't think I'll have time to maintain that, but I'm open to bringing in a contributor. My only real nit-pick is in workflow. I'd want something that can be updated automatically, i.e. when there is a new core release, Appveyor builds an updated installer (or something along those lines). That said, I'm exploring evergreen capabilities (i.e. autoupdate) since it appears to be pretty straightforward to do this for Go. |
@coreybutler Oooh, auto-update sounds awesome! Questions:
|
@mattheyan - I'm pretty sure it will be in the next major release. I hadn't thought of opt-out. Thanks to your comment, that's now on my list. Just to clarify, auto-update means auto-updating the nvm.exe, not to the latest version of node. |
Sounds great! In terms of the installer, whenever you have a chance could you jot down the steps required to install and/or point me to the relevant code of the installer? I can also try to reverse-engineer it, but it would be best to have a list from you since I may miss important bits. Also, what would need to be done to incorporate it into your release process and appveyor? Most likely once the package is done it won't require changes very often (unless the install logic changes). So an automated process should be able to build and release a new version when a new version of nvm is built, without the need to write any code. Thanks, |
I'll try to write up a spec/steps soon to cover specifics. In the meantime, the high level approach is in the wiki and the super ugly way to get all of the nitty gritty details is in the nvm.iss file, which contains all of the install logic. There are some issues with Appveyor that I need to sort out, so for now I would suggest getting it working however you can, knowing that we'll address Appveyor as soon as plausible. If the chocolatey package is 100% powershell, then it may be as simple as having unit tests (if that's even practical), meaning a separate Appveyor process or alternative build. Right now, the Appveyor issues are primarily in making sure the latest version of Go is installed for creating the executable. However; the chocolatey installer will leverage the final executable, so my initial thoughts are the completion of the go build process can trigger a follow-on build for any installers. Again, I'll try to put something more formal together, but here are a couple of other thoughts I've been mulling over (just to get them out):
While the points above aren't directly related to chocolatey, I wanted to give a brief glimpse into the bigger picture. I'm also interested in bringing in contributors who could help maintain other installers for other platforms (homebrew/apt/yum/etc). |
That's a very detailed and helpful install guide. I'll keep you up to date on progress. |
I've created a portable package, currently waiting for approval - nvm.portable Source code: chocolatey-nvm-windows. |
@arieljannai - I see the reviewer came back with a few minor feedback items. 1) Why remove the AppData folder? (Answer: that's where the app is installed ;P), and 2) Should the package name be 'nvm' instead? (I think probably so) What's your take on those questions? Let me know if I can help. -Bryan |
I just didn't had time for that 😅 |
Aaaaaaaaaand rejected. :( |
I was on a vacation, so didn't had time to look at it 😅 |
I just tested the package (had to download via the link on the left instead of installing from the web via chocolatey. Just a couple things, that probably need looked at.
I tried repacking with 1.1.1 in the nuspec and installChocolatey and it worked, but the same issues in 2 and 3 still presented themselves, though I haven't tried in a completely fresh Vagrant VM yet to see if that's just an issue of being installed after 1.1.0. I'm going to try and take a look and implement the suggestions/feedback on the Chocolatey package gist, but the pressing need for NVM that I had has mostly resolved itself, so it has lost the priority for me to spend much time on my fork. @luisrudge I noticed that the silent mode doesn't appear to work if you already have nodejs installed (via chocolatey or otherwise) and so I'm hoping we can find away to work around that limitation with the no-install option, though the conflicts could perhaps be improved if someone has time to work on the nvm-windows installer since the original author of that is busy with other projects. |
I opened a pull request against @arieljannai 's repository above that updates it to 1.1.1 and fixes the main issues mentioned during the package review process. Once built and pushed we'll want to see if they have any further qualms, but I'm using my version from our internal package repository and will see if I run into any issues before then. |
For anybody needing this sooner than later, you can try the "preview" version of nvm from Chocolatey by installing the version here. https://chocolatey.org/packages/nvm.portable/1.1.1 Use |
The "takeover" of |
The nvm chocolatey package was approved but needs updated to use AU (the Chocolatey automatic package updater) in order to keep up with new releases of nvm automatically. |
Hi guys, Open powershell windows and run following commands: |
Closing. See https://chocolatey.org/packages/nvm.portable |
NVM is awesome, saves my time, another program I use is chocolatey, with this package manager you can install easily windows programs.
I wish register nvm in chocolatey but I need the permission to do this.
The text was updated successfully, but these errors were encountered: