Author: suokko
Date: Thu Sep 11 08:33:10 2008
New Revision: 29387
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29387&view=rev
Log:
Fixed windows user data directory setup code and added man page entry for
--config-dir
Modified:
trunk/RELEASE_NOTES
trunk/doc/man/wesnoth.6
trunk/src/filesystem.cpp
trunk/src/game.cpp
Modified: trunk/RELEASE_NOTES
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/RELEASE_NOTES?rev=29387&r1=29386&r2=29387&view=diff
==============================================================================
--- trunk/RELEASE_NOTES (original)
+++ trunk/RELEASE_NOTES Thu Sep 11 08:33:10 2008
@@ -37,4 +37,10 @@
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.
+you most likely need to add editor2's sources to the build or disable it.i
+
+*** 1.5.4+svn
+
+In wnidows user data directory location changed to AppData in user's home
+directory. If giving "--config-dir SHARED" as command line parameter wenoth
+uses old userdata directory inside instalation directory.
Modified: trunk/doc/man/wesnoth.6
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/doc/man/wesnoth.6?rev=29387&r1=29386&r2=29387&view=diff
==============================================================================
--- trunk/doc/man/wesnoth.6 (original)
+++ trunk/doc/man/wesnoth.6 Thu Sep 11 08:33:10 2008
@@ -50,22 +50,14 @@
.B -c, --campaign
skip menu, show directly the campaign menu.
.TP
-.BI --compress \ infile\ outfile
-compresses a savefile
-.RI ( infile )
-that is in text WML format into binary WML format
-.RI ( outfile ).
+.B --config-dir <name>
+Makes wesnoth use <name> directory in $HOME for storing user data.
+win32: If <name> is SHARED wesnoth uses userdata directory in weanoth
instalation directory.
.TP
.B -d, --debug
shows extra debugging information and enables additional command mode
options in-game (see the website at http://www.wesnoth.org/wiki/CommandMode
for more information about command mode).
-.TP
-.BI --decompress \ infile\ outfile
-decompresses a savefile
-.RI ( infile )
-that is in binary WML format into text WML format
-.RI ( outfile ).
.TP
.B --dummylocales
Use special dummy locales to switch to any language even if that language
Modified: trunk/src/filesystem.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/filesystem.cpp?rev=29387&r1=29386&r2=29387&view=diff
==============================================================================
--- trunk/src/filesystem.cpp (original)
+++ trunk/src/filesystem.cpp Thu Sep 11 08:33:10 2008
@@ -446,18 +446,16 @@
const std::string PREFERENCES_DIR = ".wesnoth" +
std::string(game_config::version).substr(0,3);
#endif
#ifdef _WIN32
-#ifndef SHARED_USERDATA
- const char* appdata = getenv("APPDATA");
-#else
const char* appdata = "";
-#endif
+ if(path != "SHARED")
+ appdata = getenv("APPDATA");
if (strlen(appdata) > 0)
{
if (path.empty())
{
path = PREFERENCES_DIR;
}
- game_config::preferences_dir += appdata +std::string("/")+ path;
+ game_config::preferences_dir = appdata +std::string("/")+ path;
return;
} else {
if (path.empty())
Modified: trunk/src/game.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=29387&r1=29386&r2=29387&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Thu Sep 11 08:33:10 2008
@@ -331,10 +331,6 @@
multiplayer_server_ = "";
}
- } else if(val == "--config-dir") {
- if (argc_ <= ++arg_)
- break;
- set_preferences_dir(argv_[arg_]);
} else if(val == "--multiplayer" || val == "-m") {
multiplayer_mode_ = true;
break; //parse the rest of the arguments when we set up
the game
@@ -1753,6 +1749,10 @@
python_ai::invoke("documentation.py");
return 0;
#endif
+ } else if(val == "--config-dir") {
+ if (argc_ <= ++arg_)
+ break;
+ set_preferences_dir(argv_[arg_]);
} else if (val.substr(0, 6) == "--log-") {
size_t p = val.find('=');
if (p == std::string::npos) {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits