Creating Ruby applications for Windows

别说谁变了你拦得住时间么 提交于 2019-12-21 09:27:00

问题


I want to develop a Windows application. Honestly I care little about cross-platforms for now (but still would be good)

I want to use Ruby, since it has quite a simple syntax and is so.. well, simple and easy to learn.

My application is like a "game level creator", where you can design your own level and then run it with another application which is a "game level player" by reading the project file created by the creator app. You get the idea.

Now, I got a new PC and is completely clean. Absolutely no trace of my old Ruby experiments and fails.

First of all, I will need to choose a GUI platform for my Ruby application! Can you recommend me one? I have heard of Shoes and Tk, but want to know what you think.


回答1:


Have you considered IronRuby? It's an implementation of Ruby that runs on the .Net platform, which means you have access to all of the standard Windows Forms libraries, if you decide to run in Windows. http://ironruby.net/

According to david4dev, it also runs well on Mono, which makes it great for cross-platform compatibility, as the Mono platform runs on Mac OSX and Linux, as well as Windows.

Jorg W Mittag says that using the WPF (Windows Presentation Framework) is an even better option for creating GUI's since Mono has a very strong implementation of the WPF. The WPF was created to be platform agnostic and is better suited for cross-platform development over WinForms, since WinForms is tightly coupled with the Windows OS.




回答2:


I recommend using Shoes out of the 2. Shoes is a nice simple way to build small applications using Ruby. The reason why Shoes is better than TK for your application is that it makes it very simple to create graphics.

Shoes is well suited to small apps and it will be quite hard to create a game creator using it.

You are probably better off using an SDL based game framework such as Rubygame . This works on Linux, Windows and OSX.




回答3:


For the simple, typical editing most GUI kit will do just fine. However, for the more complicated (and especially the level creation/editing) you're mostly gonna end up using a lot of self-made rendering in DirectX/OpenGL.

I don't know a lot about Ruby though, but I'd consider GUI kits Or frameworks with that aspect in mind.

Just thought I'd share my 2 cents :)



来源:https://stackoverflow.com/questions/4576810/creating-ruby-applications-for-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!