[Ubuntu 19.10] Installation de Slade 3.1.10 avec WxWidget 3.1.3

[Ubuntu 19.10] Installation de Slade 3.1.10 avec WxWidget 3.1.3

1/ Installation des paquets de développement.

util01@station01:~$ sudo apt-get install build-essential libgtk2.0-dev libglew-dev libfreeimage-dev libftgl-dev libfluidsynth-dev libsfml-dev libgconf2-dev freeglut3-dev cmake libmodplug-dev git libcurl4-openssl-dev libbz2-dev
lua5.3 lua5.3-dev

2/ Installation de WxWidget 3.1.3.

– Lien : https://wiki.codelite.org/pmwiki.php/Main/WxWidgets31Binaries

– Installation des clés.

util01@station01:~$ sudo apt-key adv --fetch-keys https://repos.codelite.org/CodeLite.asc
util01@station01:~$ sudo apt-add-repository 'deb https://repos.codelite.org/wx3.1.3/ubuntu/ eoan universe'
util01@station01:~$ sudo apt-get update

– Installation des paquets.

util01@station01:~$ sudo apt-get install libwxbase3.1-0-unofficial3 \
libwxbase3.1unofficial3-dev \
libwxgtk3.1-0-unofficial3 \
libwxgtk3.1unofficial3-dev \
wx3.1-headers \
wx-common \
libwxgtk-webview3.1-0-unofficial3 \
libwxgtk-webview3.1unofficial3-dev \
libwxbase3.1-0-unofficial3-dbg \
libwxgtk3.1-0-unofficial3-dbg \
libwxgtk-webview3.1-0-unofficial3-dbg \
libwxgtk-media3.1-0-unofficial3-dbg \
wx3.1-i18n \
wx3.1-examples \
libwxgtk-media3.1-unofficial3-dev \
libwxgtk-media3.1-0-unofficial3

3/ Installation de Slade 3.1.10.

– Lien : http://slade.mancubus.net/

– Téléchargement de l’archive.

util01@station01:~/JEUX/DOOM/Editeur$ wget https://github.com/sirjuddington/SLADE/archive/3.1.8.tar.gz
util01@station01:~/JEUX/DOOM/Editeur$ tar xvfz 3.1.8.tar.gz
util01@station01:~/JEUX/DOOM/Editeur$ cd SLADE-3.1.8/dist/
util01@station01:~/JEUX/DOOM/Editeur/SLADE-3.1.8/dist$

util01@station01:~/JEUX/DOOM/Editeur$ wget https://github.com/sirjuddington/SLADE/archive/3.1.10.tar.gz
util01@station01:~/JEUX/DOOM/Editeur$ tar xvfz 3.1.10.tar.gz
util01@station01:~/JEUX/DOOM/Editeur$ cd SLADE-3.1.10/dist/

– Désactiver le scripting Lua.

Ouvrir :

src/CMakeLists.txt

Chercher et commenter :

Scripting/*.cpp

Créer :

slade-3.1.10_DisableScript.diff

Ajouter :


diff --git a/Application/App.cpp b/Application/App.cpp
index 55e6753..bdbab19 100644
--- a/Application/App.cpp
+++ b/Application/App.cpp
@@ -451,7 +451,7 @@ bool App::init(vector& args, double ui_scale)
SAction::initActions();

// Init lua
- Lua::init();
+ //Lua::init();

// Init UI
UI::init(ui_scale);
@@ -516,7 +516,7 @@ bool App::init(vector& args, double ui_scale)
Game::init();

// Init script manager
- ScriptManager::init();
+ //ScriptManager::init();

// Show the main window
MainEditor::windowWx()->Show(true);
@@ -645,7 +645,7 @@ void App::exit(bool save_config)
Game::saveCustomSpecialPresets();

// Save custom scripts
- ScriptManager::saveUserScripts();
+ //ScriptManager::saveUserScripts();
}

// Close all open archives
@@ -667,7 +667,7 @@ void App::exit(bool save_config)
}

// Close lua
- Lua::close();
+ //Lua::close();

// Close DUMB
dumb_exit();
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a0349d..3053277 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -143,7 +143,7 @@ file(GLOB_RECURSE SLADE_SOURCES
OpenGL/*.cpp
UI/*.cpp
Utility/*.cpp
- Scripting/*.cpp
+ #Scripting/*.cpp
TextEditor/*.cpp
)
set(SLADE_HEADERS
diff --git a/MainEditor/UI/ArchivePanel.cpp b/MainEditor/UI/ArchivePanel.cpp
index 3adb0ed..8afad77 100644
--- a/MainEditor/UI/ArchivePanel.cpp
+++ b/MainEditor/UI/ArchivePanel.cpp
@@ -521,9 +521,9 @@ void ArchivePanel::addMenus()
SAction::fromId("arch_check_duplicates2")->addToMenu(menu_clean);
SAction::fromId("arch_replace_maps")->addToMenu(menu_clean);
menu_archive->AppendSubMenu(menu_clean, "&Maintenance");
- auto menu_scripts = new wxMenu();
- ScriptManager::populateEditorScriptMenu(menu_scripts, ScriptManager::ScriptType::Archive, "arch_script");
- menu_archive->AppendSubMenu(menu_scripts, "&Run Script");
+ //auto menu_scripts = new wxMenu();
+ //ScriptManager::populateEditorScriptMenu(menu_scripts, ScriptManager::ScriptType::Archive, "arch_script");
+ //menu_archive->AppendSubMenu(menu_scripts, "&Run Script");
}
if (!menu_entry)
{
@@ -545,9 +545,9 @@ void ArchivePanel::addMenus()
SAction::fromId("arch_entry_export")->addToMenu(menu_entry);
menu_entry->AppendSeparator();
SAction::fromId("arch_entry_bookmark")->addToMenu(menu_entry);
- auto menu_scripts = new wxMenu();
- ScriptManager::populateEditorScriptMenu(menu_scripts, ScriptManager::ScriptType::Entry, "arch_entry_script");
- menu_entry->AppendSubMenu(menu_scripts, "&Run Script");
+ //auto menu_scripts = new wxMenu();
+ //ScriptManager::populateEditorScriptMenu(menu_scripts, ScriptManager::ScriptType::Entry, "arch_entry_script");
+ //menu_entry->AppendSubMenu(menu_scripts, "&Run Script");
}

// Add them to the main window menubar
@@ -3190,8 +3190,8 @@ bool ArchivePanel::handleAction(string id)
}

// Archive->Scripts->...
- else if (id == "arch_script")
- ScriptManager::runArchiveScript(archive_, wx_id_offset);
+ //else if (id == "arch_script")
+ // ScriptManager::runArchiveScript(archive_, wx_id_offset);

// ------------------------------------------------------------------------
@@ -3270,9 +3270,10 @@ bool ArchivePanel::handleAction(string id)
openEntryExternal();

// Entry->Run Script
+ /*
else if (id == "arch_entry_script")
ScriptManager::runEntryScript(entry_list_->getSelectedEntries(), wx_id_offset, MainEditor::windowWx());
-
+ */

