Games4Mac Community

Willkommen, Gast ( Anmelden | Registrierung )

2 Seiten V   1 2 >  
Reply to this topicStart new topic
SuperTuxKart-Portierungsdokumentation
xeno74
Beitrag 13.04.2007, 12:36
Beitrag #1

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



Diese Seite enthaelt eine detaillierte Beschreibung, um STK auf dem Mac selbst uebersetzen zu koennen.

STK-Portierungsumgebung erstellen:

01. OS X neu installieren (Empfohlen)

02. Updates für OS X installieren (-> 10.4.9)

03. xcode 2.4.1_8m1910_6936315 runterladen:

http://developer.apple.com/macosx/

Ihr braucht eine Apple-ID um das Xcode-Paket zu laden.

04. xcode installieren

05. "/etc/profile" editieren:

QUELLTEXT

# System-wide .profile for sh(1)

PATH="/sw/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin"

export PATH

PKG_CONFIG_PATH="/sw/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/local/lib/pkgconfig"

export PKG_CONFIG_PATH

if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi


06. Fink runterladen:

http://www.finkproject.org/download/index.php?phpLang=en

07. Fink installieren

08. Den FinkCommander vom DMG in den Programmordner kopieren.

09. Im FinkCommander Fink aktualisieren:

09.1 Selfupdate

09.2 update-all

09.3 Index neu einlesen

10. Folgende Fink-Pakete installieren:


10.1 SDL

10.2 SDL-image

10.3 SDL-ttf

10.4 SDL-mixer

10.5 audiofile

10.6 esound

10.7 svn

10.8 svn-client


11. SDL-Framework runterladen:

http://www.libsdl.org/download-1.2.php

12. SDL-Framework installieren durch kopieren vom "SDL.framework" nach <Datenträger>:Library:Frameworks.

13. Vorbis.framework und Ogg.framework installieren:

13.1 SuperTux runterladen:

http://developer.berlios.de/project/showfi...elease_id=11879

13.2 Mit der rechten Maustaste auf das AppBundle klicken und "Paketinhalt zeigen" wählen

13.3 In das Verzeichnis Contents:Frameworks wechseln. Und das Vorbis.framework und Ogg.framework nach <Datenträger>:Library:Frameworks kopieren.


14. Bauen der PLIB: ////////////////////////////////////////

14.1 PLIB downloaden:

http://plib.sourceforge.net/download.html

14.2 plib-1.8.4.tar.gz entpacken

14.3 In den ausgepackten PLIB-Ordner wechseln

14.4 "pwMacOSX.cxx"-Patch runterladen:



14.5 Mit der gepatchten pwMacOSX.cxx von hiker die Standard-pwMacOSX.cxx unter src/pw ersetzen.


14.6 "./configure --prefix=<..... Universal/plib_ppc>" in dem ausgepackten PLIB-Ordner ausführen

<..... Universal/plib_ppc> steht für irgendeinen Ordner eurer Wahl.

Das kann z.B. /Users/christian/Desktop/Universal/plib_ppc sein.

14.7 Änderungen in der plib:


In jsMacOSX.cxx statt:

QUELLTEXT

#include <IOKit/IOkitLib.h>


ersetzen mit

QUELLTEXT

#include <IOKit/IOKitLib.h>


14.8 In jsMacOSX.cxx statt:

QUELLTEXT

static void os_specific_s::elementEnumerator( const void *element, void* vjs)


ersetzen mit:

QUELLTEXT

void os_specific_s::elementEnumerator( const void *element, void* vjs)


14.9 make

14.10 make install
Danach haben wir die PLIB als PPC-LIBS.

14.11 So, für alle die einen PPC haben ist die PLIB auch nur auf dem PPC lauffähig. Wir brauchen aber die PLIB als Universal. Also bauen wir noch eine x86-Version der PLIB. (Die x86-User müssen jetzt eine
PPC-Variante bauen)

14.12 make clean

14.13 "./configure --prefix=<..... Universal/plib_x86>" in dem ausgepackten PLIB-Ordner ausführen

<..... Universal/plib_x86> steht für irgendeinen Ordner eurer Wahl.
(Aber nicht den ppc-Ordner verwenden)

Das kann z.B. /Users/christian/Desktop/Universal/plib_x86 sein.

14.14
Es gibt mehrere Makefiles im PLIB-Ordner. Alle müssen jetzt angepasst werden. In der Zeile cxxflags muß nach dem editieren
"CXXFLAGS = -g -O2 -Wall -arch i386" stehen.

So, diese Makefiles haben jetzt den "-arch i386" Parameter:

QUELLTEXT

<PLIB-Ordner>/Makefile
<PLIB-Ordner>/src/Makefile
<PLIB-Ordner>/src/fnt/Makefile
<PLIB-Ordner>/src/js/Makefile
<PLIB-Ordner>/src/net/Makefile
<PLIB-Ordner>/src/psl/Makefile
<PLIB-Ordner>/src/puAux/Makefile
<PLIB-Ordner>/src/pui/Makefile
<PLIB-Ordner>/src/pw/Makefile
<PLIB-Ordner>/src/sg/Makefile
<PLIB-Ordner>/src/sl/Makefile
<PLIB-Ordner>/src/ssg/Makefile
<PLIB-Ordner>/src/ssgAux/Makefile
<PLIB-Ordner>/src/util/Makefile


14.14 make install
Danach haben wir die PLIB als x86-LIBS.

14.15 So, jetzt verschmelzen wir die PPC-Libs und i386-Libs zu
Universal-Libs (Achtung nicht einfach das Beispiel übernehmen sondern die Pfade wie /Users/christian ... ändern wobei /usr/lib bleibt):

QUELLTEXT

lipo -create /Users/christian/Desktop/Universal/plib_ppc/lib/libplibfnt.a /Users/christian/Desktop/Universal/plib_x86/lib/libplibfnt.a -output /usr/lib/libplibfnt.a


Diesen Schritt müßt Ihr für alle PLIB-Libs wiederholen.

15. Bauen der Freealut-1.1.0 von OpenAL.org ////////////////////


15.1 In Makefile.in nach

QUELLTEXT

SUBDIRS = admin src include examples test_suite


suchen und durch:

QUELLTEXT

SUBDIRS = admin src include ersetzen


15.2 In der configure nach

QUELLTEXT

for ac_header in AL/alc.h AL/al.h basetsd.h ctype.h math.h stdio.h time.h


suchen und durch

QUELLTEXT

for ac_header in OpenAL/alc.h OpenAL/al.h basetsd.h ctype.h math.h stdio.h time.h


ersetzen


15.3 export CXXFLAGS="-framework OpenAL"


15.4 export LDFLAGS="-framework OpenAL"


15.5 ./configure --prefix=/usr


15.6 make


15.7 Im Ordner admin/pkgconfig die freealut.pc öffnen.

Die Zeile

QUELLTEXT

Requires: openal


ersetzen mit

QUELLTEXT

Requires:


15.8 Die Zeilen:

QUELLTEXT

Libs: -L${libdir} -lalut Cflags: -I${includedir}


ersetzen mit

QUELLTEXT

Libs: -framework OpenAL -L${libdir} -lalut Cflags: -framework OpenAL -I${includedir}



15.9 sudo make install -->Freealut-LIBS befinden sich jetzt unter "/usr/lib"


16. Wichtig: Bitte installiert die PLIB nochmal unter

"/usr/local":

16.1 sudo cp /usr/lib/libplib* /usr/local/lib/

16.2 sudo cp -R /usr/include/plib /usr/local/include/

Sonst gibt es später Probleme mit dem Ausführen des Installationsskriptes von STK.


So, die Portierungsumgebung ist fertig original.gif


SuperTuxKart installieren:

1. Kopiert folgenden Code in eine Datei die Ihr "buildUB.sh" nennt und macht sie ausführbar mit chmod.

Über diesen Link könnt Ihr Florian's Skript auch runterladen:

http://community.games4mac.de/index.php?ac...ost&id=2189

Erstellt von Florian :

buildUB.sh:

QUELLTEXT

#!/bin/bash

if [ -r ./configure ]; then

                 echo "Configure found!"

else

                 echo "No Config file found! Runing autogen.sh..."

                 sh autogen.sh

fi


if [ -r ./config.guess ]; then

                 echo "config.guess found!"

else

                  echo "config.guess not present! Copying it..."

                  cp /usr/share/libtool/config.guess ./config.guess

fi


if [ -r ./config.sub ]; then

                  echo "config.sub found!"

else

                  echo "config.sub not present! Copying it..."

                  cp /usr/share/libtool/config.sub ./config.sub

fi


if [ -r ./Makefile ]; then

                  echo "Makefile found!"

else

                  echo "Makefile missing! Running ./configure..."

                  ./configure

                  if [ -r ./Makefile ]; then

                              echo "Makefile present, ready to compile!"

                  else

                       echo "Configure not completed, Makefile still missing! Exiting..."

                  exit 1

                  fi

fi


echo "Setting environment variables..."

export sdl_LIBS=""

export LDFLAGS="-framework OpenAL -Wl,-framework,Cocoa -framework SDL -framework Cocoa -lSDLmain

-framework Vorbis -framework Ogg -L/usr/local/lib -L/opt/local/lib -L/sw/lib"

export openal_LIBS="/usr/local/lib/libmikmod.a"


if [ -r ./bin/supertuxkartPPC ]; then

                    echo "supertuxkartPPC is present, nothing to do."

else

                    echo "Cleaning up..."

                    make clean -s


                    echo "Building PPC Binary..."

                    make -e -s


                    echo "Copying PPC Binary..."

                    mkdir ./bin

                    if [ -r ./src/supertuxkart ]; then

                               cp ./src/supertuxkart ./bin/supertuxkartPPC

                               else

                               echo "Error!"

                               exit 1

                    fi

fi


if [ -r ./bin/supertuxkartx86 ]; then

                    echo "supertuxkartx86 is present, nothing to do."

                    else

                    echo "Cleaning up..."

                    make clean -s


echo "Building x86 Binary..."

export CXXFLAGS="-g -O2 -Wall -arch i386 `sdl-config --cflags`"

export LDFLAGS=$LDFLAGS" -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -L/usr/local/lib -L/opt/local/lib -L/sw/lib"

make -e -s


                   echo "Copying x86 Binary..."

                   if [ -r ./src/supertuxkart ]; then

                          cp ./src/supertuxkart ./bin/supertuxkartx86

                          else

                          echo "Error!"

                          exit 1

             fi

fi


echo "Creating Universal Binary..."

lipo -create ./bin/supertuxkartPPC ./bin/supertuxkartx86 -output ./bin/supertuxkart


echo "Done!"


Skript -Ende- -----------------------------------------------


2. SuperTuxKart via "svn" runterladen:


svn co svn://svn.berlios.de/supertuxkart/trunk/


3. Wechselt in den Ordner "trunk"


4. Kopiert das Skript "buildUB.sh" in den trunk-Ordner


5. Vergesst nicht es ausführbar zu machen z.B. mit


chmod 744 buildUB.sh


6. Jetzt gehts los:


./buildUB.sh


7. Kontrollen:


