PDA

View Full Version : RBuild


unknown
2005.07.12, 02:01 PM
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.

OneSadCookie
2005.07.12, 05:56 PM
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

unknown
2005.07.12, 06:17 PM
Thanks very much, ill do that.

unknown
2005.07.12, 06:36 PM
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?

unknown
2005.07.12, 06:51 PM
Wait, i think ive got it

unknown
2005.07.12, 06:52 PM
It works!!
Thanks so much, I can now get down to creating some actual programs!

unknown
2005.07.12, 07:15 PM
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?

OneSadCookie
2005.07.12, 07:26 PM
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

unknown
2005.07.12, 07:40 PM
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

unknown
2005.07.12, 07:41 PM
Thaat threaded newton one is sooo coool, its a really good idea and just so cool too.

OneSadCookie
2005.07.12, 07:44 PM
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...

unknown
2005.07.12, 07:56 PM
Right, ill try that thanks

unknown
2005.07.12, 08:20 PM
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

OneSadCookie
2005.07.12, 10:54 PM
#include <Carbon/Carbon.h> should be deleted from the alut.h that's inside the OpenAL framework.

unknown
2005.07.13, 07:19 AM
That didnt change the error message, is there anything else I should try?

unknown
2005.07.13, 07:24 AM
the two files its compliaing about look like this:

ruby.h

73 #if SIZEOF_LONG != SIZEOF_VOIDP
74 # error ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<----
75 #endif
76 typedef unsigned long VALUE;
77 typedef unsigned long ID;


aiff.h

78 typedef unsigned long ID;
79 typedef short MarkerIdType;
80 struct ChunkHeader {
81 ID ckID;
82 long ckSize;
83 };

OneSadCookie
2005.07.13, 07:50 AM
Check that it's using the OpenAL framework you deleted the include from?

I dunno, that should the only place Carbon.h is being included.

unknown
2005.07.13, 01:12 PM
OMG OSC YOU GOD!!!
That was it, i looked for OpenAL in frameworks and there was two so i sudo rm'd alut.h then cp'd the altered version and it built!
Its because the OpenAL framework in RubyGameCommon/External/openal/build/ wasnt being used like you guessed!
It build RubyGameCommon!

unknown
2005.07.13, 01:34 PM
Ok, Maze still wont compile though:


Build Failed: No rule to build ../RubyGameCommon/External/openal/macosx/build/OpenAL.framework


It shouldnt need to build OpenAL, if already got it sorted out before...

Same happens with

RubyFreeTypeOpenGLTest
and
SimpleRubyOpenALExample

Is the only problem I get
I have a feeling that its going to work once this is fixed probably,

:mad: :cry: :mad: :cry: :mad:

unknown
2005.07.13, 02:06 PM
GameShell works though...

OneSadCookie
2005.07.13, 05:36 PM
just move the AL framework to where it's looking for it. That's where it should have been built...

unknown
2005.07.13, 06:06 PM
Yesssssssssssss!!!!!!!!!!!!!!!!

\(^_^)/


Thats it working, thanks so much for fixing that.

Nick
2005.08.22, 04:28 PM
Ok. I googled the term, downloaded the installer, ran it, and tried the svn checkout ... line in terminal but I get an error telling me that svn is not a recognized command. Any ideas? I'd like to give this a try. Plus I was told I'd need it to really check out OSC's code.

OneSadCookie
2005.08.22, 04:40 PM
Mac subversion packages are here: http://homepage.mac.com/martinott/

I'd suggest checking out from http://onesadcookie.com/svn/repos so your checkout doesn't break if my IP changes ;)

Nick
2005.08.23, 12:08 AM
I tried that link as well and this is all I can get after installing the package:

Last login: Tue Aug 23 00:07:12 on ttyp1
Welcome to Darwin!
Nicholas-Gravelyns-Computer:~ NicholasGravelyn$ svn checkout http://onesadcookie.com/svn/repos
-bash: svn: command not found

Any ideas why this isn't working for me?

OneSadCookie
2005.08.23, 12:17 AM
you need to add /usr/local/bin to your path.

if you're using bash, edit ~/.bash_profile and add

export PATH=/usr/local/bin:$PATH

make sure there's a newline at the end of the file.

Nick
2005.08.23, 12:34 AM
Maybe I'm making this harder than it is, but where can I find that file? Searching my computer for 'bash' doesn't get it. I also haven't had luck with anything in terminal.

