From a66edb771502d36c67e50977dca20b414e767f55 Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 6 Mar 2024 17:12:26 -0500 Subject: split up scripts --- install_apps.ps1 | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) (limited to 'install_apps.ps1') diff --git a/install_apps.ps1 b/install_apps.ps1 index e291754..cb9514d 100644 --- a/install_apps.ps1 +++ b/install_apps.ps1 @@ -1,12 +1,14 @@ <# .SYNOPSIS Post-install script for adding all my apps +.NOTES + Inspired by https://gist.github.com/mikepruett3/7ca6518051383ee14f9cf8ae63ba18a7 #> $ErrorActionPreference = "Stop" -function Install-Winget-Package { +function Install-WingetPackage { param ( [String]$Package ) @@ -21,15 +23,12 @@ function Install-Winget-Package { } } -# This script does a lot so a warning is good -if ( (Read-Host -Prompt "Do you want to install all packages? [y/n]?").toLower() -ne "y" ) { - Write-Host "You didn't say yes! Bailing out..." - Exit -} +function Install-Winget { + <# + .NOTES + Sourced from https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901 + #> -# Install winget if it's not already -## https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901 -if (! (Get-AppxPackage -Name "Microsoft.DesktopAppInstaller") ) { Write-Host -Message "Installing winget" $releasesUrl = "https://api.github.com/repos/microsoft/winget-cli/releases/latest" @@ -39,16 +38,28 @@ if (! (Get-AppxPackage -Name "Microsoft.DesktopAppInstaller") ) { Write-Verbose -Message "Installing latest release from $($latestRelease.browser_download_url))" Add-AppxPackage -Path $latestRelease.browser_download_url - Write-Host -Message "Done!" + Write-Host -Message "Installed WinGet!" +} + + +# This script does a lot so a warning is good +if ( (Read-Host -Prompt "Do you want to install all packages? [y/n]?").toLower() -ne "y" ) { + Write-Host -Message "You didn't say yes! Bailing out..." + Exit +} + +# Install winget if it's not already +if (! (Get-AppxPackage -Name "Microsoft.DesktopAppInstaller") ) { + Install-Winget } $wingetPackages = @( - # apps - "Cemu.Cemu" + # regular apps + #"Cemu.Cemu" "Hibbiki.Chromium" "Ubisoft.Connect" "Discord.Discord" - "DolphinEmulator.Dolphin" + #"DolphinEmulator.Dolphin" "ElectronicArts.EADesktop" "Element.Element" "EpicGames.EpicGamesLauncher" @@ -58,12 +69,12 @@ $wingetPackages = @( "OBSProject.OBSStudio" "dotPDNLLC.paintdotnet" "PrismLauncher.PrismLauncher" - "Libretro.RetroArch" + #"Libretro.RetroArch" "Spotify.Spotify" "Valve.Steam" "tailscale.tailscale" "OneGal.Viper" - "YuzuEmu.Yuzu.Mainline" + #"YuzuEmu.Yuzu.Mainline" # utils "bootandy.dust" @@ -108,7 +119,7 @@ $wingetPackages = @( ) foreach ($package in $wingetPackages) { - Install-Winget-Package -Package $package + Install-WingetPackage -Package $package } -Write-Host "Done!" +Write-Host -Message "Done!" -- cgit v1.2.3