 |
ivanforum Forum for Iter Vehemens ad Necem
|
| View previous topic :: View next topic |
| Author |
Message |
lenox zombie

Joined: 03 Jun 2005 Posts: 67 Location: suffering in a cave
|
Posted: Fri Jun 10, 2005 5:37 pm Post subject: Howto: compile with OS x |
|
|
Whew, ok!
Sorry for the delay - I don't usually spend my thursday nights like I did last night. I'll be posting instructions here if anyone wants to follow in my footsteps. However, I have to say that there's at least one show-stopping issue with the mac build. This is to be expected; I just got it working yesterday! But maybe if I get some people to build it on their macs, they can help troubleshoot? Anyhow, let me describe the bugs before we get started:
1. delete key inserts characters instead of deleting. severity: way low, should be easy to fix with some key remapping - in the mean time use control-H to delete.
2. full screen mode shows incorrect colors for some sprites and menus. severity: medium. This is due to the difference between windows/linux's 16-bit graphics mode and mac's 15-bit graphics mode. There's a couple of ways to go about fixing this...the easiest would be to tell IVAN to go into 32-bit fullscreen mode, as it works fine in my desktop windowed, which is 32-bit.
3. 'bus error' when descending into town or dungeon. This is a show-stopping error. While it exists, us mac users can only walk back and forth on the world map I haven't done much looking at this error yet but if I had to guess, I might say it's an endian issue with the dungeon-generating code.
Now I know we can figure these issues out, but they're not figured out as of yet. So with that disclaimer, if you still want to compile IVAN for mac, keep reading:
(this was tested on a power mac g4 running os 10.3.9. Not sure if tiger is compatible fully with fink yet. Also, make sure you have the latest developer tools installed. They can be obtained from http://developer.apple.com for free.)
A. Install Fink. Fink is a linux-style package manager for os x. It allows many linux-style libs and apps to run in os x easily. Fink is somewhat geared towards power users but if you are running 10.3 there should be no issues. After you have fink installed and everything seems peachy, use FinkCommander to search for any package matching 'sdl'. There should be a small handfull of sdl-related packages. Select them all. Choose to 'install from source', using the toolbar button near the top left. I am not sure if it's necessary to install from source as opposed to binaries, but this is the way I did it.
This might take a bit depending upon your computer's speed and available ram. It's building these SDL (Simple Direct media Layer) libs from source. You might be wondering, "hey lenox, why don't i just download SDL's mac os x installer from their website?" Well, when IVAN is fully macosx-ready, you'll be able to, but not yet. Its configure script doesn't know to look for macosx-specific features.
Ok, so now we have the libs that IVAN depends upon installed happily.
B. Download the IVAN sources and expand them onto your desktop either with Stuffit, or the command line utility 'tar'. You should have a folder full of stuff. Now I am going to assume a moderate familiarity with unix shell before I go much farther, but will try to make it legible for others, too.
a) in the finder (or terminal if you are happier there), navigate to 'ivan-0.50/Main/Source' and open 'main.cpp'. Now, we're going to insert 2 lines after the line near the top that says '#include "feio.h"', and before '#include "igraph.h"'.
Here are the lines to add:
| Quote: |
#include "SDL.h"
#include "SDL_main.h"
|
Now save and close this file. In the future, there'll be more editing of the source to get this to work, at least until we've figured this all out and the changes are in the next version of IVAN.
b) Open Terminal (/Applications/Utilities/Terminal.app) . It might be a great time to drag this app to your dock so you can get back to it easily. Now, you have to navigate to the directory where the ivan source code is in. By default, Terminal opens into your home directory, so you should just be able to type 'cd Desktop/ivan-0.50' and be there. Now is a good time to make sure you are using the bash shell. if you type 'echo $SHELL' in the terminal and hit return, it should say '/bin/bash'. If it spits out an error or says something other than /bin/bash, just type 'bash' for now, to begin using it. Since bash is the default shell for 10.3, this shouldn't be much of an issue. Now, in the ivan-0.50 folder still, type
| Quote: |
LDFLAGS='-L/sw/lib' CPPFLAGS='-I/sw/include' ./configure
|
The configure script should check to make sure your system is fit to compile IVAN. If you get any terrible errors here, copy and paste the entire output of the configure script and send it to me. When it finishes without error, you are ready to actually build IVAN! Just type the following word at the terminal:
Now you might want to go make a sandwich or get caught up on the organizing of your filing cabinet or cleaning your closet or something, because this may take a bit. Your computer is doing all the linking and compiling now. It's done (one way or another) when you are back to your shell where you can input commands. If there's been an error, again...send it to me. I'm not guaranteeing I'll know what it means...but go ahead and send me the last screen or two of text, so I know where it failed and what the error was.
If this step went well, then you're ready for the final command before running IVAN!
It will probably ask you for your password. This is no different than a graphical installer asking for your admin password when installing an app.
Now for the moment of truth. The one word you type into the shell that makes it all worthwhile:
I believe you know what that command does! If you see any bugs that I haven't talked about in the beginning of this post, send them to me! Let's see if we can't make the next version of IVAN 100% mac compatible! I'd like to thank Hexi for all of his help and patience...I wouldn't have been able to get very far without talking with someone familiar with the code. |
|
| Back to top |
|
 |
lenox zombie

Joined: 03 Jun 2005 Posts: 67 Location: suffering in a cave
|
Posted: Sat Jun 18, 2005 12:57 am Post subject: |
|
|
Still working on the endian issues...learning a lot about SDL and big vs little endian architectures! I thought I would post some screenshots of IVAN running on my mac to show people who don't have macs or who don't really want to compile an incomplete version (I don't blame you!)
Here was the first screen I was greeted with...awesome!
Then this...
Here's an actual gameplay shot, but unfortunately you can't go much farther than this...
which explains this!
Finally, here's a full-screen shot (scaled down for sanity) as an example. |
|
| Back to top |
|
 |
lenox zombie

Joined: 03 Jun 2005 Posts: 67 Location: suffering in a cave
|
Posted: Thu Jul 21, 2005 5:15 pm Post subject: new errors in Tiger (10.4) |
|
|
edit: ehh, don't worry about this... it was just that Tiger and XCode 2.1 use gcc 4.0 by default.
The IVAN devs are awesome! We'll have something that works very soon! |
|
| Back to top |
|
 |
lenox zombie

Joined: 03 Jun 2005 Posts: 67 Location: suffering in a cave
|
Posted: Fri Jul 29, 2005 5:03 am Post subject: |
|
|
Ok...cvs version of IVAN finally compiled on Tiger. One of my three noted errors was fixed by the wonderful IVAN devs! The color issues in fullscreen are 100% gone and IVAN looks beautiful!
I think with the knowledge I gained in the past few weeks I could fix the 'delete' key problem easily. As for the other issue...I have faith that'll be sorted out soon, too! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|