Skorche
2005.08.23, 12:58 AM
To edit that file, it's easiest to use the terminal because it's invisible. The 'open' command will act as though you clicked on something in the Finder. Try that first by typing:
open ~/.bash_profile
Which will *probably* open it in TextEdit. If it doesn't, try:
nano ~/.bash_profile
nano is a terminal based text editor. Should be fairly straight forward. To save press Ctrl-X, then 'y', then return.

Open a new terminal window, and you should now be able to use svn correctly.


As a side note, the period at the beginning of the name makes it invisible, make sure you are searching accordingly.

Nick
2005.08.23, 01:10 AM
Cool. thanks. Now I have SVN for my own personal use as well. Fun Fun.

unknown
2005.09.12, 05:39 PM
Ok this is not good, im trying to rebuild the whole RubyGameCommon and everything in OSC's repo
I cant seem to make freetype 1.2.8 and 1.2.10 (that 1.2.ten?!) doesnt work either

I get this

/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
./builds/unix/libtool --mode=compile gcc -pedantic -ansi -I./builds/unix -I/Users/ed/OSC'Srepos/RubyGameCommon/External/freetype-2.1.10/include -c -Wall -g -O2 -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DDARWIN_NO_CARBON -DFT_CONFIG_CONFIG_H="<ftconfig.h>" -o /ftsystem.lo builds/unix/ftsystem.c
/bin/sh: -c: line 1: unexpected EOF while looking for matching `''
/bin/sh: -c: line 2: syntax error: unexpected end of file
make: *** [/ftsystem.lo] Error 2


please put me out of my misery someone..

OneSadCookie
2005.09.12, 05:51 PM
take the apostrophe out of the directory name :)

unknown
2005.09.12, 06:06 PM
:blush:
That fixed it, thank you.

unknown
2005.09.12, 06:52 PM
It upsets me that theres a stormcloud over this thread, because its gone now and the suns come out. Can a moderator fix that please?

Yes!!!
I built Mechanical!!
I had to move /RubyGameShellCommon/External/openal/macosx/build/OpenAL.framework
into /RubyGameShellCommon/External/openal/macosx/build/Deployment/OpenAL.framework
and altered the ruby scripts slightly to use the latest versions of ruby and freetype (and do a bunch of other stuff but..)
Whoohoo!
:lol:

OneSadCookie
2005.09.12, 07:22 PM
Yeah, it won't build out of the box on Xcode < 2.1, 'cos OpenAL won't be where it expects. Since I'm never gonna use anything less, though, I didn't see the point in adding a check :p

OneSadCookie
2005.09.12, 07:23 PM
Try moving Construction from RubyGameCommon to RubyGameShellCommon (use Mechanical as a guide) and see if that helps.

unknown
2005.09.12, 07:23 PM
Ok, that was seriously fast..
I found out that maze uses glut, so glut works.. Ill fix it somehow.
Ill try that too, cheers!

unknown
2005.09.12, 07:26 PM
Add GLUT.InitDisplayMode(GLUT::RGBA | GLUT::DEPTH | GLUT::DOUBLE)
to fix it for caveman os's :p

OneSadCookie
2005.09.12, 07:32 PM
:oops: , wonder how I missed that o_O

unknown
2005.09.13, 06:20 AM
I added a folder called Newton with Newton.h and libnewton32.a, which worked for ThreadedNewton
but Ascent gives me

./Ruby/Newton.bundle undefined reference to __ZSt9terminatev expected to be defined in a dynamic image
./Ruby/Newton.bundle undefined reference to __ZTVN10__cxxabiv117__class_type_infoE expected to be defined in a dynamic image
./Ruby/Newton.bundle undefined reference to __ZTVN10__cxxabiv120__si_class_type_infoE expected to be defined in a dynamic image
./Ruby/Newton.bundle undefined reference to __ZTVN10__cxxabiv121__vmi_class_type_infoE expected to be defined in a dynamic image
./Ruby/Newton.bundle undefined reference to __ZdlPv expected to be defined in a dynamic image
./Ruby/Newton.bundle undefined reference to __Znwm expected to be defined in a dynamic image
./Ruby/Newton.bundle undefined reference to ___cxa_pure_virtual expected to be defined in a dynamic image
./Ruby/Newton.bundle undefined reference to ___gxx_personality_v0 expected to be defined in a dynamic image
Trace/BPT trap


Ive been trying to get ascent working for a couple of days, now...

OneSadCookie
2005.09.13, 06:32 AM
why does it need libstdc++? There's no C++ in there...

Maybe do the linking of the bundle with g++ instead of gcc?

unknown
2005.09.13, 06:43 AM
Did you know that you are magic?
:)
thanks again