ÇA MARCHE !!! Alléluia ! Gloire au manchot tout-puissant !
J'ai fini par réussir à compiler une version correcte. Globalement, tout a l'air de fonctionner à part les traductions. J'ai eu des messages bizarres à la compilation, voir ici.
J'ai tout compilé sur une version 32 bit du RPi OS, avec juste les libsdl1.2-dev, en appliquant préalablement le patch ci-dessous. Il faut lancer le fichier src/wesnoth depuis la racine du dossier du jeu pour qu'il trouve tous les dossiers de ressources et de config.
Seuls petits points négatifs, il faut un environnement graphique, et quand j'essaie de le lancer sur un système 64-bit, le terminal m'informe gentiment que mon fichier n'existe pas (alors qu'il l'a sous les yeux !).
Voici le patch pour ceux que ça intéresse :
```diff --git a/Makefile.am b/Makefile.am
index 0d878c4..2950977 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,4 @@
+CXXFLAGS=-std=c++03
ISUBDIRS = icons
SUBDIRS = po m4 src doc $(ISUBDIRS)
pkgdatadir=$(datadir)/@DATADIR@
diff --git a/src/actions.hpp b/src/actions.hpp
index 0191f8b..0a9a287 100644
--- a/src/actions.hpp
+++ b/src/actions.hpp
@@ -23,6 +23,7 @@ struct combatant;
[^] # Re: Solution !!! 🎉
Posté par alberic89 🐧 . En réponse au message [Résolu] Compiler wesnoth-1.2. Évalué à 1.
ÇA MARCHE !!! Alléluia ! Gloire au manchot tout-puissant !
J'ai fini par réussir à compiler une version correcte. Globalement, tout a l'air de fonctionner à part les traductions. J'ai eu des messages bizarres à la compilation, voir ici.
J'ai tout compilé sur une version 32 bit du RPi OS, avec juste les libsdl1.2-dev, en appliquant préalablement le patch ci-dessous. Il faut lancer le fichier src/wesnoth depuis la racine du dossier du jeu pour qu'il trouve tous les dossiers de ressources et de config.
Seuls petits points négatifs, il faut un environnement graphique, et quand j'essaie de le lancer sur un système 64-bit, le terminal m'informe gentiment que mon fichier n'existe pas (alors qu'il l'a sous les yeux !).
Voici le patch pour ceux que ça intéresse :
```diff --git a/Makefile.am b/Makefile.am
index 0d878c4..2950977 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,4 @@
+CXXFLAGS=-std=c++03
ISUBDIRS = icons
SUBDIRS = po m4 src doc $(ISUBDIRS)
pkgdatadir=$(datadir)/@DATADIR@
diff --git a/src/actions.hpp b/src/actions.hpp
index 0191f8b..0a9a287 100644
--- a/src/actions.hpp
+++ b/src/actions.hpp
@@ -23,6 +23,7 @@ struct combatant;
#include "map.hpp"
#include "unit.hpp"
+#include "unit_map.hpp"
#include
diff --git a/src/ai_dfool.hpp b/src/ai_dfool.hpp
index ec043c4..d0f4076 100644
--- a/src/ai_dfool.hpp
+++ b/src/ai_dfool.hpp
@@ -5,6 +5,7 @@
#include "ai_interface.hpp"
#include "map.hpp"
+#include "unit_map.hpp"
#include
#include
#include
diff --git a/src/config_adapter.cpp b/src/config_adapter.cpp
index 9fd56ae..2726804 100644
--- a/src/config_adapter.cpp
+++ b/src/config_adapter.cpp
@@ -12,6 +12,7 @@
*/
#include "global.hpp"
+#include "unit_map.hpp"
#include
#include "config_adapter.hpp"
diff --git a/src/game_events.hpp b/src/game_events.hpp
index 4e0280d..dd2b8cc 100644
--- a/src/game_events.hpp
+++ b/src/game_events.hpp
@@ -21,6 +21,7 @@ class display;
#include "map.hpp"
#include "team.hpp"
#include "unit.hpp"
+#include "unit_map.hpp"
#include "variable.hpp"
#include
diff --git a/src/pathfind.cpp b/src/pathfind.cpp
index 6a61b4b..4f2c841 100644
--- a/src/pathfind.cpp
+++ b/src/pathfind.cpp
@@ -19,6 +19,7 @@ See the COPYING file for more details.
#include "log.hpp"
#include "pathfind.hpp"
#include "util.hpp"
+#include "unit_map.hpp"
#include "wassert.hpp"
class gamestatus;
diff --git a/src/preferences.cpp b/src/preferences.cpp
index c71ffef..e3f8d85 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -24,6 +24,7 @@
#include "preferences.hpp"
#include "sound.hpp"
#include "util.hpp"
+#include "unit_map.hpp"
#include "video.hpp" // non_interactive()
#include "wassert.hpp"
#include "wesconfig.h"
diff --git a/src/unit.hpp b/src/unit.hpp
index c23006d..dbc31cf 100644
--- a/src/unit.hpp
+++ b/src/unit.hpp
@@ -19,9 +19,9 @@
#include "team.hpp"
#include "unit_types.hpp"
#include "image.hpp"
-#include "unit_map.hpp"
class unit;
+class unit_map;
class display;
class gamestatus;
@@ -396,16 +396,7 @@ void sort_units(std::vector< unit > &);
int team_units(const unit_map& units, unsigned int team_num);
int team_upkeep(const unit_map& units, unsigned int team_num);
-unit_map::const_iterator team_leader(unsigned int side, const unit_map& units);
-std::string team_name(int side, const unit_map& units);
-unit_map::iterator find_visible_unit(unit_map& units,
- const gamemap::location loc,
- const gamemap& map,
- const std::vector& teams, const team& current_team);
-unit_map::const_iterator find_visible_unit(const unit_map& units,
- const gamemap::location loc,
- const gamemap& map,
- const std::vector& teams, const team& current_team);
+
struct team_data
{
diff --git a/src/unit_abilities.cpp b/src/unit_abilities.cpp
index 4fa0f6a..8bd4460 100644
--- a/src/unit_abilities.cpp
+++ b/src/unit_abilities.cpp
@@ -12,6 +12,7 @@
*/
#include "unit.hpp"
+#include "unit_map.hpp"
#include "unit_abilities.hpp"
#include "wassert.hpp"
diff --git a/src/unit_map.hpp b/src/unit_map.hpp
index e71203a..d8b8059 100644
--- a/src/unit_map.hpp
+++ b/src/unit_map.hpp
@@ -14,6 +14,7 @@
#define UNIT_MAP_H_INCLUDED
#include
+#include
#include "map.hpp"
#include "unit.hpp"
@@ -149,4 +150,15 @@ private:
std::mapgamemap::location,std::pair<gamemap::location,unit*> map_;
};
+unit_map::const_iterator team_leader(unsigned int side, const unit_map& units);
+std::string team_name(int side, const unit_map& units);
+unit_map::iterator find_visible_unit(unit_map& units,
+ const gamemap::location loc,
+ const gamemap& map,
+ const std::vector& teams, const team& current_team);
+unit_map::const_iterator find_visible_unit(const unit_map& units,
+ const gamemap::location loc,
+ const gamemap& map,
+ const std::vector& teams, const team& current_team);
+
#endif // UNIT_MAP_H_INCLUDED
diff --git a/src/upload_log.cpp b/src/upload_log.cpp
index 0718249..bcf38fc 100644
--- a/src/upload_log.cpp
+++ b/src/upload_log.cpp
@@ -23,6 +23,7 @@
#include "upload_log.hpp"
#include "wesconfig.h"
#include "wml_separators.hpp"
+#include "unit_map.hpp"
#include "SDL_net.h"
L'informatique n'est pas une science exacte, on n'est jamais à l'abri d'un succès