|
|
@ -1,5 +1,6 @@ |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Collections.ObjectModel; |
|
|
|
using System.Collections.ObjectModel; |
|
|
|
|
|
|
|
using System.IO; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using CommunityToolkit.Mvvm.ComponentModel; |
|
|
|
using CommunityToolkit.Mvvm.ComponentModel; |
|
|
|
using CommunityToolkit.Mvvm.Input; |
|
|
|
using CommunityToolkit.Mvvm.Input; |
|
|
@ -114,11 +115,13 @@ public partial class OneClickInstallViewModel : ViewModelBase |
|
|
|
} |
|
|
|
} |
|
|
|
IsIndeterminate = false; |
|
|
|
IsIndeterminate = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var libraryDir = settingsManager.LibraryDir; |
|
|
|
|
|
|
|
|
|
|
|
// get latest version & download & install |
|
|
|
// get latest version & download & install |
|
|
|
SubHeaderText = "Getting latest version..."; |
|
|
|
SubHeaderText = "Getting latest version..."; |
|
|
|
var latestVersion = await SelectedPackage.GetLatestVersion(); |
|
|
|
var latestVersion = await SelectedPackage.GetLatestVersion(); |
|
|
|
SelectedPackage.InstallLocation = |
|
|
|
SelectedPackage.InstallLocation = |
|
|
|
$"{settingsManager.LibraryDir}\\Packages\\{SelectedPackage.Name}"; |
|
|
|
Path.Combine(libraryDir, "Packages", SelectedPackage.Name); |
|
|
|
SelectedPackage.ConsoleOutput += (_, output) => SubSubHeaderText = output.Text; |
|
|
|
SelectedPackage.ConsoleOutput += (_, output) => SubSubHeaderText = output.Text; |
|
|
|
|
|
|
|
|
|
|
|
await DownloadPackage(latestVersion); |
|
|
|
await DownloadPackage(latestVersion); |
|
|
@ -130,7 +133,7 @@ public partial class OneClickInstallViewModel : ViewModelBase |
|
|
|
var installedPackage = new InstalledPackage |
|
|
|
var installedPackage = new InstalledPackage |
|
|
|
{ |
|
|
|
{ |
|
|
|
DisplayName = SelectedPackage.DisplayName, |
|
|
|
DisplayName = SelectedPackage.DisplayName, |
|
|
|
LibraryPath = $"Packages\\{SelectedPackage.Name}", |
|
|
|
LibraryPath = Path.Combine("Packages", SelectedPackage.Name), |
|
|
|
Id = Guid.NewGuid(), |
|
|
|
Id = Guid.NewGuid(), |
|
|
|
PackageName = SelectedPackage.Name, |
|
|
|
PackageName = SelectedPackage.Name, |
|
|
|
PackageVersion = latestVersion, |
|
|
|
PackageVersion = latestVersion, |
|
|
|