mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Add an explicit FullInstall method
This doesn't do everything we want yet like run the application, but it's a start.
This commit is contained in:
@@ -44,6 +44,12 @@ namespace Squirrel
|
||||
/// will return values from 0-100 and Complete, or Throw</param>
|
||||
Task ApplyReleases(UpdateInfo updateInfo, Action<int> progress = null);
|
||||
|
||||
/// <summary>
|
||||
/// Completely Installs a targeted app
|
||||
/// </summary>
|
||||
/// <returns>Completion</returns>
|
||||
Task FullInstall();
|
||||
|
||||
/// <summary>
|
||||
/// Completely uninstalls the targeted app
|
||||
/// </summary>
|
||||
|
||||
@@ -65,6 +65,13 @@ namespace Squirrel
|
||||
await applyReleases.ApplyReleases(updateInfo, progress);
|
||||
}
|
||||
|
||||
public async Task FullInstall()
|
||||
{
|
||||
var updateInfo = await CheckForUpdate();
|
||||
await DownloadReleases(updateInfo.ReleasesToApply);
|
||||
await ApplyReleases(updateInfo);
|
||||
}
|
||||
|
||||
public async Task FullUninstall()
|
||||
{
|
||||
var applyReleases = new ApplyReleasesImpl(rootAppDirectory);
|
||||
|
||||
@@ -53,9 +53,7 @@ namespace Squirrel.Tests
|
||||
}.ForEach(x => File.Copy(IntegrationTestHelper.GetPath("fixtures", x), Path.Combine(remotePackageDir.FullName, x)));
|
||||
|
||||
using (var fixture = new UpdateManager(remotePackageDir.FullName, "theApp", FrameworkVersion.Net45, tempDir)) {
|
||||
var updateInfo = await fixture.CheckForUpdate();
|
||||
await fixture.DownloadReleases(updateInfo.ReleasesToApply);
|
||||
await fixture.ApplyReleases(updateInfo);
|
||||
await fixture.FullInstall();
|
||||
}
|
||||
|
||||
var releasePath = Path.Combine(localAppDir, "packages", "RELEASES");
|
||||
|
||||
Reference in New Issue
Block a user