Author: suokko
Date: Wed Aug 20 22:36:41 2008
New Revision: 28808
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28808&view=rev
Log:
Prevent dummylocales compilation in windows
Modified:
trunk/SConstruct
trunk/src/language.cpp
trunk/src/tests/main.cpp
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=28808&r1=28807&r2=28808&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Wed Aug 20 22:36:41 2008
@@ -348,7 +348,7 @@
# Dummy locales
#
-if env["nls"]:
+if env["nls"] and env['PLATFORM'] != 'win32':
env.Command(Dir("locales/C"), [], "-mkdir -p locales;echo | localedef
--force \"$TARGET\" 2> /dev/null")
language_cfg_re = re.compile(r"data/languages/(.*)\.cfg")
language_cfgs = glob("data/languages/*.cfg")
@@ -379,7 +379,7 @@
installable_subs = Split('data fonts icons images sounds')
if env['nls']:
installable_subs.append("translations")
-if env['nls']:
+if env['nls'] and env['PLATFORM'] != 'win32':
installable_subs.append("locales")
fifodir = env['fifodir']
mandir = env["mandir"]
Modified: trunk/src/language.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/language.cpp?rev=28808&r1=28807&r2=28808&view=diff
==============================================================================
--- trunk/src/language.cpp (original)
+++ trunk/src/language.cpp Wed Aug 20 22:36:41 2008
@@ -104,11 +104,14 @@
bool language_def::available() const
{
+#ifndef _WIN32
if (game_config::use_dummylocales)
{
// Dummy has every language available.
return true;
- }else{
+ }else
+#endif
+ {
if(has_language(localename)) {
return true;
} else {
@@ -118,6 +121,7 @@
}
}
}
+
return false;
}
}
@@ -219,6 +223,8 @@
category = LC_ALL;
#endif
+#ifndef _WIN32
+ // dummy locales aren't working in windows
if (game_config::use_dummylocales)
{
static enum { UNINIT, NONE, PRESENT } status = UNINIT;
@@ -242,6 +248,7 @@
locale = xlocale.c_str();
}
}
+#endif
char *res = NULL;
#ifdef _WIN32
Modified: trunk/src/tests/main.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/tests/main.cpp?rev=28808&r1=28807&r2=28808&view=diff
==============================================================================
--- trunk/src/tests/main.cpp (original)
+++ trunk/src/tests/main.cpp Wed Aug 20 22:36:41 2008
@@ -50,12 +50,13 @@
wesnoth_global_fixture()
{
game_config::use_dummylocales = true;
+ game_config::path = "./";
// Initialize unit tests
SDL_Init(SDL_INIT_TIMER);
test_utils::get_fake_display();
- lg::set_log_domain_severity("all",3);
+// lg::set_log_domain_severity("all",3);
// Set more report as default
if (boost::unit_test::runtime_config::log_level() ==
boost::unit_test::invalid_log_level)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits