Difference between revisions of "HowTo:Compile on OSX"

From VsWiki
Jump to: navigation, search
m ([vega-bot] [replace] 1 instances of 'http://vegastrike.sourceforge.net/forums' for 'http://forums.vega-strike.org')
 
(10 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
{{NAV_Manual |
 
{{NAV_Manual |
| previous=[[HowTo:Compile_from_CVS|Compiling from SVN under your favourite Unixlike OS ]]
+
| previous=[[HowTo:Compile from SVN|Compile from SVN]]
 
| up=[[HowTos]]
 
| up=[[HowTos]]
| next=[[HowTo:Use GDB|Using GDB]]
+
| next=[[HowTo:Compile from released source|Compile from the released source]]
 
}}
 
}}
 
----
 
----
Line 10: Line 10:
  
 
* Checkout the following modules ...
 
* Checkout the following modules ...
** data package: <code>data4.x</code>
+
** data package: <code>data</code>
 
** code package: <code>vegastrike</code>
 
** code package: <code>vegastrike</code>
 
* Visit [[HowTo:Checkout SVN]] to see how you check these modules out.
 
* Visit [[HowTo:Checkout SVN]] to see how you check these modules out.
  
 
==Requirements==
 
==Requirements==
In order to compile Vegastrike there are a few things to check:
+
In order to compile Vega Strike there are a few things to check:
 
* Ensure you have installed XCode Tools from your OS installation disc.
 
* 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''
 
** 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''
Line 25: Line 25:
 
** <code>(lib)jpeg</code> + <code>libjpeg-devel</code>
 
** <code>(lib)jpeg</code> + <code>libjpeg-devel</code>
 
* Download the [http://www.libsdl.org/index.php SDL] source tarball, version 1.2.10 or later, compile, and install.
 
* Download the [http://www.libsdl.org/index.php SDL] source tarball, version 1.2.10 or later, compile, and install.
* Download and install the [http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=97 OpenAL] framework.
+
* Download and install the [http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=97 OpenAL] framework. (Footnote: This is a PPC only framework.  Intel core machines may require to compile OpenAL from source.)
  
 
==Compiling==
 
==Compiling==
Line 38: Line 38:
 
Note: You will require various options on configure, to specify the paths to the various libraries you have installed.
 
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
 
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
 +
 +
 +
==Compiling under MacIntel==
 +
In the vegastrike directory there is a script called intel-mac-conf.sh, edit this file in vi and point it to your dependencies directories (i.e for fink /sw/bin /sw/inc etc. or for Darwin Ports /opt/local/bin /opt/local/inc etc.)
 +
 +
*Note: the python from Darwin Ports did not seem to play with the configure script and I had to install python from fink to get the configure script to work.
 +
 +
Ok, Now run the script.
 +
*Note: For some reason the configure script forces itself against the 10.3.9.sdk, that is no good for us as when you try to build the process has a fit as we have an intel processor and it needs a powerpc to compile, so navigate in finder to your source directory and open configure.ac, do a find and replace and replace all the MacOSX10.3.9.sdk with MacOSX10.4u.sdk, save the file and we should be set to go.
 +
 +
Do a make vegastrike, the shell script as been designed to create us a bundle app, once the build is finished just copy this into your existing bundle.
  
 
=See also=
 
=See also=
 
* [[HowTo:Compile_from_CVS|Compiling from SVN under your favourite Unixlike OS ]]
 
* [[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://forums.vega-strike.org/viewtopic.php?t=4185 "make clean/distclean" thread in the forum] - A quite helpful thread about the make process.
 +
* [http://thewillofomega.googlepages.com/vegastrikedev Dandandaman's website about VS on Mac] including SVN builds.
  
 
----
 
----
Line 47: Line 59:
 
| previous=[[HowTo:Compile_from_CVS|Compiling from SVN under your favourite Unixlike OS ]]
 
| 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:Compile_from_released_source|Compile from the released source]]
 
}}
 
}}
 
[[Category:HowTos|Compile from CVS]]
 
[[Category:HowTos|Compile from CVS]]

Latest revision as of 22:29, 8 January 2013

arrow_left.png Compile from SVN arrow_up.png HowTos Compile from the released source arrow_right.png

How to compile from SVN under OSX.

Getting the SVN-files

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

Requirements

In order to compile Vega Strike 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. (Footnote: This is a PPC only framework. Intel core machines may require to compile OpenAL from source.)

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


Compiling under MacIntel

In the vegastrike directory there is a script called intel-mac-conf.sh, edit this file in vi and point it to your dependencies directories (i.e for fink /sw/bin /sw/inc etc. or for Darwin Ports /opt/local/bin /opt/local/inc etc.)

  • Note: the python from Darwin Ports did not seem to play with the configure script and I had to install python from fink to get the configure script to work.

Ok, Now run the script.

  • Note: For some reason the configure script forces itself against the 10.3.9.sdk, that is no good for us as when you try to build the process has a fit as we have an intel processor and it needs a powerpc to compile, so navigate in finder to your source directory and open configure.ac, do a find and replace and replace all the MacOSX10.3.9.sdk with MacOSX10.4u.sdk, save the file and we should be set to go.

Do a make vegastrike, the shell script as been designed to create us a bundle app, once the build is finished just copy this into your existing bundle.

See also


arrow_left.png Compiling from SVN under your favourite Unixlike OS arrow_up.png HowTos Compile from the released source arrow_right.png