7.1 Wechselt innerhalb des "trunk"-Verzeichnisses in das bin-Verzeichnis. Dort befindet sich das STK-Binary.


7.1 Welche Version habe ich?


QUELLTEXT

./supertuxkart --version


Beispiel:

QUELLTEXT

SuperTuxKart, 0.3alpha.

SuperTuxKart, SVN revision number '975M'.


7.2 Habe ich ein Universal-Binary das auf Intel- und auf PowerPC-Macs läuft?

QUELLTEXT

file supertuxkart



Beispiel:

QUELLTEXT

supertuxkart: Mach-O fat file with 2 architectures

supertuxkart (for architecture ppc): Mach-O executable ppc

supertuxkart (for architecture i386): Mach-O executable i386


7.3 Kann ich dieses trunk-Verzeichnis einfach auf CD brennen und auf jedem Mac starten?

QUELLTEXT

otool -L supertuxkart


In dieser Ausgabe könnt Ihr die Abhängigkeiten sehen. Das heißt, Dateien die SuperTuxKart

während der Laufzeit braucht.

QUELLTEXT

supertuxkart:

/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL (compatibility version 1.0.0,

current version 1.0.0)

/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0,

current version 11.0.0)

@executable_path/../Frameworks/SDL.framework/Versions/A/SDL (compatibility version 1.0.0, current

version 1.0.0)

@executable_path/../Frameworks/Vorbis.framework/Versions/A/Vorbis (compatibility version 1.0.0,

current version 1.0.0)

@executable_path/../Frameworks/Ogg.framework/Versions/A/Ogg (compatibility version 1.0.0, current

version 1.0.0)

/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current

version 128.0.0)

/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current

version 1.0.0)

/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current

version 275.0.0)

/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version

1.0.0)

/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)

/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.8)



Wir sehen das ein Frameworks-Verzeichnis benutzt wird das relativ "../Frameworks" zum Binary von STK

liegt.

In diesem Frameworks-Verzeichnis befinden sich folgende Frameworks:


SDL.framework

Vorbis.framework

Ogg.framework


Das heißt, wenn wir die Binary auch auf anderen Macs starten wollen die diese Frameworks nicht

haben müssen wir diese 3 Frameworks in das trunk-Verzeichnis kopieren.


8. Erstelle einen Frameworks-Ordner im "trunk"-Verzeichnis


9. Kopiere aus <Datenträgername>:Library:Frameworks die Verzeichnisse

SDL.framework, Vorbis.framework und Ogg.framework

in das neue Frameworks-Verzeichnis im trunk-Verzeichnis.

Die libmikmod und die PLIB sind statisch eingebunden.


10. Wichtig für alle Panther-User: Bitte installiert die OpenAL-Software von OpenAL.org.

Downloadlink von der OpenAL-Software:

http://www.openal.org/downloads.html

Damit kommen alle Panther-User auch in den Genuss des OpenAL-Sounds.

Tiger-User haben die OpenAL standardmäßig vorinstalliert.


So, jetzt heißt es SuperTuxKart starten

./supertuxkart


Viel Spaß beim Spielen und Testen.

IPB Bild

Der Beitrag wurde von xeno74 bearbeitet: 14.04.2007, 22:21


--------------------
Go to the top of the page
 
+Quote Post
hiker
Beitrag 21.04.2007, 05:23
Beitrag #2

*****

Gruppe: Members
Beiträge: 863
Wohnort: Melbourne, Australien



Hi,

ZITAT(xeno74 @ 13.04.2007, 12:36) [snapback]203532[/snapback]

svn co svn://svn.berlios.de/supertuxkart/trunk/

Zwei kurze Kommentare: Du kannst auch:
QUELLTEXT
svn co svn://svn.berlios.de/supertuxkart/trunk/ supertuxkart

aufrufen, dann werden die Daten nicht in 'trunk', sondern in einem Verzeichnis 'supertuxkart' abgelegt.

Und nur um ganz sicher zu gehen (sorry, falls das jetzt zu trivial ist, aber ich hab' halt keine Ahnung, wie vertraut Du mit SVN bist): Du weisst, dass Du nach dem einmaligen Auschecken einfach
QUELLTEXT
svn update
machen kannst? Dann bekommst Du ja nur die Aenderungen uebertragen, anstatt des ganzen Pakets.

Ciao,
Joerg
Go to the top of the page
 
+Quote Post
xeno74
Beitrag 21.04.2007, 07:45
Beitrag #3

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



ZITAT(hiker @ 21.04.2007, 05:23) [snapback]204577[/snapback]

Hi,
Zwei kurze Kommentare: Du kannst auch:
QUELLTEXT
svn co svn://svn.berlios.de/supertuxkart/trunk/ supertuxkart



Schöne Idee. Dann brauche ich das Verzeichnis nicht umzubenennen.

QUELLTEXT

svn co svn://svn.berlios.de/supertuxkart/trunk/ 1014


Meine Verzeichnisse bekommen bei mir immer den Revisionsnamen.

QUELLTEXT

svn update


Wußte ich auch noch nicht original.gif

Brauche ich zur Zeit noch nicht weil ich immer komplett die Revision runterlade
und dann später in den Backup-Ordner verschiebe. So habe ich alle Revisionen
zusammen und kann dadurch besser testen.

@Joerg, ich kann zur Zeit nicht mehr via http den BerliOS-Server aufrufen.
Das AppBundle der Revision 1014 liegt schon auf dem FTP-Server von BerliOS.
Ich kann aber dieses AppBundle nicht hinzufügen weil ich kein Zugriff habe via http. Kannst Du auf BerliOS zugreifen?

Gruß,

Christian

Der Beitrag wurde von xeno74 bearbeitet: 21.04.2007, 07:52


--------------------
Go to the top of the page
 
+Quote Post
hiker
Beitrag 23.04.2007, 03:15
Beitrag #4

*****

Gruppe: Members
Beiträge: 863
Wohnort: Melbourne, Australien



ZITAT(xeno74 @ 21.04.2007, 07:45) [snapback]204579[/snapback]

Meine Verzeichnisse bekommen bei mir immer den Revisionsnamen.

*grin* Du sagst das natuerlich zum richtigen Zeitpunkt original.gif Prinzipiell ist aber die Idee von SVN, dass Du eben nur eine lokale Version hast. Falls Du wirklich mal eine aeltere Version brauchst, kannst Du ja jederzeit mit
QUELLTEXT
svn checkout -r 1000 ...

diese Version kriegen, oder wenn Du nur eine Datei vergleichen willst, kannst Du
QUELLTEXT
svn diff -r 1000 kart.cpp

machen. Oder falls Du wirklich die alte Version brauchst, geht auch:
QUELLTEXT
svn cat -r 1000 kart.cpp >kart.1000.cpp


ZITAT

QUELLTEXT

svn update

Wußte ich auch noch nicht original.gif

Das ist eigentlich einer der Kernpunkte von SVN: dass man eben 'deltas' erstellen kann, also z.B. den Unterschied zwischen Deiner letzten Version, und der aktuellen SVN Version, und nur dieser Unterschied (delta) wird uebertragen. Glaub' mir, hier in Australien wuerde ich ja wahnsinnig werden, wenn ich jedesmal die kompletten XX MB uebertragen muesste, nur weil Coz irgendwo ein Komma eingefuegt hat original.gif

ZITAT

Brauche ich zur Zeit noch nicht weil ich immer komplett die Revision runterlade
und dann später in den Backup-Ordner verschiebe. So habe ich alle Revisionen
zusammen und kann dadurch besser testen.

Angesichts der Tatsache, dass berlios Probleme hat, hast Du natuerlich recht, und ich haette vielleicht auch regelmaessig mal ein svn dump ziehen sollen (das enthaelt dann die komplette Geschichte von SVN, also inkl. aller Kommentare etc.). Aber prinzipiell sollte das wirklich nicht notwendig sein sad.png (*fingers crossed* und hoffend, dass berlios bald wiederkommt).

ZITAT

@Joerg, ich kann zur Zeit nicht mehr via http den BerliOS-Server aufrufen.
Das AppBundle der Revision 1014 liegt schon auf dem FTP-Server von BerliOS.
Ich kann aber dieses AppBundle nicht hinzufügen weil ich kein Zugriff habe via http. Kannst Du auf BerliOS zugreifen?

Gleiches Problem hier, alle berlios Seiten scheinen weg zu sein (www.berlios.de, developer.berlios.de, supertuxkart Seiten, ...)

Im Moment koennen wir nur abwarten. Die aktuelle Version von STK haben wir ja, im dummen Extremfall (berlios stirbt und nimmt alle Daten mit), fangen wir einfach mit der aktuellen Version bei (z.B.) sourceforge neu an. Wir wuerden zwar etwas an Informationen/Wissen verlieren, aber das wird zu verkraften sein.

Ciao,
Joerg
Go to the top of the page
 
+Quote Post
swat
Beitrag 23.04.2007, 15:12
Beitrag #5

*****

Gruppe: Members
Beiträge: 1.403
Wohnort: Berlin



ok hier werdet ihr wohl in zukunft keine posts von mir sehen grin.png
naja ich muss das erstmal alles verstehen grin.png
aber ich denke mal das war ne gute idee mit dem post (falls ich dann mal kann, komme ich darauf zurück (falls es den dann noch gibt)) grin.png laughing.png stuart.png

swat thumbsup.gif


--------------------
Go to the top of the page
 
+Quote Post
xeno74
Beitrag 24.06.2007, 21:14
Beitrag #6

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



README.macosx

System requirements Mac:
PowerPC- or Intel-Mac with 800 MHz or more,
1 GHz recommended 3D-graphics card with 32 MB or more.
100 MB free disk space. Supporting Mac OS X 10.3.9 or later.

Compiling SuperTuxKart on OS X 10.4.x

01. Install all updates for OS X.

02. Download xcode 2.4.1_8m1910_6936315 from http://developer.apple.com/macosx/

You must be an Apple Developer Connection member to download this package.

03. Installing XCode.

04. Edit "/etc/profile":

--------------------------------------------------------------------------------------------------------

# System-wide .profile for sh(1)

PATH="/sw/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin"

export PATH

PKG_CONFIG_PATH="/sw/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/local/lib/pkgconfig"

export PKG_CONFIG_PATH

if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi

--------------------------------------------------------------------------------------------------------

05. Download Fink from http://www.finkproject.org/download/index.php?phpLang=en

06. Installing Fink.

07. Copy the FinkCommander folder to Applications and launch FinkCommander.

08. Run selfupdate.

09. Run update-all.

10. Run the index command.

11. Installing the following 'fink' packages:


11.01 SDL

11.02 SDL-image

11.03 SDL-ttf

11.04 SDL-mixer

11.05 audiofile

11.06 esound

11.07 svn

11.08 svn-client


12. Download the SDL framework from http://www.libsdl.org/download-1.2.php and copy it to /Library/Frameworks.

13. Installing Vorbis.framework and Ogg.framework:

13.01 Download SuperTux from http://developer.berlios.de/project/showfi...elease_id=11879

13.02 Right-click the SuperTux icon and select Show Package Contents from the context menu.

13.03 Change in the folder Contents:Frameworks. And copy Vorbis.framework and Ogg.framework to <hd>:Library:Frameworks.


14. Installing plib: ////////////////////////////////////////


14.01 Download PLIB from http://plib.sourceforge.net/download.html


14.02 Unpack plib-1.8.4.tar.gz.


14.03 Change in the folder PLIB.


14.04 Download "pwMacOSX.cxx"-patch from http://community.games4mac.de/index.php?ac...ost&id=2217


14.05 Installing pwMacOSX.cxx-patch.


14.06 Run ./configure --prefix=<..... Universal/plib_ppc>" in the folder PLIB.


e.g.: /Users/christian/Desktop/Universal/plib_ppc.


14.07 Modify the plib:


jsMacOSX.cxx:


#include <IOKit/IOkitLib.h>


replace with:


#include <IOKit/IOKitLib.h>


14.08 jsMacOSX.cxx:


static void os_specific_s::elementEnumerator( const void *element, void* vjs)


replace with:


void os_specific_s::elementEnumerator( const void *element, void* vjs)


14.09 make

14.10 make install

14.11 make clean


14.12 Run "./configure --prefix=<..... Universal/plib_x86>" in the folder PLIB.

e.g.: /Users/christian/Desktop/Universal/plib_x86.

14.13 Edit the following Makefiles:

<PLIB-Ordner>/Makefile

<PLIB-Ordner>/src/Makefile

<PLIB-Ordner>/src/fnt/Makefile

<PLIB-Ordner>/src/js/Makefile

<PLIB-Ordner>/src/net/Makefile

<PLIB-Ordner>/src/psl/Makefile

<PLIB-Ordner>/src/puAux/Makefile

<PLIB-Ordner>/src/pui/Makefile

<PLIB-Ordner>/src/pw/Makefile

<PLIB-Ordner>/src/sg/Makefile

<PLIB-Ordner>/src/sl/Makefile

<PLIB-Ordner>/src/ssg/Makefile

<PLIB-Ordner>/src/ssgAux/Makefile

<PLIB-Ordner>/src/util/Makefile

replace the line: "CXXFLAGS =" with "CXXFLAGS = -g -O2 -Wall -arch i386"

14.14 make install

14.15 Create a universal (multi-architecture) plib:

lipo -create /Users/christian/Desktop/Universal/plib_ppc/lib/libplibfnt.a /Users/christian/Desktop/Universal/

plib_x86/lib/libplibfnt.a -output /usr/lib/libplibfnt.a

Repeat this step for all libraries.

15. Installing Freealut-1.1.0 from OpenAL.org ////////////////////

15.01 Makefile.in:

Replace the line:

SUBDIRS = admin src include examples test_suite

with

SUBDIRS = admin src include


15.02 configure:

Replace the line

for ac_header in AL/alc.h AL/al.h basetsd.h ctype.h math.h stdio.h time.h

with

for ac_header in OpenAL/alc.h OpenAL/al.h basetsd.h ctype.h math.h stdio.h time.h


15.03 export CXXFLAGS="-framework OpenAL"


15.04 export LDFLAGS="-framework OpenAL"


15.05 ./configure --prefix=/usr


15.06 make


15.07 Open admin/pkgconfig/freealut.pc

Replace the line

Requires: openal

with

Requires:


15.08 Replace the line:

Libs: -L${libdir} -lalut Cflags: -I${includedir}

with

Libs: -framework OpenAL -L${libdir} -lalut Cflags: -framework OpenAL -I${includedir}


15.09 sudo make install


16. Copy the plib files to "/usr/local":

16.01 sudo cp /usr/lib/libplib* /usr/local/lib/

16.02 sudo cp -R /usr/include/plib /usr/local/include/


Installing SuperTuxKart //////////


1. Copy the following code and paste it in the new file "buildUB.sh".


buildUB.sh:

---------------------------------------------------------------------------------------------------------


#!/bin/bash

if [ -r ./configure ]; then

echo "Configure found!"

else

echo "No Config file found! Runing autogen.sh..."

sh autogen.sh

fi


if [ -r ./config.guess ]; then

echo "config.guess found!"

else

echo "config.guess not present! Copying it..."

cp /usr/share/libtool/config.guess ./config.guess

fi


if [ -r ./config.sub ]; then

echo "config.sub found!"

else

echo "config.sub not present! Copying it..."

cp /usr/share/libtool/config.sub ./config.sub

fi


if [ -r ./Makefile ]; then

echo "Makefile found!"

else

echo "Makefile missing! Running ./configure..."

./configure

if [ -r ./Makefile ]; then

echo "Makefile present, ready to compile!"

else

echo "Configure not completed, Makefile still missing! Exiting..."

exit 1

fi

fi


echo "Setting environment variables..."

export sdl_LIBS=""

export LDFLAGS="-framework OpenAL -Wl,-framework,Cocoa -framework SDL -framework Cocoa -lSDLmain

-framework Vorbis -framework Ogg -L/usr/local/lib -L/opt/local/lib -L/sw/lib"

export openal_LIBS="/usr/local/lib/libmikmod.a"


if [ -r ./bin/supertuxkartPPC ]; then

echo "supertuxkartPPC is present, nothing to do."

else

echo "Cleaning up..."

make clean -s


echo "Building PPC Binary..."

make -e -s


echo "Copying PPC Binary..."

mkdir ./bin

if [ -r ./src/supertuxkart ]; then

cp ./src/supertuxkart ./bin/supertuxkartPPC

else

echo "Error!"

exit 1

fi

fi


if [ -r ./bin/supertuxkartx86 ]; then

echo "supertuxkartx86 is present, nothing to do."

else

echo "Cleaning up..."

make clean -s


echo "Building x86 Binary..."

export CXXFLAGS="-g -O2 -Wall -arch i386 `sdl-config --cflags`"

export LDFLAGS=$LDFLAGS" -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -L/usr/local/lib -L/opt/local/lib -L/sw/lib"

make -e -s


echo "Copying x86 Binary..."

if [ -r ./src/supertuxkart ]; then

cp ./src/supertuxkart ./bin/supertuxkartx86

else

echo "Error!"

exit 1

fi

fi


echo "Creating Universal Binary..."

lipo -create ./bin/supertuxkartPPC ./bin/supertuxkartx86 -output ./bin/supertuxkart


echo "Done!"


-------------------------------------------------------------------------------------------------------------

2. Set the permissions for the script "buildUB.sh"

e.g.: chmod 744 buildUB.sh


3. Download SuperTuxKart-Source from "http://developer.berlios.de/project/showfiles.php?group_id=2765".


4. Go in the folder SuperTuxKart.


5. Copy the script "buildUB.sh" in the directory "SuperTuxKart".


6. ./buildUB.sh


7. Check-up:


7.01 Go in the folder "bin".


7.02 ./supertuxkart --version

Print version information

e.g.:
-------------------------------------------------------------------------
SuperTuxKart, 0.3alpha.

SuperTuxKart, SVN revision number '975M'.
-------------------------------------------------------------------------


7.03 Is this a universal binary?

file supertuxkart


e.g.:
-------------------------------------------------------------------------
supertuxkart: Mach-O fat file with 2 architectures

supertuxkart (for architecture ppc): Mach-O executable ppc

supertuxkart (for architecture i386): Mach-O executable i386
-------------------------------------------------------------------------


7.04 otool -L supertuxkart

Print shared library dependencies.

e.g.:
------------------------------------------------------------------------------------------------
supertuxkart:

/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL (compatibility version 1.0.0,

current version 1.0.0)

/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0,

current version 11.0.0)

@executable_path/../Frameworks/SDL.framework/Versions/A/SDL (compatibility version 1.0.0, current

version 1.0.0)

@executable_path/../Frameworks/Vorbis.framework/Versions/A/Vorbis (compatibility version 1.0.0,

current version 1.0.0)

@executable_path/../Frameworks/Ogg.framework/Versions/A/Ogg (compatibility version 1.0.0, current

version 1.0.0)

/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current

version 128.0.0)

/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current

version 1.0.0)

/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current

version 275.0.0)

/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version

1.0.0)

/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)

/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.8)
---------------------------------------------------------------------------------------------------------



************
S T A R T
T H E
G A M E
A N D
H A V E
F U N!
************


Please post to the development list if you have any problems.

Der Beitrag wurde von xeno74 bearbeitet: 24.06.2007, 21:17


--------------------
Go to the top of the page
 
+Quote Post
hiker
Beitrag 25.06.2007, 02:52
Beitrag #7

*****

Gruppe: Members
Beiträge: 863
Wohnort: Melbourne, Australien



...
ZITAT(xeno74 @ 24.06.2007, 21:14) [snapback]210336[/snapback]

11. Installing the following 'fink' packages:
11.01 SDL

11.02 SDL-image

11.03 SDL-ttf

11.04 SDL-mixer

Hmm - SDL-image, ttf, and mixer sollten fuer STK eigentlich nicht benoetigt werden. Oder gibt's da irgendwo eine Mac spezifische Abhaengigkeit?

Cheers,
Joerg
Go to the top of the page
 
+Quote Post
xeno74
Beitrag 25.06.2007, 09:34
Beitrag #8

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



ZITAT(hiker @ 25.06.2007, 02:52) [snapback]210346[/snapback]

...

Hmm - SDL-image, ttf, and mixer sollten fuer STK eigentlich nicht benoetigt werden. Oder gibt's da irgendwo eine Mac spezifische Abhaengigkeit?

Cheers,
Joerg


Nö, ne Abhängigkeit gibt es nicht. Diese Enträge stammen noch aus der Portierungsdoku für Portierungen allgemein. Neben STK versuchen wir immer wieder weitere Spiele für OS X zu portieren. Diese Einträge werde ich heute entfernen.

Danke Joerg flowers.png

Xeno

Der Beitrag wurde von xeno74 bearbeitet: 25.06.2007, 09:34


--------------------
Go to the top of the page
 
+Quote Post
xeno74
Beitrag 25.06.2007, 19:05
Beitrag #9

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



Update README.macosx: ----------------------------------------------------------

System requirements Mac:
PowerPC- or Intel-Mac with 800 MHz or more,
1 GHz recommended 3D-graphics card with 32 MB or more.
100 MB free disk space. Supporting Mac OS X 10.3.9 or later.

Compiling SuperTuxKart on OS X 10.4.x

01. Install all updates for OS X.

02. Download xcode 2.4.1_8m1910_6936315 from http://developer.apple.com/macosx/

You must be an Apple Developer Connection member to download this package.

03. Installing XCode.

04. Edit "/etc/profile":

--------------------------------------------------------------------------------------------------------

# System-wide .profile for sh(1)

PATH="/sw/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin"

export PATH

PKG_CONFIG_PATH="/sw/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/local/lib/pkgconfig"

export PKG_CONFIG_PATH

if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi

--------------------------------------------------------------------------------------------------------

05. Download Fink from http://www.finkproject.org/download/index.php?phpLang=en

06. Installing Fink.

07. Copy the FinkCommander folder to Applications and launch FinkCommander.

08. Run selfupdate.

09. Run update-all.

10. Run the index command.

11. Installing the following 'fink' packages:


11.01 SDL

11.02 audiofile

