Author: shadowmaster
Date: Wed Apr 4 04:16:50 2012
New Revision: 53768
URL: http://svn.gna.org/viewcvs/wesnoth?rev=53768&view=rev
Log:
addon: Write only the minimal set of information required to _info.cfg files
This is currently just the type, uploads and version attributes, just
like in versions 1.6.x through 1.10.x.
It would have made sense to write everything for the tentative
dependency tracking mechanism, but a certain developer has made the
implementation of such rather unlikely to come from me right now.
Modified:
trunk/src/addon/client.cpp
trunk/src/addon/info.cpp
trunk/src/addon/info.hpp
Modified: trunk/src/addon/client.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/addon/client.cpp?rev=53768&r1=53767&r2=53768&view=diff
==============================================================================
--- trunk/src/addon/client.cpp (original)
+++ trunk/src/addon/client.cpp Wed Apr 4 04:16:50 2012
@@ -235,7 +235,7 @@
"# of version information on installed add-ons. DO NOT EDIT!\n"
"#\n";
- info.write(wml.add_child("info"));
+ info.write_minimal(wml.add_child("info"));
write(info_contents, wml);
config file;
Modified: trunk/src/addon/info.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/addon/info.cpp?rev=53768&r1=53767&r2=53768&view=diff
==============================================================================
--- trunk/src/addon/info.cpp (original)
+++ trunk/src/addon/info.cpp Wed Apr 4 04:16:50 2012
@@ -102,6 +102,13 @@
}
cfg["dependencies"] = utils::join(this->depends);
+}
+
+void addon_info::write_minimal(config& cfg) const
+{
+ cfg["version"] = this->version.str();
+ cfg["uploads"] = this->uploads;
+ cfg["type"] = this->type;
}
std::string addon_info::display_title() const
Modified: trunk/src/addon/info.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/addon/info.hpp?rev=53768&r1=53767&r2=53768&view=diff
==============================================================================
--- trunk/src/addon/info.hpp (original)
+++ trunk/src/addon/info.hpp Wed Apr 4 04:16:50 2012
@@ -96,6 +96,16 @@
void write(config& cfg) const;
/**
+ * Write only minimal WML used for state tracking (_info.cfg) files.
+ *
+ * This currently only includes the add-on type, upload count,
+ * and version number.
+ *
+ * @param cfg Target WML config object.
+ */
+ void write_minimal(config& cfg) const;
+
+ /**
* Get a title or automatic title for display.
*
* If the real @a title is empty, the returned value is the @a id with
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits