Skeleton for xdb.

This commit is contained in:
Ben Vanik 2014-08-09 10:32:16 -07:00
parent ff8361e5a9
commit cebf595958
11 changed files with 200 additions and 1 deletions

3
.gitmodules vendored
View File

@ -16,3 +16,6 @@
[submodule "third_party/ninja"] [submodule "third_party/ninja"]
path = third_party/ninja path = third_party/ninja
url = https://chromium.googlesource.com/external/martine/ninja url = https://chromium.googlesource.com/external/martine/ninja
[submodule "third_party/wxWidgets"]
path = third_party/wxWidgets
url = https://github.com/wxWidgets/wxWidgets.git

10
src/xdb/sources.gypi Normal file
View File

@ -0,0 +1,10 @@
# Copyright 2014 Ben Vanik. All Rights Reserved.
{
'sources': [
'xdb.cc',
'xdb.h',
],
'includes': [
],
}

13
src/xdb/xdb.cc Normal file
View File

@ -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 <xdb/xdb.h>
void test() {
}

18
src/xdb/xdb.h Normal file
View File

@ -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 <xenia/common.h>
#include <xenia/core.h>
#include <xenia/emulator.h>
#include <xenia/xbox.h>
#endif // XDB_H_

1
third_party/wxWidgets vendored Submodule

@ -0,0 +1 @@
Subproject commit ae2f2a1ece3b62a734b1c40d0d989fad49e075dc

View File

@ -2,6 +2,7 @@
{ {
'includes': [ 'includes': [
'alloy-sandbox/alloy-sandbox.gypi', 'alloy-sandbox/alloy-sandbox.gypi',
'xenia-debug/xenia-debug.gypi',
'xenia-run/xenia-run.gypi', 'xenia-run/xenia-run.gypi',
#'xenia-test/xenia-test.gypi', #'xenia-test/xenia-test.gypi',
], ],

View File

@ -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 <xdb/xdb.h>
#include <gflags/gflags.h>
//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");

View File

@ -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',
],
},
],
}

View File

@ -7,7 +7,7 @@
'msvs_settings': { 'msvs_settings': {
'VCLinkerTool': { 'VCLinkerTool': {
#'SubSystem': '2' 'SubSystem': '2'
} }
}, },

View File

@ -282,6 +282,24 @@ class SetupCommand(Command):
shell_call('python third_party/ninja/bootstrap.py ' + extra_args) shell_call('python third_party/ninja/bootstrap.py ' + extra_args)
print('') 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. # Binutils.
# TODO(benvanik): disable on Windows # TODO(benvanik): disable on Windows
print('- binutils...') print('- binutils...')

View File

@ -444,5 +444,78 @@
'src/xenia/sources.gypi', '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',
],
},
], ],
} }