-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
Windows Support #216
Comments
At present there's no one championing Windows support, but this is something we're going to look at in the next version. @reybango had some interest in looking at this recently though. Perhaps he'd like to try seeing if it's possible? |
@reybango: Is it fair to assume that you were hoping to hook this up with a PowerShell script (vs. suffering through Windows Batch land)? |
@JamesMGreene I really don't have any specific ideas on how to make this work yet. I've only recently been given access. If you have some ideas, please let me know and maybe we can work together on it. Hit me up reybango at gmail. |
This is something I could take on. There are 2 things that would simplify this, from a maintenance perspective.
Here's an example of a similar installer that I wrote for a Windows / Graphite publishing tool called PerfTap icm $executioncontext.InvokeCommand.NewScriptBlock((New-Object Net.WebClient).DownloadString('https://raw.github.com/EastPoint/PerfTap/master/InstallPerfTap.ps1')) |
👍 PowerShell & Chocolatey Since this is not landing until v2 we got some time to do it right. Would be nice to get all the homebrew packages we require up on Chocolatey. We currently require: git, optipng, jpeg-turbo, phantomjs, of which it only has |
I already have a Powershell script to install PhantomJs locally for my team.. was actually thinking of doing the pull req for a new Chocolatey package since I think others would benefit. Install is not too complicated, aside from being dependent on 7zip (which can be installed through Chocolatey) #grab PhantomJS / unzip to temp dir, and move to program files
(New-Object Net.WebClient).DownloadFile('http://phantomjs.googlecode.com/files/phantomjs-1.6.1-win32-static.zip', "${Env:\temp}\phantomjs-1.6.1-win32-static.zip")
&"${Env:\ProgramFiles}\7-zip\7z.exe" x "`"${Env:\temp}\phantomjs-1.6.1-win32-static.zip`"" "-o${Env:\ProgramFiles}"
# Tweak environment variables
$Env:Path += ";${Env:\ProgramFiles}\phantomjs-1.6.1"
[Environment]::SetEnvironmentVariable("Path", $env:Path, [EnvironmentVariableTarget]::Machine) You can use COM and Windows Shell to extract zips, but I've found out the hard way that it's not supported on Server Core, which can make it painful if you have a Server Core build server (like us! ;0) 7zip will also be needed to extract the .tar.gz files for Yeoman itself, so... |
FYI - Put in the pull request to Chocolatey for PhantomJS, OptiPNG and jpeg-turbo Can probably tackle the script conversion tomorrow. |
Nice, love it. I was unaware of Chocolatey, that's pretty cool. |
Off-topic: Hey @ryanseddon, apparently you should take a look at Chocolatey (src) if you are still trying to streamline your Bunyip dependencies (e.g. Python) for Windows. |
Oooh thanks @JamesMGreene will do. |
@Iristyle That was fast! Awesome :) |
Will hack out install.ps1 now, and will basically mirror the functionality of install.sh as a first step for Windows install. I'll raise one issue though with installing tooling dependencies like OptiPNG through Chocolatey. I generally try to avoid 'global' packages for small tooling packages like OptiPNG. I can speak with some experience here, having spent a lot of time automating (for EC2 and for local dev bootstraps), and setting up source repos for my team so that code can be pulled and built with ease by both new devs AND the build server. I generally draw the line, so that full language frameworks / runtimes are installed on the build server / dev box, and additional tooling should live in the repo (and should be pulled during first build by a package manager when we're talking about binaries). So for instance, I would expect Ruby or the .NET Fx SDK to be on the build server, but OptiPNG or libjpeg-turbo to be a dependency of the project. Why?
You can see these same issues were recently raised with Grunt, and the 0.4.0 dev branch allows running locally from within node_modules. I would rather see at least PhantomJS, OptiPNG and libjpeg-turbo installed locally as NPM packages when a project is However, I don't know if there are technical or philosophical reasons that these tools are not already packages in NPM? Maybe the authors have no interest in building from source with node-gyp, etc? |
Definitely onboard with this effort. I'm on vacation this week so my time is very limited but I'll be available next week to sync with you guys and help in any way I can. |
I would too, but someone has to do it. Currently none of these can be directly installed through NPM. |
I raised a discussion about this with the PhantomJS group but it seems they're fundamentally opposed: https://groups.google.com/forum/?fromgroups=#!topic/phantomjs/tlQJzbCbrPI :) |
We would really love for someone to take ownership of helping us get Windows support in place. Since #400, we've decided to no longer support automated install scripts and instead offer an audit script which lets developers know what they're missing and provides links to where to get these dependencies. For the reasons for this please see the issue but it might help simplify the amount of work needed to get this baby installed on Windows if anyone is willing to explore. @paulirish if you have anyone else you think is worth reaching out to about Windows support it would be baller to get them involved too :) |
I can do this as mentioned... but was waiting on @ferventcoder so that I don't have to maintain those packages myself - especially since he's automating package updates on accepted pull reqs. But if necessary, I can host / maintain those bits on my GitHub account and push them up to Chocolatey by hand. From the issue you guys closed re: ShellJS (#382).. Writing a bunch of dep checks in Powershell is not too hard.. but ShellJS has cross-platform tools like Any thoughts? |
Just leaving this here http://www.decodize.com/css/installing-yeoman-front-end-development-stack-windows/ |
Got it working in windows as well, the same way mentioned at decodize. Was a very simple and quick install. Seems to work just fine for me. No issues so far. |
@jermbo002 that's excellent to hear. @paulirish Looks like we've got Windows support :) We just need to get the deps captured in the audit. //cc @Hemath |
Chocolatey version is Install Chocolatey
New Powershell prompt #1.9.3
cinst ruby
cinst compass -source ruby
cinst nodejs.install
cinst gitextensions
#then as soon as they're available in Chocolatey - based on my pull req
cinst libjpeg-turbo
cinst OptiPNG
cinst PhantomJS
Of course, this could be wrapped up in a single script as well. Updated with Robs info on installing Compass. |
|
Oh oh.. didn't realize that.. thanks Rob! |
If someone puts together a yeoman package (which I think is happening here?) - then set all of the dependencies to the above in the nuspec. In the end it's just |
No one has talked about doing a Yeoman package yet.. but that seems the next logical step... The only thing on top of wrangling the deps, would be to put |
FYI - I went ahead and put in the pull req to Chocolatey for Yeoman This will install Yeoman and it's dependencies with a single command as Rob mentioned above (after Chocolatey is installed)
|
Yay! Yeoman for all. |
@ addyosmani - everything seems to be working fine in windows. |
@ferventcoder made a couple of tweaks to what I put together and now the yeoman package is available through Chocolatey |
Yeoman npm install works fine on windows. Initially had some issues with imagemin and phantomjs. But default installation works fine now. I'm using 'yo webapps' for a while, but not tried angular. I'm on node v0.8.21. |
"yo webapp" was giving some namespace errors in windows. Today i tried default installation again; "npm install -g grunt-cli bower yo" and "npm uninstall -g yeoman"; voila! You can give happy news to win users now. Thank you. |
@sindresorhus I would like to tweet out asking Windows users to try "npm install -g grunt-cli bower yo", "npm uninstall -g yeoman" and "yo webapp" just to verify this works for most people. Sound like a good idea?. If so, we might consider including this news in the beta 4 post. |
@addyosmani go for it. |
Appears to have worked fine for most users but we've had one or two reports of grunt not correctly building after running |
First one:
It should be there, so maybe that person didn't run |
1.0 beta3 is working fine for me on Windows with the instructions on yeoman.io. I'm currently testing the master branches of "yo" "generator" and "generator-webapp" under windows as well. |
@addyosmani, also regarding the first one, Compass needs to be installed. Regarding the second one I can't spot any problems. |
@addyosmani - I tried in another win 7 machine with node vv0.8.16 and got an error - npm ERR! cb() never called! [http://pastebin.com/29MnktRe line no:103]. In this machine compass is not installed. I got similar error like first link when I tried grunt. |
|
@sindresorhus Updated node to v0.10.3 and working fine now. In windows with latest node, compass and git yeoman will work. |
@addyosmani I have no issues with beta3 when following the Getting Started instructions to install and run In order to track down issues with Windows users, I think it's important to make sure that you get the exact version of Windows, node, git, and ruby they have installed, and -- very important -- the terminal shell they're using. A lot of people don't seem to realize that trying to run commands from, say, Cygwin is not necessarily going to get expected results, since Cygwin installs and runs its own versions of things like Ruby. Frankly, I won't let Cygwin near my system anymore. In my case, I run all CLI stuff through Git Bash (msysgit), not just for Yeoman, but for everything in my development workflow. Git is a boon for us hapless Windows guys, because it helps bridge the gap a little between the cold, hard world of the NT kernel universe and you fancypants POSIX people, while being sensibly flexible.
|
running on Windows 7 x64, Nodejs 0.10.3, Git 1.8.1.2, Ruby 2.0 x64 I just made a fresh installation about an hour ago and works fine from my events.js:72 "grunt test" and "grunt" works fine though. I also tried the installation steps for Angular and everything installed On Tue, Apr 9, 2013 at 1:20 AM, Raphael Valerio notifications@github.comwrote:
|
Could you try to run |
i ran "yo webapp --skip-install" but still gives the same error at the end: I'm all done. Running npm install & bower install for you to install the events.js:72 and yes, bower and npm are on my PATH On Wed, Apr 10, 2013 at 1:05 AM, Pascal Hartig notifications@github.comwrote:
|
@JorPan I got the same error after the auto install of dependencies was added. I reported this yesterday here yeoman/generator-webapp#32 (comment) I've been using the master branch and the webapp generator was working fine before this change. Running "npm install & bower install" manually works though. |
Related to nodejs/node-v0.x-archive#2318. We could run something like this, which would solve this: var win32 = process.platform === 'win32';
spawn(win32 ? 'cmd' : 'npm', [win32 ? '/c npm install' : 'install'], { stdio: 'inherit' });
spawn(win32 ? 'cmd' : 'bower', [win32 ? '/c bower install' : 'install'], { stdio: 'inherit' }); |
@kevva sgtm
|
sgtm |
Closing as we now support Windows. Feel free to open new tickets if you stumble upon an issue, but make sure it hasn't already been reported (also see closed issues). |
🤘 |
As per our announcement back in April, we now officially support Windows as Sindre mentioned earlier. If you run into any new issues regarding Windows support please feel free to ping us on the #yeoman channel or open up a new issue on the relevant generator repo. |
Great! 👍 |
💯 |
👍 |
Is anyone working on a install script (variant of "/setup.install.sh") for Windows?
The text was updated successfully, but these errors were encountered: