mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 07:49:19 +01:00
wxWidgets 2.9.2 works with _("") strings for command-line arguments.
Optimize the OS X build for Core 2 CPU's. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6808 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
d7b6766fe2
commit
687d6d2b7e
@ -122,6 +122,7 @@ if sys.platform == 'darwin':
|
|||||||
system = '/System/Library/Frameworks'
|
system = '/System/Library/Frameworks'
|
||||||
env['CCFLAGS'] += ccld
|
env['CCFLAGS'] += ccld
|
||||||
env['CCFLAGS'] += ['-Xarch_i386', '-msse3', '-Xarch_x86_64', '-mssse3']
|
env['CCFLAGS'] += ['-Xarch_i386', '-msse3', '-Xarch_x86_64', '-mssse3']
|
||||||
|
env['CCFLAGS'] += ['-mtune=core2', '-Xarch_x86_64', '-march=core2']
|
||||||
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.5.sdk' + system]
|
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.5.sdk' + system]
|
||||||
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.6.sdk' + system]
|
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.6.sdk' + system]
|
||||||
env['CC'] = "gcc-4.2 -ObjC"
|
env['CC'] = "gcc-4.2 -ObjC"
|
||||||
|
@ -104,98 +104,58 @@ bool DolphinApp::OnInit()
|
|||||||
wxString audioPluginFilename;
|
wxString audioPluginFilename;
|
||||||
|
|
||||||
#if wxUSE_CMDLINE_PARSER // Parse command lines
|
#if wxUSE_CMDLINE_PARSER // Parse command lines
|
||||||
#if wxCHECK_VERSION(2, 9, 0)
|
|
||||||
wxCmdLineEntryDesc cmdLineDesc[] =
|
wxCmdLineEntryDesc cmdLineDesc[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
wxCMD_LINE_SWITCH, "h", "help", "Show this help message",
|
wxCMD_LINE_SWITCH, _("h"), _("help"),
|
||||||
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP
|
|
||||||
},
|
|
||||||
{
|
|
||||||
wxCMD_LINE_SWITCH, "d", "debugger", "Opens the debugger"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
wxCMD_LINE_SWITCH, "l", "logger", "Opens the logger"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
wxCMD_LINE_OPTION, "e", "exec", "Loads the specified file (DOL, ELF, WAD, GCM, ISO)",
|
|
||||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
|
||||||
},
|
|
||||||
{
|
|
||||||
wxCMD_LINE_SWITCH, "b", "batch", "Exit Dolphin with emulator"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
wxCMD_LINE_OPTION, "V", "video_plugin","Specify a video plugin",
|
|
||||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
|
||||||
},
|
|
||||||
{
|
|
||||||
wxCMD_LINE_OPTION, "A", "audio_plugin","Specify an audio plugin",
|
|
||||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
|
||||||
},
|
|
||||||
{
|
|
||||||
wxCMD_LINE_NONE
|
|
||||||
}
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
wxCmdLineEntryDesc cmdLineDesc[] =
|
|
||||||
{
|
|
||||||
{
|
|
||||||
wxCMD_LINE_SWITCH, _T("h"), _T("help"),
|
|
||||||
_("Show this help message"),
|
_("Show this help message"),
|
||||||
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP
|
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
wxCMD_LINE_SWITCH, _T("d"), _T("debugger"), _("Opens the debugger")
|
wxCMD_LINE_SWITCH, _("d"), _("debugger"),
|
||||||
|
_("Opens the debugger")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
wxCMD_LINE_SWITCH, _T("l"), _T("logger"), _("Opens the logger")
|
wxCMD_LINE_SWITCH, _("l"), _("logger"),
|
||||||
|
_("Opens the logger")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
wxCMD_LINE_OPTION, _T("e"), _T("exec"), _("Loads the specified file (DOL, ELF, WAD, GCM, ISO)"),
|
wxCMD_LINE_OPTION, _("e"), _("exec"),
|
||||||
|
_("Loads the specified file (DOL, ELF, WAD, GCM, ISO)"),
|
||||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
wxCMD_LINE_SWITCH, _T("b"), _T("batch"), _("Exit Dolphin with emulator")
|
wxCMD_LINE_SWITCH, _("b"), _("batch"),
|
||||||
|
_("Exit Dolphin with emulator")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
wxCMD_LINE_OPTION, _T("V"), _T("video_plugin"), _("Specify a video plugin"),
|
wxCMD_LINE_OPTION, _("V"), _("video_plugin"),
|
||||||
|
_("Specify a video plugin"),
|
||||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
wxCMD_LINE_OPTION, _T("A"), _T("audio_plugin"), _("Specify an audio plugin"),
|
wxCMD_LINE_OPTION, _("A"), _("audio_plugin"),
|
||||||
|
_("Specify an audio plugin"),
|
||||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
wxCMD_LINE_NONE
|
wxCMD_LINE_NONE
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
// Gets the command line parameters
|
// Gets the command line parameters
|
||||||
wxCmdLineParser parser(cmdLineDesc, argc, argv);
|
wxCmdLineParser parser(cmdLineDesc, argc, argv);
|
||||||
|
|
||||||
if (parser.Parse() != 0)
|
if (parser.Parse() != 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if wxCHECK_VERSION(2, 9, 0)
|
|
||||||
UseDebugger = parser.Found("debugger");
|
|
||||||
UseLogger = parser.Found("logger");
|
|
||||||
LoadFile = parser.Found("exec", &FileToLoad);
|
|
||||||
BatchMode = parser.Found("batch");
|
|
||||||
#else
|
|
||||||
UseDebugger = parser.Found(_T("debugger"));
|
UseDebugger = parser.Found(_T("debugger"));
|
||||||
UseLogger = parser.Found(_T("logger"));
|
UseLogger = parser.Found(_T("logger"));
|
||||||
LoadFile = parser.Found(_T("exec"), &FileToLoad);
|
LoadFile = parser.Found(_T("exec"), &FileToLoad);
|
||||||
BatchMode = parser.Found(_T("batch"));
|
BatchMode = parser.Found(_T("batch"));
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxCHECK_VERSION(2, 9, 0)
|
|
||||||
selectVideoPlugin = parser.Found("video_plugin", &videoPluginFilename);
|
|
||||||
selectAudioPlugin = parser.Found("audio_plugin", &audioPluginFilename);
|
|
||||||
#else
|
|
||||||
selectVideoPlugin = parser.Found(_T("video_plugin"), &videoPluginFilename);
|
selectVideoPlugin = parser.Found(_T("video_plugin"), &videoPluginFilename);
|
||||||
selectAudioPlugin = parser.Found(_T("audio_plugin"), &audioPluginFilename);
|
selectAudioPlugin = parser.Found(_T("audio_plugin"), &audioPluginFilename);
|
||||||
#endif
|
|
||||||
#endif // wxUSE_CMDLINE_PARSER
|
#endif // wxUSE_CMDLINE_PARSER
|
||||||
|
|
||||||
#if defined _DEBUG && defined _WIN32
|
#if defined _DEBUG && defined _WIN32
|
||||||
|
@ -69,7 +69,9 @@ elif sys.platform == 'darwin' and env['HAVE_WX']:
|
|||||||
exeGUI = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin'
|
exeGUI = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin'
|
||||||
|
|
||||||
env.Install('#' + env['prefix'] + '/Dolphin.app/Contents/' +
|
env.Install('#' + env['prefix'] + '/Dolphin.app/Contents/' +
|
||||||
'Library/Frameworks', '#Externals/Cg/Cg.framework')
|
'Library/Frameworks/Cg.framework',
|
||||||
|
source = [ '#Externals/Cg/Cg.framework/Cg',
|
||||||
|
'#Externals/Cg/Cg.framework/Resources' ])
|
||||||
|
|
||||||
env.Install(env['data_dir'], '#Data/Sys')
|
env.Install(env['data_dir'], '#Data/Sys')
|
||||||
env.Install(env['data_dir'], '#Data/User')
|
env.Install(env['data_dir'], '#Data/User')
|
||||||
@ -82,12 +84,12 @@ elif sys.platform == 'darwin' and env['HAVE_WX']:
|
|||||||
for po in po_files:
|
for po in po_files:
|
||||||
index_lo = po.find('Languages/') + len('Languages/')
|
index_lo = po.find('Languages/') + len('Languages/')
|
||||||
index_hi = po.find('.po')
|
index_hi = po.find('.po')
|
||||||
lang = po[index_lo:index_hi]
|
lproj = os.sep + po[index_lo:index_hi] + '.lproj'
|
||||||
mo_dir = env['build_dir'] + '/Languages/' + lang + '.lproj'
|
mo_dir = env['build_dir'] + '/Languages' + lproj
|
||||||
mo_file = mo_dir + '/dolphin-emu.mo'
|
mo_file = mo_dir + '/dolphin-emu.mo'
|
||||||
env.Command('#' + mo_file, po, 'mkdir -p ' + mo_dir +
|
env.Command('#' + mo_file, po, 'mkdir -p ' + mo_dir +
|
||||||
' && msgfmt -o ' + mo_file + ' ' + po)
|
' && ' + msgfmt + ' -o ' + mo_file + ' ' + po)
|
||||||
env.Install(env['data_dir'] + '/' + lang + '.lproj', '#' + mo_file)
|
env.Install(env['data_dir'] + lproj, '#' + mo_file)
|
||||||
|
|
||||||
from plistlib import writePlist
|
from plistlib import writePlist
|
||||||
def createPlist(target, source, env):
|
def createPlist(target, source, env):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user