• Advertisement
Sign in to follow this  

OS X - XCode project file

This topic is 4281 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, As most OS X coders (as far as I know) like to use XCode instead of makefiles (even though it works like a charm) I created a XCode project that builds AngelScript in to a framework (Universal Binary). I wouldn't mind maintaining it (which is just adding and removing files) so it stays up to date. If the mainainer is interested in having the xcode project along with the rest of the project files feel free to send me an email (or just Reply ;-), stygeo ^^at^^gmail^^DOT^^com). There was also an error in the code (latest repos). This might be just a compiler error but it was easy to fix. In file as_restore.cpp on line 623 and line 631 there's the error(GNU GCC 4.x) about some new ISO standard. As int n is declared on line 599 in the for loop, according to the new ISO furthur using of this variable is no longer possible. Placing the int n = 0; before the first loop on line 599 and by changing int n = 0; on line 599 in the for loop to n = 0; will fix this tiny little error. Hope that helps. Kind regards, Jeffrey

Share this post


Link to post
Share on other sites
Advertisement
Hi,
that would be great. Since I had some problems to complie AS 2.6 properly in XCode. So I'm still using AS 2.5. Maybe you could also add a build traget for a static library. So users who prefer the static library (like me) could use that build target.

Could I get your XCode project?
martin AT cheetah3d DOT de

Bye,
Martin

Share this post


Link to post
Share on other sites
That for-loop thing isn't a new standard; compilers have just implemented it wrong for a long time. I was so surprised that MSVC8.0 (which also now has standards conforming behavior) wouldn't catch this error that I went to look and see if it was silently grabbing something from an enclosing scope. To my relief, I discovered that the change you suggested had already been made - and probably a while ago; I've been using AngelScript with MSVCExpress since the first Express beta. The code in question -


else if( c == BC_TYPEID )
{
// Translate type ids into indices
asDWORD tmp[MAX_DATA_SIZE];
int n;
for( n = 0; n < asCByteCode::SizeOfType(bcTypes[c])-1; n++ )
tmp[n] = *bc++;

*(int*)tmp = FindTypeIdIdx(*(int*)tmp);

for( n = 0; n < asCByteCode::SizeOfType(bcTypes[c])-1; n++ )
WRITE_NUM(tmp[n]);
}



Incidentally, it could just say 'int n = 0' in both for loops. That's slightly better; as it is now I have to stop and think 'wait, is n used anywhere else? Is the value n has at the end of loop 1 important to loop 2?'

Share this post


Link to post
Share on other sites
There are some problems compiling 2.6 with XCode and the makefile actually. I checked out the latest repos and to my suprise it compiled fine without making any changes to the source (besides the one discribed above). I can sure mail you the XCode project file but I must warn that you'll probably run in to the same build errors with the latest release.

Just checkout the latest repos from sf and place the xcode project in the project directory. I'll make those changes you asked for (probably tomorrow) and mail them to you.

Cheers,
Jeffrey

Share this post


Link to post
Share on other sites
Again, I am forced to ask, what change?

Share this post


Link to post
Share on other sites
Quote:
Original post by stygeo
Just checkout the latest repos from sf and place the xcode project in the project directory. I'll make those changes you asked for (probably tomorrow) and mail them to you.


Hi,
that would be great.

Another probably quite dump question. I found the latest AS source code on SF

http://svn.sourceforge.net/viewcvs.cgi/angelscript/trunk/sdk/

but how can I download all files at once? I couldn't find a .zip archive.

Bye,
Martin

Share this post


Link to post
Share on other sites
i think you better search for TortoiseSvn and checkout repository directly. all howtos are written in sourceforge svn access

Share this post


Link to post
Share on other sites
Download 'port' (just google for it) it's somewhere on the darwin ports website. Once you aquired, compiled and installed port do the following(in a console); "sudo port install svn". It will automatically download the svn source and all dependencies. Once port is done downloading/compiling svn 'cd' to your favorite directory and type "svn co https://svn.sourceforge.net/svnroot/angelscript/trunk angelscript". It will now check out the latest repos and you can find the files in $CURRENTDIR/angelscript when it's done.

Cheers,
Jeff

Share this post


Link to post
Share on other sites
Hi Jeff,
thanks for the extra lesson on how to use svn. Now I also have 2.6 up and running :)

When compiling AS 2.6 there was just one small error (int i=0 declaration in the first for loop) left in

void asCRestore::ReadObjectTypeDeclaration(asCObjectType *ot)

which could be easily fixed.

Bye,
Martin

Share this post


Link to post
Share on other sites
This is great. The community needs more OS X users that can help keep AngelScript working on that system. :)

I've corrected the code bug in asCRestore::ReadObjectTypeDeclaration(). Most of the time I use MSVC6 when compiling AngelScript, and unfortunately it permits this kind of non-standard code. But this is work-in-progress code, and before releasing a new version I usually compile the code with a couple of different compilers, including MinGW g++ and MSVC8, which would have caught that little problem.

But thanks for letting me know about it. The sooner I know about the bugs, the better the library will be.

Deyja: You're not using the latest code from the SVN. That's why you didn't have the bug that stygeo is talking about.

stygeo: Would you mind sending me the XCode project files? I'll add them to the SVN for the next version. I hope you prepared the project files using the same directory structure as the other project files.

Cheetah3D: Actually, by downloading the code from SVN, you're closer to using version 2.7.0. ;) Also make sure to try out the support for native calling conventions on the PPC processors (not sure if it works though, but I hope so).

Regards,
Andreas

Share this post


Link to post
Share on other sites
:/ I would use the SVN version of I could, but I can't afford to have my development stopped by new undiscovered bugs. I don't have enough time as it is.

Share this post


Link to post
Share on other sites
Andreas:
Sure, I'll mail it to you. Doing some last test with it to make sure it works. Unfortunately I can't test the i386 version (however soon I can, getting my new iMac this weekend :-D) yet. The libraries are being placed in sdk/angelscript/lib/build I hope that's ok :-)

Cheers,
Jeff

PS, It would be cool if you could place the Apple Universal Binary logo on the website ;-)

EDIT: Please note that the XCode project file is for the latest repos. It requires the latest version of XCode (2.3).

Share this post


Link to post
Share on other sites
Thanks stygeo!

Don't worry about making sure it works on i386. If it works on PPC it's a step along the right way. :)

Also, you'll have to forgive me, because the PPC code in the reposity is not working. I received it by mistake from Manu, and I added it to the repository without confirming if it worked with him before. He is working on the PPC port, but I'm not sure how far he's gotten nor when he might finish it. I do know that he's working with the GameCube though, so it might not even work on Mac OS X. It shouldn't be too much difference between the GameCube and Mac OS X though, if they're using the same CPU architecture.

I may be getting myself an Intel Mac Mini as well. [smile] But that deal is on hold until I can visit Sweden, since the Mac Mini is so damn expensive here in Brazil.

Where can I find the Apple Universal Binary logo?

Just out of curiousity, is XCode a free development IDE?

Regards,
Andreas

Share this post


Link to post
Share on other sites
Hi,

Quote:
Original post by WitchLord
I do know that he's working with the GameCube though, so it might not even work on Mac OS X. It shouldn't be too much difference between the GameCube and Mac OS X though, if they're using the same CPU architecture.


Until now I didn't have much luck using native calls on the OS X PPC. But I didn't try it to extensively since I'm quite happy with the generic mode for the first. So maybe it is my fault.

Quote:
Original post by WitchLord
Where can I find the Apple Universal Binary logo?


You can find the logo and the license agreement here:
http://developer.apple.com/softwarelicensing/agreements/maclogo.html


Quote:
Original post by WitchLord
Just out of curiousity, is XCode a free development IDE?


Yes, it's free. Apple bundles XCode and all the other development tools for OS X with every new Mac.

Bye,
Martin

Share this post


Link to post
Share on other sites
Thanks for the link Martin. I'll check out the license agreement to see if it applies to AngelScript as well.

Mac seems to have very great support for developers and the end-users as well. It amazes me that the Mac isn't even more popular than it is. Of course, the price probably has a lot to do with that.

Regards,
Andreas

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement