################# PINBALL FOR MACOSX ######################################## # @author: RzR - http://rzr.online.fr/game.htm ############################################################################## # # This is a log when i compiled it trough a ssh session, # I didnt tested, but my friend cDlm@fr managed to make it works # If having trouble contact me url at the top # # I am looking for a mac user that can open me a shell # (for compiling upcoming version) ############################################################################## # DOWNLOAD PINBALL on MACOSX # download that one (it is the windows package with datas) http://rzr.online.fr/docs/game/pinball-test.zip http://www.rzr.free.fr.9online.fr/pub/pinball-macosx.tar.gz # make sure to copy pinball in same dir as wpinball.exe # install some external libraries if needed # http://www.libsdl.org/release/SDL-1.2.5.pkg.tar.gz # http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.3.pkg.tar.gz # http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.5.pkg.tar.gz ################ COMPILING PINBALL ON MACOX ? ################ ### Env # bash echo $OSTYPE $MACHTYPE $HOSTNAME $HOSTTYPE - $HOME $SHELL # darwin powerpc Aerith.local. macintosh - /Users/guest /bin/tcsh # darwin6.0 powerpc-apple-darwin6.0 ucf-cf-ppc-macosx-2 powerpc - autoconf --version # autoconf (GNU Autoconf) 2.57 automake --version # automake (GNU automake) 1.6.1 libtoolize --version #libtoolize (GNU libtool) 1.5 cc --version # cc (GCC) 3.1 20020420 (prerelease) uname -a #Darwin ucf-cf-ppc-macosx-2 6.5 Darwin Kernel Version 6.5: Mon Apr 7 17:05:38 PDT 2003; root:xnu/xnu-344.32.obj~1/RELEASE_PPC Power Macintosh powerpc # Darwin Aerith.local. 6.4 Darwin Kernel # Version 6.4: Wed Jan 29 18:50:42 PST 2003; # root:xnu/xnu-344.26.obj~1/RELEASE_PPC Power Macintosh powerpc /usr/X11R6/bin/glxinfo [ ! -z "$PATH" ] && \ export PATH=$HOME/usr/local/bin:$PATH [ ! -z "$LD_LIBRARY_PATH" ] && \ export LD_LIBRARY_PATH=$HOME/usr/local/lib:$LD_LIBRARY_PATH [ -z "$LD_LIBRARY_PATH" ] && \ export LD_LIBRARY_PATH=$HOME/usr/local/lib [ -z "$DYLD_LIBRARY_PATH" ] && \ export DYLD_LIBRARY_PATH=$HOME/usr/local/lib echo PATH=$PATH echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH echo DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH} # export DYLD_LIBRARY_PATH= #setenv LD_LIBRARY_PATH "/usr/local/lib" #setenv DYLD_LIBRARY_PATH "/usr/local/lib" echo ${SED} export SED=sed # ../../libtool: s%^.*/%%: No such file or directory # error echo ${LD_LIBRARY_PATH} export DESTDIR=. export DEPDIR=. export CFLAGS=-I/sw/include/SDL export CCFLAGS=-I/sw/include/SDL export LDFLAGS=-L/sw/lib/ alias ldd="otool -L" ############################################################################### ### 2003-09-23 ############################################################## # darwin6.0 powerpc-apple-darwin6.0 ucf-cf-ppc-macosx-2 powerpc - #libtoolize in /sw/bin and aclocal in /usr/bin # so aclocal is copying the wrong libtool.m4 cd ~/pinball cvs update bootstrap # You should add the contents of `/sw/share/aclocal/libtool.m4' to `aclocal.m4'. which libtool ls -l libtool libtool ./libtool --version ltmain.sh (GNU libtool) 1.5 (1.1220 2003/04/05 19:32:58) #/sw/share/automake-1.6/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL # ??? ./configure --prefix=/tmp/pinball --disable-sdltest ### cat >> pinconfig.h << EOF #undef RZR_LIBSTATIC #define RZR_LIBSTATIC #define RZR_PATHRELATIVE EOF grep RZR pinconfig.h ### .Po troubles # Makefile:218: BigSphere.Po: No such file or directory cd base sed -e "s/^include/-include/g" < Makefile > GNUmakefile cd - cd addon sed -e "s/^include/-include/g" < Makefile > GNUmakefile cd - cd src sed -e "s/^include/-include/g" < Makefile > GNUmakefile cd - cd data/tux sed -e "s/^include/-include/g" < Makefile > GNUmakefile cd - cd data/professor sed -e "s/^include/-include/g" < Makefile > GNUmakefile cd - cd test sed -e "s/^include/-include/g" < Makefile > GNUmakefile cd - ### libtool trouble # dont happend if $SED == sed Source='ModuleTux.cpp' object='ModuleTux.lo' libtool=yes \ depfile='.deps/ModuleTux.Plo' tmpdepfile='.deps/ModuleTux.TPlo' \ depmode=gcc3 /bin/sh ../../depcomp \ /bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../base -I.../../addon -I../../src -I/sw/include/SDL -D_THREAD_SAFE -g -W -Wall -O2 -c -o ModuleTux.lo `test -f 'ModuleTux.cpp' || echo './'`ModuleTux.cpp ../../libtool: s%^.*/%%: No such file or directory ../../libtool: -e: command not found *** Warning: inferring the mode of operation is deprecated. *** Future versions of Libtool will require -mode=MODE be specified. ../../libtool: -e: command not found echo ${SED} export SED=sed # ../../libtool: s%^.*/%%: No such file or directory # error # ../../libtool: Mach-O dynamically linked shared library: command not found ### # cd src make -k g++ -g -W -Wall -O2 -o pinball \ Pinball.o \ ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a \ -L/sw/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL \ -lSDL_image -lSDL_mixer g++ -g -W -Wall -O2 -o pinball \ Pinball.o \ ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a \ -framework Cocoa -framework OpenGL -framework SDL cd - ### scp pinball rzr@shell.sf.net:pinball-macosx scp rzr@shell.sf.net:pinball-macosx ./ # http://rzr.online.fr/docs/rzr/pinball-macosx.tar.gz # copy files to the same folder that contains wpinball.exe ldd pinball pinball: /sw/lib/libSDL-1.2.0.dylib (compatibility version 1.0.0, current version 1.5.0) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 8.0.0) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0) /sw/lib/libSDL_image-1.2.0.dylib (compatibility version 2.0.0, current version 2.2.0) /sw/lib/libSDL_mixer-1.2.0.dylib (compatibility version 3.0.0, current version 3.3.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 63.0.0) # http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachORuntime/MachORuntime.pdf <-- from memory that tells you the differences somewhere :) ls -l /sw/lib/libSDL* cd /sw/lib/ tar cvfz ~/sdl-darwin.tar.gz libSDL*.dylib ### mv pinball pinball-macosx ### mkdir -P /home/users/r/rz/rzr/tmp ln -fs /tmp/pinball /home/users/r/rz/rzr/tmp/pinball # the frameworks go into /Library/Frameworks by default # a framework != a dylib ln -fs pinball ../pinball # need to be in this dir cd .. # ~/pinball ./pinball #### strip pinball bzip2 -9 pinball mv pinball.bz2 pinball-darwin.bz2 scp pinball-darwin.bz2 rzr@shell.sf.net: cp ~/public_html/docs/game/macosx.txt ./ cp ~/public_html/docs/game/00index.htm ./ tar cvfz pinball-macosx.tar.gz pinball-macosx ############################################################################ # PINBALL (that's what we want) # If you don't have libs see below ### mkdir -p ~/usr/local/src cd ~/usr/local/src && \ curl -O http://switch.dl.sourceforge.net/sourceforge/pinball/pinball-0.1.3.tar.gz tar xfz pinball-0.1.3.tar.gz cd ~/usr/local/src/pinball-0.1.3 # apply rzr patch patch -p < pinball-0.1.3-macosx-rzr.patch ./bootstrap ./configure --prefix=$HOME/usr/local --disable-sdltest make && make install # Use #include GL_INCLUDE instead of #include # find / -name gl.h ln -fs /System/Library/Frameworks/AGL.framework/Versions/A/Headers GL # shouldn't be nescessary if used autoconf correctly #! depmods # depfile='/unittest.Po' tmpdepfile='/unittest.TPo' #root!! # DEPDIR undefinied export DEPDIR=. make # Makefile:273: AlignVisitor.Po: No such file or directory # remove depmods Po or create them touch # $(CXXDEPMODE) $(depcomp) \ make # TextureUtil.cpp:21:21: SDL/SDL.h: No such file or directory ln -fs . ~/usr/local/include/SDL/SDL make cd data/tux # Check if lib are compiled dyn ! # *** Warning: This library needs some functionality provided by -lSDLmain. # *** I have the capability to make that library automatically link in when # *** you link to this library. But I can only do this if you have a # *** shared version of the library, which you do not appear to have. # *** Warning: libtool could not satisfy all declared inter-library # *** dependencies of module libModuleTux. Therefore, libtool will create # *** a static module, that should work as long as the dlopening # *** application is linked with the -dlopen flag. # -lSDLmain was generated on macosx, not Linux /bin/sh ../../libtool --mode=link g++ \ -g -W -Wall -O2 -L/sw/lib -L/sw/lib \ -o libModuleTux.la \ -rpath $HOME/Documents/Development/EmiliaPinball/p/lib/pinball \ -module ModuleTux.lo \ -L/sw/lib -lSDL \ -framework Cocoa -framework OpenGL\ -lSDL_image -lSDL_mixer # _TO_BE_COMPLETED_ # I didn"t manage to build the dynlib so I turnaround it : # static linked modules make install file ~/usr/local/bin/pinball otool -L ~/usr/local/bin/pinball # try to strip the binaries, strip pinball *.so # that should be over # controls are 'x' 'n' return esc keys ### Libs / download / binaries ############################################# # First: install those external libs # Check if having opengl , and install it if not ( lib + headers) # How to install those pkg in user dir ? well we're gonna build them later # http://www.libsdl.org/release/SDL-1.2.5.pkg.tar.gz # http://www.libsdl.org/release/SDL-devel-1.2.5.pkg.tar.gz # http://www.libsdl.org/projects/SDL_image/release/SDL_image-devel-1.2.3.pkg.tar.gz # http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.3.pkg.tar.gz # http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-devel-1.2.5.pkg.tar.gz # http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.5.pkg.tar.gz # Build Libraries ########################################################### # If you have those libs skip to the pinball build, # and add paths with --*prefix options ### LIBSDL @ http://libsdl.org mkdir -p ~/usr/local/src ; cd ~/usr/local/src curl -O http://www.libsdl.org/release/SDL-1.2.5.tar.gz tar xfz SDL-1.2.5.tar.gz && \ cd SDL-1.2.5 && \ ./configure --prefix=$HOME/usr/local \ && make && make install clean ### png @ http://libpng.org --------------------------------------------------- mkdir -p ~/usr/local/src ; cd ~/usr/local/src && \ curl -O http://libpng.org/pub/png/src/libpng-1.2.5.tar.gz tar xfz libpng-1.2.5.tar.gz cd ~/usr/local/src/libpng-1.2.5 make -k -f scripts/makefile.macosx # make: *** [pngtest] Error 1 # LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -current_version $(PNGVER) -dynamiclib cc -o pngtest -fno-common -I../zlib -O pngtest.o -L. -L../zlib -lpng -lz -current_version 0.1.2.5 -dynamiclib # cc -o pngtest pngtest.o -lpng -staticlib -L. -lz && ./pngtest #sed scripts/makefile.macosx -e s/prefix=/usr/local $HOME/usr/local make -k -f scripts/makefile.macosx install # cp libpng.a ~/usr/local/lib/ # ranlib ~/usr/local/lib/libpng.a make -k -f scripts/makefile.macosx clean nm ~/usr/local/lib/libpng* | grep png_create_read_struct nm libpng* | grep png_create_read_struct # 00000000 T _png_create_read_struct rm /Users/guest/usr/local/lib/libpng. rm /Users/guest/usr/local/lib/libpng.3. cat > conftest.c < libtool << EOF /usr/bin/libtool EOF /bin/sh ../libtool --mode=link \ g++ -g -W -Wall -O2 -o pinball -export-dynamic Pinball.o \ ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a \ -L/sw/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL \ -lSDL_image -lSDL_mixer sh ../libtool --mode=link \ g++ -g -W -Wall -O2 -o pinball \ Pinball.o \ ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a \ -L/sw/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL \ -lSDL_image -lSDL_mixer g++ -g -W -Wall -O2 -o pinball \ *.o \ -L/sw/lib -lSDLmain -lSDL -lSDL_image -lSDL_mixer -framework Cocoa -framework OpenGL [Cameo:~/Pinball/pinball/src] rzr% make /bin/sh ../libtool --mode=link \ g++ -g -W -Wall -O2 -o pinball \ -export-dynamic \ Pinball.o ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a ../libltdl/libltdlc.la \ -L/sw/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL \ -lSDL_image -lSDL_mixer /usr/bin/libtool: no output file specified (specify with -o output) /bin/sh ../libtool --mode=link \ g++ -o pinball -g -W -Wall -O2 \ -export-dynamic \ Pinball.o ../src/libemilia_pin.a ../addon/libemilia_addon.a ../base/libemilia_base.a ../libltdl/libltdlc.la \ -L/sw/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL \ -lSDL_image -lSDL_mixer ../libltdl/libltdlc.la ############################################################################ 2003-09-12 =/sw/ # configure --prefix=${HOME}/tmp/ checking for SDL - version >= 1.2.0... no *** Could not run SDL test program, checking why... # export LDFLAGS=-L/sw/lib/ # configure --prefix=${HOME}/tmp/ --disable-sdltest Err: Making all in addon bash-2.05a$ make ../base/TextureUtil.h:19:24: SDL_opengl.h: No such file or directory ls /sw/include/SDL export CFLAGS=-I/sw/include/SDL export CCFLAGS=-I/sw/include/SDL ln -fs /sw/include/SDL ../ ln -fs /sw/include/SDL/SDL_opengl.h ../