#At file:///C:/src/bzr.mysql/wex/installer/ based on revid:mike.lischke@stripped
461 Iggy Galarza 2011-05-12
ManifestUpdater - Update the manifest-base.xml when a new manifest is created.
modified:
ManifestUpdater/ManifestUpdater.csproj
ManifestUpdater/ProductManifest.cs
ManifestUpdater/Program.cs
=== modified file 'ManifestUpdater/ManifestUpdater.csproj'
--- a/ManifestUpdater/ManifestUpdater.csproj 2011-03-24 15:28:30 +0000
+++ b/ManifestUpdater/ManifestUpdater.csproj 2011-05-12 13:43:54 +0000
@@ -58,7 +58,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
- <PostBuildEvent>copy "$(TargetPath)" "$(SolutionDir)Setup\$(TargetFileName)"</PostBuildEvent>
+ <PostBuildEvent>copy "$(TargetPath)" "$(SolutionDir)common\$(TargetFileName)"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
=== modified file 'ManifestUpdater/ProductManifest.cs'
--- a/ManifestUpdater/ProductManifest.cs 2011-04-11 13:15:47 +0000
+++ b/ManifestUpdater/ProductManifest.cs 2011-05-12 13:43:54 +0000
@@ -62,14 +62,31 @@ namespace WexInstaller.Core
}
}
- public void Save(string file)
+ public void Save(string file, bool isManifestBase)
{
try
{
- XmlSerializer s = new XmlSerializer(typeof(ProductManifest));
- TextWriter w = new StreamWriter(file);
- s.Serialize(w, this);
- w.Close();
+ XmlSerializer s = null;
+
+ if (isManifestBase == false)
+ {
+ s = new XmlSerializer(typeof(ProductManifest));
+ }
+ else
+ {
+ XmlAttributeOverrides attributeOverrides = new XmlAttributeOverrides();
+ XmlAttributes attributes = new XmlAttributes();
+
+ /* Hide the Feature Tree.*/
+ attributes.XmlIgnore = true;
+ attributeOverrides.Add(typeof(Package), "Features", attributes);
+
+ s = new XmlSerializer(typeof(ProductManifest), attributeOverrides);
+ }
+
+ TextWriter w = new StreamWriter(file);
+ s.Serialize(w, this);
+ w.Close();
}
catch (Exception ex)
{
=== modified file 'ManifestUpdater/Program.cs'
--- a/ManifestUpdater/Program.cs 2011-04-29 21:37:23 +0000
+++ b/ManifestUpdater/Program.cs 2011-05-12 13:43:54 +0000
@@ -48,7 +48,10 @@ namespace ManifestUpdater
}
// now save the manifest
- manifest.Save(outFile);
+ manifest.Save(outFile, false);
+
+ // and update the input file too.
+ manifest.Save(inFile, true);
if (wait)
{
Console.WriteLine();
Attachment: [text/bzr-bundle] bzr/iggy@mysql.com-20110512134354-pxn46fl35axkbrlr.bundle
| Thread |
|---|
| • bzr commit into wex-installer-1.0 branch (iggy:461) | Iggy Galarza | 12 May |