// Context menu actions
else if (id == "arch_bas_convertb")
@@ -3785,6 +3786,7 @@ void ArchivePanel::onEntryListRightClick(wxListEvent& e)
#endif
}

+ /*
// Entry scripts
if (!ScriptManager::editorScripts(ScriptManager::ScriptType::Entry).empty())
{
@@ -3793,7 +3795,7 @@ void ArchivePanel::onEntryListRightClick(wxListEvent& e)
context.AppendSeparator();
context.AppendSubMenu(menu_scripts, "Run &Script");
}
-
+ */
// Popup the context menu
PopupMenu(&context);
}
diff --git a/MainEditor/UI/MainWindow.cpp b/MainEditor/UI/MainWindow.cpp
index bfaa36d..e1046c3 100644
--- a/MainEditor/UI/MainWindow.cpp
+++ b/MainEditor/UI/MainWindow.cpp
@@ -662,12 +662,13 @@ bool MainWindow::handleAction(string id)
openStartPageTab();

// Tools->Run Script
+ /*
if (id == "main_runscript")
{
ScriptManager::open();
return true;
}
-
+ */
// Help->About
if (id == "main_about")
{
diff --git a/MapEditor/UI/MapEditorWindow.cpp b/MapEditor/UI/MapEditorWindow.cpp
index ff36a06..79509ab 100644
--- a/MapEditor/UI/MapEditorWindow.cpp
+++ b/MapEditor/UI/MapEditorWindow.cpp
@@ -267,13 +267,14 @@ void MapEditorWindow::setupMenu()
menu->Append(menu_view, "View");

// Tools menu
+ /*
wxMenu* menu_tools = new wxMenu("");
menu_scripts_ = new wxMenu();
ScriptManager::populateEditorScriptMenu(menu_scripts_, ScriptManager::ScriptType::Map, "mapw_script");
menu_tools->AppendSubMenu(menu_scripts_, "Run Script");
SAction::fromId("mapw_runscript")->addToMenu(menu_tools);
menu->Append(menu_tools, "&Tools");
-
+ */
SetMenuBar(menu);
}

@@ -1132,11 +1133,12 @@ bool MapEditorWindow::hasMapOpen(Archive* archive)
// Reloads the map editor scripts menu
// ----------------------------------------------------------------------------
void MapEditorWindow::reloadScriptsMenu()
-{
+{/*
while (menu_scripts_->FindItemByPosition(0))
menu_scripts_->Delete(menu_scripts_->FindItemByPosition(0));

ScriptManager::populateEditorScriptMenu(menu_scripts_, ScriptManager::ScriptType::Map, "mapw_script");
+ */
}

// ----------------------------------------------------------------------------
@@ -1437,19 +1439,21 @@ bool MapEditorWindow::handleAction(string id)
}

// Tools->Run Script
+ /*
else if (id == "mapw_script")
{
ScriptManager::runMapScript(&MapEditor::editContext().map(), wx_id_offset, this);
return true;
}
-
+ */
+ /*
// Tools->Script Manager
else if (id == "mapw_runscript")
{
ScriptManager::open();
return true;
}
-
+ */
return false;
}

Action :

Appliquer le fichier ‘diff’ dans ‘src/’.

– Configuration.

util01@station01:~/JEUX/DOOM/Editeur/SLADE-3.1.10/dist$ cmake .. -DUSE_WEBKIT_STARTPAGE=ON

– Compilation.

util01@station01:~/JEUX/DOOM/Editeur/SLADE-3.1.10/dist$ make

– Erreur :

/usr/include/wx-3.1-unofficial/wx/defs.h:33:17: fatal error: wx/msw/winundef.h: Aucun fichier ou dossier de ce type

Ouvrir :

/usr/include/wx-3.1-unofficial/wx/defs.h

Chercher et commenter :

# ifdef _WINDOWS_
# include "wx/msw/winundef.h"
# endif /* WIN32 */

Comments are closed, but trackbacks and pingbacks are open.