Difference between revisions of "HowTo:Compile on OSX"

From VsWiki
Jump to: navigation, search
 
Line 1: Line 1:
 
{{NAV_Manual |
 
{{NAV_Manual |
| previous=[[HowTo:Cygwin Compiling|Compiling with Cygwin]]
+
| previous=[[HowTo:Compile_from_CVS|Compiling from SVN under your favourite Unixlike OS ]]
 
| up=[[HowTos]]
 
| up=[[HowTos]]
 
| next=[[HowTo:Use GDB|Using GDB]]
 
| next=[[HowTo:Use GDB|Using GDB]]
 
}}
 
}}
 
----
 
----
How to compile from SVN under Linux.
+
How to compile from SVN under OSX.
 
 
''See also: [[HowTo:Cygwin Compiling]], [[HowTo:VCPP Compiling]]''
 
  
 
==Getting the SVN-files==
 
==Getting the SVN-files==
Line 18: Line 16:
 
==Requirements==
 
==Requirements==
 
In order to compile Vegastrike there are a few things to check:
 
In order to compile Vegastrike there are a few things to check:
* Make sure you have these packages installed ...
+
* Ensure you have installed XCode Tools from your OS installation disc.
** <code>make</code>
+
** Various gcc versions included in XCode Tools releases may have bugs preventing the compilation of Vega Strike.  Vega Strike is known to work, on OSX, with gcc version ''powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026''
** <code>gcc</code>
+
** You should also install the Mac OSX 10.3.9 SDK from the same disk.
** <code>automake</code>
+
* Using [http://fink.sourceforge.net/ Fink], make sure you install the following libraries:
** <code>autoconf</code>
 
** <code>X11</code>...
 
 
** <code>libpng</code> + <code>libpng-devel</code> <-- libpng 3 is recommended.
 
** <code>libpng</code> + <code>libpng-devel</code> <-- libpng 3 is recommended.
 
** <code>python</code> and <code>python-dev</code> <-- 2.2.1
 
** <code>python</code> and <code>python-dev</code> <-- 2.2.1
 
** <code>expat</code>
 
** <code>expat</code>
 
** <code>(lib)jpeg</code> + <code>libjpeg-devel</code>
 
** <code>(lib)jpeg</code> + <code>libjpeg-devel</code>
** <code>opengl</code> (see below) (you probably already have it)
+
* Download the [http://www.libsdl.org/index.php SDL] source tarball, version 1.2.10 or later, compile, and install.
** <code>glut</code> + <code>glut-devel</code>
+
* Download and install the [http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=97 OpenAL] framework.
** <code>openal</code> + <code>openal-devel</code>
 
** '''<code>inetutils</code>'''
 
* When using '''<code>libpng 1.2</code>''', <code>--with-png-inc=<DIR></code> is needed
 
* To be sure '''set the data dir''' to you vs-data dir:
 
<pre>
 
./configure --with-data-dir=<DIR> ........
 
</pre>
 
* If you don't want to compile with '''GTK''' just turn it off:
 
<pre>
 
./configure --enable-nogtk ...........
 
</pre>
 
* This may be necessary depending on your compiler version: (See [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=1147 this] thread in the forum)
 
<pre>
 
./configure --enable-boost-128 ...........
 
</pre>
 
  
 
==Compiling==
 
==Compiling==
The compile procedure should look like the following listing. Remember the configure part depends on above requirements. Though autoconf may not work, if so just skip it.
+
The compile procedure should look like the following listing. Remember the configure part depends on above requirements.
 
<pre>
 
<pre>
 
cd ./vegastrike
 
cd ./vegastrike
 
./bootstrap-sh
 
./bootstrap-sh
./configure --enable-boost-128 --enable-debug --enable-ggdb3 --with-data-dir=<DIR>
+
./configure
 
make vegastrike
 
make vegastrike
 
make soundserver
 
make soundserver
make install
 
 
</pre>
 
</pre>
Note: <code>enable-ggdb3</code> is only needed if you have a weird incompatible version of gcc and gdb that causes gdb to hang in some cases, such as in my version of debian.
+
Note: You will require various options on configure, to specify the paths to the various libraries you have installed.
Note: ggdb3 and debug can both be taken out if you don't want debug symbols and want VS to be faster.
+
Note: If you intend to build a binary to replace the that packaged in a release (ie in a .app), then you must use the configure command --enable-macosx-bundle
 
 
==Notes==
 
Copied from VsHowtoCompileCvsCygwin and modified by [[User:Ace123|Ace123]] on 2003.07.21.
 
  
 
=See also=
 
=See also=
 +
* [[HowTo:Compile_from_CVS|Compiling from SVN under your favourite Unixlike OS ]]
 
* [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=4185 "make clean/distclean" thread in the forum] - A quite helpful thread about the make process.
 
* [http://vegastrike.sourceforge.net/forums/viewtopic.php?t=4185 "make clean/distclean" thread in the forum] - A quite helpful thread about the make process.
  
 
----
 
----
 
{{NAV_Manual |
 
{{NAV_Manual |
| previous=[[HowTo:Cygwin Compiling|Compiling with Cygwin]]
+
| previous=[[HowTo:Compile_from_CVS|Compiling from SVN under your favourite Unixlike OS ]]
 
| up=[[HowTos]]
 
| up=[[HowTos]]
 
| next=[[HowTo:Use GDB|Using GDB]]
 
| next=[[HowTo:Use GDB|Using GDB]]
 
}}
 
}}
 
[[Category:HowTos|Compile from CVS]]
 
[[Category:HowTos|Compile from CVS]]

Revision as of 15:17, 7 October 2006

arrow_left.png Compiling from SVN under your favourite Unixlike OS arrow_up.png HowTos Using GDB arrow_right.png

How to compile from SVN under OSX.

Getting the SVN-files

  • Checkout the following modules ...
    • data package: data4.x
    • code package: vegastrike
  • Visit HowTo:Checkout SVN to see how you check these modules out.

Requirements

In order to compile Vegastrike there are a few things to check:

  • Ensure you have installed XCode Tools from your OS installation disc.
    • Various gcc versions included in XCode Tools releases may have bugs preventing the compilation of Vega Strike. Vega Strike is known to work, on OSX, with gcc version powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026
    • You should also install the Mac OSX 10.3.9 SDK from the same disk.
  • Using Fink, make sure you install the following libraries:
    • libpng + libpng-devel <-- libpng 3 is recommended.
    • python and python-dev <-- 2.2.1
    • expat
    • (lib)jpeg + libjpeg-devel
  • Download the SDL source tarball, version 1.2.10 or later, compile, and install.
  • Download and install the OpenAL framework.

Compiling

The compile procedure should look like the following listing. Remember the configure part depends on above requirements.

cd ./vegastrike
./bootstrap-sh
./configure
make vegastrike
make soundserver

Note: You will require various options on configure, to specify the paths to the various libraries you have installed. Note: If you intend to build a binary to replace the that packaged in a release (ie in a .app), then you must use the configure command --enable-macosx-bundle

See also


arrow_left.png Compiling from SVN under your favourite Unixlike OS arrow_up.png HowTos Using GDB arrow_right.png