RBuild

Sage
Posts: 1,403
Joined: 2005.07
Post: #1
I cant stand xcode anymore, so im looking for a substitute and RBuild looks like exactly what I want but I cant get it working, I dont know how.
Do you have to download all those files from the source repository indivually?

When I download all the RubyGameShell and stuff it still didnt work it just gave me errors running the rbuild_bundle stuff or somthing...

please help me.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Xcode 2.1 is much improved over previous versions; I recommend that over RBuild.

RBuild is in a subversion repository. You can find a Mac installer package for Subversion by googling for "martin ott subversion". With that installed, you can check out RBuild by saying

svn checkout http://onesadcookie.com/svn/repos/RBuild

in a terminal.

From there, it's a matter of cd'ing into the directory you want to build, and executing the rbuild.rb script -- I have an alias set up in my ~/.bash_profile
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #3
Thanks very much, ill do that.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #4
I couldnt compile SmileyTag so I tried maze
It said it could do require "rbuild_bundle"
so i put build.rb and Resources in the RBuild folder then it gave me this error

./rbuild-bundle.rb:70:in `build_bundle': undefined method `build' for main:Object (NoMethodError)
from ./rbuild-bundle.rb:57:in `find'
from /usr/local/lib/ruby/1.8/find.rb:38:in `catch'
from /usr/local/lib/ruby/1.8/find.rb:38:in `find'
from ./rbuild-bundle.rb:57:in `build_bundle'
from ./rbuild-bundle.rb:56:in `each'
from ./rbuild-bundle.rb:56:in `build_bundle'
from build.rb:6

What am I doing wrong?
Is there a way to install RBuild?
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
Wait, i think ive got it
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #6
It works!!
Thanks so much, I can now get down to creating some actual programs!
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #7
On a couple of the projects it says:
No rule to build ../RubyGameCommon/RubyGameCommon

not sure why, astro and smileytag work
maze doesnt

do you know why this is?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #8
it requires RubyGameCommon. Check that out too.

If you're going to go and build all my code, I suggest checking out the whole repository -- svn checkout http://onesadcookie.com/svn/repos OSCsCode
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #9
I checked out the whole thing using
svn checkout http://onesadcookie.com/svn/repos
i didnt write OSCsCode though should I re do it all (it took a while)

I tried to build RubyGameCommon (cos i though that might be the problem) and it got quite far but ended up with, should I even have done that?

Missing file or directory: /Developer/Examples/CoreAudio/PublicUtility/CAGuard.cpp
Missing file or directory: /Developer/Examples/CoreAudio/PublicUtility/CAHostTimeBase.cpp
Missing file or directory: /Developer/Examples/CoreAudio/PublicUtility/CAMutex.cpp
** BUILD FAILED **
Can't open External/openal/macosx/build/OpenAL.framework/Headers/*.h: No such file or directory.
Compiling Source/glut.c
Compiling Source/alc.c
Compiling Source/ogl.c
Compiling Source/alut.c
In file included from Source/alut.c:6:
External/ruby-1.8.1/ruby.h:77: warning: redefinition of `ID'
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/AIFF.h:78: warning: `ID' previously declared here
/usr/bin/gcc -g -Os -Wall -W -Wno-unused-parameter -Wnewline-eof -Werror -IExternal/freetype-2.1.8/include -IExternal/libpng-1.2.5 -IExternal/ruby-1.8.1 -FExternal/openal/macosx/build -c Source/alut.c -o Build/alut.o
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #10
Thaat threaded newton one is sooo coool, its a really good idea and just so cool too.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #11
No, you don't need to check out the whole lot again. The second argument is just the name of the folder to create (you'll have got one called "repos", which you can safely rename).

In order to build OpenAL, you'll need a more recent CoreAudio SDK (download from connect.apple.com) I think. Probably easier is to grab a pre-built framework (eg. the one from inside Water Tower 3D's app bundle) and put it where the RubyGameCommon build process is expecting to find it.

I take it you're still on 10.3 -- pretty sure I disabled the building of AL for 10.4...

the "redefinition of ID" thing is due to a bug in the alut header -- it unnecessarily includes Carbon.h, which you should delete. Again, it's fixed in 10.4; I'm surprised it's not fixed in AL CVS, and the build process for RubyGameCommon is supposed to remove it automatically...
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #12
Right, ill try that thanks
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #13
Installed the lastest version of CoreAudio and then copied OpenAL.framework into the right place which fixed those first errors.
Im using 10.3.9, I cant find an include of carbon.h in alut.h or any file called carbon.h anywhere.
What is it I should delete?

This is what i get just now trying to compile RubyGameCommon
eds-Computer:~/repos/RubyGameCommon ed$ ruby ../RBuild/rbuild.rb
Compiling Source/alut.c
In file included from Source/alut.c:6:
External/ruby-1.8.1/ruby.h:77: warning: redefinition of `ID'
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/AIFF.h:78: warning: `ID' previously declared here
/usr/bin/gcc -g -Os -Wall -W -Wno-unused-parameter -Wnewline-eof -Werror -IExternal/freetype-2.1.8/include -IExternal/libpng-1.2.5 -IExternal/ruby-1.8.1 -FExternal/openal/macosx/build -c Source/alut.c -o Build/alut.o

Exited with status 1
Build Failed: Failed to build Build/alut.o
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #14
#include <Carbon/Carbon.h> should be deleted from the alut.h that's inside the OpenAL framework.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #15
That didnt change the error message, is there anything else I should try?
Quote this message in a reply
Post Reply