diff --git a/CMakeLists.txt b/CMakeLists.txt index 091ff377..35ede588 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ include_directories ("${CMAKE_SOURCE_DIR}/src" "${PROJECT_LIBS_DIR}/pugixml/src" "${PROJECT_LIBS_DIR}/libgit2/include" "${PROJECT_LIBS_DIR}/wxWidgets/include" - "${PROJECT_LIBS_DIR}/wxWidgets/lib/wx/include/${COMPILER_PREFIX}-msw-unicode-static-2.9") + "${PROJECT_LIBS_DIR}/wxWidgets/lib/wx/include/${COMPILER_PREFIX}-msw-unicode-static-3.0") link_directories ("${PROJECT_LIBS_DIR}/yaml-cpp/build" "${PROJECT_LIBS_DIR}/libloadorder/build" @@ -58,7 +58,7 @@ link_directories ("${PROJECT_LIBS_DIR}/yaml-cpp/build" # Settings when compiling for Windows. Since it's a Windows-only app this is always true, but useful to check for copy/paste into other projects. IF (CMAKE_SYSTEM_NAME MATCHES "Windows") - add_definitions (-DUNICODE -D_UNICODE -DLIBLO_STATIC) + add_definitions (-DUNICODE -D_UNICODE -D__WXMSW__ -DNDEBUG -DLIBLO_STATIC) IF (${PROJECT_LINK} MATCHES "STATIC") add_definitions (-DBOSS_STATIC) ELSE () @@ -109,12 +109,12 @@ ELSE () ENDIF () set (BOSS_GUI_LIBS ${BOSS_LIBS} - wx_mswu_webview-2.9-${COMPILER_PREFIX} - wx_mswu_core-2.9-${COMPILER_PREFIX} - wx_baseu-2.9-${COMPILER_PREFIX} - wx_mswu_adv-2.9-${COMPILER_PREFIX} - wxpng-2.9-${COMPILER_PREFIX} - wxzlib-2.9-${COMPILER_PREFIX} + wx_mswu_webview-3.0-${COMPILER_PREFIX} + wx_mswu_core-3.0-${COMPILER_PREFIX} + wx_baseu-3.0-${COMPILER_PREFIX} + wx_mswu_adv-3.0-${COMPILER_PREFIX} + wxpng-3.0-${COMPILER_PREFIX} + wxzlib-3.0-${COMPILER_PREFIX} comctl32) diff --git a/README.md b/README.md index 641a4459..ace978c5 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ BOSS requires the following libraries: * [Libloadorder](http://github.com/WrinklyNinja/libloadorder) * [OpenSSL](https://www.openssl.org) - only if HTTPS support in libgit2 is required using compilers other than MSVC. * [PugiXML](http://code.google.com/p/pugixml/) v1.2 or later. -* [wxWidgets](http://www.wxwidgets.org) v2.9.5 or later. +* [wxWidgets](http://www.wxwidgets.org) v3.0 RC 1 or later. * [yaml-cpp](http://code.google.com/p/yaml-cpp/) v0.5.1 or later. * [zlib](http://zlib.net) v1.2.7 or later. @@ -91,6 +91,7 @@ echo "using gcc : 4.6.3 : i686-w64-mingw32-g++ : i686-w64-mingw32-windres SetFont(font); //Set up event handling. - Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &Editor::OnPluginSelect, this, LIST_Plugins); - Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_Reqs); - Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_Incs); - Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_LoadAfter); - Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_Messages); - Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_BashTags); - Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_DirtyInfo); - Bind(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, &Editor::OnListBookChange, this, BOOK_Lists); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Editor::OnQuit, this, BUTTON_Apply); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Editor::OnQuit, this, BUTTON_Cancel); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Editor::OnAddRow, this, BUTTON_AddRow); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Editor::OnEditRow, this, BUTTON_EditRow); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Editor::OnRemoveRow, this, BUTTON_RemoveRow); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Editor::OnExport, this, BUTTON_Export); + Bind(wxEVT_LIST_ITEM_SELECTED, &Editor::OnPluginSelect, this, LIST_Plugins); + Bind(wxEVT_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_Reqs); + Bind(wxEVT_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_Incs); + Bind(wxEVT_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_LoadAfter); + Bind(wxEVT_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_Messages); + Bind(wxEVT_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_BashTags); + Bind(wxEVT_LIST_ITEM_SELECTED, &Editor::OnRowSelect, this, LIST_DirtyInfo); + Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, &Editor::OnListBookChange, this, BOOK_Lists); + Bind(wxEVT_BUTTON, &Editor::OnQuit, this, BUTTON_Apply); + Bind(wxEVT_BUTTON, &Editor::OnQuit, this, BUTTON_Cancel); + Bind(wxEVT_BUTTON, &Editor::OnAddRow, this, BUTTON_AddRow); + Bind(wxEVT_BUTTON, &Editor::OnEditRow, this, BUTTON_EditRow); + Bind(wxEVT_BUTTON, &Editor::OnRemoveRow, this, BUTTON_RemoveRow); + Bind(wxEVT_BUTTON, &Editor::OnExport, this, BUTTON_Export); //Set up layout. wxBoxSizer * bigBox = new wxBoxSizer(wxHORIZONTAL); @@ -991,10 +991,10 @@ MessageEditDialog::MessageEditDialog(wxWindow *parent, const wxString& title) : _content->InsertColumn(1, translate("String")); //Set up event handling. - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &MessageEditDialog::OnAdd, this, BUTTON_AddContent); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &MessageEditDialog::OnEdit, this, BUTTON_EditContent); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &MessageEditDialog::OnRemove, this, BUTTON_RemoveContent); - Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &MessageEditDialog::OnSelect, this, LIST_MessageContent); + Bind(wxEVT_BUTTON, &MessageEditDialog::OnAdd, this, BUTTON_AddContent); + Bind(wxEVT_BUTTON, &MessageEditDialog::OnEdit, this, BUTTON_EditContent); + Bind(wxEVT_BUTTON, &MessageEditDialog::OnRemove, this, BUTTON_RemoveContent); + Bind(wxEVT_LIST_ITEM_SELECTED, &MessageEditDialog::OnSelect, this, LIST_MessageContent); wxSizerFlags leftItem(0); leftItem.Left(); diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 34ea73f3..203ce3ab 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -400,7 +400,7 @@ Launcher::Launcher(const wxChar *title, YAML::Node& settings, Game& game, vector item->Check(); if (_games[i].IsInstalled()) - Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnGameChange, this, MENU_LowestDynamicGameID + i); + Bind(wxEVT_MENU, &Launcher::OnGameChange, this, MENU_LowestDynamicGameID + i); else item->Enable(false); } @@ -418,18 +418,18 @@ Launcher::Launcher(const wxChar *title, YAML::Node& settings, Game& game, vector buttonBox->Add(ViewButton, 1, wxEXPAND|wxALIGN_CENTRE|wxALL, 10); //Bind event handlers. - Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnQuit, this, wxID_EXIT); - Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnViewLastReport, this, OPTION_ViewLastReport); - Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnOpenDebugLog, this, MENU_ViewDebugLog); - Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnSortPlugins, this, OPTION_SortPlugins); - Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnEditMetadata, this, OPTION_EditMetadata); - Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnRedatePlugins, this, MENU_RedatePlugins); - Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnOpenSettings, this, MENU_ShowSettings); - Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnHelp, this, wxID_HELP); - Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnAbout, this, wxID_ABOUT); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Launcher::OnSortPlugins, this, OPTION_SortPlugins); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Launcher::OnEditMetadata, this, OPTION_EditMetadata); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &Launcher::OnViewLastReport, this, OPTION_ViewLastReport); + Bind(wxEVT_MENU, &Launcher::OnQuit, this, wxID_EXIT); + Bind(wxEVT_MENU, &Launcher::OnViewLastReport, this, OPTION_ViewLastReport); + Bind(wxEVT_MENU, &Launcher::OnOpenDebugLog, this, MENU_ViewDebugLog); + Bind(wxEVT_MENU, &Launcher::OnSortPlugins, this, OPTION_SortPlugins); + Bind(wxEVT_MENU, &Launcher::OnEditMetadata, this, OPTION_EditMetadata); + Bind(wxEVT_MENU, &Launcher::OnRedatePlugins, this, MENU_RedatePlugins); + Bind(wxEVT_MENU, &Launcher::OnOpenSettings, this, MENU_ShowSettings); + Bind(wxEVT_MENU, &Launcher::OnHelp, this, wxID_HELP); + Bind(wxEVT_MENU, &Launcher::OnAbout, this, wxID_ABOUT); + Bind(wxEVT_BUTTON, &Launcher::OnSortPlugins, this, OPTION_SortPlugins); + Bind(wxEVT_BUTTON, &Launcher::OnEditMetadata, this, OPTION_EditMetadata); + Bind(wxEVT_BUTTON, &Launcher::OnViewLastReport, this, OPTION_ViewLastReport); Bind(wxEVT_CLOSE_WINDOW, &Launcher::OnClose, this); //Set up initial state. @@ -1110,9 +1110,9 @@ LoadOrderPreview::LoadOrderPreview(wxWindow *parent, const wxString title, const _loadOrder->SetColumnWidth(0, wxLIST_AUTOSIZE); //Set up event handling. - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &LoadOrderPreview::OnMoveUp, this, BUTTON_MoveUp); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &LoadOrderPreview::OnMoveDown, this, BUTTON_MoveDown); - Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &LoadOrderPreview::OnPluginSelect, this, LIST_LoadOrder); + Bind(wxEVT_BUTTON, &LoadOrderPreview::OnMoveUp, this, BUTTON_MoveUp); + Bind(wxEVT_BUTTON, &LoadOrderPreview::OnMoveDown, this, BUTTON_MoveDown); + Bind(wxEVT_LIST_ITEM_SELECTED, &LoadOrderPreview::OnPluginSelect, this, LIST_LoadOrder); //Set up layout. wxBoxSizer * bigBox = new wxBoxSizer(wxVERTICAL); diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index f0dc0342..d8b45eda 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -74,11 +74,11 @@ SettingsFrame::SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node gamesList->AppendColumn(translate("Install Path Registry Key")); //Set up event handling. - Bind(wxEVT_COMMAND_LIST_ITEM_SELECTED, &SettingsFrame::OnGameSelect, this, LIST_Games); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &SettingsFrame::OnQuit, this, wxID_OK); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &SettingsFrame::OnAddGame, this, BUTTON_AddGame); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &SettingsFrame::OnEditGame, this, BUTTON_EditGame); - Bind(wxEVT_COMMAND_BUTTON_CLICKED, &SettingsFrame::OnRemoveGame, this, BUTTON_RemoveGame); + Bind(wxEVT_LIST_ITEM_SELECTED, &SettingsFrame::OnGameSelect, this, LIST_Games); + Bind(wxEVT_BUTTON, &SettingsFrame::OnQuit, this, wxID_OK); + Bind(wxEVT_BUTTON, &SettingsFrame::OnAddGame, this, BUTTON_AddGame); + Bind(wxEVT_BUTTON, &SettingsFrame::OnEditGame, this, BUTTON_EditGame); + Bind(wxEVT_BUTTON, &SettingsFrame::OnRemoveGame, this, BUTTON_RemoveGame); //Set up layout. wxSizerFlags leftItem(0);