summaryrefslogtreecommitdiff
path: root/install_apps.ps1
diff options
context:
space:
mode:
authorseth <[email protected]>2024-03-06 17:12:26 -0500
committerseth <[email protected]>2024-03-06 17:12:26 -0500
commita66edb771502d36c67e50977dca20b414e767f55 (patch)
treee67ec5e85853cc2a9f1e4008714a5b43c41da8ac /install_apps.ps1
parenta37c8e6da88389bf5030e1ae4ff601c29b6c2f03 (diff)
split up scripts
Diffstat (limited to 'install_apps.ps1')
-rw-r--r--install_apps.ps145
1 files changed, 28 insertions, 17 deletions
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!"