Hello,
I''ve recently installed wxruby2 (version 1.9.4) from a precompiled
mswin32 gem. It seems to work fine, and the samples in the
distribution all work, but I have a couple of peculiar problems:
1) When I package a trivial wxruby script with rubyscript2exe, the
executable is huge - 8.5 MB. With previous versions of wxruby (prior
to wxruby2, I think) it was much smaller. Less than 3 MB. Is this how
much the new wxruby takes, or am I doing something wrong ?
Note: Alex Fenton answered in the Ruby list that it''s a script2exe bug.
Could you please elaborate on the steps needed to reduce the exe size ?
2) [warning: this is bizarre!] While running a script with a wxruby
GUI, my mouse (trackball, actually) becomes much slower. It''s
configured to be quite fast because I have a large script, but slows
down (by a factor of 2, at least) while the script is running. When
the script exits, the cursor regains its original speed. This does not
happen with simple ruby scripts (those without wxruby)
This simple hello world app (from the website) causes the problem as well:
require "wx"
include Wx
class HelloWorld < App # a new class which derives from the Wx::App class
def on_init # we''re defining what the application is going to do
when it
starts
helloframe = Frame.new(nil, -1, "Hello World") # it''s
going to make a
frame entitled "Hello World"
StaticText.new(helloframe,-1,"Hello World") # it''s
going to put the
text "Hello World" in that frame
helloframe.show() # and then it''s going to make the window appear
end
end
HelloWorld.new.main_loop # and this line makes it actually do it!
Please help,
Eli
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
Eli Bendersky wrote:> > 1) When I package a trivial wxruby script with rubyscript2exe, the > executable is huge - 8.5 MB. With previous versions of wxruby (prior > to wxruby2, I think) it was much smaller. Less than 3 MB. Is this how > much the new wxruby takes, or am I doing something wrong ? > > Note: Alex Fenton answered in the Ruby list that it''s a script2exe > bug. Could you please elaborate on the steps needed to reduce the exe > size ? >(Plain text is preferred on this list, please) 1) Create the .exe file using rubyscript2exe as normal rubyscript2exe my_app.rb 2) Run the newly-created .exe file with the argument --eee-justextract my_app.exe --eee-justextract 3) Edit the file "myapp/app.eee". Delete the line reading "f bin\wxruby2.so" 4) Change into the directory and repack the executable cd my_app eee.exe app.eee ../my_new_app.exe 5) Test that my_new_app.exe works. It should be about 3-4MB smaller than the original I have reported this bug to the maintainer of rs2exe, but haven''t had any response.> 2) [warning: this is bizarre!] While running a script with a wxruby > GUI, my mouse (trackball, actually) becomes much slower. It''s > configured to be quite fast because I have a large script, but slows > down (by a factor of 2, at least) while the script is running. When > the script exits, the cursor regains its original speed. This does not > happen with simple ruby scripts (those without wxruby) >Strange, I have never seen this before. Do you have any special software for your trackball, or are you just using your standard system settings to make it fast? Does is slow down across the whole system, or just when you''re in the wxRuby app? alex
Thanks for the repacking directions with rs2exe !> 2) [warning: this is bizarre!] While running a script with a wxruby > GUI, my mouse (trackball, actually) becomes much slower. It''s > configured to be quite fast because I have a large script, but slows > down (by a factor of 2, at least) while the script is running. When > the script exits, the cursor regains its original speed. This does not > happen with simple ruby scripts (those without wxruby) >|Strange, I have never seen this before. Do you have any special software |for your trackball, or are you just using your standard system settings |to make it fast? Does is slow down across the whole system, or just when |you''re in the wxRuby app? I''m not using any special software, just the usual Windows mouse settings. It slows down only when I''m in the wxRuby app. It also happens in apps packed by rs2exe. Interestingly, it doesn''t happen with apps written in the previous version of wxRuby. Eli