mirror of
https://github.com/Baipyrus/dotfiles.git
synced 2024-12-25 10:51:46 +00:00
add winget installation module
This commit is contained in:
parent
5090a04e95
commit
3a849a448f
@ -1,6 +1,10 @@
|
||||
Import-Module ./util/windows.psm1
|
||||
Import-Module ./util/winget.psm1
|
||||
|
||||
|
||||
# (Optionally) Install required Software
|
||||
InstallWinget
|
||||
|
||||
# Define paths for tools and configurations
|
||||
$dotfilesRepo = "$env:TMP\dotfiles"
|
||||
$alacrittyConfigDir = "$env:APPDATA\alacritty"
|
||||
|
11
util/winget.list
Normal file
11
util/winget.list
Normal file
@ -0,0 +1,11 @@
|
||||
Git.Git
|
||||
Microsoft.OpenJDK.21
|
||||
Alacritty.Alacritty
|
||||
OpenJS.NodeJS.LTS
|
||||
Chocolatey.Chocolatey
|
||||
Microsoft.DotNet.SDK.8
|
||||
Microsoft.PowerShell
|
||||
GoLang.Go
|
||||
Python.Python.3.12
|
||||
Rustlang.Rustup
|
||||
rjpcomputing.luaforwindows
|
20
util/winget.psm1
Normal file
20
util/winget.psm1
Normal file
@ -0,0 +1,20 @@
|
||||
function InstallWinget
|
||||
{
|
||||
# Reference: https://learn.microsoft.com/en-us/windows/package-manager/winget/#install-winget-on-windows-sandbox
|
||||
$progressPreference = 'silentlyContinue'
|
||||
Write-Host "Installing WinGet PowerShell module from PSGallery..."
|
||||
Install-PackageProvider -Name NuGet -Force | Out-Null
|
||||
Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery | Out-Null
|
||||
Write-Host "Using Repair-WinGetPackageManager cmdlet to bootstrap WinGet..."
|
||||
Repair-WinGetPackageManager
|
||||
}
|
||||
|
||||
function WingetInstall
|
||||
{
|
||||
$install = Read-Host "Install WinGet now? [Y/n]"
|
||||
if ($install.ToLower() -ne 'n')
|
||||
{ InstallWinget
|
||||
}
|
||||
|
||||
winget.exe install -s winget --accept-source-agreements (Get-Content ./util/winget.list)
|
||||
}
|
Loading…
Reference in New Issue
Block a user