Hi,
I just create a simple WxRuby app and then try to turn it into .exe file
using Ocra. The code is something like...
require 'wx'
class SimpleApp < Wx:App
def on_init
Wx::Frame.new(nil, -1, "Simple App").show()
end
end
SimpleApp.new.main_loop
However, the exe file from Ocra is quite big, about 5.45 Mb. I think it
is because Wx requires many dependencies so that make this result.
BTW, Is there any way to reduce file size of this exe ?
Wut
on 2010-11-09 09:08
on 2010-11-09 14:35
On Tue, Nov 9, 2010 at 4:08 PM, Worrawut Poonsuk <lists@ruby-forum.com>wrote: > end > There should be some freeware out there to reduce exe file size, I found two long time ago, but forgot their name
on 2010-11-11 14:13
Wut 'sup? I don't think so, since the 'require 'wx'' line loads all of WxRuby. I think you'll find that if you write a very elaborate ruby code, along the lines of 300KB in size, the .exe will not change much. But if I'm proved otherwise, by all means ignore me. - hameed
on 2010-11-11 18:19
I believe the exe will be much more than 300 KB in size, since exe files include all library it need, and Wx is not a very small one. about 5 mb is normal I have used ruby script2exe before and the result is way bigger than 5 mb so yours is fine, really
on 2010-11-12 05:26
when I do >ocra very_simple_app.rb, then ocra compile and the trace looks something like.. ... ... a lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/treectrl/icon4.xpm a lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/treectrl/icon5.xpm a lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/treectrl/treectrl.r b m lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/xrc a lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/xrc/samples.xrc a lib/ruby/gems/1.8/gems/wxruby-2.0.1-x86-mswin32-60/samples/xrc/xrc_sample.rb e RUBYOPT -rubygems e RUBYLIB e GEM_PATH <tempdir>\gemhome p <tempdir>\bin\ruby.exe ruby.exe "<tempdir>\src\very_simple_app.rb" === Compressing === Finished building very_simple_app.exe (5720630 bytes) I think I don't need to load such dependencies like /samples, etc... I look into ocra document again and found that ocra will load all dependencies describe in manifest file of the required gem(or source file). So that I should be able to reduce size by modify the manifest of my wxruby. But the problem is, I cannot find the manifest file in the /lib/ruby/gem/1.8/gems/wxruby-2.0.1-x86-mswin32-60/, cann't find it from the root of ruby path as well :P How can I address ? Any suggestion, pls? Wut
on 2010-11-12 11:48
what about move your samples directory somewhere and try again? perhaps that would do the trick?
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.