From The Mana World
(Added problem Catfish_Man ran into)
m (Jaxad0127 moved page MacOSX port to Archive:MacOSX port without leaving a redirect)
 
(31 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==


The following is the result of a lot of hacking and working around small problems, and certainly not completely yet nor probably the way you should actually be building TMW for Mac.
These are rough instructions, feel free to expand them.


Note that TMW and all libraries are being install to /Users/bjorn, you should probably use your own home directory. ;-)
You need to be using the master branch from github that contains the Xcode project file.


== Dependencies ==
== Using Xcode ==
For this you will need to have already downloaded the SDL.framework, SDL_mixer.framework, SDL_image.framework and (if not using trunk) the SDL_net.framework from [http://www.libsdl.org the SDL site].


All dependencies except the OpenGL library were statically linked.
Download SDL. Install SDL.framework to /Library/Frameworks


=== OpenGL ===
Download SDL_mixer. Install SDL_mixer to /Library/Frameworks


On Tiger, we found the OpenGL headers in:
Download SDL_image. Install SDL_image to /Library/Frameworks


/System/Library/Frameworks/OpenGL.framework/Headers
Open Xcode Project. I use Xcode 4.3.2 with Lion.


These were copied to:
Go to Preferences -> Downloads and install Command Line Tools.


/Users/bjorn/include/GL
Download and install MacPorts from [http://www.macports.org].


This is in order for Guichan and TMW to find "GL/gl.h".
Open Terminal window.


=== libpng ===
run "sudo port selfupdate" to get latest ports tree.


libpng 1.2.8 does not use GNU autotools. We used "scripts/makefile.darwin" after modifying it to change the install prefix. Static libraries were installed by "make -f makefile.darwin install-static".
run "sudo port install libxml2" to install libxml2.


=== libogg ===
run "sudo port install libguichan" to install guichan.


=== libvorbis ===
run "sudo port install libsdl_gfx" to install sdl_gfx.


=== libxml2 ===
run "sudo port install libsdl_net" to install sdl_net.


=== SDL ===
run "sudo port install libsdl_ttf" to install sdl_ttf.


After installing SDL, make sure sdl-config is in your path (like add /Users/bjorn/bin to the PATH environment variable). This ensures dependent packages can find the SDL headers and libraries.
run "sudo port install physfs" to install PHYSFS.


=== SDL_image ===
run "sudo port install libpng" to install PNG.


=== SDL_mixer ===
run "sudo port install freetype" to install freetype (needed by SDL_ttf)


=== Guichan ===
run "sudo port install libiconv" to install libconv


We took the Guichan 0.4.0 release and applied one small fix to get transparency to work right on the big endian system. This fix can be found [http://guichan.sourceforge.net/forum/read.php?3,240 here].
run "sudo port install gettext" to install libintl


'''Configure command:'''
Click build in Xcode.


<pre>
If you have any problems, ask in the [http://forums.themanaworld.org/viewforum.php?f=10 forums].
./configure --prefix=$HOME --disable-shared \
  --enable-force-sdl --enable-force-sdlimage --enable-force-opengl \
  CXXFLAGS="-I/Users/bjorn/include -I/Users/bjorn/include/SDL"
</pre>


=== PhysFS ===
--[[User:Trapdoor|Trapdoor]] 01:39, 18 February 2007 (CET) / Updated 21 November 2007
 
[[Category:programming]]
PhysFS 1.0.0 needed a -lreadline added to its test_physfs_LDFLAGS in Makefile.in line 280.
 
== The Mana World ==
 
'''Configure command:'''
<pre>
./configure --prefix=$HOME --with-opengl \
  CXXFLAGS="-I/Users/bjorn/include -I/Users/bjorn/include/SDL -I/Users/bjorn/include/libxml2 -DMACOSX" \
  LIBS="-lSDL -lpng"
</pre>
 
== Problems ==
 
It seems we still failed to link Guichan statically, as the ZIP distribution currently fails to run on other Mac systems. IRC log of problem report:
 
01:12 < Catfish_Man> dyld: Library not loaded: /usr/local/lib/libguichan.0.dylib
01:12 < Catfish_Man> lemme bust out otool, one sec
01:12 <@Hammerbear> Dang, so it seems we failed to statically link guichan.
01:12 <@Hammerbear> I thought we had only installed the static libs, as we did with all dependencies.
01:13 < Catfish_Man> ah, yeah
01:13 < Catfish_Man> this is the issue I got hung up on before I busted my build setup
01:16 <@Hammerbear> What system are you on?
01:17 < Catfish_Man> PowerBook G4 1GHz/ 10.4.1

Latest revision as of 20:15, 1 July 2013

Introduction

These are rough instructions, feel free to expand them.

You need to be using the master branch from github that contains the Xcode project file.

Using Xcode

For this you will need to have already downloaded the SDL.framework, SDL_mixer.framework, SDL_image.framework and (if not using trunk) the SDL_net.framework from the SDL site.

Download SDL. Install SDL.framework to /Library/Frameworks

Download SDL_mixer. Install SDL_mixer to /Library/Frameworks

Download SDL_image. Install SDL_image to /Library/Frameworks

Open Xcode Project. I use Xcode 4.3.2 with Lion.

Go to Preferences -> Downloads and install Command Line Tools.

Download and install MacPorts from [1].

Open Terminal window.

run "sudo port selfupdate" to get latest ports tree.

run "sudo port install libxml2" to install libxml2.

run "sudo port install libguichan" to install guichan.

run "sudo port install libsdl_gfx" to install sdl_gfx.

run "sudo port install libsdl_net" to install sdl_net.

run "sudo port install libsdl_ttf" to install sdl_ttf.

run "sudo port install physfs" to install PHYSFS.

run "sudo port install libpng" to install PNG.

run "sudo port install freetype" to install freetype (needed by SDL_ttf)

run "sudo port install libiconv" to install libconv

run "sudo port install gettext" to install libintl

Click build in Xcode.

If you have any problems, ask in the forums.

--Trapdoor 01:39, 18 February 2007 (CET) / Updated 21 November 2007