Cure some bit rot and allow building the standaline memcard manager on OS X.
The app appears broken though. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5650 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
e7f7eff2b6
commit
d937b73d9c
|
@ -1,27 +1,31 @@
|
||||||
# -*- python -*-
|
# -*- python -*-
|
||||||
|
|
||||||
Import('env')
|
Import('env')
|
||||||
import sys
|
import sys
|
||||||
wxenv = env.Clone()
|
wxenv = env.Clone()
|
||||||
|
|
||||||
files = [
|
files = [
|
||||||
]
|
]
|
||||||
|
|
||||||
libs = [
|
libs = [
|
||||||
'common',
|
'common',
|
||||||
]
|
]
|
||||||
|
|
||||||
if wxenv['HAVE_WX']:
|
if wxenv['HAVE_WX']:
|
||||||
files += [
|
files += [
|
||||||
'Externals/MemcardManager/src/mcmMain.cpp',
|
'Externals/MemcardManager/src/mcmMain.cpp',
|
||||||
'Externals/MemcardManager/src/MCMdebug.cpp',
|
'Externals/MemcardManager/src/MCMdebug.cpp',
|
||||||
'Source/Core/DolphinWX/Src/MemcardManager.cpp',
|
'Source/Core/DolphinWX/Src/MemcardManager.cpp',
|
||||||
'Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp',
|
'Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp',
|
||||||
'Source/Core/DolphinWX/Src/WxUtils.cpp',
|
'Source/Core/DolphinWX/Src/WxUtils.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
LIBS = libs
|
LIBS = libs
|
||||||
|
|
||||||
exeGUI = env['binary_dir'] + 'MemcardManager'
|
wxenv.Append(
|
||||||
|
LIBS = libs
|
||||||
wxenv.Program(exeGUI, files)
|
)
|
||||||
|
|
||||||
|
exeGUI = env['binary_dir'] + 'MemcardManager'
|
||||||
|
|
||||||
|
wxenv.Program(exeGUI, files)
|
||||||
|
|
|
@ -1,253 +1,248 @@
|
||||||
# -*- python -*-
|
# -*- python -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
# Home made tests
|
# Home made tests
|
||||||
sys.path.append('SconsTests')
|
sys.path.append('SconsTests')
|
||||||
import wxconfig
|
import wxconfig
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
# Some features need at least SCons 1.2
|
# Some features need at least SCons 1.2
|
||||||
EnsureSConsVersion(1, 2)
|
EnsureSConsVersion(1, 2)
|
||||||
|
|
||||||
warnings = [
|
warnings = [
|
||||||
'all',
|
'all',
|
||||||
'write-strings',
|
'write-strings',
|
||||||
'shadow',
|
'shadow',
|
||||||
'pointer-arith',
|
'pointer-arith',
|
||||||
'packed',
|
'packed',
|
||||||
'no-conversion',
|
'no-conversion',
|
||||||
]
|
]
|
||||||
compileFlags = [
|
compileFlags = [
|
||||||
'-fno-exceptions',
|
'-fno-exceptions',
|
||||||
'-fno-strict-aliasing',
|
'-fno-strict-aliasing',
|
||||||
'-msse2',
|
'-msse2',
|
||||||
#'-fomit-frame-pointer'
|
]
|
||||||
]
|
if sys.platform != 'win32':
|
||||||
if sys.platform != 'win32':
|
compileFlags += [ '-fvisibility=hidden' ]
|
||||||
compileFlags += [ '-fvisibility=hidden' ]
|
|
||||||
|
cppDefines = [
|
||||||
cppDefines = [
|
( '_FILE_OFFSET_BITS', 64),
|
||||||
( '_FILE_OFFSET_BITS', 64),
|
'_LARGEFILE_SOURCE',
|
||||||
'_LARGEFILE_SOURCE',
|
'GCC_HASCLASSVISIBILITY',
|
||||||
'GCC_HASCLASSVISIBILITY',
|
]
|
||||||
]
|
|
||||||
|
basedir = os.getcwd()+ '/'
|
||||||
basedir = os.getcwd()+ '/'
|
|
||||||
|
include_paths = [
|
||||||
include_paths = [
|
|
||||||
basedir + 'Source/Core/Common/Src',
|
basedir + 'Source/Core/Common/Src',
|
||||||
basedir + 'Source/PluginSpecs',
|
basedir + 'Source/PluginSpecs',
|
||||||
basedir + 'Source/Core/DolphinWX/Src',
|
basedir + 'Source/Core/DolphinWX/Src',
|
||||||
basedir + 'Externals/MemcardManager/src',
|
basedir + 'Externals/MemcardManager/src',
|
||||||
]
|
]
|
||||||
|
|
||||||
dirs = [
|
|
||||||
basedir + 'Source/Core/Common/Src',
|
|
||||||
basedir + '.',
|
|
||||||
]
|
|
||||||
|
|
||||||
builders = {}
|
|
||||||
if sys.platform == 'darwin':
|
|
||||||
from plistlib import writePlist
|
|
||||||
def createPlist(target, source, env):
|
|
||||||
properties = {}
|
|
||||||
for srcNode in source:
|
|
||||||
properties.update(srcNode.value)
|
|
||||||
for dstNode in target:
|
|
||||||
writePlist(properties, str(dstNode))
|
|
||||||
builders['Plist'] = Builder(action = createPlist)
|
|
||||||
|
|
||||||
# handle command line options
|
|
||||||
vars = Variables('args.cache')
|
|
||||||
|
|
||||||
vars.AddVariables(
|
|
||||||
BoolVariable('verbose', 'Set for compilation line', False),
|
|
||||||
BoolVariable('lint', 'Set for lint build (extra warnings)', False),
|
|
||||||
EnumVariable('flavor', 'Choose a build flavor', 'release',
|
|
||||||
allowed_values = ('release', 'devel', 'debug', 'fastlog', 'prof'),
|
|
||||||
ignorecase = 2
|
|
||||||
),
|
|
||||||
PathVariable('wxconfig', 'Path to the wxconfig', None),
|
|
||||||
('CC', 'The c compiler', 'gcc'),
|
|
||||||
('CXX', 'The c++ compiler', 'g++'),
|
|
||||||
)
|
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
|
||||||
env = Environment(
|
|
||||||
CPPPATH = include_paths,
|
|
||||||
RPATH = [],
|
|
||||||
LIBS = [],
|
|
||||||
LIBPATH = [],
|
|
||||||
tools = [ 'mingw' ],
|
|
||||||
variables = vars,
|
|
||||||
ENV = os.environ,
|
|
||||||
BUILDERS = builders,
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
env = Environment(
|
|
||||||
CPPPATH = include_paths,
|
|
||||||
RPATH = [],
|
|
||||||
LIBS = [],
|
|
||||||
LIBPATH = [],
|
|
||||||
variables = vars,
|
|
||||||
ENV = {
|
|
||||||
'PATH' : os.environ['PATH'],
|
|
||||||
'HOME' : os.environ['HOME']
|
|
||||||
},
|
|
||||||
BUILDERS = builders,
|
|
||||||
)
|
|
||||||
|
|
||||||
# save the given command line options
|
|
||||||
vars.Save('args.cache', env)
|
|
||||||
|
|
||||||
# verbose compile
|
|
||||||
if not env['verbose']:
|
|
||||||
env['CCCOMSTR'] = "Compiling $TARGET"
|
|
||||||
env['CXXCOMSTR'] = "Compiling $TARGET"
|
|
||||||
env['ARCOMSTR'] = "Archiving $TARGET"
|
|
||||||
env['LINKCOMSTR'] = "Linking $TARGET"
|
|
||||||
env['ASCOMSTR'] = "Assembling $TARGET"
|
|
||||||
env['ASPPCOMSTR'] = "Assembling $TARGET"
|
|
||||||
env['SHCCCOMSTR'] = "Compiling shared $TARGET"
|
|
||||||
env['SHCXXCOMSTR'] = "Compiling shared $TARGET"
|
|
||||||
env['SHLINKCOMSTR'] = "Linking shared $TARGET"
|
|
||||||
env['RANLIBCOMSTR'] = "Indexing $TARGET"
|
|
||||||
|
|
||||||
# build flavour
|
|
||||||
flavour = ARGUMENTS.get('flavor')
|
|
||||||
if (flavour == 'debug'):
|
|
||||||
compileFlags.append('-g')
|
|
||||||
cppDefines.append('_DEBUG') #enables LOGGING
|
|
||||||
# FIXME: this disable wx debugging how do we make it work?
|
|
||||||
cppDefines.append('NDEBUG')
|
|
||||||
elif (flavour == 'devel'):
|
|
||||||
compileFlags.append('-g')
|
|
||||||
elif (flavour == 'fastlog'):
|
|
||||||
compileFlags.append('-O3')
|
|
||||||
cppDefines.append('DEBUGFAST')
|
|
||||||
elif (flavour == 'prof'):
|
|
||||||
compileFlags.append('-O3')
|
|
||||||
compileFlags.append('-g')
|
|
||||||
elif (flavour == 'release'):
|
|
||||||
compileFlags.append('-O3')
|
|
||||||
|
|
||||||
# more warnings
|
|
||||||
if env['lint']:
|
|
||||||
warnings.append('error')
|
|
||||||
warnings.append('unreachable-code')
|
|
||||||
warnings.append('float-equal')
|
|
||||||
|
|
||||||
# add the warnings to the compile flags
|
|
||||||
compileFlags += [ '-W' + warning for warning in warnings ]
|
|
||||||
|
|
||||||
env['CCFLAGS'] = compileFlags
|
|
||||||
if sys.platform == 'win32':
|
|
||||||
env['CXXFLAGS'] = compileFlags
|
|
||||||
else:
|
|
||||||
env['CXXFLAGS'] = compileFlags + [ '-fvisibility-inlines-hidden' ]
|
|
||||||
env['CPPDEFINES'] = cppDefines
|
|
||||||
|
|
||||||
# Configuration tests section
|
|
||||||
tests = {'CheckWXConfig' : wxconfig.CheckWXConfig,
|
|
||||||
'CheckPKGConfig' : utils.CheckPKGConfig,
|
|
||||||
'CheckPKG' : utils.CheckPKG,
|
|
||||||
}
|
|
||||||
|
|
||||||
#object files
|
|
||||||
env['build_dir'] = os.path.join(basedir, 'Build', platform.system() + '-' + 'MemCardManager' + os.sep)
|
|
||||||
|
|
||||||
|
|
||||||
VariantDir(env['build_dir'], '.', duplicate=0)
|
|
||||||
|
|
||||||
conf = env.Configure(custom_tests = tests,
|
|
||||||
config_h="Source/Core/Common/Src/Config.h")
|
|
||||||
|
|
||||||
if not conf.CheckPKGConfig('0.15.0'):
|
|
||||||
print "Can't find pkg-config, some tests will fail"
|
|
||||||
|
|
||||||
|
|
||||||
|
dirs = [
|
||||||
|
basedir + 'Source/Core/Common/Src',
|
||||||
|
basedir + '.'
|
||||||
|
]
|
||||||
|
|
||||||
|
builders = {}
|
||||||
env['HAVE_X11'] = conf.CheckPKG('x11')
|
if sys.platform == 'darwin':
|
||||||
|
from plistlib import writePlist
|
||||||
# handling wx flags CCFLAGS should be created before
|
def createPlist(target, source, env):
|
||||||
wxmods = ['adv', 'core', 'base']
|
properties = {}
|
||||||
env['USE_WX'] = 0
|
for srcNode in source:
|
||||||
|
properties.update(srcNode.value)
|
||||||
env['HAVE_WX'] = conf.CheckWXConfig('2.8', wxmods, 0)
|
for dstNode in target:
|
||||||
|
writePlist(properties, str(dstNode))
|
||||||
|
builders['Plist'] = Builder(action = createPlist)
|
||||||
conf.Define('HAVE_WX', env['HAVE_WX'])
|
|
||||||
conf.Define('USE_WX', env['USE_WX'])
|
|
||||||
conf.Define('HAVE_X11', env['HAVE_X11'])
|
|
||||||
|
|
||||||
|
# Handle command line options
|
||||||
# profile
|
vars = Variables('args.cache')
|
||||||
env['USE_OPROFILE'] = 0
|
|
||||||
if (flavour == 'prof'):
|
vars.AddVariables(
|
||||||
proflibs = [ '/usr/lib/oprofile', '/usr/local/lib/oprofile' ]
|
BoolVariable('verbose', 'Set for compilation line', False),
|
||||||
env['LIBPATH'].append(proflibs)
|
BoolVariable('lint', 'Set for lint build (extra warnings)', False),
|
||||||
env['RPATH'].append(proflibs)
|
EnumVariable('flavor', 'Choose a build flavor', 'release',
|
||||||
if conf.CheckPKG('opagent'):
|
allowed_values = ('release','devel','debug','fastlog','prof'),
|
||||||
env['USE_OPROFILE'] = 1
|
ignorecase = 2
|
||||||
else:
|
),
|
||||||
print "Can't build prof without oprofile, disabling"
|
PathVariable('wxconfig', 'Path to the wxconfig', None),
|
||||||
|
('CC', 'The c compiler', 'gcc'),
|
||||||
conf.Define('USE_OPROFILE', env['USE_OPROFILE'])
|
('CXX', 'The c++ compiler', 'g++'),
|
||||||
# After all configuration tests are done
|
)
|
||||||
conf.Finish()
|
|
||||||
|
if sys.platform == 'win32':
|
||||||
#wx windows flags
|
env = Environment(
|
||||||
if env['HAVE_WX']:
|
CPPPATH = include_paths,
|
||||||
wxconfig.ParseWXConfig(env)
|
RPATH = [],
|
||||||
else:
|
LIBS = [],
|
||||||
print "WX not found or disabled, not building GUI"
|
LIBPATH = [],
|
||||||
|
tools = [ 'mingw' ],
|
||||||
# add methods from utils to env
|
variables = vars,
|
||||||
env.AddMethod(utils.filterWarnings)
|
ENV = os.environ,
|
||||||
|
BUILDERS = builders,
|
||||||
# Where do we run from
|
)
|
||||||
env['base_dir'] = os.getcwd()+ '/'
|
else:
|
||||||
|
env = Environment(
|
||||||
# install paths
|
CPPPATH = include_paths,
|
||||||
extra=''
|
RPATH = [],
|
||||||
if flavour == 'debug':
|
LIBS = [],
|
||||||
extra = '-debug'
|
LIBPATH = [],
|
||||||
elif flavour == 'prof':
|
variables = vars,
|
||||||
extra = '-prof'
|
ENV = {
|
||||||
|
'PATH' : os.environ['PATH'],
|
||||||
# TODO: support global install
|
'HOME' : os.environ['HOME']
|
||||||
env['prefix'] = os.path.join(env['base_dir'] + 'Binary', 'MemCardManager' + extra +os.sep)
|
},
|
||||||
#TODO add bin
|
BUILDERS = builders,
|
||||||
env['binary_dir'] = env['prefix']
|
)
|
||||||
|
|
||||||
# static libs goes here
|
# Save the given command line options
|
||||||
|
vars.Save('args.cache', env)
|
||||||
|
|
||||||
|
# Verbose compile
|
||||||
|
if not env['verbose']:
|
||||||
|
env['CCCOMSTR'] = "Compiling $TARGET"
|
||||||
|
env['CXXCOMSTR'] = "Compiling $TARGET"
|
||||||
|
env['ARCOMSTR'] = "Archiving $TARGET"
|
||||||
|
env['LINKCOMSTR'] = "Linking $TARGET"
|
||||||
|
env['ASCOMSTR'] = "Assembling $TARGET"
|
||||||
|
env['ASPPCOMSTR'] = "Assembling $TARGET"
|
||||||
|
env['SHCCCOMSTR'] = "Compiling shared $TARGET"
|
||||||
|
env['SHCXXCOMSTR'] = "Compiling shared $TARGET"
|
||||||
|
env['SHLINKCOMSTR'] = "Linking shared $TARGET"
|
||||||
|
env['RANLIBCOMSTR'] = "Indexing $TARGET"
|
||||||
|
|
||||||
|
# Build flavour
|
||||||
|
flavour = env['flavor']
|
||||||
|
if (flavour == 'debug'):
|
||||||
|
compileFlags.append('-ggdb')
|
||||||
|
cppDefines.append('_DEBUG') #enables LOGGING
|
||||||
|
# FIXME: this disable wx debugging how do we make it work?
|
||||||
|
cppDefines.append('NDEBUG')
|
||||||
|
elif (flavour == 'devel'):
|
||||||
|
compileFlags.append('-ggdb')
|
||||||
|
elif (flavour == 'fastlog'):
|
||||||
|
compileFlags.append('-O3')
|
||||||
|
cppDefines.append('DEBUGFAST')
|
||||||
|
elif (flavour == 'prof'):
|
||||||
|
compileFlags.append('-O3')
|
||||||
|
compileFlags.append('-ggdb')
|
||||||
|
elif (flavour == 'release'):
|
||||||
|
compileFlags.append('-O3')
|
||||||
|
|
||||||
|
# More warnings
|
||||||
|
if env['lint']:
|
||||||
|
warnings.append('error')
|
||||||
|
# Should check for the availability of these (in GCC 4.3 or newer)
|
||||||
|
if sys.platform != 'darwin':
|
||||||
|
warnings.append('no-array-bounds')
|
||||||
|
warnings.append('no-unused-result')
|
||||||
|
# wxWidgets causes too many warnings with these
|
||||||
|
#warnings.append('unreachable-code')
|
||||||
|
#warnings.append('float-equal')
|
||||||
|
|
||||||
|
# Add the warnings to the compile flags
|
||||||
|
compileFlags += [ '-W' + warning for warning in warnings ]
|
||||||
|
|
||||||
|
env['CCFLAGS'] = compileFlags
|
||||||
|
if sys.platform == 'win32':
|
||||||
|
env['CXXFLAGS'] = compileFlags
|
||||||
|
else:
|
||||||
|
env['CXXFLAGS'] = compileFlags + [ '-fvisibility-inlines-hidden' ]
|
||||||
|
env['CPPDEFINES'] = cppDefines
|
||||||
|
|
||||||
|
# Configuration tests section
|
||||||
|
tests = {'CheckWXConfig' : wxconfig.CheckWXConfig,
|
||||||
|
'CheckPKGConfig' : utils.CheckPKGConfig,
|
||||||
|
'CheckPKG' : utils.CheckPKG,
|
||||||
|
}
|
||||||
|
|
||||||
|
# Object files
|
||||||
|
env['build_dir'] = os.path.join(basedir, 'Build',
|
||||||
|
platform.system() + '-' + 'MemCardManager' + os.sep)
|
||||||
|
|
||||||
|
conf = env.Configure(custom_tests = tests,
|
||||||
|
config_h="Source/Core/Common/Src/Config.h")
|
||||||
|
|
||||||
|
if not conf.CheckPKGConfig('0.15.0'):
|
||||||
|
print "Can't find pkg-config, some tests will fail"
|
||||||
|
|
||||||
|
# OS X specifics
|
||||||
|
if sys.platform == 'darwin':
|
||||||
|
env['HAVE_X11'] = 0
|
||||||
|
compileFlags.append('-mmacosx-version-min=10.5')
|
||||||
|
conf.Define('MAP_32BIT', 0)
|
||||||
|
else:
|
||||||
|
env['HAVE_X11'] = conf.CheckPKG('x11')
|
||||||
|
|
||||||
|
# Handling wx flags CCFLAGS should be created before
|
||||||
|
wxmods = ['adv', 'core', 'base']
|
||||||
|
env['USE_WX'] = 0
|
||||||
|
|
||||||
|
env['HAVE_WX'] = conf.CheckWXConfig('2.8', wxmods, 0)
|
||||||
|
|
||||||
|
conf.Define('HAVE_WX', env['HAVE_WX'])
|
||||||
|
conf.Define('USE_WX', env['USE_WX'])
|
||||||
|
conf.Define('HAVE_X11', env['HAVE_X11'])
|
||||||
|
|
||||||
|
# Profile
|
||||||
|
env['USE_OPROFILE'] = 0
|
||||||
|
if (flavour == 'prof'):
|
||||||
|
proflibs = [ '/usr/lib/oprofile', '/usr/local/lib/oprofile' ]
|
||||||
|
env['LIBPATH'].append(proflibs)
|
||||||
|
env['RPATH'].append(proflibs)
|
||||||
|
if conf.CheckPKG('opagent'):
|
||||||
|
env['USE_OPROFILE'] = 1
|
||||||
|
else:
|
||||||
|
print "Can't build prof without oprofile, disabling"
|
||||||
|
|
||||||
|
conf.Define('USE_OPROFILE', env['USE_OPROFILE'])
|
||||||
|
# After all configuration tests are done
|
||||||
|
conf.Finish()
|
||||||
|
|
||||||
|
if env['HAVE_WX']:
|
||||||
|
wxconfig.ParseWXConfig(env)
|
||||||
|
else:
|
||||||
|
print "WX not found or disabled, not building GUI"
|
||||||
|
|
||||||
|
# Install paths
|
||||||
|
extra=''
|
||||||
|
if flavour == 'debug':
|
||||||
|
extra = '-debug'
|
||||||
|
elif flavour == 'prof':
|
||||||
|
extra = '-prof'
|
||||||
|
|
||||||
|
# TODO: support global install
|
||||||
|
env['prefix'] = os.path.join(env['base_dir'] + 'Binary',
|
||||||
|
'MemCardManager' + extra + os.sep)
|
||||||
|
# TODO: add bin
|
||||||
|
env['binary_dir'] = env['prefix']
|
||||||
|
|
||||||
|
# Static libs goes here
|
||||||
env['local_libs'] = env['build_dir'] + os.sep + 'libs' + os.sep
|
env['local_libs'] = env['build_dir'] + os.sep + 'libs' + os.sep
|
||||||
|
|
||||||
env['LIBPATH'].append(env['local_libs'])
|
env['LIBPATH'].append(env['local_libs'])
|
||||||
|
|
||||||
# print a nice progress indication when not compiling
|
# Print a nice progress indication when not compiling
|
||||||
Progress(['-\r', '\\\r', '|\r', '/\r'], interval = 5)
|
Progress(['-\r', '\\\r', '|\r', '/\r'], interval = 5)
|
||||||
|
|
||||||
# die on unknown variables
|
# Die on unknown variables
|
||||||
unknown = vars.UnknownVariables()
|
unknown = vars.UnknownVariables()
|
||||||
if unknown:
|
if unknown:
|
||||||
print "Unknown variables:", unknown.keys()
|
print "Unknown variables:", unknown.keys()
|
||||||
Exit(1)
|
Exit(1)
|
||||||
|
|
||||||
# generate help
|
# Generate help
|
||||||
Help(vars.GenerateHelpText(env))
|
Help(vars.GenerateHelpText(env))
|
||||||
|
|
||||||
Export('env')
|
Export('env')
|
||||||
|
|
||||||
for subdir in dirs:
|
for subdir in dirs:
|
||||||
SConscript(
|
SConscript(
|
||||||
subdir + os.sep + 'SConscript',
|
subdir + os.sep + 'SConscript',
|
||||||
variant_dir = env[ 'build_dir' ] + subdir + os.sep,
|
variant_dir = env[ 'build_dir' ] + subdir + os.sep,
|
||||||
duplicate=0
|
duplicate=0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -55,9 +55,9 @@ void CMemcardManagerDebug::Init_ChildControls()
|
||||||
m_Notebook_MCMD->AddPage(m_Tab_BAT, _T("Bat"));
|
m_Notebook_MCMD->AddPage(m_Tab_BAT, _T("Bat"));
|
||||||
m_Notebook_MCMD->AddPage(m_Tab_BAT_b, _T("Bat_b"));
|
m_Notebook_MCMD->AddPage(m_Tab_BAT_b, _T("Bat_b"));
|
||||||
|
|
||||||
wxBoxSizer* sMain = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* wMain = new wxBoxSizer(wxVERTICAL);
|
||||||
sMain->Add(m_Notebook_MCMD, 1, wxEXPAND|wxALL, 5);
|
wMain->Add(m_Notebook_MCMD, 1, wxEXPAND|wxALL, 5);
|
||||||
SetSizer(sMain);
|
SetSizer(wMain);
|
||||||
Layout();
|
Layout();
|
||||||
Fit();
|
Fit();
|
||||||
}
|
}
|
||||||
|
@ -68,10 +68,10 @@ void CMemcardManagerDebug::OnClose(wxCloseEvent& WXUNUSED (event))
|
||||||
|
|
||||||
void CMemcardManagerDebug::Init_HDR()
|
void CMemcardManagerDebug::Init_HDR()
|
||||||
{
|
{
|
||||||
wxBoxSizer *sMain;
|
wxBoxSizer *wMain;
|
||||||
wxStaticBoxSizer *sHDR[2];
|
wxStaticBoxSizer *sHDR[2];
|
||||||
|
|
||||||
sMain = new wxBoxSizer(wxHORIZONTAL);
|
wMain = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sHDR[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_HDR, wxT("MEMCARD:A"));
|
sHDR[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_HDR, wxT("MEMCARD:A"));
|
||||||
sHDR[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_HDR, wxT("MEMCARD:B"));
|
sHDR[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_HDR, wxT("MEMCARD:B"));
|
||||||
|
|
||||||
|
@ -142,9 +142,9 @@ void CMemcardManagerDebug::Init_HDR()
|
||||||
sOtPaths[i]->Add(t_HDR_CheckSum2[i], wxGBPosition(10, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sOtPaths[i]->Add(t_HDR_CheckSum2[i], wxGBPosition(10, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
|
|
||||||
sHDR[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5);
|
sHDR[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5);
|
||||||
sMain->Add(sHDR[i], 0, wxEXPAND|wxALL, 1);
|
wMain->Add(sHDR[i], 0, wxEXPAND|wxALL, 1);
|
||||||
}
|
}
|
||||||
m_Tab_HDR->SetSizer(sMain);
|
m_Tab_HDR->SetSizer(wMain);
|
||||||
m_Tab_HDR->Layout();
|
m_Tab_HDR->Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,9 +221,9 @@ void CMemcardManagerDebug::updateHDRtab(int card)
|
||||||
|
|
||||||
void CMemcardManagerDebug::Init_DIR()
|
void CMemcardManagerDebug::Init_DIR()
|
||||||
{
|
{
|
||||||
wxBoxSizer *sMain;
|
wxBoxSizer *wMain;
|
||||||
wxStaticBoxSizer *sDIR[2];
|
wxStaticBoxSizer *sDIR[2];
|
||||||
sMain = new wxBoxSizer(wxHORIZONTAL);
|
wMain = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sDIR[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR, wxT("MEMCARD:A"));
|
sDIR[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR, wxT("MEMCARD:A"));
|
||||||
sDIR[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR, wxT("MEMCARD:B"));
|
sDIR[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR, wxT("MEMCARD:B"));
|
||||||
|
|
||||||
|
@ -253,10 +253,10 @@ void CMemcardManagerDebug::Init_DIR()
|
||||||
|
|
||||||
|
|
||||||
sDIR[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5);
|
sDIR[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5);
|
||||||
sMain->Add(sDIR[i], 0, wxEXPAND|wxALL, 1);
|
wMain->Add(sDIR[i], 0, wxEXPAND|wxALL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Tab_DIR->SetSizer(sMain);
|
m_Tab_DIR->SetSizer(wMain);
|
||||||
m_Tab_DIR->Layout();
|
m_Tab_DIR->Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,9 +284,9 @@ void CMemcardManagerDebug::updateDIRtab(int card)
|
||||||
|
|
||||||
void CMemcardManagerDebug::Init_DIR_b()
|
void CMemcardManagerDebug::Init_DIR_b()
|
||||||
{
|
{
|
||||||
wxBoxSizer *sMain;
|
wxBoxSizer *wMain;
|
||||||
wxStaticBoxSizer *sDIR_b[2];
|
wxStaticBoxSizer *sDIR_b[2];
|
||||||
sMain = new wxBoxSizer(wxHORIZONTAL);
|
wMain = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sDIR_b[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR_b, wxT("MEMCARD:A"));
|
sDIR_b[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR_b, wxT("MEMCARD:A"));
|
||||||
sDIR_b[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR_b, wxT("MEMCARD:B"));
|
sDIR_b[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_DIR_b, wxT("MEMCARD:B"));
|
||||||
|
|
||||||
|
@ -315,9 +315,9 @@ void CMemcardManagerDebug::Init_DIR_b()
|
||||||
sOtPaths[i]->Add(t_DIR_b_CheckSum2[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sOtPaths[i]->Add(t_DIR_b_CheckSum2[i], wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
|
|
||||||
sDIR_b[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5);
|
sDIR_b[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5);
|
||||||
sMain->Add(sDIR_b[i], 0, wxEXPAND|wxALL, 1);
|
wMain->Add(sDIR_b[i], 0, wxEXPAND|wxALL, 1);
|
||||||
}
|
}
|
||||||
m_Tab_DIR_b->SetSizer(sMain);
|
m_Tab_DIR_b->SetSizer(wMain);
|
||||||
m_Tab_DIR_b->Layout();
|
m_Tab_DIR_b->Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,9 +341,9 @@ void CMemcardManagerDebug::updateDIRBtab(int card)
|
||||||
|
|
||||||
void CMemcardManagerDebug::Init_BAT()
|
void CMemcardManagerDebug::Init_BAT()
|
||||||
{
|
{
|
||||||
wxBoxSizer *sMain;
|
wxBoxSizer *wMain;
|
||||||
wxStaticBoxSizer *sBAT[4];
|
wxStaticBoxSizer *sBAT[4];
|
||||||
sMain = new wxBoxSizer(wxHORIZONTAL);
|
wMain = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sBAT[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT, wxT("MEMCARD:A"));
|
sBAT[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT, wxT("MEMCARD:A"));
|
||||||
sBAT[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT, wxT("MEMCARD:B"));
|
sBAT[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT, wxT("MEMCARD:B"));
|
||||||
sBAT[2] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT, wxT("MEMCARD:A MAP"));
|
sBAT[2] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT, wxT("MEMCARD:A MAP"));
|
||||||
|
@ -386,7 +386,7 @@ void CMemcardManagerDebug::Init_BAT()
|
||||||
|
|
||||||
|
|
||||||
sBAT[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5);
|
sBAT[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5);
|
||||||
sMain->Add(sBAT[i], 0, wxEXPAND|wxALL, 1);
|
wMain->Add(sBAT[i], 0, wxEXPAND|wxALL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int k=2;k<=3;k++) //256
|
for (int k=2;k<=3;k++) //256
|
||||||
|
@ -402,10 +402,10 @@ void CMemcardManagerDebug::Init_BAT()
|
||||||
}
|
}
|
||||||
|
|
||||||
sBAT[k]->Add(sOtPaths[k], 0, wxEXPAND|wxALL, 5);
|
sBAT[k]->Add(sOtPaths[k], 0, wxEXPAND|wxALL, 5);
|
||||||
sMain->Add(sBAT[k], 0, wxEXPAND|wxALL, 1);
|
wMain->Add(sBAT[k], 0, wxEXPAND|wxALL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Tab_BAT->SetSizer(sMain);
|
m_Tab_BAT->SetSizer(wMain);
|
||||||
m_Tab_BAT->Layout();
|
m_Tab_BAT->Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,9 +449,9 @@ void CMemcardManagerDebug::updateBATtab(int card)
|
||||||
|
|
||||||
void CMemcardManagerDebug::Init_BAT_b()
|
void CMemcardManagerDebug::Init_BAT_b()
|
||||||
{
|
{
|
||||||
wxBoxSizer *sMain;
|
wxBoxSizer *wMain;
|
||||||
wxStaticBoxSizer *sBAT_b[2];
|
wxStaticBoxSizer *sBAT_b[2];
|
||||||
sMain = new wxBoxSizer(wxHORIZONTAL);
|
wMain = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sBAT_b[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT_b, wxT("MEMCARD:A"));
|
sBAT_b[0] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT_b, wxT("MEMCARD:A"));
|
||||||
sBAT_b[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT_b, wxT("MEMCARD:B"));
|
sBAT_b[1] = new wxStaticBoxSizer(wxVERTICAL, m_Tab_BAT_b, wxT("MEMCARD:B"));
|
||||||
|
|
||||||
|
@ -490,10 +490,10 @@ void CMemcardManagerDebug::Init_BAT_b()
|
||||||
sOtPaths[i]->Add(t_BAT_b_LastAllocated[i], wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
sOtPaths[i]->Add(t_BAT_b_LastAllocated[i], wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||||
|
|
||||||
sBAT_b[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5);
|
sBAT_b[i]->Add(sOtPaths[i], 0, wxEXPAND|wxALL, 5);
|
||||||
sMain->Add(sBAT_b[i], 0, wxEXPAND|wxALL, 1);
|
wMain->Add(sBAT_b[i], 0, wxEXPAND|wxALL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_Tab_BAT_b->SetSizer(sMain);
|
m_Tab_BAT_b->SetSizer(wMain);
|
||||||
m_Tab_BAT_b->Layout();
|
m_Tab_BAT_b->Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
#ifndef _MCM__
|
#ifndef _MCM__
|
||||||
#define _MCM__
|
#define _MCM__
|
||||||
|
|
||||||
void __Log(int logNumber, const char* text, ...){logNumber; text;}
|
void __Log(int logNumber, const char* text, ...)
|
||||||
void __Logv(int log, int v, const char *format, ...){log; v; format;}
|
{(void)logNumber; (void)text;}
|
||||||
|
void __Logv(int log, int v, const char *format, ...)
|
||||||
|
{(void)log; (void)v; (void)format;}
|
||||||
|
|
||||||
#include "MemcardManager.h"
|
#include "MemcardManager.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
|
|
Loading…
Reference in New Issue