11.03 esound

11.04 svn

11.05 svn-client


12. Download the SDL framework from http://www.libsdl.org/download-1.2.php and copy it to /Library/Frameworks.

13. Installing Vorbis.framework and Ogg.framework:

13.01 Download SuperTux from http://developer.berlios.de/project/showfi...elease_id=11879

13.02 Right-click the SuperTux icon and select Show Package Contents from the context menu.

13.03 Change in the folder Contents:Frameworks. And copy Vorbis.framework and Ogg.framework to <hd>:Library:Frameworks.


14. Installing plib: ////////////////////////////////////////


14.01 Download PLIB from http://plib.sourceforge.net/download.html


14.02 Unpack plib-1.8.4.tar.gz.


14.03 Change in the folder PLIB.


14.04 Download "pwMacOSX.cxx"-patch from ftp://ftp.berlios.de/pub/supertuxkart/plib_patch_for_osx.zip


14.05 Installing pwMacOSX.cxx-patch.


14.06 Run ./configure --prefix=<..... Universal/plib_ppc>" in the folder PLIB.


e.g.: /Users/christian/Desktop/Universal/plib_ppc.


14.07 Modify the plib:


jsMacOSX.cxx:


#include <IOKit/IOkitLib.h>


replace with:


#include <IOKit/IOKitLib.h>


14.08 jsMacOSX.cxx:


static void os_specific_s::elementEnumerator( const void *element, void* vjs)


replace with:


void os_specific_s::elementEnumerator( const void *element, void* vjs)


14.09 make

14.10 make install

14.11 make clean


14.12 Run "./configure --prefix=<..... Universal/plib_x86>" in the folder PLIB.

e.g.: /Users/christian/Desktop/Universal/plib_x86.

14.13 Edit the following Makefiles:

<PLIB-Ordner>/Makefile

<PLIB-Ordner>/src/Makefile

<PLIB-Ordner>/src/fnt/Makefile

<PLIB-Ordner>/src/js/Makefile

<PLIB-Ordner>/src/net/Makefile

<PLIB-Ordner>/src/psl/Makefile

<PLIB-Ordner>/src/puAux/Makefile

<PLIB-Ordner>/src/pui/Makefile

<PLIB-Ordner>/src/pw/Makefile

<PLIB-Ordner>/src/sg/Makefile

<PLIB-Ordner>/src/sl/Makefile

<PLIB-Ordner>/src/ssg/Makefile

<PLIB-Ordner>/src/ssgAux/Makefile

<PLIB-Ordner>/src/util/Makefile

replace the line: "CXXFLAGS =" with "CXXFLAGS = -g -O2 -Wall -arch i386"

14.14 make install

14.15 Create a universal (multi-architecture) plib:

lipo -create /Users/christian/Desktop/Universal/plib_ppc/lib/libplibfnt.a /Users/christian/Desktop/Universal/

plib_x86/lib/libplibfnt.a -output /usr/lib/libplibfnt.a

Repeat this step for all libraries.

15. Installing Freealut-1.1.0 from OpenAL.org ////////////////////

15.01 Makefile.in:

Replace the line:

SUBDIRS = admin src include examples test_suite

with

SUBDIRS = admin src include


15.02 configure:

Replace the line

for ac_header in AL/alc.h AL/al.h basetsd.h ctype.h math.h stdio.h time.h

with

for ac_header in OpenAL/alc.h OpenAL/al.h basetsd.h ctype.h math.h stdio.h time.h


15.03 export CXXFLAGS="-framework OpenAL"


15.04 export LDFLAGS="-framework OpenAL"


15.05 ./configure --prefix=/usr


15.06 make


15.07 Open admin/pkgconfig/freealut.pc

Replace the line

Requires: openal

with

Requires:


15.08 Replace the line:

Libs: -L${libdir} -lalut Cflags: -I${includedir}

with

Libs: -framework OpenAL -L${libdir} -lalut Cflags: -framework OpenAL -I${includedir}


15.09 sudo make install


16. Copy the plib files to "/usr/local":

16.01 sudo cp /usr/lib/libplib* /usr/local/lib/

16.02 sudo cp -R /usr/include/plib /usr/local/include/


Installing SuperTuxKart //////////


1. Copy the following code and paste it in the new file "buildUB.sh".


buildUB.sh:

---------------------------------------------------------------------------------------------------------


#!/bin/bash

if [ -r ./configure ]; then

echo "Configure found!"

else

echo "No Config file found! Runing autogen.sh..."

sh autogen.sh

fi


if [ -r ./config.guess ]; then

echo "config.guess found!"

else

echo "config.guess not present! Copying it..."

cp /usr/share/libtool/config.guess ./config.guess

fi


if [ -r ./config.sub ]; then

echo "config.sub found!"

else

echo "config.sub not present! Copying it..."

cp /usr/share/libtool/config.sub ./config.sub

fi


if [ -r ./Makefile ]; then

echo "Makefile found!"

else

echo "Makefile missing! Running ./configure..."

./configure

if [ -r ./Makefile ]; then

echo "Makefile present, ready to compile!"

else

echo "Configure not completed, Makefile still missing! Exiting..."

exit 1

fi

fi


echo "Setting environment variables..."

export sdl_LIBS=""

export LDFLAGS="-framework OpenAL -Wl,-framework,Cocoa -framework SDL -framework Cocoa -lSDLmain

-framework Vorbis -framework Ogg -L/usr/local/lib -L/opt/local/lib -L/sw/lib"

export openal_LIBS="/usr/local/lib/libmikmod.a"


if [ -r ./bin/supertuxkartPPC ]; then

echo "supertuxkartPPC is present, nothing to do."

else

echo "Cleaning up..."

make clean -s


echo "Building PPC Binary..."

make -e -s


echo "Copying PPC Binary..."

mkdir ./bin

if [ -r ./src/supertuxkart ]; then

cp ./src/supertuxkart ./bin/supertuxkartPPC

else

echo "Error!"

exit 1

fi

fi


if [ -r ./bin/supertuxkartx86 ]; then

echo "supertuxkartx86 is present, nothing to do."

else

echo "Cleaning up..."

make clean -s


echo "Building x86 Binary..."

export CXXFLAGS="-g -O2 -Wall -arch i386 `sdl-config --cflags`"

export LDFLAGS=$LDFLAGS" -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -L/usr/local/lib -L/opt/local/lib -L/sw/lib"

make -e -s


echo "Copying x86 Binary..."

if [ -r ./src/supertuxkart ]; then

cp ./src/supertuxkart ./bin/supertuxkartx86

else

echo "Error!"

exit 1

fi

fi


echo "Creating Universal Binary..."

lipo -create ./bin/supertuxkartPPC ./bin/supertuxkartx86 -output ./bin/supertuxkart


echo "Done!"


-------------------------------------------------------------------------------------------------------------

2. Set the permissions for the script "buildUB.sh"

e.g.: chmod 744 buildUB.sh


3. Download SuperTuxKart-Source from "http://developer.berlios.de/project/showfiles.php?group_id=2765".


4. Go in the folder SuperTuxKart.


5. Copy the script "buildUB.sh" in the directory "SuperTuxKart".


6. ./buildUB.sh


7. Check-up:


7.01 Go in the folder "bin".


7.02 ./supertuxkart --version

Print version information

e.g.:
-------------------------------------------------------------------------
SuperTuxKart, 0.3alpha.

SuperTuxKart, SVN revision number '975M'.
-------------------------------------------------------------------------


7.03 Is this a universal binary?

file supertuxkart


e.g.:
-------------------------------------------------------------------------
supertuxkart: Mach-O fat file with 2 architectures

supertuxkart (for architecture ppc): Mach-O executable ppc

supertuxkart (for architecture i386): Mach-O executable i386
-------------------------------------------------------------------------


7.04 otool -L supertuxkart

Print shared library dependencies.

e.g.:
------------------------------------------------------------------------------------------------
supertuxkart:

/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL (compatibility version 1.0.0,

current version 1.0.0)

/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0,

current version 11.0.0)

@executable_path/../Frameworks/SDL.framework/Versions/A/SDL (compatibility version 1.0.0, current

version 1.0.0)

@executable_path/../Frameworks/Vorbis.framework/Versions/A/Vorbis (compatibility version 1.0.0,

current version 1.0.0)

@executable_path/../Frameworks/Ogg.framework/Versions/A/Ogg (compatibility version 1.0.0, current

version 1.0.0)

/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current

version 128.0.0)

/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current

version 1.0.0)

/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current

version 275.0.0)

/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version

1.0.0)

/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)

/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.8)
---------------------------------------------------------------------------------------------------------



*************
S T A R T
T H E
G A M E
A N D
H A V E
F U N!
**************


Please post to the development list if you have any problems.




--------------------
Go to the top of the page
 
+Quote Post
xeno74
Beitrag 25.06.2007, 19:55
Beitrag #10

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



Dieser Beitrag enthaelt eine detaillierte Beschreibung, um STK auf dem Mac selbst uebersetzen zu koennen.

STK-Portierungsumgebung erstellen

01. OS X neu installieren (Empfohlen)

02. Updates für OS X installieren (-> 10.4.10)

03. xcode 2.4.1_8m1910_6936315 runterladen:

http://developer.apple.com/macosx/

Ihr braucht eine Apple-ID um das Xcode-Paket zu laden.

04. xcode installieren

05. "/etc/profile" editieren:

QUELLTEXT
# System-wide .profile for sh(1)

PATH="/sw/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin"

export PATH

PKG_CONFIG_PATH="/sw/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/local/lib/pkgconfig"

export PKG_CONFIG_PATH

if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi


06. Fink runterladen:

http://www.finkproject.org/download/index.php?phpLang=en

07. Fink installieren

08. Den FinkCommander vom DMG in den Programmordner kopieren.

09. Im FinkCommander Fink aktualisieren:

09.1 Selfupdate

09.2 update-all

09.3 Index neu einlesen

10. Folgende Fink-Pakete installieren:


10.1 SDL

10.2 audiofile

10.3 esound

10.4 svn

10.5 svn-client


11. SDL-Framework runterladen:

http://www.libsdl.org/download-1.2.php

12. SDL-Framework installieren durch kopieren vom "SDL.framework" nach <Datenträger>:Library:Frameworks.

13. Vorbis.framework und Ogg.framework installieren:

13.1 SuperTux runterladen:

http://developer.berlios.de/project/showfi...elease_id=11879

13.2 Mit der rechten Maustaste auf das AppBundle klicken und "Paketinhalt zeigen" wählen

13.3 In das Verzeichnis Contents:Frameworks wechseln. Und das Vorbis.framework und Ogg.framework nach <Datenträger>:Library:Frameworks kopieren.


14. Bauen der PLIB: ////////////////////////////////////////


14.1 PLIB downloaden:


http://plib.sourceforge.net/download.html


14.2 plib-1.8.4.tar.gz entpacken


14.3 In den ausgepackten PLIB-Ordner wechseln


14.4 "pwMacOSX.cxx"-Patch runterladen:


ftp://ftp.berlios.de/pub/supertuxkart/plib_patch_for_osx.zip


