Building a Windows Executable from My Ruby App

Building a Windows executable from my Ruby app?

I've used it about 3 times and I haven't had any problems with it and I ran one of the apps on 10 servers and never had any issues. So, I think RubyScript2Exe is about as good as it gets for ruby.

Creating Windows executable for ruby APP

So Finally I got the answer, So Travelling ruby does't work for me because some of its limitations

So its good to go with Ocra Gem (https://github.com/larsch/ocra)

Simple install the gem on windows (I have made app on window)
and run the command

ocra <Ruby file name > --verbose --gem-full --no-dep-run --add-all-core --gemfile Gemfile

It will generate the exe file and you are ready to run it on any windows

Building CompassApp (jruby app) executable from source on Windows

@Fabio Hi, we made Compass.app and Fire.app :-)

It is easy to build Compass.app on OS X or Linux. We have a (almost) step by step guide about building Fire.app on the GitHub wiki and it can be applied to Compass.app too: https://github.com/handlino/FireApp/wiki

We have never tried to build it on Windows, and do not think it can be done easily.

Can Ruby be used to develop simple Windows applications?

Ruby is not primarily a web programming language even though Ruby on Rails is certainly suited for web development. Ruby is a general purpose scripting language.

The FXRuby and WxRuby frameworks are the most fully featured GUI frameworks for Ruby. You can write the apps in Ruby and then generate a Windows executable. The frameworks are cross-platform, so you could also run the apps written in these on other platforms, like Linux or Mac OS X.

There are also a few other less popular approaches like QtRuby and Shoes, and you can even use IronRuby (a CLR Ruby implementation) to write a .Net application.

Ruby : my program creates .exe but can't without ocra installed in another computer

Thanks to Raffael's answer, it's working like that :

Forget the idea of using exec("ocra game.rbw") into the program. With my computer with ocra installed, I created a basic game.exe with game.rbw that will be interpreted differently thanks to eval. The idea is that instead of creating a new .exe for each different project, we will set it thanks to source code interpretation.

If you had something like that into game.rbw :

Dir.entries("SourceCode").each do |code|
require_relative "SourceCode/" + code if code.include?(".rb")
end

Replace it by :

Dir.entries("SourceCode").each do |code|
eval(File.open("SourceCode/" + code, "r:UTF-8").readlines.join("\n")) if code.include?(".rb")
end

If you set a part of your source code, next time launching your game.exe would be interpreted differently.



Related Topics



Leave a reply



Submit