Skip to content

Commit

Permalink
Basic testing for bulk-installing packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewNaylor committed Oct 25, 2020
1 parent 713df7a commit b88842b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions guinget/ApplyChangesWindow.vb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ Public Class ApplyChangesWindow
' when they're ready to start installing them.
MessageBox.Show("Sorry, we don't support automatic batch package installs yet, but you can double-click or press Enter" &
" on each package in the list to install them individually when you're ready.", "Confirm changes")
Dim PackageIDs As New List(Of String)
Dim PackageVersions As New List(Of String)
For Each Package As DataGridViewRow In datagridviewAppsBeingInstalled.Rows
PackageIDs.Add(Package.Cells(0).Value.ToString)
PackageVersions.Add(Package.Cells(1).Value.ToString)
Next
PackageTools.BulkInstallPkg(datagridviewAppsBeingInstalled.Columns(0))
End Sub

Private Sub InstallSinglePackage()
Expand Down
3 changes: 3 additions & 0 deletions libguinget/PackageTools.vb
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ Public Class PackageTools
For Each Version As String In PackageVersions
' Begin adding packages to the list.
BulkInstallCommandList = "winget install --id " & Package & " -v " & Version & InteractiveFlag & " -e"
'
Next
Next

MessageBox.Show(BulkInstallCommandList.ToString)
End Using
End Sub
#End Region
Expand Down

0 comments on commit b88842b

Please sign in to comment.