[ANN] wxRuby 2.0.0

I'm happy to announce the release of wxRuby 2.0.0, the comprehensive, cross-platform GUI toolkit for Ruby. Though recent versions have been very usable (and much used), this is the first official stable release from the project, the fruit of several years development.

http://wxruby.rubyforge.org/

== Minimal Example

require 'wx'
Wx::App.run do
   frame = Wx::Frame.new(nil, :title => 'Welcome to wxRuby')
   frame.show
end

== Why wxRuby?

There are several fine GUI toolkits for Ruby, but wxRuby offers a combination of advantages that we feel isn't equalled by any other:

* Uses real native widgets on Windows, OS X and Linux/GTK, giving applications OS-standard appearance and behaviour
* Fully supports Ruby 1.8 and Ruby 1.9
* Provides a comprehensive set of GUI controls, including advanced widgets: a rich text editor, Scintilla code editor, a spreadsheet, IDE-style layouts, a media player etc
* Cross-platform support classes for printing, the clipboard, drag/drop between applications, locales, images etc
* Uses a liberal licence, compatible with free and commercial development
* Based on the mature, widely used and actively developed wxWidgets library
* Works with a range of free and commercial RAD tools for visually designing GUIs
* Easy to install, package and redistribute
* Highly customisable from the ground up

== Installation

Binary gems are provided for nine major platforms. For most users, especially on Windows and OS X, installing from a binary gem will be easiest. For now, we recommend you download the gem for your platform from the file page:

http://rubyforge.org/frs/?group_id=35&release_id=31815

And install it locally using "gem install <filename>". Rubygems seems to be failing to offer the latest version for remote installation in some cases.

Linux users will need their distro's libwxgtk-2.8; see INSTALL.txt for more information.

For users wanting to get started quickly on GUI development with Ruby 1.9, there's also a setup package containing MingW, Ruby 1.9 and wxRuby 2.0.0.

== Credits

Thanks to all those who've contribute to the project over the past few years, supplying patches, bug reports, suggestions for enhancements, and just being interested in making wxRuby as good a GUI tool as possible. Known contributors are listed in the README distributed with wxRuby.

== Further Information

wxRuby homepage:
http://wxruby.rubyforge.org/

Rubyforge project page:
http://rubyforge.org/projects/wxruby/

wxruby-users mailing list:
http://rubyforge.org/mailman/listinfo/wxruby-users

API docs:
http://wxruby.rubyforge.org/doc/

···

__

alex

Alex Fenton wrote:

I'm happy to announce the release of wxRuby 2.0.0, the comprehensive,
cross-platform GUI toolkit for Ruby.

Congrats :slight_smile:

For users wanting to get started quickly on GUI development with Ruby
1.9, there's also a setup package containing MingW, Ruby 1.9 and wxRuby
2.0.0.

Thanks for doing that on mingw :stuck_out_tongue:
Could I make a plea for 1.9 windows users to try to consolidate on
mingw, versus other compilers? Cross It would make it easier , and have
less targets for binary distributables [and they're easier, thanks to
Luis' cross compiler [1]]. It would also coalesce open source projects,
so we could all benefit each other [mingw is open source, VC not].
It's just my opinion but it would seem to make sense.
Thoughts?

-=r
[1] GitHub - rake-compiler/rake-compiler: Provide a standard and simplified way to build and package Ruby C and Java extensions using Rake as glue. see also
http://blog.mmediasys.com/2008/12/13/while-leaving-ny-rake-compiler-for-the-masses/
and http://www.holymonkey.com/building-shoes-in-windows [the last for
how to build mingw ruby 1.9]

···

--
Posted via http://www.ruby-forum.com/\.

Alex Fenton wrote:

I'm happy to announce the release of wxRuby 2.0.0, the comprehensive, cross-platform GUI toolkit for Ruby. Though recent versions have been very usable (and much used), this is the first official stable release from the project, the fruit of several years development.

http://wxruby.rubyforge.org/

Very cool.

I looked around the the project site, but did not find any specif info on packaging of completed apps for distribution.

How do I bundle up a wxRuby app to give to an end user (who may or may not have Ruby installed)?

Can I do all my development on my Ubuntu machine, then bundle up my app and hand it off to a Mac or Windows user?

Thanks,

···

--
James Britt

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff

Alex Fenton wrote:

== Installation

Binary gems are provided for nine major platforms. For most users,
especially on Windows and OS X, installing from a binary gem will be
easiest. For now, we recommend you download the gem for your platform
from the file page:

http://rubyforge.org/frs/?group_id=35&release_id=31815

I see:

wxruby-2.0.0-universal-darwin-9.gem

but I'm using:

$ ruby -v
ruby 1.8.2 (2004-12-25) [universal-darwin8.0]

which as you can says darwin 8.0. I'm using osx 10.4.11 Tiger, which
was the last release before Leopard osx 10.5. Does that mean there's no
soup for me?

···

--
Posted via http://www.ruby-forum.com/\.

James Britt wrote:

Alex Fenton wrote:

http://wxruby.rubyforge.org/

Very cool.

Thanks.

I looked around the the project site, but did not find any specif info on packaging of completed apps for distribution.

How do I bundle up a wxRuby app to give to an end user (who may or may not have Ruby installed)?

Rubyscript2exe works fine for many cases. On Windows and OS X, wxWidgets is statically compiled into wxRuby, so you have everything you need to redistribute to others.

For more advanced installations, I've used platform-specific tools like Platypus (OS X) and NSIS installer (Windows) to ship a complete ruby package that works like a compiled native app.

Can I do all my development on my Ubuntu machine, then bundle up my app and hand it off to a Mac or Windows user?

