diff --git a/Tools/PatchXmlCreator/Helper.cs b/Tools/PatchXmlCreator/Helper.cs
index ca9896771..bfeb98e4e 100644
--- a/Tools/PatchXmlCreator/Helper.cs
+++ b/Tools/PatchXmlCreator/Helper.cs
@@ -80,7 +80,7 @@ private static string GetProjectDirectory
/// Gets the output path.
///
///
- private static string GetOutputPath
+ internal static string GetOutputPath
{
get
{
diff --git a/Tools/PatchXmlCreator/PatchXmlCreatorWindow.cs b/Tools/PatchXmlCreator/PatchXmlCreatorWindow.cs
index a5b4b00c6..4c0ff5388 100644
--- a/Tools/PatchXmlCreator/PatchXmlCreatorWindow.cs
+++ b/Tools/PatchXmlCreator/PatchXmlCreatorWindow.cs
@@ -23,11 +23,6 @@ internal partial class PatchXmlCreatorWindow : EVEMonForm
#region Fields
private const string CompatibilityMessage = "\nNOT COMPATIBLE with EVEMon prior to version 2.2.0";
-
- private static readonly Dictionary s_listOfInitMessages = new Dictionary();
- private static readonly List s_datafiles = new List();
- private static readonly CultureInfo s_enUsCulture = new CultureInfo("en-US");
-
private const string InstallerFilename = "EVEMon-install-{0}.exe";
private const string DateTimeFormat = "dd MMMM yyyy";
private const string DatafilesMessageFormat = "{0} {1} ({2}) {3} data file by the EVEMon Development Team";
@@ -35,6 +30,12 @@ internal partial class PatchXmlCreatorWindow : EVEMonForm
private const string InstallerArgs = "/S /AUTORUN /SKIPDOTNET";
private const string AdditionalArgs = "/D=%EVEMON_EXECUTABLE_PATH%";
+ private static readonly Dictionary s_listOfInitMessages = new Dictionary();
+ private static readonly List s_datafiles = new List();
+ private static readonly CultureInfo s_enUsCulture = new CultureInfo("en-US");
+
+ private static string s_version;
+
private readonly Action m_action;
private Control m_activeTextBox;
@@ -136,9 +137,12 @@ private void OnClick(object sender, EventArgs e)
///
private static string GetAssemblyVersion()
{
- return
- AssemblyName.GetAssemblyName(Path.Combine(Helper.GetSourceFilesDirectory, Helper.EVEMonExecFilename))
- .Version.ToString();
+ if (!String.IsNullOrWhiteSpace(s_version))
+ return s_version;
+
+ return s_version = AssemblyName
+ .GetAssemblyName(Path.Combine(Helper.GetSourceFilesDirectory, Helper.EVEMonExecFilename))
+ .Version.ToString();
}
///
@@ -177,8 +181,8 @@ internal static FileInfo GetInstallerPath()
{
string installerFile = String.Format(CultureConstants.InvariantCulture, InstallerFilename,
GetAssemblyVersionWithoutRevision(GetAssemblyVersion()));
- string installerPath = String.Format(CultureConstants.InvariantCulture, "{1}{0}{2}", Path.DirectorySeparatorChar,
- Helper.GetSourceFilesDirectory.Replace("Release", "Installbuilder\\Installer"), installerFile);
+ string installerPath = Path.Combine(Helper.GetSourceFilesDirectory
+ .Replace(Helper.GetOutputPath, "bin\\Installbuilder\\Installer\\"), installerFile);
return new FileInfo(installerPath);
}
@@ -429,7 +433,7 @@ private bool ButtonEnabledFromReleaseControls()
if (String.IsNullOrEmpty(control.Text))
control.BackColor = SystemColors.Highlight;
else if (control == rtbReleaseMessage || (!Path.GetInvalidPathChars().Any(
- invalidChar => control.Text.Contains(invalidChar)) && !control.Text.Contains("#")))
+ invalidChar => control.Text.Contains(invalidChar))))
{
continue;
}
@@ -522,6 +526,7 @@ private string ExportPatchXml()
SerializablePatch serial = new SerializablePatch();
ExportRelease(serial.Release);
+ ExportReleases(serial.Releases);
ExportDatafiles(serial.Datafiles);
XmlDocument doc = (XmlDocument)Util.SerializeToXmlDocument(serial);
@@ -547,6 +552,22 @@ private void ExportRelease(SerializableRelease serialRelease)
serialRelease.Message = rtbReleaseMessage.Text.Trim();
}
+ ///
+ /// Serializes the releases info for the patch file.
+ ///
+ /// The serial releases.
+ private static void ExportReleases(ICollection serialReleases)
+ {
+ SerializablePatch patch = TryDeserializePatchXml();
+ if (patch == null)
+ return;
+
+ foreach (SerializableRelease release in patch.Releases)
+ {
+ serialReleases.Add(release);
+ }
+ }
+
///
/// Serializes the data files info for the patch file.
///