Author: ilor
Date: Fri Sep 5 15:32:24 2008
New Revision: 29296
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29296&view=rev
Log:
change #ifdef USE_EDITOR2 to #ifndef DISABLE_EDITOR2 and update buildsystems
accordingly. This will force people using custom builds (e.g. devcpp,
codeblocks) to either add editor2 sources or consciously disable it.
Modified:
trunk/CMakeLists.txt
trunk/RELEASE_NOTES
trunk/SConstruct
trunk/changelog
trunk/configure.ac
trunk/src/game.cpp
trunk/src/gui/widgets/settings.cpp
trunk/src/gui/widgets/settings.hpp
trunk/src/gui/widgets/window.cpp
trunk/src/hotkeys.cpp
trunk/src/hotkeys.hpp
trunk/src/titlescreen.cpp
trunk/src/titlescreen.hpp
Modified: trunk/CMakeLists.txt
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/CMakeLists.txt?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/CMakeLists.txt (original)
+++ trunk/CMakeLists.txt Fri Sep 5 15:32:24 2008
@@ -100,9 +100,9 @@
add_definitions(-DWESNOTH_PATH='\"${DATADIR}\"')
endif(NOT WIN32)
-if(ENABLE_EDITOR2)
- add_definitions(-DUSE_EDITOR2)
-endif(ENABLE_EDITOR2)
+if(NOT ENABLE_EDITOR2)
+ add_definitions(-DDISABLE_EDITOR2)
+endif(NOT ENABLE_EDITOR2)
if(X11_FOUND)
add_definitions(-D_X11)
Modified: trunk/RELEASE_NOTES
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/RELEASE_NOTES?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/RELEASE_NOTES (original)
+++ trunk/RELEASE_NOTES Fri Sep 5 15:32:24 2008
@@ -32,3 +32,9 @@
parameter achieves the same.
***
+
+Editor2 is now built by default, that is, without having to supply an extra
+compilation flag. To build *without* editor2, set the DISABLE_EDITOR2 define.
+The behaviour of scons, cmake and autotools is unchanged, this affects only
+people who use some other building method. If you start getting linker errors,
+you most likely need to add editor2's sources to the build or disable it.
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Fri Sep 5 15:32:24 2008
@@ -282,8 +282,8 @@
if env['internal_data']:
env.Append(CPPDEFINES = "USE_INTERNAL_DATA")
-if env['editor2']:
- env.Append(CPPDEFINES = "USE_EDITOR2")
+if not env['editor2']:
+ env.Append(CPPDEFINES = "DISABLE_EDITOR2")
if have_X:
env.Append(CPPDEFINES = "_X11")
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Fri Sep 5 15:32:24 2008
@@ -6,6 +6,8 @@
* More visible selection - draw a special overlay on every selected hex.
* Allow different map generators to be used in map -> generate map
(FR #3950)
+ * Reverse the preprocessor logic in src/ to default to building editor2,
+ with a DISABLE_EDITOR2 define to build without it.
* Language and i18n:
* updated translations: Chinese (Traditional), Czech, French, Galician,
German, Hungarian, Italian, Polish
Modified: trunk/configure.ac
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/configure.ac?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Sep 5 15:32:24 2008
@@ -302,9 +302,9 @@
AM_CONDITIONAL([INSTALLDATA], [test [ x$game = xyes || test x$editor = xyes ||
test x$editor2 = xyes ]])
AM_CONDITIONAL([DUMMYLOCALES], [test x$dummylocales = xyes])
-if test x$editor2 = xyes
-then
- CXXFLAGS="$CXXFLAGS -DUSE_EDITOR2"
+if test x$editor2 = xno
+then
+ CXXFLAGS="$CXXFLAGS -DDISABLE_EDITOR2"
fi
if test x$dummylocales = xyes; then
Modified: trunk/src/game.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Fri Sep 5 15:32:24 2008
@@ -73,7 +73,7 @@
#include "ai_python.hpp"
#endif
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
#include "editor2/editor_main.hpp"
#endif
@@ -134,7 +134,7 @@
bool new_campaign();
bool goto_campaign();
bool goto_multiplayer();
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
bool goto_editor();
#endif
bool play_multiplayer();
@@ -147,7 +147,7 @@
enum RELOAD_GAME_DATA { RELOAD_DATA, NO_RELOAD_DATA };
void play_game(RELOAD_GAME_DATA reload=RELOAD_DATA);
void play_replay();
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
editor2::EXIT_STATUS start_editor();
#endif
void start_wesnothd();
@@ -205,7 +205,7 @@
std::string multiplayer_server_;
bool jump_to_campaign_, jump_to_multiplayer_;
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
bool jump_to_editor_;
#endif
game_config::config_cache& cache_;
@@ -244,7 +244,7 @@
multiplayer_server_(),
jump_to_campaign_(false),
jump_to_multiplayer_(false)
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
,jump_to_editor_(false)
#endif
,cache_(game_config::config_cache::instance())
@@ -353,7 +353,7 @@
} else if(val == "--new-widgets") {
// This is a hidden option to enable the new widget
toolkit.
gui2::new_widgets = true;
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
} else if(val == "-e" || val == "--editor") {
jump_to_editor_ = true;
#endif
@@ -1114,7 +1114,7 @@
return true;
}
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
bool game_controller::goto_editor()
{
if(jump_to_editor_){
@@ -1581,7 +1581,7 @@
}
}
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
editor2::EXIT_STATUS game_controller::start_editor()
{
cache_.clear_defines();
@@ -1665,7 +1665,7 @@
<< " additional command
mode options in-game.\n"
<< " --decompress INFILE OUTFILE decompresses a
savefile (INFILE) that is in binary\n"
<< " WML format into text
WML format (OUTFILE).\n"
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
<< " -e, --editor starts editor2 not
showing title screen.\n"
#endif
<< " -f, --fullscreen runs the game in
full screen mode.\n"
@@ -1969,7 +1969,7 @@
if(game.goto_multiplayer() == false){
continue; //Go to main menu
}
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
if (game.goto_editor() == false) {
return 0;
}
@@ -2053,7 +2053,7 @@
loadscreen::global_loadscreen_manager
loadscreen(game.disp().video());
game.reload_changed_game_config();
continue;
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
} else if(res == gui::START_MAP_EDITOR) {
//@todo editor can ask the game to quit completely
if (game.start_editor() ==
editor2::EXIT_QUIT_TO_DESKTOP) {
Modified: trunk/src/gui/widgets/settings.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/settings.cpp?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/src/gui/widgets/settings.cpp (original)
+++ trunk/src/gui/widgets/settings.cpp Fri Sep 5 15:32:24 2008
@@ -90,7 +90,7 @@
window_type_list[MP_SERVER_LIST] = "mp_server_list";
window_type_list[MP_CREATE_GAME] = "mp_create_game";
window_type_list[TITLE_SCREEN] = "title_screen";
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
window_type_list[EDITOR_NEW_MAP] = "editor_new_map";
window_type_list[EDITOR_GENERATE_MAP] = "editor_generate_map";
window_type_list[EDITOR_RESIZE_MAP] = "editor_resize_map";
Modified: trunk/src/gui/widgets/settings.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/settings.hpp?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/src/gui/widgets/settings.hpp (original)
+++ trunk/src/gui/widgets/settings.hpp Fri Sep 5 15:32:24 2008
@@ -42,7 +42,7 @@
//! mp game the user wants to play.
MP_SERVER_LIST, //<! The mp server list dialog.
MP_CREATE_GAME, /**< The mp creation dialog. */
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
EDITOR_NEW_MAP, //<! New map dialog
EDITOR_GENERATE_MAP, /** Editor random map genarator dialog */
EDITOR_RESIZE_MAP, /** Editor resize map dialog */
Modified: trunk/src/gui/widgets/window.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.cpp?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.cpp (original)
+++ trunk/src/gui/widgets/window.cpp Fri Sep 5 15:32:24 2008
@@ -172,7 +172,7 @@
*/
} else if(id == "tutorial") {
return static_cast<tretval>(gui::TUTORIAL);
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
} else if(id == "editor") {
return static_cast<tretval>(gui::START_MAP_EDITOR);
#endif
Modified: trunk/src/hotkeys.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/hotkeys.cpp?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/src/hotkeys.cpp (original)
+++ trunk/src/hotkeys.cpp Fri Sep 5 15:32:24 2008
@@ -130,7 +130,7 @@
{ hotkey::HOTKEY_EDIT_AUTO_UPDATE, "editautoupdate", N_("Delay
transition updates"), true, hotkey::SCOPE_GENERAL },
{ hotkey::HOTKEY_EDIT_UPDATE, "editupdate", N_("Update transitions"),
true, hotkey::SCOPE_GENERAL },
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
{ hotkey::HOTKEY_EDITOR_QUIT_TO_DESKTOP, "editor-quit-to-desktop",
N_("Quit to Desktop"), false, hotkey::SCOPE_EDITOR },
{ hotkey::HOTKEY_EDITOR_PARTIAL_UNDO, "editor-partial-undo",
N_("Partial Undo"), false, hotkey::SCOPE_EDITOR },
{ hotkey::HOTKEY_EDITOR_MAP_NEW, "editor-map-new", N_("New Map"),
false, hotkey::SCOPE_EDITOR },
Modified: trunk/src/hotkeys.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/hotkeys.hpp?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/src/hotkeys.hpp (original)
+++ trunk/src/hotkeys.hpp Fri Sep 5 15:32:24 2008
@@ -70,7 +70,7 @@
HOTKEY_EDIT_FLIP, HOTKEY_EDIT_SELECT_ALL, HOTKEY_EDIT_DRAW,
HOTKEY_EDIT_REFRESH, HOTKEY_EDIT_UPDATE, HOTKEY_EDIT_AUTO_UPDATE,
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
HOTKEY_EDITOR_QUIT_TO_DESKTOP,
HOTKEY_EDITOR_PARTIAL_UNDO,
HOTKEY_EDITOR_MAP_NEW, HOTKEY_EDITOR_MAP_LOAD, HOTKEY_EDITOR_MAP_SAVE,
Modified: trunk/src/titlescreen.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.cpp?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/src/titlescreen.cpp (original)
+++ trunk/src/titlescreen.cpp Fri Sep 5 15:32:24 2008
@@ -369,7 +369,7 @@
N_("TitleScreen
button^Multiplayer"),
N_("TitleScreen button^Load"),
N_("TitleScreen button^Add-ons"),
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
N_("TitleScreen button^Editor"),
#endif
N_("TitleScreen
button^Language"),
@@ -389,7 +389,7 @@
N_("Play multiplayer
(hotseat, LAN, or Internet), or a single scenario against the AI"),
N_("Load a saved game"),
N_("Download usermade
campaigns, eras, or map packs"),
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
N_("Start the map editor"),
#endif
N_("Change the language"),
Modified: trunk/src/titlescreen.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/titlescreen.hpp?rev=29296&r1=29295&r2=29296&view=diff
==============================================================================
--- trunk/src/titlescreen.hpp (original)
+++ trunk/src/titlescreen.hpp Fri Sep 5 15:32:24 2008
@@ -31,7 +31,7 @@
NEW_CAMPAIGN, /**< Let user
select a campaign to play */
MULTIPLAYER, /**< Play
single scenario against humans or AI */
LOAD_GAME, GET_ADDONS,
-#ifdef USE_EDITOR2
+#ifndef DISABLE_EDITOR2
START_MAP_EDITOR,
#endif
CHANGE_LANGUAGE, EDIT_PREFERENCES,
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits