From 10152188e2ca1c87356cef236cccb3e3277b0895 Mon Sep 17 00:00:00 2001 From: Apocrypher00 Date: Sun, 19 Jan 2025 16:24:43 -0800 Subject: [PATCH] Fixed update check and added NuGet auto-install. --- KillPopper.ps1 | 20 ++++++++++++++++---- README.md | 6 ++++-- version.txt | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/KillPopper.ps1 b/KillPopper.ps1 index 7a6a3ba..9f79f35 100644 --- a/KillPopper.ps1 +++ b/KillPopper.ps1 @@ -12,7 +12,7 @@ Future versions may ignore "Player Downed", but I haven't figured out how to differentiate them yet. .VERSION - 1.2.0 + 1.2.1 .AUTHOR Apocrypher00 @@ -39,8 +39,8 @@ Write-Host "Gallery folder is '$GalleryPath'" $SplashPath = "C:\Program Files (x86)\Steam\steamapps\common\Hunt Showdown\EasyAntiCheat\SplashScreen.png" Write-Host "Splash screen is at '$SplashPath'" -$CurrentVersion = "1.2.0" -$RepoURL = "https://github.com/Apocrypher00/KillPopper/blob/master" +$CurrentVersion = "1.2.1" +$RepoURL = "https://raw.githubusercontent.com/Apocrypher00/KillPopper/master" # $ScriptURL = "$RepoURL/KillPopper.ps1" $VersionFileURL = "$RepoURL/version.txt" @@ -89,6 +89,18 @@ try { Wait-Exit "Failed to start transcript!" } + # Check if NuGet is installed + if (-not (Get-PackageProvider -Name "NuGet" -ListAvailable -ErrorAction SilentlyContinue)) { + Write-Warning "NuGet not installed. Installing..." + try { + Install-PackageProvider -Name "NuGet" -Scope CurrentUser -Force + } catch { + Wait-Exit "Failed to install NuGet!" $_ + } + } else { + Write-Host "NuGet is already installed." + } + # Check if the BurntToast module is installed if (-not (Get-InstalledModule -Name "BurntToast" -ErrorAction SilentlyContinue)) { Write-Warning "BurntToast not installed. Installing..." @@ -130,7 +142,7 @@ try { $LatestVersion = Invoke-WebRequest -Uri $VersionFileURL -UseBasicParsing | Select-Object -ExpandProperty Content $LatestVersion = $LatestVersion.Trim() - if ($CurrentVersion -ne $LatestVersion) { + if ($LatestVersion -gt $CurrentVersion) { Write-Warning "New version available: $LatestVersion!" # Write-Host "Updating script..." diff --git a/README.md b/README.md index aee888c..69651e0 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,13 @@ This is especially helpful when other players die to your traps on the other sid ## Requirements GeForce Experience (for v1.1+), or NVIDIA App (for v1.2+) PowerShell 5+ (PowerShell 5 is pre-installed on Windows) -BurntToast PowerShell module (should be installed the first time the script runs) +BurntToast PowerShell Module (should be installed the first time the script runs) +NuGet PowerShell Package Provider (should be installed the first time the script runs) ## Getting Started Download the latest release and unzip the files to a new folder, then just double click the shortcut with the green arrow before playing. The script will run in the background and monitor for new clips. The script will tell you if any errors occurr by displaying them in the console and by logging everything to the logs folder. -Note that if the script has trouble installing BurntToast, you may have to run it as admin the first time. \ No newline at end of file +Make sure that notifications are enabled and you don't have "Do Not Disturb" turned on while in-game. +The current version of KillPopper doesn't distinguish between kill clips and down clips, so you will have to disable "Player downed" highlights if you don't want notifications to appear when you die. \ No newline at end of file diff --git a/version.txt b/version.txt index 867e524..cb174d5 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.2.1 \ No newline at end of file