- Fixed loader issue for SilentInstaller;
- Updated file version to 1.2.1.1;
This commit is contained in:
parent
af8e0ed935
commit
6ff01b5adf
4 changed files with 14 additions and 10 deletions
|
@ -37,5 +37,5 @@ using System.Reflection;
|
|||
[assembly: AssemblyCompany("Outercurve Foundation")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012 Outercurve Foundation.")]
|
||||
[assembly: AssemblyVersion("1.2.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.1.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.1.1")]
|
||||
[assembly: AssemblyInformationalVersion("1.2.1")]
|
|
@ -80,7 +80,7 @@ namespace WebsitePanel.Installer.Core
|
|||
|
||||
private WebClient fileLoader;
|
||||
|
||||
public BitlyLoader(string remoteFile)
|
||||
internal BitlyLoader(string remoteFile)
|
||||
: base(remoteFile)
|
||||
{
|
||||
InitFileLoader();
|
||||
|
@ -175,7 +175,7 @@ namespace WebsitePanel.Installer.Core
|
|||
public event EventHandler<LoaderEventArgs<Int32>> ProgressChanged;
|
||||
public event EventHandler<EventArgs> OperationCompleted;
|
||||
|
||||
public Loader(string remoteFile)
|
||||
internal Loader(string remoteFile)
|
||||
{
|
||||
this.remoteFile = remoteFile;
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -337,10 +337,13 @@ namespace WebsitePanel.SilentInstaller
|
|||
string installerPath = Utils.GetDbString(row["InstallerPath"]);
|
||||
string installerType = Utils.GetDbString(row["InstallerType"]);
|
||||
|
||||
// Get appropriate loader to download the app distributive
|
||||
var loader = LoaderFactory.CreateFileLoader(fileName);
|
||||
// Mimic synchronous download process for the console app
|
||||
AutoResetEvent autoEvent = new AutoResetEvent(false);
|
||||
|
||||
try
|
||||
{
|
||||
// download installer
|
||||
var loader = new Loader(fileName);
|
||||
//
|
||||
loader.OperationCompleted += new EventHandler<EventArgs>((object sender, EventArgs e) =>
|
||||
{
|
||||
|
@ -374,25 +377,26 @@ namespace WebsitePanel.SilentInstaller
|
|||
Log.WriteEnd("Installer finished");
|
||||
// Remove temporary directory
|
||||
FileUtils.DeleteTempDirectory();
|
||||
// We are done
|
||||
autoEvent.Set();
|
||||
});
|
||||
|
||||
// TODO: Add cleanup for events.
|
||||
loader.OperationFailed += new EventHandler<LoaderEventArgs<Exception>>(loader_OperationFailed);
|
||||
loader.ProgressChanged += new EventHandler<LoaderEventArgs<int>>(loader_ProgressChanged);
|
||||
loader.StatusChanged += new EventHandler<LoaderEventArgs<string>>(loader_StatusChanged);
|
||||
//
|
||||
loader.LoadAppDistributive();
|
||||
// Wait until the download is complete
|
||||
autoEvent.WaitOne();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.WriteError("Installer error", ex);
|
||||
//AppContext.AppForm.ShowError(ex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
//this.componentSettingsXml = null;
|
||||
//this.componentCode = null;
|
||||
autoEvent.Set();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void loader_StatusChanged(object sender, LoaderEventArgs<string> e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue