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:
|
Super Tux Kart on Ubuntu Edgy, contributed by Damien:
|
||||||
|
|
||||||
install following packages:
|
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
|
libglu1-mesa-dev subversion autoconf automake1.9 g++ gcc
|
||||||
|
|
||||||
do a:
|
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
|
This is part of the cygwin packages, so just select this in
|
||||||
the cygwin setup program.
|
the cygwin setup program.
|
||||||
|
|
||||||
3) Compile and install plib
|
3) Install OpenAL
|
||||||
This should work straight out of the box.
|
|
||||||
|
|
||||||
4) Install OpenAL
|
|
||||||
We have had some problems with this, so this might be the most difficult stage.
|
We have had some problems with this, so this might be the most difficult stage.
|
||||||
|
|
||||||
4) Unpack superuxkart and run ./configure and make.
|
4) Unpack superuxkart and run ./configure and make.
|
||||||
@ -22,8 +19,6 @@ Comments:
|
|||||||
1) A -DNOMINMAX is added for cygwin compilations, since otherwise
|
1) A -DNOMINMAX is added for cygwin compilations, since otherwise
|
||||||
min and max are #defined, causing problems with all std::min and
|
min and max are #defined, causing problems with all std::min and
|
||||||
std::max constructs.
|
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
|
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.
|
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.
|
(*) 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.
|
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:
|
System requirements Mac:
|
||||||
PowerPC- or Intel-Mac with 800 MHz or more,
|
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.
|
13.03 Change in the folder Contents:Frameworks. And copy Vorbis.framework and Ogg.framework to <hd>:Library:Frameworks.
|
||||||
|
|
||||||
|
|
||||||
14. Installing plib: ////////////////////////////////////////
|
14. This step is not necessary anymore.
|
||||||
|
|
||||||
|
|
||||||
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. 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
|
15.09 sudo make install
|
||||||
|
|
||||||
|
|
||||||
16. Copy the plib files to "/usr/local":
|
16. This step is not necessary anymore.
|
||||||
|
|
||||||
16.01 sudo cp /usr/lib/libplib* /usr/local/lib/
|
|
||||||
|
|
||||||
16.02 sudo cp -R /usr/include/plib /usr/local/include/
|
|
||||||
|
|
||||||
|
|
||||||
Installing SuperTuxKart //////////
|
Installing SuperTuxKart //////////
|
||||||
|
|
||||||
|
@ -25,13 +25,10 @@ Cygwin
|
|||||||
This is part of the cygwin packages, so just select this in
|
This is part of the cygwin packages, so just select this in
|
||||||
the cygwin setup program.
|
the cygwin setup program.
|
||||||
|
|
||||||
2) Compile and install plib
|
2) Install OpenAL
|
||||||
This should work straight out of the box.
|
|
||||||
|
|
||||||
3) Install OpenAL
|
|
||||||
We have had some problems with this in the past, so it might be tricky.
|
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.
|
That should be all.
|
||||||
|
|
||||||
@ -40,8 +37,6 @@ Comments:
|
|||||||
min and max are #defined, causing problems with all std::min and
|
min and max are #defined, causing problems with all std::min and
|
||||||
std::max constructs. This is done automatically by the configure
|
std::max constructs. This is done automatically by the configure
|
||||||
script.
|
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
|
and it includes a sub project for the bullet library. More details
|
||||||
can be found in .../src/ide/vc8/README.
|
can be found in .../src/ide/vc8/README.
|
||||||
|
|
||||||
You still have to install all dependencies, and:
|
You still have to install all dependencies.
|
||||||
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)
|
|
||||||
|
|
||||||
|
41
configure.ac
41
configure.ac
@ -41,11 +41,6 @@ dnl Check for `configure' flags
|
|||||||
dnl ===========================
|
dnl ===========================
|
||||||
SUMMARY="\nSummary of optional components:\n==============================="
|
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,
|
AC_ARG_ENABLE(debug, [AS_HELP_STRING(--enable-debug,
|
||||||
[enable debugging info])])
|
[enable debugging info])])
|
||||||
if test x$enable_debug = xyes; then
|
if test x$enable_debug = xyes; then
|
||||||
@ -194,42 +189,6 @@ LIBS=$save_LIBS
|
|||||||
AC_LANG_PUSH(C++)
|
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 =======================
|
||||||
dnl check for SDL libraries
|
dnl check for SDL libraries
|
||||||
dnl =======================
|
dnl =======================
|
||||||
|
@ -249,8 +249,7 @@ supertuxkart_SOURCES = \
|
|||||||
|
|
||||||
# Link in the specific gcc 4.1 bug work around
|
# Link in the specific gcc 4.1 bug work around
|
||||||
supertuxkart_LDADD = \
|
supertuxkart_LDADD = \
|
||||||
-lplibjs -lplibsl -lplibssg -lplibpu -lplibfnt -lplibsg \
|
$(irrlicht_LIBS) $(bullet_LIBS) $(enet_LIBS) $(glut_LIBS) \
|
||||||
-lplibul -lplibssgaux $(irrlicht_LIBS) $(bullet_LIBS) $(enet_LIBS) $(glut_LIBS) \
|
|
||||||
$(opengl_LIBS) $(openal_LIBS) $(oggvorbis_LIBS) \
|
$(opengl_LIBS) $(openal_LIBS) $(oggvorbis_LIBS) \
|
||||||
$(INTLLIBS)
|
$(INTLLIBS)
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
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"
|
OutputFile="./../../../$(ProjectName)_d.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
AdditionalLibraryDirectories=""$(STK_LIB)";"$(IRR_LIB)""
|
AdditionalLibraryDirectories=""$(STK_LIB)";"$(IRR_LIB)""
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
WholeProgramOptimization="true"
|
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"
|
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"
|
RuntimeLibrary="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -149,10 +149,10 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
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"
|
OutputFile="./../../../$(ProjectName).exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories=""$(STK_LIB)""
|
AdditionalLibraryDirectories=""$(STK_LIB)";"$(IRR_LIB)""
|
||||||
IgnoreDefaultLibraryNames="libcmt.lib"
|
IgnoreDefaultLibraryNames="libcmt.lib"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
|
@ -47,8 +47,6 @@
|
|||||||
#include "tracks/quad_set.hpp"
|
#include "tracks/quad_set.hpp"
|
||||||
#include "utils/string_utils.hpp"
|
#include "utils/string_utils.hpp"
|
||||||
|
|
||||||
#include <plib/ssg.h>
|
|
||||||
|
|
||||||
const float Track::NOHIT = -99999.9f;
|
const float Track::NOHIT = -99999.9f;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -595,8 +593,8 @@ void Track::loadDriveline()
|
|||||||
float theta = -atan2(dx, dy);
|
float theta = -atan2(dx, dy);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_driveline_min = Vec3( SG_MAX/2.0f);
|
m_driveline_min = Vec3( 9999999.9f);
|
||||||
m_driveline_max = Vec3(-SG_MAX/2.0f);
|
m_driveline_max = Vec3(-9999999.9f);
|
||||||
|
|
||||||
|
|
||||||
m_distance_from_start.reserve(DRIVELINE_SIZE);
|
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;
|
int prev_sector = QuadGraph::UNKNOWN_SECTOR;
|
||||||
SGfloat prev_distance = 1.51f;
|
float prev_distance = 1.51f;
|
||||||
while(!feof(fd))
|
while(!feof(fd))
|
||||||
{
|
{
|
||||||
char s [ 1024 ] ;
|
char s [ 1024 ] ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user