oolite/Doc/ExternalLibrariesSourceCodeChanges.txt
Nikos Barkas 0842e943ee - Fixed crash in SDL builds, where unpausing the game after a hyperspace jump would segfault when GUI backgrounds were installed.
- Added to the source tree the source files that have to be changed for building the libespeak.dll v1.43.03 for Oolite Windows.
- Updated documentation on external libraries source code changes to include libespeak.dll and instructions for building it.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3380 127b21dd-08f5-0310-b4b7-95ae10353056
2010-05-19 16:50:41 +00:00

77 lines
4.8 KiB
Plaintext

Modifications to external libraries' source code for running Oolite
-------------------------------------------------------------------
The various ports of Oolite are using a number of external libraries for graphics, sound, input and event handling. Throughout development, certain changes to the source code of these libraries have been deemed necessary, either to enable Oolite to run in a more efficient and independent manner, or simply to fix issues that occurred as a result of these external libraries themselves. Of these libraries, the ones that have to be rebuilt specifically for Oolite, together with the main reasons/areas changed for this reason are:
1. gnustep-base v1.15.3 (Windows) - bug in NSInteger definition, DTD checking not wanted, a couple of build warnings with MinGW GCC 3.4.2.
2. SDL v1.2.13 - (Windows) window resizing issues.
3. SpiderMonkey v1.7 (all platforms) - certain JS macro definitions required by Oolite not guaranteed or non-existent in standard library.
4. eSpeak v1.43.03 (Windows) - Special build of the Windows speech synthesis libespeak.dll to enable asynchronous playback. Also, defaults the eSpeak data directory to Resources/espeak-data.
The changes made in the source code of each of these libraries is as follows:
1. gnustep-base v1.15.3 (Windows)
- GSSocketStream.m:57: Inserted the lines
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
int inet_pton(int af, const char *src, void *dst);
to remove implicit function declaration warnings with GCC 3.4.2.
- NSPropertyList.m:2612: Changed line
[parser doValidityChecking: YES];
to
[parser doValidityChecking: NO];
to disable plist DTD checking (clogs the logfile, not required for Oolite).
- GSConfig.h:134 (build generated file): Changed line
typedef gsuaddr gsaddr;
to
typedef gssaddr gsaddr;
to fix incorrect definition of NSInteger.
2. SDL v1.2.13 (Windows)
- SDL_resize.c:57: Added the lines
#ifdef __WIN32__
SDL_VideoSurface->w = w;
SDL_VideoSurface->h = h;
#endif
to enable window resizing without side effects like texture corruption in the Windows port of Oolite. The entire source of the modified SDL library is included in the source distribution of the game under <source code installation folder>/deps/Cross-platform-deps/SDL/SDL-1.2.13.zip
3. SpiderMonkey v1.7 (all platforms)
- Specific build settings for Oolite are required. Library rebuilt with the following macros defined as shown below:
JS_STRINGS_ARE_UTF8 defined
JS_THREADSAFE not defined
MOZILLA_1_8_BRANCH not defined.
The entire source code of the library with the modifications included can be found in Oolite's source code distribution, under <source code installation folder>/deps/Cross-platform-deps/SpiderMonkey.
4. eSpeak v1.43.03 (Windows)
- The libespeak.dll has been custom-built for the Windows port of Oolite to enable asynchronous playback and to also default the eSpeak data files folder to Resources/espeak-data. The source files that need to be changed for this to happen can be found inside deps/Windows-x86-deps/OOeSpeakWin32DLLBuild. The instructions for building this library, for those interested, are as follows:
- You will need to have OoliteDevelopmentEnvironment - Light Edition installed, downloadable from http://terrastorage.ath.cx/Marmagka/5cced8c2546092e4072f2beb229d5271/OoliteDevelopmentEnvironment_20090330.zip or from
http://www.4shared.com/file/116738805/8d8c4647/OoliteDevelopmentEnvironment_20090330.html. Instructions for setting it up can be found at http://www.aegidian.org/bb/viewtopic.php?t=5943.
- Download espeak-1.43.03-source.zip from http://espeak.sourceforge.net/download.html
- Unzip the file to a folder of choice, maintaining the directory structure. We'll refer to this folder as <espeakSourceFolder>.
- Copy the files
Makefile
gettimeofday.c
speak_lib.cpp
speech.h
from deps/Windows-x86-deps/eSpeakWin32ChangedFiles to <espeakSourceFolder>/src.
- Rename the file <eSpeakSourceFolder>/src/portaudio19.h to portaudio.h.
- Copy the file speak_lib.h from <espeakSourceFolder>/platforms/windows/windows_dll/src to <espeakSourceFolder>/src.
- Start up MinGW/MSYS and change working directory to the <espeakSourceFolder>/src folder.
- Execute 'make libespeak.dll' from the command prompt.
- The library should compile and at the end of the build you should have a file named libespeak.dll (the actual binary) and the import library file libespeak.dll.a, for use when you want to link libespeak.dll to your project.
Certain other Oolite dependencies are built with specific project settings on the Mac platform, without further changes to their source code. These libraries are libpng (uses also a custom pngusr.h header for the Mac version) and libogg/libvorbis. Also, the Mac debug support uses a modified version of RBSplitView, mostly to enable it to build on 64-bit Mac OS X.