bleedingwolf / Ratpack

A micro web framework for Groovy
Other
210 stars 4 forks source link

windows support? #29

Closed patsimon closed 10 years ago

patsimon commented 10 years ago

The ratpack binary that "gradle buildDistro" creates appears to be *nix only. Is there an equivalent windows binary that I could create?

raymyers commented 10 years ago

You should probably check the project's new home to see if this still applies.

https://github.com/ratpack/ratpack

Since the distro is now built via a standard Gradle "application" plugin, I think it should work in windows. Build a distribution with "gradle installApp", or "gradle distZip", depending on whether you want it zipped.

There are some example project setups that might make it easier to convert.

For Java:

https://github.com/ratpack/example-ratpack-gradle-java-app

For Groovy:

https://github.com/ratpack/example-ratpack-gradle-groovy-app

patsimon commented 10 years ago

I tried using the code on the new site (with "gradle distZip"). Unfortunately, the project that I am looking at specifically uses THIS version of ratpack.

raymyers commented 10 years ago

I don't have a Windows machine handy to try this on, but the executable "ratpack/bin/ratpack" is just a groovy script. If you've got groovy installed, you should be able to run it in Windows with something like "groovy path/to/ratpack/bin/ratpack [arg]". If that works, it'd be easy to wrap that in a .bat if desired.

Failing that, the standard way to do this is with the gradle application plugin. It would be pretty simple to convert this version to use it - RatpackRunner would just have to have a main method. Let me know if you want to give that a try and have trouble.

http://www.gradle.org/docs/current/userguide/application_plugin.html

Ultimately, I would encourage you to try converting the project you're working on to the new version of Ratpack if that's practical, since this one never stabilized and hasn't really been maintained for 2 years.

patsimon commented 10 years ago

Thanks for the tips Ray. I ended up spinning up a Virtual Box image which was the easiest path in the end