除了 Shoes 之外还有其他方法可以开发和分发用 Ruby 编写的跨平台 GUI 桌面应用程序吗?
我开始相信 _why 的应用程序的普遍错误对于 Shoes 来说是特别严重的,并且任何比两个按钮表单更复杂的东西都很难维护。
RubyGTK、wxRuby 等似乎很有前途,但它们并没有解决以不需要在用户计算机上预安装 Ruby 的方式分发应用程序的问题,而且像 ruby2exe 这样的库似乎非常不合时宜。日期且不完整。
一般来说——当前的流行趋势是什么?
顺便说一句:如果 Python 中有一个非常简单的解决方案,我可能会考虑用 Python 重做我正在做的事情。
Is there any way besides Shoes to develop and distribute cross-platform GUI desktop applications written in Ruby?
I come to believe that general bugginess of _why's applications is exceptionally crippling in case of Shoes, and anything more complex than a two-button form is a pain to maintain.
RubyGTK, wxRuby, etc seem to be promising, but they do not solve the issue of distributing an app in a way that doesn't require Ruby pre-installed on users' computers — and libraries like ruby2exe seem to be horribly out-of-date and incomplete.
Generally — what is the current fad?
BTW: if there is a really easy solution to this in Python, I may consider redoing the stuff I'm up to in Python.
发布评论
评论(7)
对于 Ruby,一键式 Ruby 应用程序生成器 (OCRA) 正在作为RubyScript2Exe。
Ocra 可与 Ruby 1.8.6 和 1.9.1 以及 wxRuby 配合使用。 支持相对紧凑的可执行文件的 LZMA 压缩。
For Ruby, the One-Click Ruby Application Builder (OCRA) is emerging as the successor to RubyScript2Exe.
Ocra works with both Ruby 1.8.6 and 1.9.1, and with wxRuby. Supports LZMA compression for relatively compact executables.
我不了解 Ruby,但 Python 的标准是 py2exe 创建 Windows 二进制文件。 对我来说,跨平台 pyinstaller 曾经运行良好。 对于您的 GUI,TkInter 是标准。 很多人喜欢wxPython。 所有这些都相当积极地开发。 我建议尝试一下这些选项来决定 Python 是否是更好的选择。
I don't know about Ruby, but the standard for Python is py2exe to create Windows binaries. For me, the cross-plattform pyinstaller has worked well, once. For your GUI, TkInter is the standard. A lot of people like wxPython. All those are fairly actively developed. I suggest playing a little bit around with these options to decide whether Python is the better choice.
事态相当糟糕。 目前最可靠的方法可能是使用JRuby。 我知道这可能不是您想听到的答案,但是,正如您所说,ruby2exe 不可靠,而 Shoes 还很遥远(甚至不打算成为一个全面的应用程序)。 就我个人而言,我不喜欢强迫用户安装 GTK 或 Qt 或 wxWidgets,但 JVM 相当普遍。
The state of affairs is pretty bad. The most reliable method at present is probably to use JRuby. I know that's probably not the answer you want to hear, but, as you say, ruby2exe is unreliable, and Shoes is a long way off (and isn't even intended to be a full-scale application). Personally, I dislike forcing users to install GTK or Qt or wxWidgets, but the JVM is fairly ubiquitous.
根据您的开发程度,鞋子 相当不错。 它基本上是它自己的 Ruby 发行版。 它可能有点隐藏(在文件菜单中),但它允许您为所有 3 个平台打包应用程序,而无需使用 Shoes 启动屏幕。
其背后的渲染引擎是Cairo。
Depending on how far you development is, Shoes is pretty good. Its basically it's own Ruby Distribution. It may be a bit hidden (in the files menu), but it allows you to package your application for all 3 platforms without having that Shoes startup screen.
The rendering engine behind it is Cairo.
我认为没有人真正回答他的问题。
对于我来说,我使用 VB 对 Ocra 编译的 Ruby 脚本进行 Shell() 调用。
它工作得很好,允许我创建在所有现代操作系统中运行的应用程序。
Linux 测试是通过使用 Wine 运行并确保我使用 .NET 之前版本的 VB 进行 .exe 编译来完成的。
I don't think anyone really answered his question.
As for me, I use VB to do Shell() calls to Ocra compiled Ruby scripts.
It works pretty well and allows me to create apps that run in all modern OS.
Linux testing is done by using Wine to run and ensuring that I use a pre .NET version of VB for the .exe compilation.
我不知道 ruby2exe,但 py2exe 工作得很好。 即使使用像 wxWidgets 这样的库。 编辑:你甚至不必要求用户安装 wxWidgets,它与应用程序捆绑在一起(py2app 也是如此)
我将它用于我的非常小的项目 此处。
对于 Mac 用户来说,py2app 也可以与 wxWidgets 配合使用。
I don't know about ruby2exe, but py2exe works perfeclty fine. Even with librairies like wxWidgets. Edit: you don't even have to ask the user to install wxWidgets, it's bundled with the app (same goes for py2app)
I use it for my very small project here.
For the Mac crowd, py2app works fine too with wxWidgets.
我读过(但没有使用)Seattlerb 的 Wilson,它将自己描述为纯 x86 汇编器,但听起来不像是跨平台或 GUI。
I've read about (but not used) Seattlerb's Wilson, which describes itself as a pure x86 assembler, but it doesn't sound like it'd be cross-platform or GUI.