Worked on the release notes / installation instructions, and fixed

some other minor issues.


git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@11 ea6a568a-9f4f-0410-981a-c910a81bb256
actorid
nkorslund 17 years ago
parent 2f93fd25d3
commit 16e6da7d69

@ -1,52 +1,36 @@
OpenMW - the completely unofficial reimplementation of Morrowind OpenMW - the completely unofficial reimplementation of Morrowind
================================================================ ================================================================
Written by Nicolay Korslund OpenMW is an open source reimplementation of the Morrowind game
Email: korslund@gmail.com engine. For more information, see README.txt or
WWW: http://openmw.snaptoad.com
License: See GPL3.txt
Current version: 0.2 (second release, very pre-alpha)
Date: 2008 jun. 17
http://openmw.snaptoad.com/
QUICK NOTE: You must own and install Morrowind before you can use
OpenMW. Let me repeat that: OpenMW will NOT run if you do not have
Morrowind installed on your system!
Installation from source
========================
(this file is NOT complete!)
New in version 0.2
==================
The second release should now work with the GDC compiler (the D
frontend for GCC) and DSSS. Since GDC is the only option for compiling
on other Unixes, on 64 bit and on Mac, this will probably make porting
to these platforms much easier. DSSS (a specialized D build tool) will
hopefully make porting to Windows a lot easier.
To compile, you no longer use 'make'. Instead you use 'dsss build',
which will run 'make' for you. (More details below.)
See the changelog at the end. Supported Unix platforms:
-------------------------
The only Unix operating system that has been tested and is known to
work is 32bit Ubuntu Linux 8.04.
FreeBSD works partially, but you have to recompile most of the
dependencies as well. There is a bug in the compiler can breaks
exceptions though, so if anything goes wrong you probably will not get
any sensible error message.
Linux 64 bit is known NOT to work at the moment.
Installation from source If you manage to build OpenMW on a platform not listed here, or want
======================== to try, please let me know!
These instructions are for the brave souls who seek to compile OpenMW
on their own. If you are using the binary version, you can skip to the
next section.
Supported platforms:
--------------------
The only operating system that has been tested and is known to work is
32bit Ubuntu Linux 8.04. Windows and other platforms have not been
tested as of yet.
Dependencies: Dependencies:
------------- -------------
@ -55,30 +39,36 @@ Dependencies needed to build OpenMW:
OGRE 1.4.5 (3d engine) OGRE 1.4.5 (3d engine)
Audiere 1.9.4 (sound engine) Audiere 1.9.4 (sound engine)
OIS-1.2.0 (input system) OIS-1.0.0 (input system)
gcc and g++ (C++ compiler) gcc and g++ (C++ compiler)
GNU make (build tool for C++ files) GNU make (build tool for C++ files)
DMD 1.030 (D compiler) DMD 1.031 (D compiler)
or GDC 4.1.3 (alternative D compiler) or GDC 4.1.3 (alternative D compiler)
Monster 0.8 (scripting language and tools) Monster 0.8 (scripting language and tools)
DSSS 0.75 (D build tool) DSSS 0.75 (D build tool)
curl (for DSSS) curl (for DSSS)
The above versions are the ones I have tested recently, but other The above versions are the ones I have tested recently, but other
versions might work. OGRE and Audiere will require their own set of versions might work. OGRE, Audiere and OIS will require their own set
dependencies. I recommend using an automated package tool to install of dependencies. I recommend using an automated package tool to
as many of these as possible. On ubuntu, try typing: install as many of these as possible. On ubuntu, try typing:
sudo apt-get install libogre-dev libaudiere-dev build-essential g++ curl gdc sudo apt-get install libogre-dev libaudiere-dev libois-dev build-essential g++ curl gdc
This takes care of OGRE, Audiere, the C and D compilers, make and This takes care of OGRE, Audiere, OIS, the C and D compilers, make and
curl. The rest have to be installed manually. There is a libois-dev curl. The rest have to be installed manually. This will give you the
package in Ubuntu (OIS version 0.99), but this has NOT been tested. GDC (frontend for GCC) compiler.
You can find the other libraries and tools here: The "official" compiler, DMD, is updated more often, but both should
work. Note however that DMD is only available on 32 bit Linux - other
operating systems or architectures will have to use GDC. (However GDC
might also be unstable on these platforms.)
If you want to use DMD instead, go to
http://digitalmars.com/d/1.0/dmd-linux.html
You can find the two remaining dependencies here:
OIS: http://sourceforge.net/projects/wgois/
DMD: http://digitalmars.com/d/1.0/dmd-linux.html
DSSS: http://svn.dsource.org/projects/dsss/downloads/ DSSS: http://svn.dsource.org/projects/dsss/downloads/
Monster: http://monster.snaptoad.com/download.html Monster: http://monster.snaptoad.com/download.html
@ -87,79 +77,46 @@ recommend the binary), make sure to get one that matches your D
compiler. Ie. get the GDC version if you installed GDC, and the DMD compiler. Ie. get the GDC version if you installed GDC, and the DMD
version for DMD. version for DMD.
If you want to install Ogre and Audiere manually as well, try: If you want to install Ogre, Audiere or OIS manually as well, try:
OGRE: http://ogre3d.org OGRE: http://ogre3d.org
Audiere: http://audiere.sourceforge.net/ Audiere: http://audiere.sourceforge.net/
OIS: http://sourceforge.net/projects/wgois/
Once everything is set up correctly, you might need to alter a couple
of lines in the Makefile. The Makefile is only used to compile the C++
parts of OpenMW, that interfaces with Ogre, OIS and Audiere. On the
line:
OGCC=g++ `pkg-config --cflags OGRE`
Insert the path to your OIS include directory (or leave it blank if
you installed OIS in /usr). For example, you might add:
-I/home/me/my/path/to/OIS/include
You might also need to add other include paths or options for Ogre if
the pkg-config command doesn't work for some reason. Mine outputs
$ pkg-config --cflags OGRE Building:
-DOGRE_GUI_GLX -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/include/OGRE ---------
After you are reasonably satisfied, you can try running make manually After installing all the dependencies, you can try running make first
to see if the C++ parts compile. When you are ready to compile the D to see if the C++ parts compile. You may need to alter the Makefile if
parts and link it all together, type: you are using non-standard include paths, etc. When you are ready to
compile the D parts and link it all together, type:
dsss build dsss build
If something goes terribly wrong during the build (it probably will), If something goes terribly wrong during the build (which isn't
_and_ you figure out how to solve it, I would appreciate if you told unlikely), and you figure out how to solve it, I would appreciate if
me about it so I could update these instructions. you told me about it so I could update these instructions.
Running the binary
==================
The binary downloads have been compiled on a 32-bit Ubuntu 8.04 box
with the libraries mentioned below. They might not work on other linux
systems due to differing library setups. If this is the case, then
your only option is to compile from source.
Dependencies:
-------------
The binary depends on the following libraries:
OGRE 1.4 Installation from binary
Audiere 1.9.4 ========================
OIS-1.2.0
and Morrowind of course. If you followed the compilation instructions (not written yet - we might as well create a .deb file)
above, you will have these already. If not, you can find them here:
OGRE: http://ogre3d.org
Audiere: http://audiere.sourceforge.net/
OIS: http://sourceforge.net/projects/wgois/
Alternatively (on Ubuntu 8.04) you can at least get Ogre and Audiere
with the command:
sudo apt-get install libogre14 libaudiere-1.9.4
Configuration: Configuration
-------------- =============
Before you can run OpenMW, you have to help it find the Morrowind data Before you can run OpenMW, you have to help it find the Morrowind data
files. The 'morro' program needs the files Morrowind.esm and files. The 'openmw' program needs the files Morrowind.esm and
Morrowind.bsa, and the directories Sound/ and Music/ from your Morrowind.bsa, and the directories Sound/ and Music/ from your
Morrowind Data Files directory. By default it expects to find these in "Morrowind\Data Files\" directory. By default it expects to find these
the data/ directory. (Can be changed in morro.ini.) in the data/ directory. (This can be changed in openmw.ini)
I recommend creating a symbolic link to your original Morrowind I recommend creating a symbolic link to your original Morrowind
install. For example, if you have Morrowind installed in: install. For example, if you have Morrowind installed in:
@ -172,61 +129,37 @@ following command:
ln -s "/media/hda1/Program Files/Bethesda Softworks/Morrowind/Data Files/" data ln -s "/media/hda1/Program Files/Bethesda Softworks/Morrowind/Data Files/" data
Also, if you have OGRE installed in a non-standard directory (ie. NOT Also, if you have OGRE installed in a non-standard directory (ie. NOT
to /usr/lib/OGRE), you have to change the PluginFolder in plugins.cfg. to /usr/lib/OGRE), you have to change the PluginFolder in the file
plugins.cfg.linux.
The first time you run openmw you will be asked to set screen
resolution and other graphics settings. You can bring this dialogue up
at any time with the -oc command line switch. I don't recommend using
fullscreen mode yet, since it might mess up your screen and input
settings if the program crashes.
Finally, you can change screen resolution and fullscreen mode in
ogre.cfg. (I don't recommend fullscreen mode yet, since it may mess up
your screen and input settings if the program crashes.)
Running OpenMW:
--------------- Running OpenMW
==============
If Azura is with you and all the stars and planets are aligned in your If Azura is with you and all the stars and planets are aligned in your
favor, you should now be able to run OpenMW using the program called favor, you should now be able to run OpenMW using the program called
'morro'. 'openmw'.
Write morro -h to see a list of options. Write openmw -h to see a list of options.
Running without parameters should bring you into the cave called Sud, Running without parameters should bring you into the cave called Sud,
or the last cell loaded. You are in free float mode. Move around with or the last cell loaded. You are in free float mode. Move around with
WASD (or arrow keys), move up and down with left shift and ctrl, exit WASD (or arrow keys), move up and down with left shift and ctrl, exit
with 'q' or escape. with 'q' or escape. Note that if you have a localized (non-English)
version, the cell "Sud" might not exist. I will solve this issue in a
later version.
To load another cell, specify the cell name on the command line. Use To load another cell, specify the cell name on the command line. Use
the 'esmtool' program to get a list of cells (see below.) Note that the 'esmtool' program to get a list of cells. Note that you must use
you must use quotation marks "" if the cell name contains spaces or quotation marks "" if the cell name contains spaces or other weird
other weird characters. Exterior cells are disabled at the moment. characters. Exterior cells are disabled at the moment.
Enjoy! ;-) Enjoy! ;-)
Other included tools:
=====================
esmtool - Used to inspect ES files (ESM, ESP, ESS). Run without
arguments to get a list of options.
bsatool - Tool for viewing and extracting files from BSA archives.
(Can also be used to test the NIF parser on a BSA.)
niftool - Decodes one or more NIF files and prints the details.
Changelog:
==========
0.3 (work in progress)
- updated Makefile and sources for increased portability (thanks to
Dmitry Marakasov for FreeBSD tips and testing!)
0.2 (2008 jun. 17) - latest release
- compiles with gdc
- switched to DSSS for building D code
- includes the program esmtool
0.1 (2008 jun. 03)
- first release

@ -1,35 +1,10 @@
OpenMW - the completely unofficial reimplementation of Morrowind OpenMW - the completely unofficial reimplementation of Morrowind
================================================================ ================================================================
Written by Nicolay Korslund OpenMW is an open source reimplementation of the Morrowind game
Email: korslund@gmail.com engine. For more information, see README.txt or
WWW: http://openmw.snaptoad.com
License: See GPL3.txt
Current version: 0.2 (second release, very pre-alpha)
Date: 2008 jun. 17
http://openmw.snaptoad.com/
QUICK NOTE: You must own and install Morrowind before you can use
OpenMW. Let me repeat that: OpenMW will NOT run if you do not have
Morrowind installed on your system!
New in version 0.2
==================
The second release should now work with the GDC compiler (the D
frontend for GCC) and DSSS. Since GDC is the only option for compiling
on other Unixes, on 64 bit and on Mac, this will probably make porting
to these platforms much easier. DSSS (a specialized D build tool) will
hopefully make porting to Windows a lot easier.
To compile, you no longer use 'make'. Instead you use 'dsss build',
which will run 'make' for you. (More details below.)
See the changelog at the end.
@ -37,16 +12,15 @@ See the changelog at the end.
Installation from source Installation from source
======================== ========================
These instructions are for the brave souls who seek to compile OpenMW (this file is NOT complete!)
on their own. If you are using the binary version, you can skip to the
next section.
Supported platforms: Supported Windows platforms:
-------------------- ----------------------------
Only tested on Windows XP. If you manage to compile or run OpenMW on
another Windows platform (9x/Me/NT/Vista), please let me know!
The only operating system that has been tested and is known to work is
32bit Ubuntu Linux 8.04. Windows and other platforms have not been
tested as of yet.
Dependencies: Dependencies:
------------- -------------
@ -55,178 +29,89 @@ Dependencies needed to build OpenMW:
OGRE 1.4.5 (3d engine) OGRE 1.4.5 (3d engine)
Audiere 1.9.4 (sound engine) Audiere 1.9.4 (sound engine)
OIS-1.2.0 (input system) OIS-1.0.0 (input system)
gcc and g++ (C++ compiler) Mingw (C++ compiler)
GNU make (build tool for C++ files) gdc 4.1.3 (mingw) (D compiler)
DMD 1.030 (D compiler)
or GDC 4.1.3 (alternative D compiler)
Monster 0.8 (scripting language and tools) Monster 0.8 (scripting language and tools)
DSSS 0.75 (D build tool) DSSS 0.75 (D build tool)
curl (for DSSS)
The above versions are the ones I have tested recently, but other The above versions are the ones I have tested recently, but other
versions might work. OGRE and Audiere will require their own set of versions might work. OGRE, Audiere and OIS are comples libraries with
dependencies. I recommend using an automated package tool to install their own set of dependencies. I recomend downloading prebuild SDKs
as many of these as possible. On ubuntu, try typing: instead of building them from source. You can find these here:
sudo apt-get install libogre-dev libaudiere-dev build-essential g++ curl gdc
This takes care of OGRE, Audiere, the C and D compilers, make and
curl. The rest have to be installed manually. There is a libois-dev
package in Ubuntu (OIS version 0.99), but this has NOT been tested.
You can find the other libraries and tools here:
OGRE: http://ogre3d.org
Audiere: http://audiere.sourceforge.net/
OIS: http://sourceforge.net/projects/wgois/ OIS: http://sourceforge.net/projects/wgois/
DMD: http://digitalmars.com/d/1.0/dmd-linux.html
DSSS: http://svn.dsource.org/projects/dsss/downloads/ DSSS: http://svn.dsource.org/projects/dsss/downloads/
Monster: http://monster.snaptoad.com/download.html Monster: http://monster.snaptoad.com/download.html
If you are using a DSSS binary and not compiling from source (I (Note that the "official" compiler, DMD, will not work, because it is
recommend the binary), make sure to get one that matches your D incompatible with most modern C++ compilers in Windows.)
compiler. Ie. get the GDC version if you installed GDC, and the DMD
version for DMD.
If you want to install Ogre and Audiere manually as well, try:
OGRE: http://ogre3d.org
Audiere: http://audiere.sourceforge.net/
Once everything is set up correctly, you might need to alter a couple
of lines in the Makefile. The Makefile is only used to compile the C++
parts of OpenMW, that interfaces with Ogre, OIS and Audiere. On the
line:
OGCC=g++ `pkg-config --cflags OGRE`
Insert the path to your OIS include directory (or leave it blank if
you installed OIS in /usr). For example, you might add:
-I/home/me/my/path/to/OIS/include
You might also need to add other include paths or options for Ogre if
the pkg-config command doesn't work for some reason. Mine outputs
$ pkg-config --cflags OGRE (notes to write: you must use the command line, and mingw - cygwin
-DOGRE_GUI_GLX -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/include/OGRE does not work.)
After you are reasonably satisfied, you can try running make manually
to see if the C++ parts compile. When you are ready to compile the D
parts and link it all together, type:
dsss build Building:
---------
If something goes terribly wrong during the build (it probably will), (to be written)
_and_ you figure out how to solve it, I would appreciate if you told
me about it so I could update these instructions.
If something goes terribly wrong during the build (which isn't
unlikely), and you figure out how to solve it, I would appreciate if
you told me about it so I could update these instructions.
Running the binary
==================
The binary downloads have been compiled on a 32-bit Ubuntu 8.04 box Installation from binary
with the libraries mentioned below. They might not work on other linux ========================
systems due to differing library setups. If this is the case, then
your only option is to compile from source.
Dependencies:
-------------
The binary depends on the following libraries:
OGRE 1.4
Audiere 1.9.4
OIS-1.2.0
and Morrowind of course. If you followed the compilation instructions (not written yet)
above, you will have these already. If not, you can find them here:
OGRE: http://ogre3d.org
Audiere: http://audiere.sourceforge.net/
OIS: http://sourceforge.net/projects/wgois/
Alternatively (on Ubuntu 8.04) you can at least get Ogre and Audiere
with the command:
sudo apt-get install libogre14 libaudiere-1.9.4
Configuration: Configuration
-------------- =============
Before you can run OpenMW, you have to help it find the Morrowind data Before you can run OpenMW, you have to help it find the Morrowind data
files. The 'morro' program needs the files Morrowind.esm and files. The 'openmw' program needs the files Morrowind.esm and
Morrowind.bsa, and the directories Sound/ and Music/ from your Morrowind.bsa, and the directories Sound\ and Music\ from your
Morrowind Data Files directory. By default it expects to find these in "Morrowind\Data Files\" directory. By default it expects to find these
the data/ directory. (Can be changed in morro.ini.) in the data\ directory. You can change this in the openmw.ini file.
I recommend creating a symbolic link to your original Morrowind (todo: write about directory structure, dlls and ogre plugins here)
install. For example, if you have Morrowind installed in:
c:\Program Files\Bethesda Softworks\Morrowind\ The first time you run openmw you will be asked to set screen
resolution and other graphics settings. You can bring this dialogue up
at any time with the -oc command line switch. I don't recommend using
fullscreen mode yet, since it might mess up your screen and input
settings if the program crashes.
and your windows c: drive is mounted on /media/hda1, then run the
following command:
ln -s "/media/hda1/Program Files/Bethesda Softworks/Morrowind/Data Files/" data
Also, if you have OGRE installed in a non-standard directory (ie. NOT
to /usr/lib/OGRE), you have to change the PluginFolder in plugins.cfg.
Finally, you can change screen resolution and fullscreen mode in Running OpenMW
ogre.cfg. (I don't recommend fullscreen mode yet, since it may mess up ==============
your screen and input settings if the program crashes.)
Running OpenMW:
---------------
If Azura is with you and all the stars and planets are aligned in your If Azura is with you and all the stars and planets are aligned in your
favor, you should now be able to run OpenMW using the program called favor, you should now be able to run OpenMW using the program called
'morro'. 'openmw'.
Write morro -h to see a list of options. Write openmw -h to see a list of options.
Running without parameters should bring you into the cave called Sud, Running without parameters should bring you into the cave called Sud,
or the last cell loaded. You are in free float mode. Move around with or the last cell loaded. You are in free float mode. Move around with
WASD (or arrow keys), move up and down with left shift and ctrl, exit WASD (or arrow keys), move up and down with left shift and ctrl, exit
with 'q' or escape. with 'q' or escape. Note that if you have a localized (non-English)
version, the cell "Sud" might not exist. I will solve this issue in a
later version.
To load another cell, specify the cell name on the command line. Use To load another cell, specify the cell name on the command line. Use
the 'esmtool' program to get a list of cells (see below.) Note that the 'esmtool' program to get a list of cells. Note that you must use
you must use quotation marks "" if the cell name contains spaces or quotation marks "" if the cell name contains spaces or other weird
other weird characters. Exterior cells are disabled at the moment. characters. Exterior cells are disabled at the moment.
Enjoy! ;-) Enjoy! ;-)
Other included tools:
=====================
esmtool - Used to inspect ES files (ESM, ESP, ESS). Run without
arguments to get a list of options.
bsatool - Tool for viewing and extracting files from BSA archives.
(Can also be used to test the NIF parser on a BSA.)
niftool - Decodes one or more NIF files and prints the details.
Changelog:
==========
0.3 (work in progress)
- updated Makefile and sources for increased portability (thanks to
Dmitry Marakasov for FreeBSD tips and testing!)
0.2 (2008 jun. 17) - latest release
- compiles with gdc
- switched to DSSS for building D code
- includes the program esmtool
0.1 (2008 jun. 03)
- first release

@ -29,11 +29,10 @@ binary packages and installation from source.
See also the changelog at the end. See also the changelog at the end.
Note: if you are using a localized (non-English) version of Morrowind, Note: if you are using a localized (non-English) version of Morrowind,
the default starting cell (Sud) might not exist, and the esmtool will the default starting cell (Sud) might not exist, and the esmtool
probably fail with UTF errors, since the system currently expects UTF8 program will probably fail with UTF errors. This will be fixed in a
input. This will be fixed in a future release - I have even added future release - I have even added localized support as one of the
localized support as one of the major goals on the web page. major goals on the web page.
@ -41,7 +40,7 @@ localized support as one of the major goals on the web page.
On the immediate TODO list: On the immediate TODO list:
=========================== ===========================
- read the input files in the correct code page - read the data files in the correct code page
- support for Mac - support for Mac
- collision detection - collision detection
- displaying creatures correcty, animation - displaying creatures correcty, animation
@ -62,8 +61,11 @@ For instructions, see the files INSTALL-win32.txt or
INSTALL-linux.txt. INSTALL-linux.txt.
FreeBSD has also been tested but is only partially supported, due to FreeBSD has also been tested but is only partially supported, due to
sketchy D compiler support. Linux 64 bit currently does NOT work, for sketchy D compiler support. It will run, but exceptions do not work
the same reason. and will immediately abort the program.
Linux 64 bit is known NOT to work, also because of compiler
deficiencies.
@ -107,13 +109,14 @@ Changelog:
0.3 (work in progress) 0.3 (work in progress)
- built and tested on Windows XP - built and tested on Windows XP
- partial support for FreeBSD (exceptions do not work) - partial support for FreeBSD (exceptions do not work)
- removed some config files, since these are auto-generated when - renamed main program from 'morro' to 'openmw'
missing - made the config system more robust
- made the config system more robust (an Ogre config windows opened - added -oc switch for showing Ogre config window on startup
when needed) - removed some config files, these are auto-generated when
- alternatively reads config file from ~/.openmw/ on unix systems. missing. Separated plugins.cfg into linux and windows versions.
- updated Makefile and sources for increased portability (thanks to - updated Makefile and sources for increased portability (thanks to
Dmitry Marakasov.) Dmitry Marakasov.)
- tested against OIS 1.0.0 (Ubuntu repository package)
0.2 (2008 jun. 17) - latest release 0.2 (2008 jun. 17) - latest release
- compiles with gdc - compiles with gdc

@ -147,13 +147,19 @@ struct ConfigManager
// Initialize the key binding manager // Initialize the key binding manager
keyBindings.initKeys(); keyBindings.initKeys();
// On Linux / Unix, if openmw.ini is not found in the current /* Disable this at the moment. It's a good idea to put
// directory, use ~/openmw/openmw.ini instead. configuration in a central location, but it's useless as long
as Ogre expects to find it's files in the current working
directory. The best permanent solution would be to let the
locations of ogre.cfg and plugins.cfg be determined by
openmw.ini - I will fix that later.
version(Posix) version(Posix)
{ {
if(!exists(confFile)) if(!exists(confFile))
confFile = expandTilde("~/.openmw/openmw.ini"); confFile = expandTilde("~/.openmw/openmw.ini");
} }
*/
readIni(reset); readIni(reset);

@ -1,7 +0,0 @@
Render System=OpenGL Rendering Subsystem
[OpenGL Rendering Subsystem]
FSAA=0
Full Screen=No
RTT Preferred Mode=FBO
Video Mode=800 x 600

@ -1,19 +0,0 @@
Render System=Direct3D9 Rendering Subsystem
[Direct3D9 Rendering Subsystem]
Allow NVPerfHUD=No
Anti aliasing=None
Floating-point mode=Fastest
Full Screen=No
Rendering Device=
VSync=No
Video Mode=800 x 600 @ 32-bit colour
[OpenGL Rendering Subsystem]
Colour Depth=32
Display Frequency=60
FSAA=0
Full Screen=No
RTT Preferred Mode=FBO
VSync=No
Video Mode=800 x 600

@ -51,9 +51,10 @@ typedef void* ManualLoader;
extern(C): extern(C):
// Do engine configuration. Returns 0 if we should continue, 1 if // Do engine configuration. Returns 0 if we should continue, 1 if
// not. The parameter (0 or 1) determine whether an Ogre config // not.
// dialogue is shown. int cpp_configure(int showConfig, // Do we show the config dialogue?
int cpp_configure(int showConfig); char *plugincfg // Name of 'plugin.cfg' file
);
// Sets up the window // Sets up the window
void cpp_initWindow(); void cpp_initWindow();

@ -41,13 +41,19 @@ extern "C" void cpp_cleanup()
} }
} }
extern "C" int32_t cpp_configure(int32_t showConfig) extern "C" int32_t cpp_configure(
int32_t showConfig, // Do we show the config dialogue?
char *plugincfg // Name of 'plugin.cfg' file
)
{ {
mRoot = new Root(); mRoot = new Root(plugincfg);
// Add the BSA archive manager before reading the config file. // Add the BSA archive manager before reading the config file.
ArchiveManager::getSingleton().addArchiveFactory( &mBSAFactory ); ArchiveManager::getSingleton().addArchiveFactory( &mBSAFactory );
/* The only entry we use from resources.cfg is the "BSA=internal"
entry, which we can put in manually.
// Load resource paths from config file // Load resource paths from config file
ConfigFile cf; ConfigFile cf;
cf.load("resources.cfg"); cf.load("resources.cfg");
@ -69,11 +75,14 @@ extern "C" int32_t cpp_configure(int32_t showConfig)
archName, typeName, secName); archName, typeName, secName);
} }
} }
*/
ResourceGroupManager::getSingleton().
addResourceLocation("internal", "BSA", "General");
// Show the configuration dialog and initialise the system, if the // Show the configuration dialog and initialise the system, if the
// showConfig parameter is specified. The settings are stored in // showConfig parameter is specified. The settings are stored in
// ogre.cfg. If the parameter is false, the settings are assumed to // ogre.cfg. If showConfig is false, the settings are assumed to
// come from ogre.cfg. // already exist in ogre.cfg.
int result; int result;
if(showConfig) if(showConfig)
result = mRoot->showConfigDialog(); result = mRoot->showConfigDialog();

@ -79,9 +79,19 @@ static ~this()
// Loads ogre configurations, creats the root, etc. // Loads ogre configurations, creats the root, etc.
void setupOgre() void setupOgre()
{ {
// Later we will send some config info from core.config along with char[] plugincfg;
version(Windows)
plugincfg = "plugins.cfg.win32";
else version(Posix)
plugincfg = "plugins.cfg.linux";
else
// Assume the user knows what to do
plugincfg = "plugins.cfg";
// Later we will send more config info from core.config along with
// this function // this function
if(cpp_configure(config.finalOgreConfig)) if(cpp_configure(config.finalOgreConfig, toStringz(plugincfg)))
OgreException("Configuration abort"); OgreException("Configuration abort");
cpp_initWindow(); cpp_initWindow();

@ -1,13 +0,0 @@
# Defines plugins to load
# Define plugin folder
PluginFolder=/usr/lib/OGRE
# Define plugins
Plugin=RenderSystem_GL
Plugin=Plugin_ParticleFX
Plugin=Plugin_BSPSceneManager
Plugin=Plugin_OctreeSceneManager
# Plugin=Plugin_CgProgramManager

@ -1,23 +0,0 @@
# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
[Bootstrap]
#Zip=ogre/media/packs/OgreCore.zip
# Resource locations to be added to the default path
[General]
#FileSystem=media
#FileSystem=ogre/media/fonts
#FileSystem=ogre/media/materials/programs
#FileSystem=ogre/media/materials/scripts
#FileSystem=ogre/media/materials/textures
#FileSystem=ogre/media/models
#FileSystem=ogre/media/overlays
#FileSystem=ogre/media/particle
#FileSystem=ogre/media/gui
#Zip=ogre/media/packs/cubemap.zip
#Zip=ogre/media/packs/cubemapsJS.zip
#Zip=ogre/media/packs/dragon.zip
#Zip=ogre/media/packs/fresneldemo.zip
#Zip=ogre/media/packs/ogretestmap.zip
#Zip=ogre/media/packs/skybox.zip
BSA=internal
Loading…
Cancel
Save