mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Put the final touches on the windows version.
git-svn-id: https://openmw.svn.sourceforge.net/svnroot/openmw/trunk@13 ea6a568a-9f4f-0410-981a-c910a81bb256
This commit is contained in:
parent
888c552f1b
commit
c9251f6c75
3 changed files with 32 additions and 6 deletions
|
@ -80,6 +80,7 @@ struct ConfigManager
|
||||||
int screenShotNum;
|
int screenShotNum;
|
||||||
|
|
||||||
// Directories
|
// Directories
|
||||||
|
char[] dataDir;
|
||||||
char[] esmDir;
|
char[] esmDir;
|
||||||
char[] bsaDir;
|
char[] bsaDir;
|
||||||
char[] sndDir;
|
char[] sndDir;
|
||||||
|
@ -250,12 +251,29 @@ struct ConfigManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read specific directories
|
// Read data file directory
|
||||||
|
dataDir = ini.getString("General", "Data Directory", "data/");
|
||||||
|
|
||||||
|
// Make sure there's a trailing slash at the end. The forward slash
|
||||||
|
// / works on all platforms, while the backslash \ does not. This
|
||||||
|
// isn't super robust, but we will fix a general path handle
|
||||||
|
// mechanism later (or use an existing one.)
|
||||||
|
if(dataDir.ends("\\")) dataDir[$-1] = '/';
|
||||||
|
if(!dataDir.ends("/")) dataDir ~= '/';
|
||||||
|
|
||||||
|
bsaDir = dataDir;
|
||||||
|
esmDir = dataDir;
|
||||||
|
sndDir = dataDir ~ "Sound/";
|
||||||
|
musDir = dataDir ~ "Music/Explore/";
|
||||||
|
musDir2 = dataDir ~ "Music/Battle/";
|
||||||
|
|
||||||
|
/* Don't bother reading every directory seperately
|
||||||
bsaDir = ini.getString("General", "BSA Directory", "data/");
|
bsaDir = ini.getString("General", "BSA Directory", "data/");
|
||||||
esmDir = ini.getString("General", "ESM Directory", "data/");
|
esmDir = ini.getString("General", "ESM Directory", "data/");
|
||||||
sndDir = ini.getString("General", "SFX Directory", "data/Sound/");
|
sndDir = ini.getString("General", "SFX Directory", "data/Sound/");
|
||||||
musDir = ini.getString("General", "Explore Music Directory", "data/Music/Explore/");
|
musDir = ini.getString("General", "Explore Music Directory", "data/Music/Explore/");
|
||||||
musDir2 = ini.getString("General", "Battle Music Directory", "data/Music/Battle/");
|
musDir2 = ini.getString("General", "Battle Music Directory", "data/Music/Battle/");
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the config file
|
// Create the config file
|
||||||
|
@ -269,11 +287,14 @@ struct ConfigManager
|
||||||
comment("Don't write your own comments in this file, they");
|
comment("Don't write your own comments in this file, they");
|
||||||
comment("will disappear when the file is rewritten.");
|
comment("will disappear when the file is rewritten.");
|
||||||
section("General");
|
section("General");
|
||||||
|
writeString("Data Directory", dataDir);
|
||||||
|
/*
|
||||||
writeString("ESM Directory", esmDir);
|
writeString("ESM Directory", esmDir);
|
||||||
writeString("BSA Directory", bsaDir);
|
writeString("BSA Directory", bsaDir);
|
||||||
writeString("SFX Directory", sndDir);
|
writeString("SFX Directory", sndDir);
|
||||||
writeString("Explore Music Directory", musDir);
|
writeString("Explore Music Directory", musDir);
|
||||||
writeString("Battle Music Directory", musDir2);
|
writeString("Battle Music Directory", musDir2);
|
||||||
|
*/
|
||||||
writeInt("Screenshots", screenShotNum);
|
writeInt("Screenshots", screenShotNum);
|
||||||
writeString("Default Cell", defaultCell);
|
writeString("Default Cell", defaultCell);
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,4 @@ copy ..\audiere\bin\audiere.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 openmw.d bsa\*.d core\*.d esm\*.d input\*.d nif\*.d ogre\*.d scene\*.d sound\*.d util\*.d cpp_audiere.o cpp_ogre.o ..\monster\monster\util\*.d ..\monster\monster\minibos\*.d ..\monster\monster\minibos\c\*.d ..\monster\monster\minibos\c\windows\*.d -I..\monster ogremain_d.dll ..\audiere\lib\audiere.lib OIS_d.dll -lstdc++ -o openmw.exe
|
gdc openmw.d bsa\*.d core\*.d esm\*.d input\*.d nif\*.d ogre\*.d scene\*.d sound\*.d util\*.d cpp_audiere.o cpp_ogre.o monster\util\*.d ogremain_d.dll ..\audiere\lib\audiere.lib OIS_d.dll -lstdc++ -o openmw.exe
|
||||||
|
|
||||||
echo Setting up the correct Ogre cfg files
|
|
||||||
copy ogre.cfg.win32 ogre.cfg
|
|
||||||
copy plugins.cfg.win32 plugins.cfg
|
|
||||||
|
|
9
openmw.d
9
openmw.d
|
@ -26,6 +26,7 @@ module morro;
|
||||||
import std.stdio;
|
import std.stdio;
|
||||||
import std.string;
|
import std.string;
|
||||||
import std.cstream;
|
import std.cstream;
|
||||||
|
import std.file;
|
||||||
|
|
||||||
import ogre.ogre;
|
import ogre.ogre;
|
||||||
import ogre.bindings;
|
import ogre.bindings;
|
||||||
|
@ -103,6 +104,14 @@ void main(char[][] args)
|
||||||
config.initialize(resetKeys);
|
config.initialize(resetKeys);
|
||||||
scope(exit) config.writeConfig();
|
scope(exit) config.writeConfig();
|
||||||
|
|
||||||
|
// Check if the data directory exists
|
||||||
|
if(!exists(config.dataDir) || !isdir(config.dataDir))
|
||||||
|
{
|
||||||
|
writefln("Cannot find data directory '", config.dataDir,
|
||||||
|
"' - please edit openmw.ini.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// If the -oc parameter is specified, we override any config
|
// If the -oc parameter is specified, we override any config
|
||||||
// setting.
|
// setting.
|
||||||
if(showOgreFlag) config.finalOgreConfig = true;
|
if(showOgreFlag) config.finalOgreConfig = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue