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 -- Posted via http://www.ruby-forum.com/.
Hameed Gifford
2010-Nov-09 12:35 UTC
[wxruby-users] how to reduce size of .exe file got from ocra
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 Tue, 2010-11-09 at 09:08 +0100, Worrawut Poonsuk wrote:> 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 >
hendra kusuma
2010-Nov-09 13:08 UTC
[wxruby-users] how to reduce size of .exe file got from ocra
On Tue, Nov 9, 2010 at 4:08 PM, Worrawut Poonsuk <lists at ruby-forum.com>wrote:> 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 > >There should be some freeware out there to reduce exe file size, I found two long time ago, but forgot their name -- Suka linux? Kunjungi blog saya http://penguinroad.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20101109/fcd0ca6b/attachment.html>
hendra kusuma
2010-Nov-11 17:18 UTC
[wxruby-users] how to reduce size of .exe file got from ocra
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 Tue, Nov 9, 2010 at 8:35 PM, Hameed Gifford <giff.h92 at gmail.com> wrote:> 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 Tue, 2010-11-09 at 09:08 +0100, Worrawut Poonsuk wrote: > > 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 > > > > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-- Suka linux? Kunjungi blog saya http://penguinroad.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20101112/30e6443b/attachment.html>
Worrawut Poonsuk
2010-Nov-12 04:26 UTC
[wxruby-users] how to reduce size of .exe file got from ocra
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 -- Posted via http://www.ruby-forum.com/.
hendra kusuma
2010-Nov-12 10:35 UTC
[wxruby-users] how to reduce size of .exe file got from ocra
what about move your samples directory somewhere and try again? perhaps that would do the trick? On Fri, Nov 12, 2010 at 12:26 PM, Worrawut Poonsuk <lists at ruby-forum.com>wrote:> 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-- Suka linux? Kunjungi blog saya http://penguinroad.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20101112/a018826a/attachment-0001.html>