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
This commit is contained in:
parent
eac584b350
commit
043c4c0671
2
INSTALL
2
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:
|
||||
|
@ -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.
|
||||
|
115
README.macosx
115
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 <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.
|
||||
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 //////////
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
41
configure.ac
41
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 <plib/ul.h>
|
||||
|
||||
# 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 =======================
|
||||
|
@ -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)
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib user32.lib gdi32.lib winmm.lib advapi32.lib SDL.lib SDLmain.lib OpenAL32.lib libogg.lib libvorbis.lib libvorbisfile.lib sg.lib ssg.lib ul.lib ssgAux.lib fnt.lib intl.lib Irrlicht.lib ws2_32.lib"
|
||||
AdditionalDependencies="opengl32.lib user32.lib gdi32.lib winmm.lib advapi32.lib SDL.lib SDLmain.lib OpenAL32.lib libogg.lib libvorbis.lib libvorbisfile.lib intl.lib Irrlicht.lib ws2_32.lib"
|
||||
OutputFile="./../../../$(ProjectName)_d.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(STK_LIB)";"$(IRR_LIB)""
|
||||
@ -130,7 +130,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
WholeProgramOptimization="true"
|
||||
AdditionalIncludeDirectories="../../../src;../../../src/bullet/src;"$(STK_INCLUDE)";../../../src/enet/include"
|
||||
AdditionalIncludeDirectories="../../../src;../../../src/bullet/src;"$(STK_INCLUDE)";../../../src/enet/include;"$(IRR_INCLUDE)""
|
||||
PreprocessorDefinitions="HAVE_OPENAL;HAVE_OGGVORBIS;NDEBUG;_CONSOLE;WIN32;NOMINMAX;VERSION=\"SVN\";_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;BT_NO_PROFILE;PACKAGE=\"supertuxkart\";HAVE_GETTEXT;ENABLE_NLS;HAVE_GLUT;HAVE_IRRLICHT"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
@ -149,10 +149,10 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="opengl32.lib user32.lib gdi32.lib winmm.lib advapi32.lib SDL.lib SDLmain.lib OpenAL32.lib libogg.lib libvorbis.lib libvorbisfile.lib sg.lib ssg.lib ul.lib ssgAux.lib fnt.lib intl.lib ws2_32.lib"
|
||||
AdditionalDependencies="opengl32.lib user32.lib gdi32.lib winmm.lib advapi32.lib SDL.lib SDLmain.lib OpenAL32.lib libogg.lib libvorbis.lib libvorbisfile.lib intl.lib Irrlicht.lib ws2_32.lib"
|
||||
OutputFile="./../../../$(ProjectName).exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(STK_LIB)""
|
||||
AdditionalLibraryDirectories=""$(STK_LIB)";"$(IRR_LIB)""
|
||||
IgnoreDefaultLibraryNames="libcmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
|
@ -47,8 +47,6 @@
|
||||
#include "tracks/quad_set.hpp"
|
||||
#include "utils/string_utils.hpp"
|
||||
|
||||
#include <plib/ssg.h>
|
||||
|
||||
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<Vec3>& 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 ] ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user