forked from teamnwah/openmw-tes3coop
Windows build still not finished
git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@37 ea6a568a-9f4f-0410-981a-c910a81bb256
This commit is contained in:
parent
fc621518cb
commit
53ae52c7c9
5 changed files with 29 additions and 13 deletions
|
@ -26,8 +26,7 @@ Dependencies needed to build OpenMW:
|
||||||
|
|
||||||
OGRE 1.4.9 (3d engine)
|
OGRE 1.4.9 (3d engine)
|
||||||
OpenAL (3d sound system)
|
OpenAL (3d sound system)
|
||||||
libavcodec,
|
FFmpeg (For MP3 playback)
|
||||||
libavformat (For MP3 playback)
|
|
||||||
Mingw (C++ compiler)
|
Mingw (C++ compiler)
|
||||||
gdc 4.1.3 (mingw) (D compiler)
|
gdc 4.1.3 (mingw) (D compiler)
|
||||||
|
|
||||||
|
@ -36,15 +35,18 @@ versions might work. OGRE, OpenAL and OIS are complex libraries with
|
||||||
their own set of dependencies. I recommend downloading prebuild SDKs
|
their own set of dependencies. I recommend downloading prebuild SDKs
|
||||||
instead of building them from source.
|
instead of building them from source.
|
||||||
|
|
||||||
libavcodec and libavformat are part of the FFmpeg package, which is
|
FFmpeg package contains the necessary libraries libavcodec and
|
||||||
part of the 'mplayer' project. Note that some of the codecs might be
|
libavformat. You will most likely have to build it from source. This
|
||||||
patented in your country.
|
can be done either with Mingw32/Msys or with Cygwin. See below for
|
||||||
|
instructions. Note that some of the codecs included with FFmpeg might
|
||||||
|
be patented in your country.
|
||||||
|
|
||||||
You can find the libraries here:
|
You can find the libraries here:
|
||||||
|
|
||||||
OGRE: http://ogre3d.org (See "Getting Ogre" in README-win32.txt for details)
|
OGRE: http://ogre3d.org (See "Getting Ogre" in README-win32.txt for details)
|
||||||
OIS: Comes with the Ogre SDK
|
OIS: Comes with the Ogre SDK
|
||||||
OpenAL: http://openal.org/
|
OpenAL: http://openal.org/
|
||||||
|
FFmpeg: http://ffmpeg.mplayerhq.hu/
|
||||||
Mingw http://sourceforge.net/projects/mingw/
|
Mingw http://sourceforge.net/projects/mingw/
|
||||||
gdc http://sourceforge.net/projects/gdcwin/
|
gdc http://sourceforge.net/projects/gdcwin/
|
||||||
|
|
||||||
|
@ -65,11 +67,17 @@ Open a command line. Set up your PATH to include Mingw and gdc
|
||||||
(eg. "set PATH=%PATH%;c:\mingw\bin"). Make sure the commands g++ and
|
(eg. "set PATH=%PATH%;c:\mingw\bin"). Make sure the commands g++ and
|
||||||
gdc work (should output "no input files".)
|
gdc work (should output "no input files".)
|
||||||
|
|
||||||
The build script expects to find the Ogre and Audiere SDKs in the
|
The build script expects to find the Ogre and FFmpeg SDKs in the
|
||||||
parent directory. An example directory structure is:
|
parent directory. An example directory structure is:
|
||||||
|
|
||||||
c:\openmw\Ogre - Ogre SDK
|
c:\openmw\Ogre - Ogre SDK
|
||||||
c:\openmw\openmw - OpenMW source
|
c:\openmw\openmw - OpenMW source
|
||||||
|
c:\openmw\ffmpeg - FFmpeg
|
||||||
|
|
||||||
|
You must compile FFmpeg from source, since at the time of writing
|
||||||
|
there are no prebuilt SDKs available. The source must be built with
|
||||||
|
Mingw as well (not Cygwin!) The following configure flags should work:
|
||||||
|
./configure --enable-shared --disable--ffserver --disable-ffplay
|
||||||
|
|
||||||
|
|
||||||
Building
|
Building
|
||||||
|
|
|
@ -2,18 +2,21 @@
|
||||||
|
|
||||||
rem See COMPILE-win32.txt for instructions.
|
rem See COMPILE-win32.txt for instructions.
|
||||||
|
|
||||||
rem This file assumes it can find Ogre in ..\ogro
|
rem This file assumes it can find Ogre in ..\ogre and that ffmpeg
|
||||||
rem TODO: Not updated to OpenAL
|
rem has been downloaded and compiled in ..\ffmpeg
|
||||||
|
|
||||||
echo Compiling C++ files
|
echo Compiling C++ files
|
||||||
g++ -c sound\cpp_audiere.cpp -I..\audiere\include
|
g++ -c sound\cpp_avcodec.cpp -I..\ffmpeg
|
||||||
g++ -c ogre\cpp_ogre.cpp -I..\ogre\include
|
g++ -c ogre\cpp_ogre.cpp -I..\ogre\include
|
||||||
|
|
||||||
copy ..\ogre\bin\debug\ogremain_d.dll .
|
copy ..\ogre\bin\debug\ogremain_d.dll .
|
||||||
copy ..\ogre\bin\debug\ois_d.dll .
|
copy ..\ogre\bin\debug\ois_d.dll .
|
||||||
copy ..\ogre\bin\debug\cg.dll .
|
copy ..\ogre\bin\debug\cg.dll .
|
||||||
copy ..\audiere\bin\audiere.dll .
|
copy ..\ffmpeg\libavcodec\cygavcodec-51.dll cygavcodec.dll
|
||||||
|
copy ..\ffmpeg\libavformat\cygavformat-52.dll cygavformat.dll
|
||||||
|
copy ..\ffmpeg\libavdevice\cygavdevice-52.dll cygavdevice.dll
|
||||||
|
copy ..\ffmpeg\libavutil\cygavutil-49.dll cygavutil.dll
|
||||||
copy \windows\system32\d3dx9_30.dll d3dx9d_30.dll
|
copy \windows\system32\d3dx9_30.dll d3dx9d_30.dll
|
||||||
|
|
||||||
echo Compiling main program (openmw.exe)
|
echo Compiling main program (openmw.exe)
|
||||||
gdc -Wall -g openmw.d bsa\*.d core\*.d esm\*.d input\*.d nif\*.d ogre\*.d scene\*.d sound\*.d util\*.d cpp_ogre.o monster\util\*.d ogremain_d.dll OIS_d.dll -lstdc++ -o openmw.exe
|
gdc -Wall -g openmw.d bsa\*.d core\*.d esm\*.d input\*.d nif\*.d ogre\*.d scene\*.d sound\*.d util\*.d cpp_ogre.o cpp_avcodec.o monster\util\*.d cygavcodec.dll cygavformat.dll cygavdevice.dll cygavutil.dll openal32.dll ogremain_d.dll OIS_d.dll -lstdc++ -o openmw.exe
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module sound.al;
|
module sound.al;
|
||||||
|
|
||||||
extern(System):
|
extern(C):
|
||||||
|
|
||||||
//Defines
|
//Defines
|
||||||
const int AL_NONE = 0;
|
const int AL_NONE = 0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module sound.alc;
|
module sound.alc;
|
||||||
|
|
||||||
extern(System):
|
extern(C):
|
||||||
|
|
||||||
//Definitions
|
//Definitions
|
||||||
const int ALC_FALSE = 0;
|
const int ALC_FALSE = 0;
|
||||||
|
|
|
@ -24,8 +24,13 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
extern "C" { // the headers don't do this..
|
extern "C" { // the headers don't do this..
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <libavcodec/avcodec.h>
|
||||||
|
#include <libavformat/avformat.h>
|
||||||
|
#else
|
||||||
#include <ffmpeg/avcodec.h>
|
#include <ffmpeg/avcodec.h>
|
||||||
#include <ffmpeg/avformat.h>
|
#include <ffmpeg/avformat.h>
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
Loading…
Reference in a new issue