diff --git a/.gitmodules b/.gitmodules index 88e7cbc77..58ca605a0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,10 +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 - ignore = dirty [submodule "third_party/catch"] path = third_party/catch url = https://github.com/philsquared/Catch.git diff --git a/src/xdb/sources.gypi b/src/xdb/sources.gypi index 8f052078f..b8b6c0c9b 100644 --- a/src/xdb/sources.gypi +++ b/src/xdb/sources.gypi @@ -20,6 +20,5 @@ 'includes': [ 'sym/sources.gypi', - 'ui/sources.gypi', ], } diff --git a/src/xdb/ui/main_frame.cc b/src/xdb/ui/main_frame.cc deleted file mode 100644 index 08453647f..000000000 --- a/src/xdb/ui/main_frame.cc +++ /dev/null @@ -1,44 +0,0 @@ -/** - ****************************************************************************** - * 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 - -namespace xdb { -namespace ui { - -MainFrame::MainFrame(std::unique_ptr debug_target) - : MainFrameBase(nullptr), debug_target_(std::move(debug_target)) { - cursor_ = std::move(debug_target_->CreateCursor()); - cursor_->end_of_stream.AddListener([]() { - XELOGI("eos"); - }); - cursor_->module_loaded.AddListener([](Module* module) { - // - XELOGI("mod load"); - }); - cursor_->module_unloaded.AddListener([](Module* module) { - // - XELOGI("mod unload"); - }); - cursor_->thread_created.AddListener([](Thread* thread) { - // - XELOGI("thread create"); - }); - cursor_->thread_exited.AddListener([](Thread* thread) { - // - XELOGI("thread exit"); - }); - cursor_->Continue(); -} - -void MainFrame::OnIdle(wxIdleEvent& event) { -} - -} // namespace ui -} // namespace xdb diff --git a/src/xdb/ui/main_frame.h b/src/xdb/ui/main_frame.h deleted file mode 100644 index eae87642d..000000000 --- a/src/xdb/ui/main_frame.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - ****************************************************************************** - * 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_UI_MAIN_FRAME_H_ -#define XDB_UI_MAIN_FRAME_H_ - -#include - -#include -#include - -namespace xdb { -namespace ui { - -class MainFrame : public MainFrameBase { - public: - MainFrame(std::unique_ptr debug_target); - - protected: - void OnIdle(wxIdleEvent& event) override; - - private: - std::unique_ptr debug_target_; - std::unique_ptr cursor_; -}; - -} // namespace ui -} // namespace xdb - -#endif // XDB_UI_MAIN_FRAME_H_ diff --git a/src/xdb/ui/open_postmortem_trace_dialog.h b/src/xdb/ui/open_postmortem_trace_dialog.h deleted file mode 100644 index 64944029f..000000000 --- a/src/xdb/ui/open_postmortem_trace_dialog.h +++ /dev/null @@ -1,33 +0,0 @@ -/** - ****************************************************************************** - * 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_UI_OPEN_POSTMORTEM_TRACE_DIALOG_H_ -#define XDB_UI_OPEN_POSTMORTEM_TRACE_DIALOG_H_ - -#include - -namespace xdb { -namespace ui { - -class OpenPostmortemTraceDialog : public OpenPostmortemTraceDialogBase { - public: - OpenPostmortemTraceDialog() : OpenPostmortemTraceDialogBase(nullptr) {} - - const std::wstring trace_file_path() const { - return trace_file_picker_->GetFileName().GetFullPath().ToStdWstring(); - } - const std::wstring content_file_path() const { - return content_file_picker_->GetFileName().GetFullPath().ToStdWstring(); - } -}; - -} // namespace ui -} // namespace xdb - -#endif // XDB_UI_OPEN_POSTMORTEM_TRACE_DIALOG_H_ diff --git a/src/xdb/ui/sources.gypi b/src/xdb/ui/sources.gypi deleted file mode 100644 index 9f4541a7b..000000000 --- a/src/xdb/ui/sources.gypi +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2014 Ben Vanik. All Rights Reserved. -{ - 'sources': [ - 'main_frame.cc', - 'main_frame.h', - 'open_postmortem_trace_dialog.h', - 'xdb_app.cc', - 'xdb_app.h', - 'xdb_ui.cpp', - 'xdb_ui.h', - ], - - 'includes': [ - ], -} diff --git a/src/xdb/ui/xdb-ui.fbp b/src/xdb/ui/xdb-ui.fbp deleted file mode 100644 index 0c3a7aca3..000000000 --- a/src/xdb/ui/xdb-ui.fbp +++ /dev/null @@ -1,1173 +0,0 @@ - - - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - connect - xdb_ui - 1000 - none - 0 - xdb - "xdb" "ui" - . - - 1 - 1 - 1 - 1 - UI - 1 - 0 - - 1 - wxAUI_MGR_DEFAULT|wxAUI_MGR_LIVE_RESIZE - - wxBOTH - - 1 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - MainFrameBase - - 1024,768 - wxDEFAULT_FRAME_STYLE - ; - xenia debugger - - - - wxTAB_TRAVERSAL - 1 - - - - - - - - - - - - - - - OnIdle - - - - - - - - - - - - - - - - - - - - - - - - 1 - 1 - - - 0 - wxID_ANY - Main Menu - - - menu_bar_ - protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - File - file_menu_ - protected - - - - 0 - 0 - 0 - 1 - 10 - - - - - - - - 0 - 0 - 0 - - 1 - 0 - Dock - 0 - Top - 1 - - 1 - - 0 - 0 - wxID_ANY - 0 - - - 0 - - - 0 - - 1 - tool_bar_ - 1 - 1 - - - protected - 0 - - Resizable - 5 - 1 - - wxAUI_TB_HORZ_LAYOUT - - label - 1 - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - wxID_ANY - wxITEM_NORMAL - tool - tool_test_ - protected - - - - - - - - - - - - - - - - - - 1 - 1 - - 1 - - 0 - wxID_ANY - - - status_bar_ - protected - - - wxST_SIZEGRIP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - 0 - 0 - 0 - - - - - - - - 0 - 0 - 0 - - 1 - 0 - Dock - 0 - Center - 1 - - 0 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 0 - notebook_ - 0 - - - protected - 0 - - Resizable - 1 - - wxAUI_NB_TAB_EXTERNAL_MOVE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT|wxAUI_NB_TOP|wxAUI_NB_WINDOWLIST_BUTTON - - -1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - a page - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_panel3 - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - a page - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 1 - 1 - - 1 - 0 - Dock - 0 - Center - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_panel4 - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - wxBOTH - - 1 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - OpenPostmortemTraceDialogBase - - -1,-1 - wxDEFAULT_DIALOG_STYLE - - Open Postmortem Trace - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - root_panel_outer - wxVERTICAL - none - - 10 - wxEXPAND | wxALL - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - root_panel - 1 - - - none - 1 - - Resizable - 1 - - - 0 - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - 1 - wxVERTICAL - 0 - - 0 - - root_sizer - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 0 - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Use --trace_file= to specify the output file path when running xenia-run. - - 0 - - - 0 - - 1 - info_label - 1 - - - none - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - 2 - wxBOTH - 1 - - 0 - - content_sizer - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Trace File: - - 0 - - - 0 - - 1 - trace_file_label - 1 - - - none - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - Select a .trace file - - 0 - - 1 - trace_file_picker_ - 1 - - - protected - 1 - - Resizable - 1 - - wxFLP_DEFAULT_STYLE|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_USE_TEXTCTRL - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - *.trace - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Content Path: - - 0 - - - 0 - - 1 - content_file_label - 1 - - - none - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER|wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - Select the source content path - - 0 - - 1 - content_file_picker_ - 1 - - - protected - 1 - - Resizable - 1 - - wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_USE_TEXTCTRL - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - *.xex;*.iso;*.* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - wxEXPAND - 1 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - dialog_buttons_ - protected - - OnCancelButtonClick - - - - OnOKButtonClick - - - - - - - - - - - diff --git a/src/xdb/ui/xdb_app.cc b/src/xdb/ui/xdb_app.cc deleted file mode 100644 index d02c67136..000000000 --- a/src/xdb/ui/xdb_app.cc +++ /dev/null @@ -1,126 +0,0 @@ -/** - ****************************************************************************** - * 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 -#include - -#include -#include -#include -#include -#include - -namespace xdb { -namespace ui { - -IMPLEMENT_APP(XdbApp); - -bool XdbApp::OnInit() { return true; } - -int XdbApp::OnExit() { - // Top level windows are deleted by wx automatically. - return 0; -} - -void XdbApp::OpenEmpty() { - while (true) { - OpenPostmortemTraceDialog dialog; - if (dialog.ShowModal() == wxID_CANCEL) { - Exit(); - return; - } - if (OpenTraceFile(dialog.trace_file_path(), dialog.content_file_path())) { - break; - } - } -} - -bool XdbApp::OpenTraceFile(const std::string& trace_file_path, - const std::string& content_file_path) { - return OpenTraceFile(poly::to_wstring(trace_file_path), - poly::to_wstring(content_file_path)); -} - -bool XdbApp::OpenTraceFile(const std::wstring& trace_file_path, - const std::wstring& content_file_path) { - std::unique_ptr target(new PostmortemDebugTarget()); - - if (!target->LoadTrace(trace_file_path, content_file_path)) { - HandleOpenError("Unable to load trace file."); - return false; - } - - wxProgressDialog progress_dialog( - "Preparing trace...", "This may take some time.", 100, nullptr, - wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_SMOOTH | wxPD_CAN_ABORT | - wxPD_ELAPSED_TIME | wxPD_ELAPSED_TIME); - progress_dialog.Show(); - - enum class PrepareStatus { - PROCESSING, - SUCCEEDED, - FAILED, - }; - std::atomic status(PrepareStatus::PROCESSING); - std::atomic cancelled; - std::thread preparation_thread([&target, &cancelled, &status]() { - status = target->Prepare(cancelled) ? PrepareStatus::SUCCEEDED - : PrepareStatus::FAILED; - }); - - do { - std::this_thread::sleep_for(std::chrono::milliseconds(10)); - } while (status == PrepareStatus::PROCESSING && progress_dialog.Pulse()); - cancelled = progress_dialog.WasCancelled(); - preparation_thread.join(); - progress_dialog.Hide(); - if (cancelled) { - return false; - } - if (status == PrepareStatus::FAILED) { - HandleOpenError("Invalid trace file; unable to process."); - return false; - } - - return OpenDebugTarget(std::move(target)); -} - -bool XdbApp::OpenDebugTarget(std::unique_ptr debug_target) { - auto main_frame = new MainFrame(std::move(debug_target)); - - main_frames_.push_back(main_frame); - main_frame->Connect(wxEVT_DESTROY, wxEventHandler(XdbApp::OnMainFrameDestroy), - nullptr, this); - - main_frame->Show(); - main_frame->SetFocus(); - - return true; -} - -void XdbApp::HandleOpenError(const std::string& message) { - wxMessageDialog dialog(nullptr, message, "Error", - wxOK | wxOK_DEFAULT | wxICON_ERROR); - dialog.ShowModal(); -} - -void XdbApp::OnMainFrameDestroy(wxEvent& event) { - for (auto it = main_frames_.begin(); it != main_frames_.end(); ++it) { - if (*it == event.GetEventObject()) { - main_frames_.erase(it); - return; - } - } - assert_always(); -} - -} // namespace ui -} // namespace xdb diff --git a/src/xdb/ui/xdb_app.h b/src/xdb/ui/xdb_app.h deleted file mode 100644 index c6c3bfd7d..000000000 --- a/src/xdb/ui/xdb_app.h +++ /dev/null @@ -1,48 +0,0 @@ -/** - ****************************************************************************** - * 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_UI_XDB_APP_H_ -#define XDB_UI_XDB_APP_H_ - -#include -#include -#include - -#include -#include - -namespace xdb { -namespace ui { - -class MainFrame; - -class XdbApp : public wxApp { - public: - bool OnInit() override; - int OnExit() override; - - void OpenEmpty(); - bool OpenTraceFile(const std::string& trace_file_path, - const std::string& content_file_path = ""); - bool OpenTraceFile(const std::wstring& trace_file_path, - const std::wstring& content_file_path = L""); - bool OpenDebugTarget(std::unique_ptr debug_target); - - private: - void HandleOpenError(const std::string& message); - - void OnMainFrameDestroy(wxEvent& event); - - std::vector main_frames_; -}; - -} // namespace ui -} // namespace xdb - -#endif // XDB_UI_XDB_APP_H_ diff --git a/src/xdb/ui/xdb_ui.cpp b/src/xdb/ui/xdb_ui.cpp deleted file mode 100644 index 28e247680..000000000 --- a/src/xdb/ui/xdb_ui.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 5 2014) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "xdb_ui.h" - -/////////////////////////////////////////////////////////////////////////// -using namespace xdb::ui; - -MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - m_mgr.SetManagedWindow(this); - m_mgr.SetFlags(wxAUI_MGR_DEFAULT|wxAUI_MGR_LIVE_RESIZE); - - menu_bar_ = new wxMenuBar( 0 ); - file_menu_ = new wxMenu(); - menu_bar_->Append( file_menu_, wxT("File") ); - - this->SetMenuBar( menu_bar_ ); - - tool_bar_ = new wxAuiToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT ); - tool_test_ = tool_bar_->AddTool( wxID_ANY, wxT("tool"), wxNullBitmap, wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL ); - - tool_bar_->Realize(); - m_mgr.AddPane( tool_bar_, wxAuiPaneInfo().Top().CaptionVisible( false ).CloseButton( false ).Dock().Resizable().FloatingSize( wxDefaultSize ).DockFixed( false ).BottomDockable( false ).LeftDockable( false ).RightDockable( false ).Layer( 10 ).ToolbarPane() ); - - status_bar_ = this->CreateStatusBar( 1, wxST_SIZEGRIP, wxID_ANY ); - notebook_ = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TAB_EXTERNAL_MOVE|wxAUI_NB_TAB_MOVE|wxAUI_NB_TAB_SPLIT|wxAUI_NB_TOP|wxAUI_NB_WINDOWLIST_BUTTON ); - m_mgr.AddPane( notebook_, wxAuiPaneInfo() .Center() .CaptionVisible( false ).CloseButton( false ).PaneBorder( false ).Movable( false ).Dock().Resizable().FloatingSize( wxDefaultSize ).DockFixed( false ).BottomDockable( false ).TopDockable( false ).LeftDockable( false ).RightDockable( false ).Floatable( false ) ); - - m_panel3 = new wxPanel( notebook_, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - notebook_->AddPage( m_panel3, wxT("a page"), false, wxNullBitmap ); - m_panel4 = new wxPanel( notebook_, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - notebook_->AddPage( m_panel4, wxT("a page"), true, wxNullBitmap ); - - - m_mgr.Update(); - this->Centre( wxBOTH ); - - // Connect Events - this->Connect( wxEVT_IDLE, wxIdleEventHandler( MainFrameBase::OnIdle ) ); -} - -MainFrameBase::~MainFrameBase() -{ - // Disconnect Events - this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( MainFrameBase::OnIdle ) ); - - m_mgr.UnInit(); - -} - -OpenPostmortemTraceDialogBase::OpenPostmortemTraceDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* root_panel_outer; - root_panel_outer = new wxBoxSizer( wxVERTICAL ); - - wxPanel* root_panel; - root_panel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); - wxFlexGridSizer* root_sizer; - root_sizer = new wxFlexGridSizer( 0, 1, 0, 0 ); - root_sizer->AddGrowableCol( 0 ); - root_sizer->SetFlexibleDirection( wxVERTICAL ); - root_sizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - wxStaticText* info_label; - info_label = new wxStaticText( root_panel, wxID_ANY, wxT("Use --trace_file= to specify the output file path when running xenia-run."), wxDefaultPosition, wxDefaultSize, 0 ); - info_label->Wrap( -1 ); - root_sizer->Add( info_label, 0, wxALL, 5 ); - - wxFlexGridSizer* content_sizer; - content_sizer = new wxFlexGridSizer( 0, 2, 0, 0 ); - content_sizer->AddGrowableCol( 1 ); - content_sizer->SetFlexibleDirection( wxBOTH ); - content_sizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - wxStaticText* trace_file_label; - trace_file_label = new wxStaticText( root_panel, wxID_ANY, wxT("Trace File:"), wxDefaultPosition, wxDefaultSize, 0 ); - trace_file_label->Wrap( -1 ); - content_sizer->Add( trace_file_label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - trace_file_picker_ = new wxFilePickerCtrl( root_panel, wxID_ANY, wxEmptyString, wxT("Select a .trace file"), wxT("*.trace"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_USE_TEXTCTRL ); - content_sizer->Add( trace_file_picker_, 1, wxALIGN_CENTER|wxALL|wxEXPAND, 5 ); - - wxStaticText* content_file_label; - content_file_label = new wxStaticText( root_panel, wxID_ANY, wxT("Content Path:"), wxDefaultPosition, wxDefaultSize, 0 ); - content_file_label->Wrap( -1 ); - content_sizer->Add( content_file_label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5 ); - - content_file_picker_ = new wxFilePickerCtrl( root_panel, wxID_ANY, wxEmptyString, wxT("Select the source content path"), wxT("*.xex;*.iso;*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_USE_TEXTCTRL ); - content_sizer->Add( content_file_picker_, 1, wxALIGN_CENTER|wxALL|wxEXPAND, 5 ); - - - root_sizer->Add( content_sizer, 0, wxEXPAND, 5 ); - - dialog_buttons_ = new wxStdDialogButtonSizer(); - dialog_buttons_OK = new wxButton( root_panel, wxID_OK ); - dialog_buttons_->AddButton( dialog_buttons_OK ); - dialog_buttons_Cancel = new wxButton( root_panel, wxID_CANCEL ); - dialog_buttons_->AddButton( dialog_buttons_Cancel ); - dialog_buttons_->Realize(); - - root_sizer->Add( dialog_buttons_, 1, wxEXPAND, 0 ); - - - root_panel->SetSizer( root_sizer ); - root_panel->Layout(); - root_sizer->Fit( root_panel ); - root_panel_outer->Add( root_panel, 1, wxEXPAND | wxALL, 10 ); - - - this->SetSizer( root_panel_outer ); - this->Layout(); - root_panel_outer->Fit( this ); - - this->Centre( wxBOTH ); - - // Connect Events - dialog_buttons_Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenPostmortemTraceDialogBase::OnCancelButtonClick ), NULL, this ); - dialog_buttons_OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenPostmortemTraceDialogBase::OnOKButtonClick ), NULL, this ); -} - -OpenPostmortemTraceDialogBase::~OpenPostmortemTraceDialogBase() -{ - // Disconnect Events - dialog_buttons_Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenPostmortemTraceDialogBase::OnCancelButtonClick ), NULL, this ); - dialog_buttons_OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenPostmortemTraceDialogBase::OnOKButtonClick ), NULL, this ); - -} diff --git a/src/xdb/ui/xdb_ui.h b/src/xdb/ui/xdb_ui.h deleted file mode 100644 index 778cfeddc..000000000 --- a/src/xdb/ui/xdb_ui.h +++ /dev/null @@ -1,99 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 5 2014) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __XDB_UI_H__ -#define __XDB_UI_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -namespace xdb -{ - namespace ui - { - /////////////////////////////////////////////////////////////////////////////// - /// Class MainFrameBase - /////////////////////////////////////////////////////////////////////////////// - class MainFrameBase : public wxFrame - { - private: - - protected: - wxMenuBar* menu_bar_; - wxMenu* file_menu_; - wxAuiToolBar* tool_bar_; - wxAuiToolBarItem* tool_test_; - wxStatusBar* status_bar_; - wxAuiNotebook* notebook_; - wxPanel* m_panel3; - wxPanel* m_panel4; - - // Virtual event handlers, overide them in your derived class - virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); } - - - public: - - MainFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("xenia debugger"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 1024,768 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); - wxAuiManager m_mgr; - - ~MainFrameBase(); - - }; - - /////////////////////////////////////////////////////////////////////////////// - /// Class OpenPostmortemTraceDialogBase - /////////////////////////////////////////////////////////////////////////////// - class OpenPostmortemTraceDialogBase : public wxDialog - { - private: - - protected: - wxFilePickerCtrl* trace_file_picker_; - wxFilePickerCtrl* content_file_picker_; - wxStdDialogButtonSizer* dialog_buttons_; - wxButton* dialog_buttons_OK; - wxButton* dialog_buttons_Cancel; - - // Virtual event handlers, overide them in your derived class - virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } - virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } - - - public: - - OpenPostmortemTraceDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Open Postmortem Trace"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE ); - ~OpenPostmortemTraceDialogBase(); - - }; - - } // namespace ui -} // namespace xdb - -#endif //__XDB_UI_H__ diff --git a/third_party/wxWidgets b/third_party/wxWidgets deleted file mode 160000 index ae2f2a1ec..000000000 --- a/third_party/wxWidgets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ae2f2a1ece3b62a734b1c40d0d989fad49e075dc diff --git a/tools/tools.gypi b/tools/tools.gypi index 1c363ac6a..685b8164b 100644 --- a/tools/tools.gypi +++ b/tools/tools.gypi @@ -1,8 +1,6 @@ # Copyright 2013 Ben Vanik. All Rights Reserved. { 'includes': [ - 'xenia-compare/xenia-compare.gypi', - 'xenia-debug/xenia-debug.gypi', 'xenia-run/xenia-run.gypi', ], } diff --git a/tools/xenia-compare/xenia-compare.cc b/tools/xenia-compare/xenia-compare.cc deleted file mode 100644 index e6cc1fd85..000000000 --- a/tools/xenia-compare/xenia-compare.cc +++ /dev/null @@ -1,41 +0,0 @@ -/** - ****************************************************************************** - * 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 -#include -#include -#include -#include - -DEFINE_string(trace_file_left, "", "Trace file to compare (original)."); -DEFINE_string(trace_file_right, "", "Trace file to compare (new)."); - -namespace xc { - -using xdb::PostmortemDebugTarget; - -int main(std::vector& args) { - auto left_target = std::make_unique(); - if (!left_target->LoadTrace(poly::to_wstring(FLAGS_trace_file_left))) { - PFATAL("Unable to load left trace file: %s", FLAGS_trace_file_left.c_str()); - } - auto right_target = std::make_unique(); - if (!right_target->LoadTrace(poly::to_wstring(FLAGS_trace_file_right))) { - PFATAL("Unable to load right trace file: %s", - FLAGS_trace_file_right.c_str()); - } - - return 0; -} - -} // namespace xc - -DEFINE_ENTRY_POINT(L"xenia-compare", L"xenia-compare", xc::main); diff --git a/tools/xenia-compare/xenia-compare.gypi b/tools/xenia-compare/xenia-compare.gypi deleted file mode 100644 index 1a75f3f34..000000000 --- a/tools/xenia-compare/xenia-compare.gypi +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2014 Ben Vanik. All Rights Reserved. -{ - 'targets': [ - { - 'target_name': 'xenia-compare', - 'type': 'executable', - - 'msvs_settings': { - 'VCLinkerTool': { - 'SubSystem': '1' - }, - }, - - 'dependencies': [ - 'xdb', - 'xenia', - ], - - 'include_dirs': [ - '.', - ], - - 'sources': [ - 'xenia-compare.cc', - ], - }, - ], -} diff --git a/tools/xenia-debug/xenia-debug.cc b/tools/xenia-debug/xenia-debug.cc deleted file mode 100644 index 27863f72b..000000000 --- a/tools/xenia-debug/xenia-debug.cc +++ /dev/null @@ -1,63 +0,0 @@ -/** - ****************************************************************************** - * 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 - -#include -#include -#include -#include -#include - -DEFINE_string(trace_file, "", "Trace file to load on startup."); -DEFINE_string(content_file, "", - "ISO/STFS/XEX file the specified trace_file should reference."); - -namespace xdb { - -int main(std::vector& args) { - wxInitializer init; - if (!init.IsOk()) { - PFATAL("Failed to initialize wxWidgets"); - return 1; - } - - // App is auto-freed by wx. - auto app = new ui::XdbApp(); - wxApp::SetInstance(app); - if (!wxEntryStart(0, nullptr)) { - PFATAL("Failed to enter wxWidgets app"); - return 1; - } - if (!app->OnInit()) { - PFATAL("Failed to init app"); - return 1; - } - - if (!FLAGS_trace_file.empty()) { - // Trace file specified on command line. - if (!app->OpenTraceFile(FLAGS_trace_file, FLAGS_content_file)) { - PFATAL("Failed to open trace file"); - return 1; - } - } else { - app->OpenEmpty(); - } - - app->OnRun(); - int result_code = app->OnExit(); - wxEntryCleanup(); - return result_code; -} - -} // namespace xdb - -DEFINE_ENTRY_POINT(L"xenia-debug", L"xenia-debug", xdb::main); diff --git a/tools/xenia-debug/xenia-debug.gypi b/tools/xenia-debug/xenia-debug.gypi deleted file mode 100644 index 412439497..000000000 --- a/tools/xenia-debug/xenia-debug.gypi +++ /dev/null @@ -1,28 +0,0 @@ -# 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/xenia-build.py b/xenia-build.py index 3d5a0ee8e..3d364729d 100755 --- a/xenia-build.py +++ b/xenia-build.py @@ -291,24 +291,6 @@ class SetupCommand(Command): shell_call('third_party/binutils/build.sh') print('') - # wxWidgets. - print('- Building wxWidgets (will take awhile)...') - 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('') - post_update_deps('debug') post_update_deps('release') diff --git a/xenia.gyp b/xenia.gyp index 123de2f5f..a880cea97 100644 --- a/xenia.gyp +++ b/xenia.gyp @@ -100,7 +100,6 @@ #'LinkIncremental': '1', # 1 = NO, 2 = YES 'TargetMachine': '17', # x86 - 64 'AdditionalLibraryDirectories': [ - '..\\..\\third_party\\wxWidgets\\lib\\vc_x64_lib\\', ], 'EntryPointSymbol': 'wWinMainCRTStartup', }, @@ -469,8 +468,6 @@ 'direct_dependent_settings': { 'include_dirs': [ 'src/', - 'third_party/wxWidgets/include/', - 'third_party/wxWidgets/include/msvc/', ], 'target_conditions': [ @@ -518,8 +515,6 @@ 'include_dirs': [ '.', 'src/', - 'third_party/wxWidgets/include/', - 'third_party/wxWidgets/include/msvc/', ], 'includes': [