public static void installUpdate()
{
buildDownloadForm();
downloadForm.Show();
// sort the list of patches with the oldest first - this is the order they will be insalled in
updateCheck.patchList.Sort(delegate(updateCheck.patches p1, updateCheck.patches p2) { return p1.patchVersion.CompareTo(p2.patchVersion); });
foreach (updateCheck.patches thePatch in updateCheck.patchList)
{
optionDownloadURL = thePatch.patchURL;
optionDownloadPath = Path.Combine(Path.GetTempPath(), Path.GetFileName(optionDownloadURL));
destinationPath = Path.Combine(Path.GetTempPath(), Path.GetFileNameWithoutExtension(optionDownloadURL) + DateTime.Now.Ticks.ToString());
//SkinInfo.mpPaths.configBasePath;
downloadForm.Text = "Download and Install Avalon Update r" + thePatch.patchVersion.ToString();
pLabel.Text = "Starting Download of Patch r" + thePatch.patchVersion.ToString();
Cursor.Current = Cursors.WaitCursor;
Download();
}
downloadForm.Hide();
Cursor.Current = Cursors.Default;
if (AvalonGUIConfig.manualInstallNeeded)
{
string messageStr = "Manual Update Required - To apply close" + " " + "MediaPortal and/or Configuration" + "\n\n";
messageStr = messageStr + string.Format("and run: {0}", Path.GetFileName(optionDownloadPath)) + "\n\n" + "which can be found on your Desktop";
MessageBox.Show(messageStr, "Patch Installer Downloaded to Desktop");
}
}