Forums Archived

The forums are being archived. See this topic for more information.

Installing Rubygame 2.4.1 in Windows

Get help and support with Rubygame

Re: Installing Rubygame 2.4.1 in Windows

Postby bmatthew1 » Tue Apr 21, 2009 4:07 pm

Hmm, it doesn't look too good does it? :(

Code: Select all
C:\>irb
irb(main):001:0> require 'rubygame_core'
LoadError: no such file to load -- rubygame_core
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from (irb):1
irb(main):002:0> require 'rubygame_gfx'
LoadError: no such file to load -- rubygame_gfx
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from (irb):2
irb(main):003:0> require 'rubygame_image'
LoadError: no such file to load -- rubygame_image
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from (irb):3
irb(main):004:0> require 'rubygame_ttf'
LoadError: no such file to load -- rubygame_ttf
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from (irb):4
irb(main):005:0> require 'rubygame_mixer'
LoadError: no such file to load -- rubygame_mixer
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from (irb):5
irb(main):006:0>
User avatar
bmatthew1
 
Posts: 28
Joined: Wed Apr 01, 2009 2:20 pm
Location: England

Re: Installing Rubygame 2.4.1 in Windows

Postby shawn42 » Tue Apr 21, 2009 4:18 pm

What are the errors you get when running the other demos? (I'm grabbing at straws now"
User avatar
shawn42
 
Posts: 109
Joined: Tue Feb 10, 2009 8:22 pm

Re: Installing Rubygame 2.4.1 in Windows

Postby bmatthew1 » Tue Apr 21, 2009 4:55 pm

The errors are along the lines of the following...

Code: Select all
demo_draw.rb:20: You must have SDL_gfx support to run this demo! (RuntimeError)

Code: Select all
demo_music.rb:19:in `test_music': undefined method `audio_driver' for Rubygame:Module (NoMethodError)

Code: Select all
demo_ttf.rb:151:in `main': TTF is not usable. Bailing out. (RuntimeError)

Code: Select all
demo_gl_tex.rb:53: undefined method `load_image' for Rubygame::Surface:Class (NoMethodError)


Even though I've linked to all the SDL libraries & made sure that they're exported to my dll those errors still persist.

I think I'll leave it for now & try to fix the problems later because I can see you're getting frustrated ( a bit like myself ). :P
User avatar
bmatthew1
 
Posts: 28
Joined: Wed Apr 01, 2009 2:20 pm
Location: England

Re: Installing Rubygame 2.4.1 in Windows

Postby bmatthew1 » Tue Apr 21, 2009 10:44 pm

I've finally done it. :D

I was looking through the Rakefile that came with rubygame-2.4.1 & found the following at the bottom...

Code: Select all
# TODO: We should check if the libraries exist?

rubygame_gfx = ExtensionModule.new do |gfx|
  gfx.dynlib = 'rubygame_gfx'
  gfx.objs = ['rubygame_shared', 'rubygame_gfx']
  gfx.add_lib( 'SDL_gfx' )
  gfx.add_header( 'SDL_gfxPrimitives.h')
  gfx.add_header( 'SDL_rotozoom.h' )
  gfx.create_all_tasks() if $options[:"sdl-gfx"]
end

rubygame_image = ExtensionModule.new do |image|
  image.dynlib = 'rubygame_image'
  image.objs = ['rubygame_shared', 'rubygame_image']
  image.add_lib('SDL_image')
  image.add_header('SDL_image.h')
  image.create_all_tasks() if $options[:"sdl-image"]
end

rubygame_mixer = ExtensionModule.new do |mixer|
  mixer.dynlib = 'rubygame_mixer'
  mixer.objs = ['rubygame_shared', 'rubygame_mixer', 'rubygame_sound', 'rubygame_music']
  mixer.add_lib('SDL_mixer')
  mixer.add_header('SDL_mixer.h')
  mixer.create_all_tasks() if $options[:"sdl-mixer"]
end

rubygame_ttf = ExtensionModule.new do |ttf|
  ttf.dynlib = 'rubygame_ttf'
  ttf.add_lib('SDL_ttf')
  ttf.objs = ['rubygame_shared', 'rubygame_ttf']
  ttf.add_header('SDL_ttf.h')
  ttf.create_all_tasks() if $options[:"sdl-ttf"]
end


Based on that information, I created separate dlls for rubygame_gfx, rubygame_image, rubygame_mixer & rubygame_ttf. I then tested the examples & they all worked.

Some time over the next few days I'll upload the dlls & the various projects I had to create for them.
User avatar
bmatthew1
 
Posts: 28
Joined: Wed Apr 01, 2009 2:20 pm
Location: England

Previous

Return to Help & Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron