Got rid of default Dolphin.ini

Default plugins are now in Paths.h
Important note for scons users, plugin names now match the one on windows!!!
make sure to remove the old ones!! and update your .ini!!



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1131 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2008-11-11 20:59:48 +00:00
parent fa1c90a411
commit b47f349c96
15 changed files with 68 additions and 56 deletions

View File

@ -1,5 +0,0 @@
[Default]
GFXPlugin = Plugins/libzeroogl.so
DSPPlugin = Plugins/libdsphle.so
PadPlugin = Plugins/libPlugin_nJoy_SDL.so
WiiMotePlugin = Plugins/libPlugin_Wiimote.so

View File

@ -1,5 +0,0 @@
[Default]
GFXPlugin = Plugins\Plugin_VideoOGL.dll
DSPPlugin = Plugins\Plugin_DSP_HLE.dll
PadPlugin = Plugins\Plugin_PadSimple.dll
WiiMotePlugin = Plugins\Plugin_Wiimote.dll

View File

@ -1,5 +0,0 @@
[Default]
GFXPlugin = Plugins\Plugin_VideoOGL.dll
DSPPlugin = Plugins\Plugin_DSP_HLE.dll
PadPlugin = Plugins\Plugin_PadSimple.dll
WiiMotePlugin = Plugins\Plugin_Wiimote.dll

View File

@ -213,6 +213,13 @@ if not env['osx64']:
# add methods from utils to env
env.AddMethod(utils.filterWarnings)
# output
if sys.platform == 'darwin':
platform = 'mac'
else:
platform = 'linux'
env['plugin_dir'] = 'Binary/%s/Plugins/' % platform
Export('env')
utils.GenerateRevFile(env['flavor'], "Source/Core/Common/Src/svnrev_template.h",

View File

@ -43,6 +43,8 @@
#include <stdio.h>
#include <string.h>
#include "Paths.h"
// Function Cross-Compatibility
#ifdef _WIN32
#define strcasecmp _stricmp

View File

@ -0,0 +1,36 @@
#ifndef PATHS_H
#define PATHS_H
#define PLUGINS_DIR "Plugins"
#define DEFAULT_DATA_DIR ""
#define USERDATA_DIR "User"
#define SYSDATA_DIR "Sys"
// Under User
#define CONFIG_DIR "Config"
#define GAMECONFIG_DIR "GameConfig"
#define CACHE_DIR "Cache"
#define SAVESTATES_DIR "SaveStates"
#define SCREENSHOTS_DIR "ScreenShots"
#define LOGS_DIR "Logs"
// Under Sys
// Files
#define DOLPHIN_CONFIG "Dolphin.ini"
#define DEFAULT_GFX_PLUGIN "Plugin_VideoOGL"
#define DEFAULT_DSP_PLUGIN "Plugin_DSP_HLE"
#define DEFAULT_PAD_PLUGIN "Plugin_PadSimple"
#define DEFAULT_WIIMOTE_PLUGIN "Plugin_Wiimote"
#ifdef _WIN32
#define PLUGIN_SUFFIX ".dll"
#define DIR_SEP "\\"
#else
#define PLUGIN_SUFFIX ".so"
#define DIR_SEP "/"
#endif
#endif // PATHS_H

View File

@ -40,7 +40,7 @@ SConfig::~SConfig()
void SConfig::SaveSettings()
{
IniFile ini;
ini.Load("Dolphin.ini"); // yes we must load first to not kill unknown stuff
// ini.Load(DOLPHIN_CONFIG); // yes we must load first to not kill unknown stuff
// misc
{
@ -78,21 +78,21 @@ void SConfig::SaveSettings()
ini.Set("Core", "RunCompareClient", m_LocalCoreStartupParameter.bRunCompareClient);
}
ini.Save("Dolphin.ini");
ini.Save(DOLPHIN_CONFIG);
}
void SConfig::LoadSettings()
{
IniFile ini;
ini.Load("Dolphin.ini");
ini.Load(DOLPHIN_CONFIG);
// hard coded default plugin
{
ini.Get("Default", "GFXPlugin", &m_DefaultGFXPlugin);
ini.Get("Default", "DSPPlugin", &m_DefaultDSPPlugin);
ini.Get("Default", "PadPlugin", &m_DefaultPADPlugin);
ini.Get("Default", "WiiMotePlugin", &m_DefaultWiiMotePlugin);
m_DefaultGFXPlugin = PLUGINS_DIR DIR_SEP DEFAULT_GFX_PLUGIN PLUGIN_SUFFIX;
m_DefaultDSPPlugin = PLUGINS_DIR DIR_SEP DEFAULT_DSP_PLUGIN PLUGIN_SUFFIX;
m_DefaultPADPlugin = PLUGINS_DIR DIR_SEP DEFAULT_PAD_PLUGIN PLUGIN_SUFFIX;
m_DefaultWiiMotePlugin = PLUGINS_DIR DIR_SEP DEFAULT_WIIMOTE_PLUGIN PLUGIN_SUFFIX;
}
// misc

View File

@ -25,7 +25,7 @@
struct SConfig
{
// default plugins ... hard coded inside the ini
// hard coded default plugins ...
std::string m_DefaultGFXPlugin;
std::string m_DefaultDSPPlugin;
std::string m_DefaultPADPlugin;

View File

@ -3,10 +3,7 @@
Import('env')
import sys
if sys.platform == 'darwin':
output = '../../../../Binary/mac/Plugins/dsphle.so'
else:
output = '../../../../Binary/linux/Plugins/dsphle.so'
name = "Plugin_DSP_HLE.so"
files = [
'DSPHandler.cpp',
@ -36,4 +33,4 @@ dspenv.Append(
LIBS = [ 'common' ],
)
if not env['osx64']:
dspenv.SharedLibrary(output, files)
dspenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files)

View File

@ -3,10 +3,7 @@
Import('env')
import sys
if sys.platform == 'darwin':
output = "../../../../Binary/mac/Plugins/dsplle.so"
else:
output = "../../../../Binary/linux/Plugins/dsplle.so"
name = "Plugin_DSP_LLE.so"
files = [
"AOSoundStream.cpp",
@ -35,4 +32,4 @@ lleenv.Append(
LIBS = [ 'common' ],
)
if not env['osx64']:
lleenv.SharedLibrary(output, files)
lleenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files)

View File

@ -3,10 +3,7 @@
Import('env')
import sys
if sys.platform == 'darwin':
output = "../../../../Binary/mac/Plugins/dspnull.so"
else:
output = "../../../../Binary/linux/Plugins/dspnull.so"
name = "Plugin_DSP_NULL.so"
files = [
"DSPHandler.cpp",
@ -35,4 +32,4 @@ else:
LIBS = [ 'common' ],
)
dspenv.SharedLibrary(output, files)
dspenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files)

View File

@ -3,10 +3,7 @@
Import('env')
import sys
if sys.platform == 'darwin':
output = "../../../../Binary/mac/Plugins/padsimple.so"
else:
output = "../../../../Binary/linux/Plugins/padsimple.so"
name = "Plugin_PadSimple.so"
files = [
"PadSimple.cpp",
@ -27,4 +24,4 @@ if padenv['osx64']:
LINKFLAGS = [ '-arch', 'x86_64' ],
)
padenv.SharedLibrary(output, files)
padenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files)

View File

@ -6,6 +6,8 @@ import sys
sys.path.append('../../../SconsTests')
import utils
name = "Plugin_VideoOGL.so"
files = [
'BPStructs.cpp',
'Globals.cpp',
@ -62,7 +64,6 @@ if gfxenv['osx64']:
]
if sys.platform == 'darwin':
platform = 'mac'
# SDL is currently the only way to get video on Mac OS X.
if gfxenv['osx64']:
useSDL = False
@ -78,7 +79,6 @@ if sys.platform == 'darwin':
for framework in [ 'OpenGL', 'Cg' ]
]
else:
platform = 'linux'
# By default, GLX is used on Linux to setup OpenGL, but you can select SDL
# instead if you like, by changing the line below.
tests = {'CheckPKG' : utils.CheckPKG}
@ -111,7 +111,7 @@ gfxenv.Append(
)
gfxenv.SharedLibrary(
'../../../../Binary/%s/Plugins/zeroogl.so' % platform,
'../../../../'+env['plugin_dir']+name,
files,
LIBS = libs + gfxenv['LIBS']
)

View File

@ -3,10 +3,7 @@
Import('env')
import sys
if sys.platform == 'darwin':
output = "../../../../Binary/mac/Plugins/Plugin_Wiimote.so"
else:
output = "../../../../Binary/linux/Plugins/Plugin_Wiimote.so"
name = "Plugin_Wiimote.so"
files = [
"Wiimote.cpp",
@ -26,4 +23,4 @@ else:
LIBS = [ 'common' ],
)
padenv.SharedLibrary(output, files)
padenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files)

View File

@ -3,10 +3,7 @@
Import('env')
import sys
if sys.platform == 'darwin':
output = '../../../../Binary/mac/Plugins/Plugin_nJoy_SDL.so'
else:
output = '../../../../Binary/linux/Plugins/Plugin_nJoy_SDL.so'
name = "Plugin_nJoy_SDL.so"
files = [
'nJoy.cpp',
@ -20,4 +17,4 @@ padenv.Append(
LIBS = [ 'common' ],
)
if not env['osx64']:
padenv.SharedLibrary(output, files)
padenv.SharedLibrary('../../../../'+env['plugin_dir']+name, files)