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.
This commit is contained in:
parent
d91dbf73e4
commit
1bee8c9033
3 changed files with 18 additions and 1 deletions
|
@ -235,7 +235,7 @@ bool addons_client::install_addon(config& archive_cfg, const addon_info& info)
|
|||
"# 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;
|
||||
|
|
|
@ -104,6 +104,13 @@ void addon_info::write(config& cfg) const
|
|||
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
|
||||
{
|
||||
if(this->title.empty()) {
|
||||
|
|
|
@ -95,6 +95,16 @@ struct addon_info
|
|||
|
||||
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.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue