From 043c4c0671fa7307cff0a6614de0a80249c98839 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 28 May 2009 02:29:09 +0000 Subject: [PATCH] Removed dependency on plib - hooorayyyy! git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3545 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- INSTALL | 2 +- README.cygwin | 7 +- README.macosx | 115 +------------------------------- README.windows | 23 +------ configure.ac | 41 ------------ src/Makefile.am | 3 +- src/ide/vc9/supertuxkart.vcproj | 8 +-- src/tracks/track.cpp | 8 +-- 8 files changed, 15 insertions(+), 192 deletions(-) diff --git a/INSTALL b/INSTALL index 895a551d5..b0f499499 100644 --- a/INSTALL +++ b/INSTALL @@ -42,7 +42,7 @@ Here are the compilation instructions for the current svn(05 oct. 2006) of Super Tux Kart on Ubuntu Edgy, contributed by Damien: install following packages: -# apt-get install libopenal-dev libmikmod2-dev plib1.8.4-dev +# apt-get install libopenal-dev libmikmod2-dev libglu1-mesa-dev subversion autoconf automake1.9 g++ gcc do a: diff --git a/README.cygwin b/README.cygwin index f0a81b3c0..3d53482a1 100644 --- a/README.cygwin +++ b/README.cygwin @@ -7,10 +7,7 @@ Some short instruction on how to compile supertuxkart with cygwin: This is part of the cygwin packages, so just select this in the cygwin setup program. -3) Compile and install plib - This should work straight out of the box. - -4) Install OpenAL +3) Install OpenAL We have had some problems with this, so this might be the most difficult stage. 4) Unpack superuxkart and run ./configure and make. @@ -22,8 +19,6 @@ Comments: 1) A -DNOMINMAX is added for cygwin compilations, since otherwise min and max are #defined, causing problems with all std::min and std::max constructs. -2) The order in which plib/pu.h and plib/pw.h are included appears - to be important - pw should be included first. If you have any problems, please post on the mailing list - I am not a regular windows user, so am probably not able to help you. diff --git a/README.macosx b/README.macosx index 9a4707923..0ada0bf45 100644 --- a/README.macosx +++ b/README.macosx @@ -3,10 +3,6 @@ http://supertuxkart.sourceforge.net/Building_and_packaging_on_OSX (*) There is an experimental Xcode project in /src/ide/Xcode/. It will still require that all dependencies are installed as explained on the wiki. The older instructions should still work, and are quite detailed. -Note that we supply a modified version of plib (on our download page -at http://sourceforge.net/project/showfiles.php?group_id=202302) -which fixes a few compilation problems on Macs. We strongly recommend -to use this version (unless a newer plib version is released). System requirements Mac: PowerPC- or Intel-Mac with 800 MHz or more, @@ -78,109 +74,7 @@ if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi 13.03 Change in the folder Contents:Frameworks. And copy Vorbis.framework and Ogg.framework to :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 - - -replace with: - - -#include - - -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: - -/Makefile - -/src/Makefile - -/src/fnt/Makefile - -/src/js/Makefile - -/src/net/Makefile - -/src/psl/Makefile - -/src/puAux/Makefile - -/src/pui/Makefile - -/src/pw/Makefile - -/src/sg/Makefile - -/src/sl/Makefile - -/src/ssg/Makefile - -/src/ssgAux/Makefile - -/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. +14. This step is not necessary anymore. 15. Installing Freealut-1.1.0 from OpenAL.org //////////////////// @@ -241,12 +135,7 @@ Libs: -framework OpenAL -L${libdir} -lalut Cflags: -framework OpenAL -I${include 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/ - +16. This step is not necessary anymore. Installing SuperTuxKart ////////// diff --git a/README.windows b/README.windows index 3b585043b..fa74bd25a 100644 --- a/README.windows +++ b/README.windows @@ -25,13 +25,10 @@ Cygwin This is part of the cygwin packages, so just select this in the cygwin setup program. -2) Compile and install plib - This should work straight out of the box. - -3) Install OpenAL +2) Install OpenAL We have had some problems with this in the past, so it might be tricky. -4) Unpack supertuxkart and run ./configure and make. +3) Unpack supertuxkart and run ./configure and make. That should be all. @@ -40,8 +37,6 @@ Comments: min and max are #defined, causing problems with all std::min and std::max constructs. This is done automatically by the configure script. -2) The order in which plib/pu.h and plib/pw.h are included appears - to be important - pw should be included first. @@ -55,17 +50,5 @@ The main project file is .../src/ide/vc8/supertuxkart.vcproj, and it includes a sub project for the bullet library. More details can be found in .../src/ide/vc8/README. -You still have to install all dependencies, and: -1) Modify plib: - Best choice would be to use the plib version from our download page, - since it contains all bugfixes that are necessary. The latest - release (1.8.5) might work, if you are using 1.8.4: - In src/ssg/ssgLoadAC.cxx replace: - loader_fd = fopen ( filename, "ra" ) ; - with - loader_fd = fopen ( filename, "r" ) ; - This patch will be submitted to PLIB, but we don't know if and - when it will be applied. - -2) Compile plib (project files for visual c++ are included) +You still have to install all dependencies. diff --git a/configure.ac b/configure.ac index cc9910f88..6d3a1ecf9 100644 --- a/configure.ac +++ b/configure.ac @@ -41,11 +41,6 @@ dnl Check for `configure' flags dnl =========================== SUMMARY="\nSummary of optional components:\n===============================" -if test "x$with_plib" != "x" ; then - echo "plib prefix is $with_plib" - EXTRA_DIRS="${EXTRA_DIRS} $with_plib" -fi - AC_ARG_ENABLE(debug, [AS_HELP_STRING(--enable-debug, [enable debugging info])]) if test x$enable_debug = xyes; then @@ -194,42 +189,6 @@ LIBS=$save_LIBS AC_LANG_PUSH(C++) -# ============================================== -# Check for "plib" without which we cannot go on -# ============================================== -# specify the plib location -AC_ARG_WITH(plib, [AS_HELP_STRING(--with-plib=PREFIX, - [specify the prefix path to plib])]) -if test "x$with_plib" != "x" ; then - echo "plib prefix is $with_plib" - EXTRA_DIRS="${EXTRA_DIRS} $with_plib" -fi - -AC_CHECK_HEADER(plib/ul.h) -if test "x$ac_cv_header_plib_ul_h" != "xyes"; then - AC_MSG_ERROR([[cannot find useable plib installation. You need to install plib 1.8.4 or newer.]]) -fi - -AC_MSG_CHECKING([for plib 1.8.4 or newer]) -AC_TRY_RUN([ -# include - -# define MIN_PLIB_VERSION 184 - int main() { - if ( PLIB_VERSION < MIN_PLIB_VERSION ) { - return -1; - } - return 0; - } - ], - AC_MSG_RESULT(yes), - [ AC_MSG_RESULT(wrong version); - AC_MSG_ERROR([plib 1.8.4 or later is needed. Please intall it first.])], - AC_MSG_RESULT(yes) -) - - - dnl ======================= dnl check for SDL libraries dnl ======================= diff --git a/src/Makefile.am b/src/Makefile.am index 602092acc..ddc4f1b80 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -249,8 +249,7 @@ supertuxkart_SOURCES = \ # Link in the specific gcc 4.1 bug work around supertuxkart_LDADD = \ - -lplibjs -lplibsl -lplibssg -lplibpu -lplibfnt -lplibsg \ - -lplibul -lplibssgaux $(irrlicht_LIBS) $(bullet_LIBS) $(enet_LIBS) $(glut_LIBS) \ + $(irrlicht_LIBS) $(bullet_LIBS) $(enet_LIBS) $(glut_LIBS) \ $(opengl_LIBS) $(openal_LIBS) $(oggvorbis_LIBS) \ $(INTLLIBS) diff --git a/src/ide/vc9/supertuxkart.vcproj b/src/ide/vc9/supertuxkart.vcproj index 75cde2615..ff587a61e 100644 --- a/src/ide/vc9/supertuxkart.vcproj +++ b/src/ide/vc9/supertuxkart.vcproj @@ -65,7 +65,7 @@ /> - const float Track::NOHIT = -99999.9f; // ---------------------------------------------------------------------------- @@ -595,8 +593,8 @@ void Track::loadDriveline() float theta = -atan2(dx, dy); } - m_driveline_min = Vec3( SG_MAX/2.0f); - m_driveline_max = Vec3(-SG_MAX/2.0f); + m_driveline_min = Vec3( 9999999.9f); + m_driveline_max = Vec3(-9999999.9f); m_distance_from_start.reserve(DRIVELINE_SIZE); @@ -639,7 +637,7 @@ Track::readDrivelineFromFile(std::vector& line, const std::string& file_ex } int prev_sector = QuadGraph::UNKNOWN_SECTOR; - SGfloat prev_distance = 1.51f; + float prev_distance = 1.51f; while(!feof(fd)) { char s [ 1024 ] ;