Wxruby2 problems

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 F. answered in the Ruby list that it’s a script2exe bug.
Could you please elaborate on the steps needed to reduce the exe size ?

  1. [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

Eli B. 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 F. 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.

  1. [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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs