| 167 | }; |
| 168 | |
| 169 | bool cmCPackIFWRepository::PatchUpdatesXml() |
| 170 | { |
| 171 | // Lazy directory initialization |
| 172 | if (this->Directory.empty() && this->Generator) { |
| 173 | this->Directory = this->Generator->toplevel; |
| 174 | } |
| 175 | |
| 176 | // Filenames |
| 177 | std::string updatesXml = this->Directory + "/repository/Updates.xml"; |
| 178 | std::string updatesPatchXml = |
| 179 | this->Directory + "/repository/UpdatesPatch.xml"; |
| 180 | |
| 181 | // Output stream |
| 182 | cmGeneratedFileStream fout(updatesPatchXml); |
| 183 | cmXMLWriter xout(fout); |
| 184 | |
| 185 | xout.StartDocument(); |
| 186 | |
| 187 | this->WriteGeneratedByToStrim(xout); |
| 188 | |
| 189 | // Patch |
| 190 | { |
| 191 | cmCPackIFWUpdatesPatcher patcher(this, xout); |
| 192 | patcher.ParseFile(updatesXml.data()); |
| 193 | } |
| 194 | |
| 195 | xout.EndDocument(); |
| 196 | |
| 197 | fout.Close(); |
| 198 | |
| 199 | return cmSystemTools::RenameFile(updatesPatchXml, updatesXml); |
| 200 | } |
| 201 | |
| 202 | void cmCPackIFWRepository::WriteRepositoryConfig(cmXMLWriter& xout) const |
| 203 | { |
no test coverage detected