diff --git a/.gitmodules b/.gitmodules index db77456b2..31ad04ace 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "third_party/ninja"] path = third_party/ninja url = https://chromium.googlesource.com/external/martine/ninja +[submodule "third_party/wxWidgets"] + path = third_party/wxWidgets + url = https://github.com/wxWidgets/wxWidgets.git diff --git a/src/xdb/sources.gypi b/src/xdb/sources.gypi new file mode 100644 index 000000000..f5ffe8297 --- /dev/null +++ b/src/xdb/sources.gypi @@ -0,0 +1,10 @@ +# Copyright 2014 Ben Vanik. All Rights Reserved. +{ + 'sources': [ + 'xdb.cc', + 'xdb.h', + ], + + 'includes': [ + ], +} diff --git a/src/xdb/xdb.cc b/src/xdb/xdb.cc new file mode 100644 index 000000000..f6d955728 --- /dev/null +++ b/src/xdb/xdb.cc @@ -0,0 +1,13 @@ +/** + ****************************************************************************** + * Xenia : Xbox 360 Emulator Research Project * + ****************************************************************************** + * Copyright 2014 Ben Vanik. All rights reserved. * + * Released under the BSD license - see LICENSE in the root for more details. * + ****************************************************************************** + */ + +#include + +void test() { +} diff --git a/src/xdb/xdb.h b/src/xdb/xdb.h new file mode 100644 index 000000000..dbe6052ac --- /dev/null +++ b/src/xdb/xdb.h @@ -0,0 +1,18 @@ +/** + ****************************************************************************** + * Xenia : Xbox 360 Emulator Research Project * + ****************************************************************************** + * Copyright 2014 Ben Vanik. All rights reserved. * + * Released under the BSD license - see LICENSE in the root for more details. * + ****************************************************************************** + */ + +#ifndef XDB_H_ +#define XDB_H_ + +#include +#include +#include +#include + +#endif // XDB_H_ diff --git a/third_party/wxWidgets b/third_party/wxWidgets new file mode 160000 index 000000000..ae2f2a1ec --- /dev/null +++ b/third_party/wxWidgets @@ -0,0 +1 @@ +Subproject commit ae2f2a1ece3b62a734b1c40d0d989fad49e075dc diff --git a/tools/tools.gypi b/tools/tools.gypi index 07a980f97..ab8e44c99 100644 --- a/tools/tools.gypi +++ b/tools/tools.gypi @@ -2,6 +2,7 @@ { 'includes': [ 'alloy-sandbox/alloy-sandbox.gypi', + 'xenia-debug/xenia-debug.gypi', 'xenia-run/xenia-run.gypi', #'xenia-test/xenia-test.gypi', ], diff --git a/tools/xenia-debug/xenia-debug.cc b/tools/xenia-debug/xenia-debug.cc new file mode 100644 index 000000000..630491c20 --- /dev/null +++ b/tools/xenia-debug/xenia-debug.cc @@ -0,0 +1,34 @@ +/** + ****************************************************************************** + * Xenia : Xbox 360 Emulator Research Project * + ****************************************************************************** + * Copyright 2014 Ben Vanik. All rights reserved. * + * Released under the BSD license - see LICENSE in the root for more details. * + ****************************************************************************** + */ + +#include + +#include + + +//using namespace xdb; + + +int xenia_debug(int argc, xechar_t** argv) { + int result_code = 1; + + // Create platform abstraction layer. + xe_pal_options_t pal_options; + xe_zero_struct(&pal_options, sizeof(pal_options)); + XEEXPECTZERO(xe_pal_init(pal_options)); + + + result_code = 0; +XECLEANUP: + if (result_code) { + XEFATAL("Failed to launch debugger: %d", result_code); + } + return result_code; +} +XE_MAIN_WINDOW_THUNK(xenia_debug, XETEXT("xenia-debug"), "xenia-debug"); diff --git a/tools/xenia-debug/xenia-debug.gypi b/tools/xenia-debug/xenia-debug.gypi new file mode 100644 index 000000000..14ef1c990 --- /dev/null +++ b/tools/xenia-debug/xenia-debug.gypi @@ -0,0 +1,28 @@ +# Copyright 2013 Ben Vanik. All Rights Reserved. +{ + 'targets': [ + { + 'target_name': 'xenia-debug', + 'type': 'executable', + + 'msvs_settings': { + 'VCLinkerTool': { + 'SubSystem': '2' + } + }, + + 'dependencies': [ + 'xdb', + 'xenia', + ], + + 'include_dirs': [ + '.', + ], + + 'sources': [ + 'xenia-debug.cc', + ], + }, + ], +} diff --git a/tools/xenia-run/xenia-run.gypi b/tools/xenia-run/xenia-run.gypi index 6b9ba5c23..150cb062f 100644 --- a/tools/xenia-run/xenia-run.gypi +++ b/tools/xenia-run/xenia-run.gypi @@ -7,7 +7,7 @@ 'msvs_settings': { 'VCLinkerTool': { - #'SubSystem': '2' + 'SubSystem': '2' } }, diff --git a/xenia-build.py b/xenia-build.py index ff5fd32d6..702dcfdb4 100755 --- a/xenia-build.py +++ b/xenia-build.py @@ -282,6 +282,24 @@ class SetupCommand(Command): shell_call('python third_party/ninja/bootstrap.py ' + extra_args) print('') + # wxWidgets. + print('- wxWidgets...') + os.chdir('third_party/wxWidgets') + if sys.platform == 'win32': + shutil.copyfile('include/wx/msw/setup0.h', 'include/wx/msw/setup.h') + shell_call(' '.join([ + 'msbuild', + 'build\msw\wx_vc10.sln', + '/nologo', + '/verbosity:quiet', + '/p:Configuration=Release', + '/p:Platform=x64', + ])) + else: + print('WARNING: wxWidgets build not supported yet'); + os.chdir(cwd) + print('') + # Binutils. # TODO(benvanik): disable on Windows print('- binutils...') diff --git a/xenia.gyp b/xenia.gyp index 06ad0d428..ea353f570 100644 --- a/xenia.gyp +++ b/xenia.gyp @@ -444,5 +444,78 @@ 'src/xenia/sources.gypi', ], }, + + { + 'target_name': 'xdb', + 'product_name': 'xdb', + 'type': 'static_library', + + 'dependencies': [ + 'gflags', + 'xenia', + ], + 'export_dependent_settings': [ + 'gflags', + 'xenia', + ], + + 'direct_dependent_settings': { + 'include_dirs': [ + 'src/', + 'third_party/wxWidgets/include/', + ], + + 'target_conditions': [ + ['_type=="shared_library"', { + 'cflags': [ + ], + }], + ['_type=="executable"', { + 'conditions': [ + ['OS == "win"', { + 'libraries': [ + 'kernel32', + 'user32', + 'ole32', + 'wsock32', + 'Ws2_32', + 'Shell32', + # TODO(benvanik): root dir + '../../third_party/wxWidgets/lib/vc_x64_lib/wxbase31u', + '../../third_party/wxWidgets/lib/vc_x64_lib/wxmsw31u_core', + '../../third_party/wxWidgets/lib/vc_x64_lib/wxmsw31u_aui', + '../../third_party/wxWidgets/lib/vc_x64_lib/wxmsw31u_stc', + ], + }], + ['OS == "mac"', { + 'xcode_settings': { + 'OTHER_LDFLAGS': [ + ], + }, + }], + ['OS == "linux"', { + 'libraries': [ + '-lpthread', + '-ldl', + ], + }], + ], + }], + ], + }, + + 'cflags': [ + ], + + 'include_dirs': [ + '.', + 'src/', + 'third_party/wxWidgets/include/', + ], + + 'includes': [ + 'src/xdb/sources.gypi', + ], + }, ], }