Browse Source

Add shared folders setup in package install

pull/5/head
Ionite 1 year ago
parent
commit
2dfa94e6ea
No known key found for this signature in database
  1. 8
      StabilityMatrix/ViewModels/InstallerViewModel.cs

8
StabilityMatrix/ViewModels/InstallerViewModel.cs

@ -23,6 +23,7 @@ public partial class InstallerViewModel : ObservableObject
private readonly ILogger<InstallerViewModel> logger; private readonly ILogger<InstallerViewModel> logger;
private readonly IPyRunner pyRunner; private readonly IPyRunner pyRunner;
private readonly IPackageFactory packageFactory; private readonly IPackageFactory packageFactory;
private readonly ISharedFolders sharedFolders;
[ObservableProperty] [ObservableProperty]
[NotifyPropertyChangedFor(nameof(ProgressBarVisibility))] [NotifyPropertyChangedFor(nameof(ProgressBarVisibility))]
@ -84,12 +85,13 @@ public partial class InstallerViewModel : ObservableObject
public InstallerViewModel(ISettingsManager settingsManager, ILogger<InstallerViewModel> logger, IPyRunner pyRunner, public InstallerViewModel(ISettingsManager settingsManager, ILogger<InstallerViewModel> logger, IPyRunner pyRunner,
IPackageFactory packageFactory) IPackageFactory packageFactory, ISharedFolders sharedFolders)
{ {
this.settingsManager = settingsManager; this.settingsManager = settingsManager;
this.logger = logger; this.logger = logger;
this.pyRunner = pyRunner; this.pyRunner = pyRunner;
this.packageFactory = packageFactory; this.packageFactory = packageFactory;
this.sharedFolders = sharedFolders;
ProgressText = ""; ProgressText = "";
InstallButtonText = "Install"; InstallButtonText = "Install";
@ -257,8 +259,10 @@ public partial class InstallerViewModel : ObservableObject
var version = await DownloadPackage(SelectedVersion.TagName); var version = await DownloadPackage(SelectedVersion.TagName);
await InstallPackage(); await InstallPackage();
ProgressText = "Setting up shared folder links...";
sharedFolders.SetupLinksForPackage(SelectedPackage, SelectedPackage.InstallLocation);
ProgressText = "Done"; ProgressText = "Done";
IsIndeterminate = false; IsIndeterminate = false;
SelectedPackageOnProgressChanged(this, 100); SelectedPackageOnProgressChanged(this, 100);

Loading…
Cancel
Save