As with any other MRI native extension, a compiled wxRuby library is specific to platform (= OS + processor + major ruby version). The ruby code works independently, but you can't build a rubyscript2exe on Linux for Windows.

But given that the way desktop apps are expected to work varies considerably by OS, you're going to want to test on Mac before you hand it off from Ubuntu, aren't you?

alex

Roger Pack wrote:

Could I make a plea for 1.9 windows users to try to consolidate on
mingw, versus other compilers? Cross It would make it easier , and have
less targets for binary distributables [and they're easier, thanks to
Luis' cross compiler [1]].

I'm +1 on that, in theory. Having different 1.9 builds for Windows washing about makes it more difficult to provide pre-built gems.

MingW is familiar for those using gcc on other platforms; the main downside I've found is that the support tools (eg gdb) are a bit flaky at the moment. Eg gdb sometimes exits unexpectedly while debugging, and the key entry/prompt/shell gets muddled easily.

a

7stud -- wrote:

I see:

wxruby-2.0.0-universal-darwin-9.gem

but I'm using:

$ ruby -v
ruby 1.8.2 (2004-12-25) [universal-darwin8.0]

which as you can says darwin 8.0. I'm using osx 10.4.11 Tiger, which was the last release before Leopard osx 10.5. Does that mean there's no soup for me?

I don't know for certain b/c I don't have a 10.4 machine to test on.

There are specific steps taken in the build (eg ways of configuring wxWidgets) to provide backwards compatibility, so I hope it might work. If you could try it, I'd be interested in the results.

a

Alex Fenton wrote:

7stud -- wrote:

was the last release before Leopard osx 10.5. Does that mean there's no
soup for me?

I don't know for certain b/c I don't have a 10.4 machine to test on.

There are specific steps taken in the build (eg ways of configuring
wxWidgets) to provide backwards compatibility, so I hope it might work.
If you could try it, I'd be interested in the results.

I finally got around to trying this. But I can't even untar the wxRuby
gem:

$ tar -xvf /Users/me/Desktop/wxruby-2.0.0-universal-darwin-9.gem.tar
data.tar.gz
tar: data.tar.gz: implausibly old time stamp 1969-12-31 17:00:00
metadata.gz
tar: metadata.gz: implausibly old time stamp 1969-12-31 17:00:00
$

···

--
Posted via http://www.ruby-forum.com/\.

Alex Fenton wrote:

···

Rubyscript2exe works fine for many cases. On Windows and OS X, wxWidgets
is statically compiled into wxRuby, so you have everything you need to
redistribute to others.

For more advanced installations, I've used platform-specific tools like
Platypus (OS X) and NSIS installer (Windows) to ship a complete ruby
package that works like a compiled native app.

So your answer is that using ocra or rubyscript2exe is enough to make an executable after the WXRUby application that works without problems on any Windows, even on those that do not have Ruby installed ?

--
Posted via http://www.ruby-forum.com/\.

7stud -- wrote:

Alex Fenton wrote:

7stud -- wrote:

was the last release before Leopard osx 10.5. Does that mean there's no
soup for me?

I don't know for certain b/c I don't have a 10.4 machine to test on.

There are specific steps taken in the build (eg ways of configuring
wxWidgets) to provide backwards compatibility, so I hope it might work.
If you could try it, I'd be interested in the results.

I finally got around to trying this. But I can't even untar the wxRuby
gem:

$ tar -xvf /Users/me/Desktop/wxruby-2.0.0-universal-darwin-9.gem.tar
data.tar.gz
tar: data.tar.gz: implausibly old time stamp 1969-12-31 17:00:00
metadata.gz
tar: metadata.gz: implausibly old time stamp 1969-12-31 17:00:00
$

Ok, there is some weirdness with osx and safari and the names of
downloaded files, which I rediscovered here:

So I changed the filename on my Desktop to:

wxruby-2.0.0-universal-darwin-9.gem

(I removed the .tar extension on the end). Then I changed directories
to my Desktop:

$ cd ~/Desktop

and then commanded:

~/Desktop$ gem install wxruby-2.0.0-universal-darwin-9.gem

and I immediately got a message that said wxruby installed successfully.
Wow that was fast.

Ok, now to test the install. I found a basic wxruby example here:

http://book.opensourceproject.org.cn/lamp/ruby/cookbook/opensource/0596523696/rubyckbk-chp-21-sect-14.html

Instead of typing in the whole example, I decided to see if requiring
wxruby would work first.

r1test.rb

···

-------
require 'wxruby'

Nope:

r1test.rb:1:in `require': No such file to load -- wxruby (LoadError)
        from r1test.rb:1

Oh yeah, there's some ruby gem weirdness about requires. Checking my
notes in pickaxe2, I came up with this:

require 'rubygems'
require 'wxruby'

Still didn't work:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': No such file to load -- wxruby (LoadError)
        from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from r1test.rb:2

Hmm...the basic example at the link above mentions a tutorial here:

http://wxruby.rubyforge.org/wiki/wiki.pl?Getting_Started

Ahh, the tutorial uses:

require 'wx'

Nope:

r1test.rb:1:in `require': No such file to load -- wx (LoadError)
        from r1test.rb:1

Ok, how about:

require 'rubygems'
require 'wx'

That worked. On to the example:

require 'rubygems'
require 'wx'
include Wx

class TroutApp < App
  def on_init
    frame = Frame.new(nil, -1, "Title")
    text = StaticText.new(frame, -1, "You are a trout!",
              Point.new(-1, 1), DEFAULT_SIZE, ALIGN_CENTER)
    frame.show
  end
end

TroutApp.new.main_loop

And that worked. So I guess you have your answer.
--
Posted via http://www.ruby-forum.com/\.