14.5 Mit der gepatchten pwMacOSX.cxx von hiker die Standard-pwMacOSX.cxx unter src/pw ersetzen.


14.6 "./configure --prefix=<..... Universal/plib_ppc>" in dem ausgepackten PLIB-Ordner ausführen


<..... Universal/plib_ppc> steht für irgendeinen Ordner eurer Wahl.


Das kann z.B. /Users/christian/Desktop/Universal/plib_ppc sein.


14.7 Änderungen in der plib:


In jsMacOSX.cxx statt:


QUELLTEXT
#include <IOKit/IOkitLib.h>



ersetzen mit


QUELLTEXT
#include <IOKit/IOKitLib.h>



14.8 In jsMacOSX.cxx statt:


QUELLTEXT
static void os_specific_s::elementEnumerator( const void *element, void* vjs)



ersetzen mit:


QUELLTEXT
void os_specific_s::elementEnumerator( const void *element, void* vjs)



14.9 make

14.10 make install

Danach haben wir die PLIB als PPC-LIBS.

14.11 So, für alle die einen PPC haben ist die PLIB auch nur auf dem PPC lauffähig. Wir brauchen aber die PLIB als Universal. Also bauen wir noch eine x86-Version der PLIB. (Die x86-User müssen jetzt eine PPC-Variante bauen)


14.12 make clean


14.13 "./configure --prefix=<..... Universal/plib_x86>" in dem ausgepackten PLIB-Ordner ausführen

<..... Universal/plib_x86> steht für irgendeinen Ordner eurer Wahl.

(Aber nicht den ppc-Ordner verwenden)


Das kann z.B. /Users/christian/Desktop/Universal/plib_x86 sein.

14.14 Es gibt mehrere Makefiles im PLIB-Ordner. Alle müssen jetzt angepasst werden. In der Zeile cxxflags muß nach dem editieren

"CXXFLAGS = -g -O2 -Wall -arch i386" stehen.


So, diese Makefiles haben jetzt den "-arch i386" Parameter:


<PLIB-Ordner>/Makefile

<PLIB-Ordner>/src/Makefile

<PLIB-Ordner>/src/fnt/Makefile

<PLIB-Ordner>/src/js/Makefile

<PLIB-Ordner>/src/net/Makefile

<PLIB-Ordner>/src/psl/Makefile

<PLIB-Ordner>/src/puAux/Makefile

<PLIB-Ordner>/src/pui/Makefile

<PLIB-Ordner>/src/pw/Makefile

<PLIB-Ordner>/src/sg/Makefile

<PLIB-Ordner>/src/sl/Makefile

<PLIB-Ordner>/src/ssg/Makefile

<PLIB-Ordner>/src/ssgAux/Makefile

<PLIB-Ordner>/src/util/Makefile


14.15 make install

Danach haben wir die PLIB als x86-LIBS.

14.16 So, jetzt verschmelzen wir die PPC-Libs und i386-Libs zu

Universal-Libs (Achtung nicht einfach das Beispiel übernehmen sondern die Pfade wie /Users/christian ... ändern wobei /usr/lib bleibt):


QUELLTEXT
lipo -create /Users/christian/Desktop/Universal/plib_ppc/lib/libplibfnt.a /Users/christian/Desktop/Universal/plib_x86/lib/libplibfnt.a -output /usr/lib/libplibfnt.a



Diesen Schritt müßt Ihr für alle PLIB-Libs wiederholen.


15. Bauen der Freealut-1.1.0 von OpenAL.org ////////////////////


15.1 In Makefile.in nach

QUELLTEXT
SUBDIRS = admin src include examples test_suite


suchen und durch:

QUELLTEXT
SUBDIRS = admin src include
ersetzen


15.2 In der configure nach

QUELLTEXT
for ac_header in AL/alc.h AL/al.h basetsd.h ctype.h math.h stdio.h time.h


suchen und durch

QUELLTEXT
for ac_header in OpenAL/alc.h OpenAL/al.h basetsd.h ctype.h math.h stdio.h time.h


ersetzen


15.3 export CXXFLAGS="-framework OpenAL"


15.4 export LDFLAGS="-framework OpenAL"


15.5 ./configure --prefix=/usr


15.6 make


15.7 Im Ordner admin/pkgconfig die freealut.pc öffnen.

Die Zeile

QUELLTEXT
Requires: openal


ersetzen mit

QUELLTEXT
Requires:



15.8 Die Zeilen:

QUELLTEXT
Libs: -L${libdir} -lalut Cflags: -I${includedir}


ersetzen mit

QUELLTEXT
Libs: -framework OpenAL -L${libdir} -lalut Cflags: -framework OpenAL -I${includedir}



15.9 sudo make install -->Freealut-LIBS befinden sich jetzt unter "/usr/lib"


16. Wichtig: Bitte installiert die PLIB nochmal unter

"/usr/local":

16.1 sudo cp /usr/lib/libplib* /usr/local/lib/

16.2 sudo cp -R /usr/include/plib /usr/local/include/

Sonst gibt es später Probleme mit dem Ausführen des Installationsskriptes von STK.


So, die Portierungsumgebung ist fertig original.gif


SuperTuxKart installieren

1. Kopiert folgenden Code in eine Datei die Ihr "buildUB.sh" nennt und macht sie ausführbar mit chmod


Erstellt von Florian von der Games4Mac-Community

Ihr könnt auch das Skript von G4M runterladen:

http://community.games4mac.de/index.php?ac...ost&id=2189

buildUB.sh:


QUELLTEXT
#!/bin/bash

if [ -r ./configure ]; then

echo "Configure found!"

else

echo "No Config file found! Runing autogen.sh..."

sh autogen.sh

fi


if [ -r ./config.guess ]; then

echo "config.guess found!"

else

echo "config.guess not present! Copying it..."

cp /usr/share/libtool/config.guess ./config.guess

fi


if [ -r ./config.sub ]; then

echo "config.sub found!"

else

echo "config.sub not present! Copying it..."

cp /usr/share/libtool/config.sub ./config.sub

fi


if [ -r ./Makefile ]; then

echo "Makefile found!"

else

echo "Makefile missing! Running ./configure..."

./configure

if [ -r ./Makefile ]; then

echo "Makefile present, ready to compile!"

else

echo "Configure not completed, Makefile still missing! Exiting..."

exit 1

fi

fi


echo "Setting environment variables..."

export sdl_LIBS=""

export LDFLAGS="-framework OpenAL -Wl,-framework,Cocoa -framework SDL -framework Cocoa -lSDLmain

-framework Vorbis -framework Ogg -L/usr/local/lib -L/opt/local/lib -L/sw/lib"

export openal_LIBS="/usr/local/lib/libmikmod.a"


if [ -r ./bin/supertuxkartPPC ]; then

echo "supertuxkartPPC is present, nothing to do."

else

echo "Cleaning up..."

make clean -s


echo "Building PPC Binary..."

make -e -s


echo "Copying PPC Binary..."

mkdir ./bin

if [ -r ./src/supertuxkart ]; then

cp ./src/supertuxkart ./bin/supertuxkartPPC

else

echo "Error!"

exit 1

fi

fi


if [ -r ./bin/supertuxkartx86 ]; then

echo "supertuxkartx86 is present, nothing to do."

else

echo "Cleaning up..."

make clean -s


echo "Building x86 Binary..."

export CXXFLAGS="-g -O2 -Wall -arch i386 `sdl-config --cflags`"

export LDFLAGS=$LDFLAGS" -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -L/usr/local/lib -L/opt/local/lib -L/sw/lib"

make -e -s


echo "Copying x86 Binary..."

if [ -r ./src/supertuxkart ]; then

cp ./src/supertuxkart ./bin/supertuxkartx86

else

echo "Error!"

exit 1

fi

fi


echo "Creating Universal Binary..."

lipo -create ./bin/supertuxkartPPC ./bin/supertuxkartx86 -output ./bin/supertuxkart


echo "Done!"



2. SuperTuxKart via "svn" runterladen:


svn co svn://svn.berlios.de/supertuxkart/trunk/supertuxkart


3. Wechselt in den Ordner "supertuxkart"


4. Kopiert das Skript "buildUB.sh" in den supertuxkart-Ordner


5. Vergesst nicht es ausführbar zu machen z.B. mit


chmod 744 buildUB.sh


6. Jetzt gehts los:


./buildUB.sh


7. Kontrollen:


7.1 Wechselt innerhalb des "supertuxkart"-Verzeichnisses in das bin-Verzeichnis. Dort befindet sich das STK-Binary.


7.2 Welche Version habe ich?


./supertuxkart --version


Beispiel:

QUELLTEXT
SuperTuxKart, 0.3alpha.

SuperTuxKart, SVN revision number '975M'.



7.3 Habe ich ein Universal-Binary das auf Intel- und auf PowerPC-Macs läuft?


file supertuxkart


Beispiel:

QUELLTEXT
supertuxkart: Mach-O fat file with 2 architectures

supertuxkart (for architecture ppc): Mach-O executable ppc

supertuxkart (for architecture i386): Mach-O executable i386



7.4 Kann ich dieses supertuxkart-Verzeichnis einfach auf CD brennen und auf jedem Mac starten?


otool -L supertuxkart


In dieser Ausgabe könnt Ihr die Abhängigkeiten sehen. Das heißt, Dateien die SuperTuxKart während der Laufzeit braucht.

QUELLTEXT
supertuxkart:

/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL (compatibility version 1.0.0,

current version 1.0.0)

/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0,

current version 11.0.0)

@executable_path/../Frameworks/SDL.framework/Versions/A/SDL (compatibility version 1.0.0, current

version 1.0.0)

@executable_path/../Frameworks/Vorbis.framework/Versions/A/Vorbis (compatibility version 1.0.0,

current version 1.0.0)

@executable_path/../Frameworks/Ogg.framework/Versions/A/Ogg (compatibility version 1.0.0, current

version 1.0.0)

/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current

version 128.0.0)

/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current

version 1.0.0)

/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current

version 275.0.0)

/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version

1.0.0)

/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)

/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.8)



Wir sehen das ein Frameworks-Verzeichnis benutzt wird das relativ "../Frameworks" zum Binary von STK liegt.

In diesem Frameworks-Verzeichnis befinden sich folgende Frameworks:


SDL.framework

Vorbis.framework

Ogg.framework


Das heißt, wenn wir die Binary auch auf anderen Macs starten wollen die diese Frameworks nicht haben müssen wir diese 3 Frameworks in das supertuxkart-Verzeichnis kopieren.


8. Erstelle einen Frameworks-Ordner im "supertuxkart"-Verzeichnis


9. Kopiere aus <Datenträgername>:Library:Frameworks die Verzeichnisse

SDL.framework, Vorbis.framework und Ogg.framework

in das neue Frameworks-Verzeichnis im supertuxkart-Verzeichnis.

Die libmikmod und die PLIB sind statisch eingebunden.


10. Wichtig für alle Panther-User: Bitte installiert die OpenAL-Software von OpenAL.org.

Downloadlink von der OpenAL-Software:

http://www.openal.org/downloads.html

Damit kommen alle Panther-User auch in den Genuss des OpenAL-Sounds.

Tiger-User haben die OpenAL standardmäßig vorinstalliert.


So, jetzt heißt es SuperTuxKart starten

./supertuxkart


Viel Spaß beim Spielen und Testen.

Der Beitrag wurde von xeno74 bearbeitet: 25.06.2007, 20:27


--------------------
Go to the top of the page
 
+Quote Post
xeno74
Beitrag 03.08.2007, 19:53
Beitrag #11

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



SuperTuxKart 0.4:

01. OS X neu installieren (Empfohlen)

02. Updates für OS X installieren (-> 10.4.10)

03. xcode 2.4.1_8m1910_6936315 runterladen:

http://developer.apple.com/macosx/

Ihr braucht eine Apple-ID um das Xcode-Paket zu laden.

04. xcode installieren

05. "/etc/profile" editieren:

QUELLTEXT
# System-wide .profile for sh(1)

PATH="/sw/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin"

export PATH

PKG_CONFIG_PATH="/sw/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/local/lib/pkgconfig"

export PKG_CONFIG_PATH

if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi


06. Fink runterladen:

http://www.finkproject.org/download/index.php?phpLang=en

07. Fink installieren

08. Den FinkCommander vom DMG in den Programmordner kopieren.

09. Im FinkCommander Fink aktualisieren:

09.1 Selfupdate

09.2 update-all

09.3 Index neu einlesen

10. Folgende Fink-Pakete installieren:


10.1 SDL

10.2 audiofile

10.3 esound

10.4 svn

10.5 svn-client


11. SDL-Framework runterladen:

http://www.libsdl.org/download-1.2.php

12. SDL-Framework installieren durch kopieren vom "SDL.framework" nach <Datenträger>:Library:Frameworks.

13. Vorbis.framework und Ogg.framework installieren:

13.1 SuperTux runterladen:

http://developer.berlios.de/project/showfi...elease_id=11879

13.2 Mit der rechten Maustaste auf das AppBundle klicken und "Paketinhalt zeigen" wählen

13.3 In das Verzeichnis Contents:Frameworks wechseln. Und das Vorbis.framework und Ogg.framework nach <Datenträger>:Library:Frameworks kopieren.


14. Bauen der PLIB: ////////////////////////////////////////


14.1 PLIB downloaden:


http://plib.sourceforge.net/download.html


14.2 plib-1.8.4.tar.gz entpacken


14.3 In den ausgepackten PLIB-Ordner wechseln


14.4 "pwMacOSX.cxx"-Patch runterladen:


ftp://ftp.berlios.de/pub/supertuxkart/plib_patch_for_osx.zip


14.5 Mit der gepatchten pwMacOSX.cxx von hiker die Standard-pwMacOSX.cxx unter src/pw ersetzen.


14.6 "./configure --prefix=<..... Universal/plib_ppc>" in dem ausgepackten PLIB-Ordner ausführen


<..... Universal/plib_ppc> steht für irgendeinen Ordner eurer Wahl.


Das kann z.B. /Users/christian/Desktop/Universal/plib_ppc sein.


14.7 Änderungen in der plib:


In jsMacOSX.cxx statt:


QUELLTEXT
#include <IOKit/IOkitLib.h>



ersetzen mit


QUELLTEXT
#include <IOKit/IOKitLib.h>



14.8 In jsMacOSX.cxx statt:


QUELLTEXT
static void os_specific_s::elementEnumerator( const void *element, void* vjs)


ersetzen mit:


QUELLTEXT
void os_specific_s::elementEnumerator( const void *element, void* vjs)



14.9 make

14.10 make install

Danach haben wir die PLIB als PPC-LIBS.

14.11 So, für alle die einen PPC haben ist die PLIB auch nur auf dem PPC lauffähig. Wir brauchen aber die PLIB

als Universal. Also bauen wir noch eine x86-Version der PLIB. (Die x86-User müssen jetzt eine

PPC-Variante bauen)


14.12 make clean


14.13 "./configure --prefix=<..... Universal/plib_x86>" in dem ausgepackten PLIB-Ordner ausführen

<..... Universal/plib_x86> steht für irgendeinen Ordner eurer Wahl.

(Aber nicht den ppc-Ordner verwenden)


Das kann z.B. /Users/christian/Desktop/Universal/plib_x86 sein.

14.14 Es gibt mehrere Makefiles im PLIB-Ordner. Alle müssen jetzt angepasst werden. In der Zeile cxxflags muß nach

dem editieren

"CXXFLAGS = -g -O2 -Wall -arch i386" stehen.


So, diese Makefiles haben jetzt den "-arch i386" Parameter:


<PLIB-Ordner>/Makefile

<PLIB-Ordner>/src/Makefile

<PLIB-Ordner>/src/fnt/Makefile

<PLIB-Ordner>/src/js/Makefile

<PLIB-Ordner>/src/net/Makefile

<PLIB-Ordner>/src/psl/Makefile

<PLIB-Ordner>/src/puAux/Makefile

<PLIB-Ordner>/src/pui/Makefile

<PLIB-Ordner>/src/pw/Makefile

<PLIB-Ordner>/src/sg/Makefile

<PLIB-Ordner>/src/sl/Makefile

<PLIB-Ordner>/src/ssg/Makefile

<PLIB-Ordner>/src/ssgAux/Makefile

<PLIB-Ordner>/src/util/Makefile


14.15 make install

Danach haben wir die PLIB als x86-LIBS.

14.16 So, jetzt verschmelzen wir die PPC-Libs und i386-Libs zu

Universal-Libs (Achtung nicht einfach das Beispiel übernehmen sondern die Pfade wie /Users/christian ...

ändern wobei /usr/lib bleibt):


QUELLTEXT
lipo -create /Users/christian/Desktop/Universal/plib_ppc/lib/libplibfnt.a /Users/christian/Desktop/Universal/plib_x86/lib/libplibfnt.a -output /usr/lib/libplibfnt.a



Diesen Schritt müßt Ihr für alle PLIB-Libs wiederholen.


15. Bauen der Freealut-1.1.0 von OpenAL.org ////////////////////


15.1 In Makefile.in nach

QUELLTEXT
SUBDIRS = admin src include examples test_suite


suchen und durch:

QUELLTEXT
SUBDIRS = admin src include
ersetzen


15.2 In der configure nach

QUELLTEXT
for ac_header in AL/alc.h AL/al.h basetsd.h ctype.h math.h stdio.h time.h


suchen und durch

QUELLTEXT
for ac_header in OpenAL/alc.h OpenAL/al.h basetsd.h ctype.h math.h stdio.h time.h


ersetzen


15.3 export CXXFLAGS="-framework OpenAL"


15.4 export LDFLAGS="-framework OpenAL"


15.5 ./configure --prefix=/usr


15.6 make


15.7 Im Ordner admin/pkgconfig die freealut.pc öffnen.

Die Zeile

QUELLTEXT
Requires: openal


ersetzen mit

QUELLTEXT
Requires:



15.8 Die Zeilen:
QUELLTEXT

Libs: -L${libdir} -lalut Cflags: -I${includedir}


ersetzen mit

QUELLTEXT
Libs: -framework OpenAL -L${libdir} -lalut Cflags: -framework OpenAL -I${includedir}



15.9 sudo make install -->Freealut-LIBS befinden sich jetzt unter "/usr/lib"


16. Wichtig: Bitte installiert die PLIB nochmal unter

"/usr/local":

16.1
QUELLTEXT
sudo cp /usr/lib/libplib* /usr/local/lib/


16.2
QUELLTEXT
sudo cp -R /usr/include/plib /usr/local/include/



17. Kompilieren von der Bullet Physics (Ihr muesst 2 x die Bullet Physics kompilieren):

Die kompilierten Bullet-Physics 2.55 für Intel und PPC liegen auf dem FTP-Server von berliOS zum Download bereit (Für alle die nicht kompilieren wollen):

ftp://ftp.berlios.de/pub/supertuxkart/bul...macosxintel.zip

ftp://ftp.berlios.de/pub/supertuxkart/bul...5_macosxppc.zip


Wenn Ihr die Bullet Physics kompilieren wollt, dann rate ich euch von dem ZIP-File ab. Mit dieser Version funktioniert das Kompilieren nicht. Ladet die TGZ-Datei runter. Mit dieser Datei gibt es keine Probleme.

Download:

http://sourceforge.net/project/showfiles.p...ckage_id=162623

17.1 Auspacken, ./configure und jam.

Wenn Ihr eine Intel-Version auf einem PPC kompilieren wollt, dann müßt Ihr noch die Jamconfig anpassen:

Diese beiden Zeilen müssen angepasst werden:


QUELLTEXT
COMPILER.CFLAGS += "-pipe -arch i386";



und


QUELLTEXT
COMPILER.C++FLAGS += "-fno-exceptions -arch i386";



Zusätzlich habe ich noch diese Zeile angepasst:


QUELLTEXT
TARGET.PROCESSOR ?= "INTEL";



Wenn Ihr eine Intel- und eine PPC-Version von der Bullet kompiliert habt (2 Bullet-Ordner müssen vorhanden sein) dann geht es jetzt weiter mit der Erstellung von SuperTuxKart.


18. Kompilieren von SuperTuxKart (PPC-Version):


18.1 Kopiert das Libs-Verzeichnis der PPC-Bullet-Version in den <SuperTuxKart>-Ordner:

QUELLTEXT
cp -R <PPC-Bullet-Ordner>/out/macosxppc/optimize/libs <SuperTuxKart>


Wenn Ihr die kompilierte Version vom FTP-Server verwendet dann kopiert folgendermaßen:

QUELLTEXT
cp -R bullet-2.55_macosxppc/libs <SuperTuxKart>


18.2 Erstellt einen Ordner "bullet" im <SuperTuxKart>-Ordner:

QUELLTEXT
mkdir <SuperTuxKart>/bullet


18.3 Kopiert das Verzeichnis "Demos" vom "PPC-bullet-2.55"-Ordner in das bullet-Verzeichnis vom SuperTuxKart-Ordner:

QUELLTEXT
cp -R bullet-2.55/Demos <SuperTuxKart>/bullet


18.4 Kopiert das Verzeichnis "src" vom "PPC-bullet-2.55"-Ordner in das bullet-Verzeichnis vom SuperTuxKart-Ordner:

QUELLTEXT
cp -R bullet-2.55/src <SuperTuxKart>/bullet


Wenn Ihr die kompilierte Version vom FTP-Server verwendet dann braucht Ihr kein bullet-Verzeichnis zu erstellen. Kopiert das bullet-Verzeichnis von diesem Archiv in das SuperTuxKart-Verzeichnis:

QUELLTEXT
cp -R bullet-2.55_macosxppc/bullet <SuperTuxKart>


18.5
QUELLTEXT
./configure --enable-bullet


18.6
QUELLTEXT
make


18.7 Linken:

STK-Bullet-Version für den PPC-Mac linken (auf einem PPC-Mac):


QUELLTEXT
g++ -g -O2 -Wall -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I../bullet/src -framework OpenAL -L/opt/local/lib -lSDLmain -Wl,-framework,Cocoa -o supertuxkart main.o material.o material_manager.o attachment.o attachment_manager.o collectable.o collectable_manager.o sound_manager.o sound_plib.o music_mikmod.o music_ogg.o sfx_openal.o utils.o isect.o track.o herring.o herring_manager.o explosion.o user_config.o cup_data.o kart_properties_manager.o projectile_manager.o kart_properties.o stk_config.o highscores.o highscore_manager.o loader.o race_manager.o string_utils.o track_manager.o world.o moving_physics.o moving_texture.o callback_manager.o physics.o skid_mark.o shadow.o particle_system.o game_manager.o widget_set.o camera.o sdldrv.o moveable.o ssg_help.o kart.o player_kart.o projectile.o history.o scene.o traffic.o lisp.o lexer.o parser.o writer.o menu_manager.o base_gui.o race_gui.o race_results_gui.o grand_prix_ending.o num_laps.o race_menu.o num_players.o track_sel.o player_controls.o config_display.o config_sound.o config_controls.o options.o game_mode.o difficulty.o char_sel.o main_menu.o help_menu.o credits_menu.o scrolled_text.o grand_prix_select.o font.o default_robot.o -L. -lstatic_ssg -lplibjs -lplibsl -lplibssg -lplibpu -lplibfnt -lplibsg -lplibul -lplibssgaux -framework Carbon -framework OpenGL -framework IOKit -framework AGL -framework SDL -lSDLmain -framework Cocoa -framework Vorbis -framework Ogg /usr/lib/libmikmod.a -L../libs -lbulletopenglsupport -lbulletdynamics -lbulletcollision -lbulletmath -framework GLUT




19. Kompilieren von SuperTuxKart (Intel-Version):


19.1 Kopiert das Libs-Verzeichnis der Intel-Bullet-Version in den <SuperTuxKart>-Ordner:

QUELLTEXT
cp -R <Intel-Bullet-Ordner>/out/macosxppc/optimize/libs <SuperTuxKart>


Wundert euch nicht, dass der Ordner macosxppc heißt. In diesem Ordner befinden sich Intel-Libs.

Wenn Ihr die kompilierte Version vom FTP-Server verwendet dann kopiert folgendermaßen:

QUELLTEXT
cp -R bullet-2.55_macosxintel/libs <SuperTuxKart>


19.2 Erstellt einen Ordner "bullet" im <SuperTuxKart>-Ordner:

QUELLTEXT
mkdir <SuperTuxKart>/bullet


19.3 Kopiert das Verzeichnis "Demos" vom "Intel-bullet-2.55"-Ordner in das bullet-Verzeichnis vom SuperTuxKart-Ordner:

QUELLTEXT
cp -R bullet-2.55/Demos <SuperTuxKart>/bullet


19.4 Kopiert das Verzeichnis "src" vom "Intel-bullet-2.55"-Ordner in das bullet-Verzeichnis vom SuperTuxKart-Ordner:

QUELLTEXT
cp -R bullet-2.55/src <SuperTuxKart>/bullet


Wenn Ihr die kompilierte Version vom FTP-Server verwendet dann braucht Ihr kein bullet-Verzeichnis zu erstellen. Kopiert das bullet-Verzeichnis von diesem Archiv in das SuperTuxKart-Verzeichnis:

QUELLTEXT
cp -R bullet-2.55_macosxintel/bullet <SuperTuxKart>


19.5
QUELLTEXT
./configure --enable-bullet


Wenn Ihr die Intel-Version von STK auf einem PPC-Mac herstellt dann muesst Ihr folgenden Eintrag im Makefile und src/Makefile von STK editieren:


QUELLTEXT
CXXFLAGS = -g -O2 -Wall -arch i386 -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I../bullet/src



19.6
QUELLTEXT
make


19.7 Linken:


STK-Bullet-Version für den Intel-Mac linken (auf einem PPC-Mac):


QUELLTEXT
g++ -g -O2 -Wall -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I../bullet/src -framework OpenAL -L/usr/local/lib -lSDLmain -Wl,-framework,Cocoa -o supertuxkart main.o material.o material_manager.o attachment.o attachment_manager.o collectable.o collectable_manager.o sound_manager.o sound_plib.o music_mikmod.o music_ogg.o sfx_openal.o utils.o isect.o track.o herring.o herring_manager.o explosion.o user_config.o cup_data.o kart_properties_manager.o projectile_manager.o kart_properties.o stk_config.o highscores.o highscore_manager.o loader.o race_manager.o string_utils.o track_manager.o world.o moving_physics.o moving_texture.o callback_manager.o physics.o skid_mark.o shadow.o particle_system.o game_manager.o widget_set.o camera.o sdldrv.o moveable.o ssg_help.o kart.o player_kart.o projectile.o history.o scene.o traffic.o lisp.o lexer.o parser.o writer.o menu_manager.o base_gui.o race_gui.o race_results_gui.o grand_prix_ending.o num_laps.o race_menu.o num_players.o track_sel.o player_controls.o config_display.o config_sound.o config_controls.o options.o game_mode.o difficulty.o char_sel.o main_menu.o help_menu.o credits_menu.o scrolled_text.o grand_prix_select.o font.o default_robot.o -L. -lstatic_ssg -lplibjs -lplibsl -lplibssg -lplibpu -lplibfnt -lplibsg -lplibul -lplibssgaux -framework Carbon -framework OpenGL -framework IOKit -framework AGL -framework SDL -lSDLmain -framework Cocoa -framework Vorbis -framework Ogg /usr/local/lib/libmikmod.a -L../libs -lbulletopenglsupport -lbulletdynamics -lbulletcollision -lbulletmath -framework GLUT -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386


20. Und dann ein Universal aus beiden Binarys bauen:


QUELLTEXT
lipo -create supertuxkartPPC supertuxkartIntel -output supertuxkart



21. SuperTuxKart starten:

QUELLTEXT
./supertuxkart


Der Beitrag wurde von xeno74 bearbeitet: 03.08.2007, 20:09


--------------------
Go to the top of the page
 
+Quote Post
xeno74
Beitrag 08.08.2007, 11:44
Beitrag #12

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



Zitat von hiker:

ZITAT

hab' gerade Dein update fuer den Mac gesehen, und dabei ist mir eine
Kleinigkeit aufgefallen:

[...]

> 14.14 Es gibt mehrere Makefiles im PLIB-Ordner. Alle müssen jetzt
> angepasst werden. In der Zeile cxxflags muß nach
>
> dem editieren
>
> "CXXFLAGS = -g -O2 -Wall -arch i386" stehen.

Du muesstest einfach:
make CXXFLAGS="-g -O2 -Wall -arch i386"
sagen koennen, ohne die ganzen Makefiles aendern zu muessen. Probier's
vielleicht bei Gelegenheit mal aus - es sollte ja eine Menge Arbeit
sparen.



--------------------
Go to the top of the page
 
+Quote Post
xeno74
Beitrag 08.08.2007, 11:56
Beitrag #13

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



Zitat von hiker:

Vorschlag für das STK-Wiki:
ZITAT

Vielleicht waere es auch sinnvoll, diese Seite in mehrere Seiten
aufzuteilen, z.B.:
1) OS Update and Xcode installieren // das ist dann halt ein Link
2) Fink installieren // wiederum ein link
2.1) SDL // etc.
2.2) was-auch-immer
3) plib installieren
4) freealut
etc.

Und jede dieser Seiten enthaelt dann halt die entsprechenden Punkte.
Dann ist es einfacher, die Teile zu finden, die man braucht (z.B.
jemand, der bereits Fink etc. hat, braucht halt nicht durch die ganze
lange Seite zu suchen, um zu finden, wo's fuer ihn weitergeht).

Du kannst die Seiten auch optisch ansprechender gestalten, wenn Du die
wiki Formatierung benutzt - bislang scheinst Du die Listen etc. selbst
zu machen. Hilfreich:
http://meta.wikimedia.org/wiki/MediaWiki_U...ide#For_editors
und besonders fuer Listen:
http://meta.wikimedia.org/wiki/Help:List
Dann wuerdest Du auch z.B. ein Inhaltsverzeichnis bekommen, wie z.B.
auf:
http://supertuxkart.berlios.de/wiki/index.php/Milestones

(ich gebe ja zu, das ich mir immer eine existierende Seite als Vorlage
nehme wink.png ).

Aber das nur so als Hinweis, falls Du Dich mal langweilst (*evil
grin*) smile.png





--------------------
Go to the top of the page
 
+Quote Post
xeno74
Beitrag 07.03.2008, 12:42
Beitrag #14

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



Aurias Anleitung zum Kompilieren von SuperTuxKart:

ZITAT

Building dependencies from source

edit
Environment

Install developer tools, either from the OS X Install DVD or from Apple's website
Add /usr/local/bin to your PATH, *before* /usr/bin (http://www.troubleshooters.com/linux/prepostpath.htm) so that the new versions of stuff you install are picked over the older ones installed by default (this might no be necessary if you don't install autotools below)
symlink include folder of OpenGL framework to /usr/local/include/GL (Unix programs have an easier time finding it this way)
% sudo ln -s /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/ /usr/local/include/GL
Download pkg-config sources from http://pkgconfig.freedesktop.org/releases/ and build it:
% cd /path/to/pkg-config-0.22
% ./configure
% make
% sudo make install
edit
Autotools

This step is probably only necessary if you use SVN version of STK (I think). You may want to install more recent autotools (the ones that come with OS X 10.4 are often too old. Maybe 10.5 users don't need this.). For this make sure /usr/local/bin is in your PATH as described above otherwise it won't work (will pick old versions).

All the following programs can be built and installed with the following commands on the terminal :

% cd /path/to/source_file
% ./configure
% make
% sudo make install
get M4 from http://ftp.gnu.org/gnu/m4/ and install it
symlink m4 to gm4 since that's how some programs refer to it.
% sudo ln -s /usr/local/bin/m4 /usr/local/bin/gm4
Then, build and install autoconf and automake from GNU the same way as described above
http://www.gnu.org/software/autoconf/
http://www.gnu.org/software/automake/
edit
ogg/vorbis

download libogg sources from http://xiph.org/downloads/
% ./configure
% make
% sudo make install
download libvorbis from http://xiph.org/downloads/
% ./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
% make
% sudo make install
edit
SDL

get source code archive from http://www.libsdl.org/download-1.2.php
% cd /path/to/SDL-1.2.13
% ./configure --without-x --disable-x11-video
% make
% sudo make install
edit
PLib

The sources you can download from the official plib website will not build on mac. Instead, download the modified sources from the dependencies package of the downloads area here : http://sourceforge.net/projects/supertuxkart
% ./configure
% make
% sudo make install
edit
Alternate path : macports

These commands install a bit more stuff than needed, because their author needed to build other games too. For STK, freetype, sdl_tiff, esound, SDL_mixer, SDL-image and mikmod should not be necessary. Since I don't use macports I will leave them as-is.

sudo port -v install pkgconig
sudo port -v install plib
sudo port -v install libsdl +quartz
sudo port -v install libsdl_mixer +mikmod
sudo port -v install libsdl_image
sudo port -v install libogg
sudo port -v install livorbis
sudo port -v install automake
sudo port -v install esound
sudo port -v install libsdl_tiff
sudo port -v install freetype
edit
OpenAL

(This bit is a bit messy, sorry)

The OpenAL framework provided by Apple on OS X 10.4 is too old. Once again maybe 10.5 users will have a more recent one but for now if we want 10.4 compatibility we do the following :

Get OpenAL source code
I personnaly used SVN. It's actually probably not a good idea to use an unstable version. Anyway it worked for me so I leave it this way but you might want to try a source archive or a stable branch instead.
% svn checkout http://www.openal.org/repos/openal/trunk openal
% cd openal
build OpenAL:
open folder OpenAL-MacOSX, open XCode project
select target openal.dylib and build style "deployment"
build
find /OpenAL-MacOSX/build/Deployment/openal.dylib and copy it to /usr/local/lib, renaming it to libopenal.dylib
% sudo cp ./OpenAL-MacOSX/build/Deployment/openal.dylib /usr/local/lib/libopenal.dylib
% sudo install_name_tool -id /usr/local/lib/libopenal.dylib /usr/local/lib/libopenal.dylib
copy headers from /OpenAL-MacOSXbuild/include/AL to /usr/local/include/AL
% sudo cp -r ./include/AL/ /usr/local/include/AL
create openal.pc in /usr/local/lib/pkgconfig
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: OpenAL
Description: OpenAL blah blah blah not an official .pc file
Requires:
Version: 1.1.0
Libs: -L${libdir} -lopenal
Cflags: -I${includedir}

build alut:
% cd /openal/alut
% ./autogen.sh
% ./configure
% make
% sudo make install
edit
Building STK

If you have anything installed in /opt/supertuxkart (like an older version) it's probably a good idea to delete it now so you can start with a clean install.
% ./autogen.sh (for SVN version only?)
% ./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --enable-debug=no --prefix=/opt/supertuxkart
% make
% sudo make install
You can now launch STK from terminal
% /opt/supertuxkart/bin/supertuxkart

edit
Making an app bundle

Download this small "packaging kit" : http://www.mediafire.com/?yjzzjmy2dnj
% chmod +x makeapp.sh
% ./makeapp.sh
You should now be able to open it by double-clicking, however you can't send it to another computer.

edit
Getting ready for distribution

Here, many strategies are possible, I personnaly used dylib bundler.
Get its sources from http://macdylibbundler.sourceforge.net, build it and install it.

The "packaging kit" mentionned above provides a sample dylibbundler config file. You might need to modify it, for instance if some of your libraries are not in the same prefix as me, or if they have more dependencies (this will happen if you use macports).
Issue one of these two depending on your architecture

% dylibbundler -l -x ./SuperTuxKart.app/Contents/MacOS/supertuxkart -d ./SuperTuxKart.app/Contents/libs-ppc/ -cd -od -p @executable_path/../libs-ppc/

% dylibbundler -l -x ./SuperTuxKart.app/Contents/MacOS/supertuxkart -d ./SuperTuxKart.app/Contents/libs-intel/ -cd -od -p @executable_path/../libs-intel/

To make a Universal Binary, you need to build it on 2 computers, then you can merge the two executable with command
% lipo -create [ppc-file] [intel-file] -output [filename]



--------------------
Go to the top of the page
 
+Quote Post
xeno74
Beitrag 03.02.2010, 18:31
Beitrag #15

*******

Gruppe: Members
Beiträge: 3.340
Wohnort: Deutschland, München



Notizen über die Kompilierung der aktuellen SVN-Versionen von STK 0.7 unter Mac OS X

Intel:

QUELLTEXT
export LDFLAGS=" -framework OpenAL -Wl,-framework,Cocoa -framework SDL -framework Cocoa -framework vorbis -framework ogg -framework libintl -L/usr/local/lib -framework GLUT"


STK-Intel-Makefile:

QUELLTEXT
CXXFLAGS =  -Wall -DNDEBUG -O2 -framework GLUT -arch i386


QUELLTEXT
LDFLAGS = -framework OpenAL -Wl,-framework,Cocoa -framework SDL -framework Cocoa -framework vorbis -framework ogg -framework libintl -L/usr/local/lib -framework GLUT -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386


PowerPC:

QUELLTEXT
export LDFLAGS=" -framework OpenAL -Wl,-framework,Cocoa -framework SDL -framework Cocoa -framework vorbis -framework ogg -framework libintl -L/usr/local/lib -framework GLUT"


Linken STK-Intel:

QUELLTEXT
g++  -Wall -DNDEBUG -O2 -framework GLUT  -framework OpenAL -Wl,-framework,Cocoa -framework SDL -framework Cocoa -framework vorbis -framework ogg -framework libintl -L/usr/local/lib -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -o supertuxkart main.o main_loop.o animation_base.o animation_manager.o billboard_animation.o ipo.o three_d_animation.o music_information.o music_ogg.o sfx_manager.o sfx_openal.o sound_manager.o challenge.o challenge_data.o unlock_manager.o player.o stk_config.o user_config.o device_config.o camera.o explosion.o irr_driver.o material.o material_manager.o mesh_tools.o moving_texture.o nitro.o shadow.o skid_marks.o slip_stream.o smoke.o stars.o water_splash.o CGUIFont.o abstract_state_manager.o engine.o event_handler.o modaldialog.o screen_loader.o screen.o skin.o widget.o button_widget.o check_box_widget.o dynamic_ribbon_widget.o icon_button_widget.o label_widget.o list_widget.o model_view_widget.o ribbon_widget.o spinner_widget.o text_box_widget.o device_manager.o input.o input_device.o input_manager.o file_manager.o xml_node.o attachment.o attachment_manager.o bowling.o bubblegumitem.o cake.o flyable.o item.o item_manager.o plunger.o powerup.o powerup_manager.o projectile_manager.o rubber_band.o kart.o kart_model.o kart_properties.o kart_properties_manager.o moveable.o player_kart.o lexer.o lisp.o parser.o writer.o clock.o follow_the_leader.o linear_world.o profile_world.o standard_race.o three_strikes_battle.o world.o connect_message.o kart_control_message.o kart_update_message.o message.o network_kart.o network_manager.o race_info_message.o race_result_message.o race_state.o btKart.o btUprightConstraint.o physical_object.o physics.o triangle_mesh.o grand_prix_data.o grand_prix_manager.o highscore_manager.o highscores.o history.o race_manager.o replay_base.o replay_buffers.o replay_player.o replay_recorder.o default_robot.o new_ai.o challenges.o credits.o add_device_dialog.o enter_player_name_dialog.o track_info_dialog.o player_info_dialog.o press_a_key_dialog.o race_over_dialog.o race_paused_dialog.o arenas_screen.o feature_unlocked.o help_screen_1.o help_screen_2.o help_screen_3.o kart_selection.o main_menu_screen.o options_screen_av.o options_screen_input.o options_screen_players.o race_gui.o race_setup_screen.o state_manager.o tracks_screen.o ambient_light_sphere.o bezier_curve.o check_manager.o check_sphere.o check_structure.o check_line.o graph_node.o quad.o quad_graph.o quad_set.o terrain_info.o track.o track_manager.o track_object.o track_object_manager.o constants.o random_generator.o string_utils.o translation.o vec3.o -L/usr/local/lib/ -lIrrlicht -Lbullet/Demos/OpenGL -lbulletopenglsupport -Lbullet/src -lbulletdynamics -lbulletcollision -lbulletmath -framework Carbon -framework OpenGL -framework IOKit -framework AGL -lc -Wl,-framework -Wl,CoreFoundation /Users/christian/Desktop/enet-1.2.1/libenet.a


Linken STK-PowerPC:

QUELLTEXT
g++  -Wall -DNDEBUG -O2 -framework GLUT -framework OpenAL -Wl,-framework,Cocoa -framework SDL -framework Cocoa -framework vorbis -framework ogg -framework libintl -L/usr/local/lib -o supertuxkart main.o main_loop.o animation_base.o animation_manager.o billboard_animation.o ipo.o three_d_animation.o music_information.o music_ogg.o sfx_manager.o sfx_openal.o sound_manager.o challenge.o challenge_data.o unlock_manager.o player.o stk_config.o user_config.o device_config.o camera.o explosion.o irr_driver.o material.o material_manager.o mesh_tools.o moving_texture.o nitro.o shadow.o skid_marks.o slip_stream.o smoke.o stars.o water_splash.o CGUIFont.o abstract_state_manager.o engine.o event_handler.o modaldialog.o screen_loader.o screen.o skin.o widget.o button_widget.o check_box_widget.o dynamic_ribbon_widget.o icon_button_widget.o label_widget.o list_widget.o model_view_widget.o ribbon_widget.o spinner_widget.o text_box_widget.o device_manager.o input.o input_device.o input_manager.o file_manager.o xml_node.o attachment.o attachment_manager.o bowling.o bubblegumitem.o cake.o flyable.o item.o item_manager.o plunger.o powerup.o powerup_manager.o projectile_manager.o rubber_band.o kart.o kart_model.o kart_properties.o kart_properties_manager.o moveable.o player_kart.o lexer.o lisp.o parser.o writer.o clock.o follow_the_leader.o linear_world.o profile_world.o standard_race.o three_strikes_battle.o world.o connect_message.o kart_control_message.o kart_update_message.o message.o network_kart.o network_manager.o race_info_message.o race_result_message.o race_state.o btKart.o btUprightConstraint.o physical_object.o physics.o triangle_mesh.o grand_prix_data.o grand_prix_manager.o highscore_manager.o highscores.o history.o race_manager.o replay_base.o replay_buffers.o replay_player.o replay_recorder.o default_robot.o new_ai.o challenges.o credits.o add_device_dialog.o enter_player_name_dialog.o track_info_dialog.o player_info_dialog.o press_a_key_dialog.o race_over_dialog.o race_paused_dialog.o arenas_screen.o feature_unlocked.o help_screen_1.o help_screen_2.o help_screen_3.o kart_selection.o main_menu_screen.o options_screen_av.o options_screen_input.o options_screen_players.o race_gui.o race_setup_screen.o state_manager.o tracks_screen.o ambient_light_sphere.o bezier_curve.o check_manager.o check_sphere.o check_structure.o check_line.o graph_node.o quad.o quad_graph.o quad_set.o terrain_info.o track.o track_manager.o track_object.o track_object_manager.o constants.o random_generator.o string_utils.o translation.o vec3.o -L/usr/local/lib/ -lIrrlicht -Lbullet/Demos/OpenGL -lbulletopenglsupport -Lbullet/src -lbulletdynamics -lbulletcollision -lbulletmath -framework Carbon -framework OpenGL -framework IOKit -framework AGL -lc -Wl,-framework -Wl,CoreFoundation enet/libenet.a


Universal-Binary erstellen:

QUELLTEXT
lipo -create supertuxkart-intel supertuxkart-ppc -output supertuxkart


--------------------
Go to the top of the page
 
+Quote Post

2 Seiten V   1 2 >
Reply to this topicStart new topic
1 Besucher lesen dieses Thema (Gäste: 1 | Anonyme Besucher: 0)
0 Mitglieder:

 

RSS Vereinfachte Darstellung Aktuelles Datum: 09.09.2010, 16:51