From 62b8dcbcaa969a6ac1f6d2b7c91c372433974dd6 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Mon, 1 Jul 2024 09:47:26 +1000 Subject: [PATCH 1/5] Remove MicrosoftOutlook Unable to find update API for the latest version v2 --- .../Get-MicrosoftOutlook.ps1 | 23 +++++--- Disabled/MicrosoftOutlook.json | 31 +++++++++++ Evergreen/Manifests/MicrosoftOutlook.json | 54 ------------------- 3 files changed, 48 insertions(+), 60 deletions(-) rename {Evergreen/Apps => Disabled}/Get-MicrosoftOutlook.ps1 (65%) create mode 100644 Disabled/MicrosoftOutlook.json delete mode 100644 Evergreen/Manifests/MicrosoftOutlook.json diff --git a/Evergreen/Apps/Get-MicrosoftOutlook.ps1 b/Disabled/Get-MicrosoftOutlook.ps1 similarity index 65% rename from Evergreen/Apps/Get-MicrosoftOutlook.ps1 rename to Disabled/Get-MicrosoftOutlook.ps1 index 4795c7cc..ccc3b589 100644 --- a/Evergreen/Apps/Get-MicrosoftOutlook.ps1 +++ b/Disabled/Get-MicrosoftOutlook.ps1 @@ -16,26 +16,37 @@ function Get-MicrosoftOutlook { $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) ) - # Read the JSON and convert to a PowerShell object. Return the release version of Teams + # Read the update feed $params = @{ Uri = $res.Get.Update.Uri - Raw = $True + Raw = $true } $Update = Invoke-EvergreenWebRequest @params - - # Read the JSON and build an array of platform, channel, version - if ($Null -ne $Update) { + if ($null -ne $Update) { # Match version number $Version = [RegEx]::Match($Update[-1].Split(" ")[1], $res.Get.Update.MatchVersion).Captures.Groups[1].Value Write-Verbose -Message "$($MyInvocation.MyCommand): Found version: $Version." # Build the output object and output object to the pipeline + $Url = $res.Get.Download.Uri.Zip -replace "#installer", $Update[-1].Split(" ")[1] $PSObject = [PSCustomObject] @{ Version = $Version Sha1Hash = $Update[-1].Split(" ")[0] Size = $Update[-1].Split(" ")[2] - URI = $res.Get.Download.Uri -replace "#installer", $Update[-1].Split(" ")[1] + Type = Get-FileType -File $Url + URI = $Url + } + Write-Output -InputObject $PSObject + + # Build the output object for setup.exe + $Url = (Resolve-SystemNetWebRequest -Uri $res.Get.Download.Uri.Exe).ResponseUri.AbsoluteUri + $PSObject = [PSCustomObject] @{ + Version = $Version + Sha1Hash = "Unknown" + Size = "Unknown" + Type = Get-FileType -File $Url + URI = $Url } Write-Output -InputObject $PSObject } diff --git a/Disabled/MicrosoftOutlook.json b/Disabled/MicrosoftOutlook.json new file mode 100644 index 00000000..94186ebb --- /dev/null +++ b/Disabled/MicrosoftOutlook.json @@ -0,0 +1,31 @@ +{ + "Name": "Microsoft Outlook", + "Source": "https://www.microsoft.com/en/microsoft-365/outlook/email-and-calendar-software-microsoft-outlook", + "Get": { + "Update": { + "Uri": "https://res.cdn.office.net/nativehost/5mttl/installer/v1/win-x64/prod/RELEASES?id=Outlook&localVersion=1.2022.10050400&arch=amd64", + "MatchVersion": "(\\d+(\\.\\d+){1,4}).*" + }, + "Download": { + "Uri": { + "Zip": "https://res.cdn.office.net/nativehost/5mttl/installer/v1/win-x64/prod/#installer", + "Exe": "https://go.microsoft.com/fwlink/?linkid=2207851" + } + } + }, + "Install": { + "Setup": "", + "Physical": { + "Arguments": "", + "PostInstall": [ + "" + ] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [ + "" + ] + } + } +} \ No newline at end of file diff --git a/Evergreen/Manifests/MicrosoftOutlook.json b/Evergreen/Manifests/MicrosoftOutlook.json deleted file mode 100644 index a0fb4159..00000000 --- a/Evergreen/Manifests/MicrosoftOutlook.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "Name": "Microsoft Outlook", - "Source": "https://www.microsoft.com/en/microsoft-365/outlook/email-and-calendar-software-microsoft-outlook", - "Get": { - "Update": { - "Uri": "https://res.cdn.office.net/nativehost/5mttl/installer/v1/win-x64/prod/RELEASES?id=Outlook&localVersion=1.2022.10050400&arch=amd64", - "ContentType": "application/json; charset=utf-8", - "UserAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64) SkypeUriPreview Preview/0.5", - "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", - "Rings": { - "General": "general", - "ITAdmins": "ring1_5", - "DeveloperPartners": "ring1_6", - "Dogfood": "ring2", - "TAP": "ring3", - "Preview": "ring3_6", - "OuterRing": "ring3_9", - "Public": "ring4" - }, - "ReplaceText": "#ring" - }, - "Download": { - "Uri": "https://res.cdn.office.net/nativehost/5mttl/installer/v1/win-x64/prod/#installer", - "Architecture": [ - "x64", - "x32", - "arm64" - ], - "ReplaceText": { - "architecture": "#architecture", - "ring": "#ring" - }, - "Extensions": [ - ".exe", - ".msi" - ] - } - }, - "Install": { - "Setup": "", - "Physical": { - "Arguments": "", - "PostInstall": [ - "" - ] - }, - "Virtual": { - "Arguments": "", - "PostInstall": [ - "" - ] - } - } -} \ No newline at end of file From 8269df9c9423cca881ec6fc77bd5899c0b3523d5 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Mon, 1 Jul 2024 10:38:55 +1000 Subject: [PATCH 2/5] Add Elgato apps --- Evergreen/Apps/Get-Elgato4KCaptureUtility.ps1 | 19 ++++++++++ Evergreen/Apps/Get-ElgatoAudioEffects.ps1 | 20 +++++++++++ Evergreen/Apps/Get-ElgatoCameraHub.ps1 | 19 ++++++++++ Evergreen/Apps/Get-ElgatoControlCenter.ps1 | 19 ++++++++++ Evergreen/Apps/Get-ElgatoEpocCam.ps1 | 19 ++++++++++ Evergreen/Apps/Get-ElgatoGameCapture.ps1 | 19 ++++++++++ Evergreen/Apps/Get-ElgatoStreamDeck.ps1 | 19 ++++++++++ Evergreen/Apps/Get-ElgatoVideoCapture.ps1 | 19 ++++++++++ Evergreen/Apps/Get-ElgatoWaveLink.ps1 | 19 ++++++++++ .../Manifests/Elgato4KCaptureUtility.json | 22 ++++++++++++ Evergreen/Manifests/ElgatoAudioEffects.json | 22 ++++++++++++ Evergreen/Manifests/ElgatoCameraHub.json | 22 ++++++++++++ Evergreen/Manifests/ElgatoControlCenter.json | 22 ++++++++++++ Evergreen/Manifests/ElgatoEpocCam.json | 22 ++++++++++++ Evergreen/Manifests/ElgatoGameCapture.json | 22 ++++++++++++ Evergreen/Manifests/ElgatoStreamDeck.json | 22 ++++++++++++ Evergreen/Manifests/ElgatoVideoCapture.json | 22 ++++++++++++ Evergreen/Manifests/ElgatoWaveLink.json | 22 ++++++++++++ Evergreen/Shared/Get-ElgatoApp.ps1 | 35 +++++++++++++++++++ 19 files changed, 405 insertions(+) create mode 100644 Evergreen/Apps/Get-Elgato4KCaptureUtility.ps1 create mode 100644 Evergreen/Apps/Get-ElgatoAudioEffects.ps1 create mode 100644 Evergreen/Apps/Get-ElgatoCameraHub.ps1 create mode 100644 Evergreen/Apps/Get-ElgatoControlCenter.ps1 create mode 100644 Evergreen/Apps/Get-ElgatoEpocCam.ps1 create mode 100644 Evergreen/Apps/Get-ElgatoGameCapture.ps1 create mode 100644 Evergreen/Apps/Get-ElgatoStreamDeck.ps1 create mode 100644 Evergreen/Apps/Get-ElgatoVideoCapture.ps1 create mode 100644 Evergreen/Apps/Get-ElgatoWaveLink.ps1 create mode 100644 Evergreen/Manifests/Elgato4KCaptureUtility.json create mode 100644 Evergreen/Manifests/ElgatoAudioEffects.json create mode 100644 Evergreen/Manifests/ElgatoCameraHub.json create mode 100644 Evergreen/Manifests/ElgatoControlCenter.json create mode 100644 Evergreen/Manifests/ElgatoEpocCam.json create mode 100644 Evergreen/Manifests/ElgatoGameCapture.json create mode 100644 Evergreen/Manifests/ElgatoStreamDeck.json create mode 100644 Evergreen/Manifests/ElgatoVideoCapture.json create mode 100644 Evergreen/Manifests/ElgatoWaveLink.json create mode 100644 Evergreen/Shared/Get-ElgatoApp.ps1 diff --git a/Evergreen/Apps/Get-Elgato4KCaptureUtility.ps1 b/Evergreen/Apps/Get-Elgato4KCaptureUtility.ps1 new file mode 100644 index 00000000..6446ae64 --- /dev/null +++ b/Evergreen/Apps/Get-Elgato4KCaptureUtility.ps1 @@ -0,0 +1,19 @@ +function Get-Elgato4KCaptureUtility { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Pass app details to the internal function + $object = Get-ElgatoApp -res $res + Write-Output -InputObject $object +} diff --git a/Evergreen/Apps/Get-ElgatoAudioEffects.ps1 b/Evergreen/Apps/Get-ElgatoAudioEffects.ps1 new file mode 100644 index 00000000..bdfc70b2 --- /dev/null +++ b/Evergreen/Apps/Get-ElgatoAudioEffects.ps1 @@ -0,0 +1,20 @@ +function Get-ElgatoAudioEffects { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification="Product name is a plural")] + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Pass app details to the internal function + $object = Get-ElgatoApp -res $res + Write-Output -InputObject $object +} diff --git a/Evergreen/Apps/Get-ElgatoCameraHub.ps1 b/Evergreen/Apps/Get-ElgatoCameraHub.ps1 new file mode 100644 index 00000000..beaffcac --- /dev/null +++ b/Evergreen/Apps/Get-ElgatoCameraHub.ps1 @@ -0,0 +1,19 @@ +function Get-ElgatoCameraHub { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Pass app details to the internal function + $object = Get-ElgatoApp -res $res + Write-Output -InputObject $object +} diff --git a/Evergreen/Apps/Get-ElgatoControlCenter.ps1 b/Evergreen/Apps/Get-ElgatoControlCenter.ps1 new file mode 100644 index 00000000..d870debe --- /dev/null +++ b/Evergreen/Apps/Get-ElgatoControlCenter.ps1 @@ -0,0 +1,19 @@ +function Get-ElgatoControlCenter { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Pass app details to the internal function + $object = Get-ElgatoApp -res $res + Write-Output -InputObject $object +} diff --git a/Evergreen/Apps/Get-ElgatoEpocCam.ps1 b/Evergreen/Apps/Get-ElgatoEpocCam.ps1 new file mode 100644 index 00000000..94383add --- /dev/null +++ b/Evergreen/Apps/Get-ElgatoEpocCam.ps1 @@ -0,0 +1,19 @@ +function Get-ElgatoEpocCam { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Pass app details to the internal function + $object = Get-ElgatoApp -res $res + Write-Output -InputObject $object +} diff --git a/Evergreen/Apps/Get-ElgatoGameCapture.ps1 b/Evergreen/Apps/Get-ElgatoGameCapture.ps1 new file mode 100644 index 00000000..408a5a01 --- /dev/null +++ b/Evergreen/Apps/Get-ElgatoGameCapture.ps1 @@ -0,0 +1,19 @@ +function Get-ElgatoGameCapture { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Pass app details to the internal function + $object = Get-ElgatoApp -res $res + Write-Output -InputObject $object +} diff --git a/Evergreen/Apps/Get-ElgatoStreamDeck.ps1 b/Evergreen/Apps/Get-ElgatoStreamDeck.ps1 new file mode 100644 index 00000000..fec2beac --- /dev/null +++ b/Evergreen/Apps/Get-ElgatoStreamDeck.ps1 @@ -0,0 +1,19 @@ +function Get-ElgatoStreamDeck { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Pass app details to the internal function + $object = Get-ElgatoApp -res $res + Write-Output -InputObject $object +} diff --git a/Evergreen/Apps/Get-ElgatoVideoCapture.ps1 b/Evergreen/Apps/Get-ElgatoVideoCapture.ps1 new file mode 100644 index 00000000..f569546d --- /dev/null +++ b/Evergreen/Apps/Get-ElgatoVideoCapture.ps1 @@ -0,0 +1,19 @@ +function Get-ElgatoVideoCapture { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Pass app details to the internal function + $object = Get-ElgatoApp -res $res + Write-Output -InputObject $object +} diff --git a/Evergreen/Apps/Get-ElgatoWaveLink.ps1 b/Evergreen/Apps/Get-ElgatoWaveLink.ps1 new file mode 100644 index 00000000..bbd4356b --- /dev/null +++ b/Evergreen/Apps/Get-ElgatoWaveLink.ps1 @@ -0,0 +1,19 @@ +function Get-ElgatoWaveLink { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Pass app details to the internal function + $object = Get-ElgatoApp -res $res + Write-Output -InputObject $object +} diff --git a/Evergreen/Manifests/Elgato4KCaptureUtility.json b/Evergreen/Manifests/Elgato4KCaptureUtility.json new file mode 100644 index 00000000..f187314f --- /dev/null +++ b/Evergreen/Manifests/Elgato4KCaptureUtility.json @@ -0,0 +1,22 @@ +{ + "Name": "Elgato 4K Capture Utility", + "Source": "https://help.elgato.com/hc/en-us/articles/360027963752-Elgato-4K-Capture-Utility-Software-Interface", + "Get": { + "Update": { + "Uri": "https://gc-updates.elgato.com", + "Property": "4kcu-win" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Manifests/ElgatoAudioEffects.json b/Evergreen/Manifests/ElgatoAudioEffects.json new file mode 100644 index 00000000..f7b23dc3 --- /dev/null +++ b/Evergreen/Manifests/ElgatoAudioEffects.json @@ -0,0 +1,22 @@ +{ + "Name": "Elgato Audio Effects", + "Source": "https://www.elgato.com/", + "Get": { + "Update": { + "Uri": "https://gc-updates.elgato.com", + "Property": "audio-effects-win" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Manifests/ElgatoCameraHub.json b/Evergreen/Manifests/ElgatoCameraHub.json new file mode 100644 index 00000000..753d4930 --- /dev/null +++ b/Evergreen/Manifests/ElgatoCameraHub.json @@ -0,0 +1,22 @@ +{ + "Name": "Elgato Camera Hub", + "Source": "https://help.elgato.com/hc/en-us/sections/360013950972-Elgato-Camera-Hub-Software", + "Get": { + "Update": { + "Uri": "https://gc-updates.elgato.com", + "Property": "camera-hub-win" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Manifests/ElgatoControlCenter.json b/Evergreen/Manifests/ElgatoControlCenter.json new file mode 100644 index 00000000..d81a3ca8 --- /dev/null +++ b/Evergreen/Manifests/ElgatoControlCenter.json @@ -0,0 +1,22 @@ +{ + "Name": "Elgato Control Center", + "Source": "https://help.elgato.com/hc/en-us/sections/360004115951-Elgato-Control-Center-Software", + "Get": { + "Update": { + "Uri": "https://gc-updates.elgato.com", + "Property": "cc-win" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Manifests/ElgatoEpocCam.json b/Evergreen/Manifests/ElgatoEpocCam.json new file mode 100644 index 00000000..834a35dd --- /dev/null +++ b/Evergreen/Manifests/ElgatoEpocCam.json @@ -0,0 +1,22 @@ +{ + "Name": "Elgato EpocCam", + "Source": "https://www.elgato.com/us/en/s/epoccam", + "Get": { + "Update": { + "Uri": "https://gc-updates.elgato.com", + "Property": "epoccam-win" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Manifests/ElgatoGameCapture.json b/Evergreen/Manifests/ElgatoGameCapture.json new file mode 100644 index 00000000..485d4169 --- /dev/null +++ b/Evergreen/Manifests/ElgatoGameCapture.json @@ -0,0 +1,22 @@ +{ + "Name": "Elgato Game Capture", + "Source": "https://help.elgato.com/hc/en-us/sections/360004111092-Elgato-Game-Capture-HD-Software", + "Get": { + "Update": { + "Uri": "https://gc-updates.elgato.com", + "Property": "gc-win" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Manifests/ElgatoStreamDeck.json b/Evergreen/Manifests/ElgatoStreamDeck.json new file mode 100644 index 00000000..2a5ef09e --- /dev/null +++ b/Evergreen/Manifests/ElgatoStreamDeck.json @@ -0,0 +1,22 @@ +{ + "Name": "Elgato Stream Deck", + "Source": "https://www.elgato.com/us/en/s/welcome-to-stream-deck", + "Get": { + "Update": { + "Uri": "https://gc-updates.elgato.com", + "Property": "sd-win" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Manifests/ElgatoVideoCapture.json b/Evergreen/Manifests/ElgatoVideoCapture.json new file mode 100644 index 00000000..53b282da --- /dev/null +++ b/Evergreen/Manifests/ElgatoVideoCapture.json @@ -0,0 +1,22 @@ +{ + "Name": "Elgato Video Capture", + "Source": "https://www.elgato.com/us/en/p/video-capture", + "Get": { + "Update": { + "Uri": "https://gc-updates.elgato.com", + "Property": "vc-win" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Manifests/ElgatoWaveLink.json b/Evergreen/Manifests/ElgatoWaveLink.json new file mode 100644 index 00000000..b88fa2c5 --- /dev/null +++ b/Evergreen/Manifests/ElgatoWaveLink.json @@ -0,0 +1,22 @@ +{ + "Name": "Elgato Wave Link", + "Source": "https://help.elgato.com/hc/en-us/articles/360044566172-Wave-Link-First-Time-Setup-for-Windows", + "Get": { + "Update": { + "Uri": "https://gc-updates.elgato.com", + "Property": "wave-link-win" + } + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Shared/Get-ElgatoApp.ps1 b/Evergreen/Shared/Get-ElgatoApp.ps1 new file mode 100644 index 00000000..67269f94 --- /dev/null +++ b/Evergreen/Shared/Get-ElgatoApp.ps1 @@ -0,0 +1,35 @@ +function Get-ElgatoApp { + <# + .SYNOPSIS + Get the current versions and download URLs for Elgato apps. + + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNullOrEmpty()] + [System.Management.Automation.PSObject] $res + ) + + # Get the update API + $params = @{ + Uri = $res.Get.Update.Uri + ContentType = "application/json" + } + $Releases = Invoke-EvergreenRestMethod @params + + # Build the output object for each returned release + foreach ($Release in $Releases.$($res.Get.Update.Property)) { + $PSObject = [PSCustomObject]@{ + Version = $Release.version + Architecture = Get-Architecture -String $Release.minimumOS + Type = Get-FileType -File $Release.downloadUrl + URI = $Release.downloadUrl + } + Write-Output -InputObject $PSObject + } +} From c6c8b14305da2622ffbb23f95faacece9596e7d6 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Mon, 1 Jul 2024 22:36:10 +1000 Subject: [PATCH 3/5] Add OmnissaHorizonClient --- .vscode/settings.json | 1 + Evergreen/Apps/Get-OmnissaHorizonClient.ps1 | 38 +++++++++++++++++++ Evergreen/Manifests/OmnissaHorizonClient.json | 28 ++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 Evergreen/Apps/Get-OmnissaHorizonClient.ps1 create mode 100644 Evergreen/Manifests/OmnissaHorizonClient.json diff --git a/.vscode/settings.json b/.vscode/settings.json index 7dbbb0b0..bf582ef2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -74,6 +74,7 @@ "notlike", "notmatch", "nupkg", + "Omnissa", "ONLYOFFICE", "Outfile", "Pandoc", diff --git a/Evergreen/Apps/Get-OmnissaHorizonClient.ps1 b/Evergreen/Apps/Get-OmnissaHorizonClient.ps1 new file mode 100644 index 00000000..6bcd2c43 --- /dev/null +++ b/Evergreen/Apps/Get-OmnissaHorizonClient.ps1 @@ -0,0 +1,38 @@ +function Get-OmnissaHorizonClient { + <# + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the download group and id + $Products = Invoke-EvergreenRestMethod -Uri $res.Get.Update.Uri + $Product = $Products.dlgEditionsLists | Where-Object { $_.name -match $res.Get.Update.Match } + + # Build the URL to the downloads list + $Url = $res.Get.Download.Uri -replace "#cart", $Product.dlgList.code ` + -replace "#pid", $Product.dlgList.productId ` + -replace "#rpid", $Product.dlgList.releasePackageId + + # Get the download list + $Downloads = Invoke-EvergreenRestMethod -Uri $Url + + # Construct the output; Return the custom object to the pipeline + foreach ($File in $Downloads.downloadFiles) { + [PSCustomObject] @{ + Version = $File.version + Date = $File.releaseDate + Sha256 = $File.sha256checksum + Type = Get-FileType -File $File.thirdPartyDownloadUrl + URI = $File.thirdPartyDownloadUrl + } | Write-Output + } +} diff --git a/Evergreen/Manifests/OmnissaHorizonClient.json b/Evergreen/Manifests/OmnissaHorizonClient.json new file mode 100644 index 00000000..5916fd85 --- /dev/null +++ b/Evergreen/Manifests/OmnissaHorizonClient.json @@ -0,0 +1,28 @@ +{ + "Name": "Omnissa Horizon Client", + "Source": "https://customerconnect.omnissa.com/downloads/info/slug/desktop_end_user_computing/vmware_horizon_clients/horizon_8", + "Get": { + "Update": { + "Uri": "https://customerconnect.omnissa.com/channel/public/api/v1.0/products/getRelatedDLGList?locale=en_US&category=desktop_end_user_computing&product=vmware_horizon_clients&version=horizon_8&dlgType=PRODUCT_BINARY", + "Match": "Horizon Client for Windows" + }, + "Download": { + "Uri": "https://customerconnect.omnissa.com/channel/public/api/v1.0/dlg/details?locale=en_US&downloadGroup=#cart&productId=#pid&rPId=#rpid" + } + }, + "Install": { + "Setup": "", + "Physical": { + "Arguments": "", + "PostInstall": [ + + ] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [ + + ] + } + } +} From 117ca4969cd3140002ad3580897ab7e65bdea0d1 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Wed, 3 Jul 2024 21:32:55 +1000 Subject: [PATCH 4/5] VMware App --- Evergreen/Shared/Get-VMwareApp.ps1 | 49 +++++++++++++++++++++ scripts/Test-VMware.ps1 | 70 ++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 Evergreen/Shared/Get-VMwareApp.ps1 create mode 100644 scripts/Test-VMware.ps1 diff --git a/Evergreen/Shared/Get-VMwareApp.ps1 b/Evergreen/Shared/Get-VMwareApp.ps1 new file mode 100644 index 00000000..d49408ad --- /dev/null +++ b/Evergreen/Shared/Get-VMwareApp.ps1 @@ -0,0 +1,49 @@ +function Get-VMwareApp { + <# + .SYNOPSIS + Returns details for VMware Workstation apps + + .NOTES + Author: Aaron Parker + Twitter: @stealthpuppy + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $false)] + param ( + [Parameter(Mandatory = $false, Position = 0)] + [ValidateNotNullOrEmpty()] + [System.Management.Automation.PSObject] $res + ) + + try { + # Get the latest version of the app provided in $res + $UpdateFeed = Invoke-EvergreenRestMethod -Uri $res.Get.Update.Uri + $Latest = $UpdateFeed.metaList.metadata | ` + Sort-Object -Property @{ Expression = { [System.Version]$_.Version }; Descending = $true } | ` + Select-Object -First 1 + Write-Verbose -Message "$($MyInvocation.MyCommand): Found latest version $($Latest.Version)." + + # Get the metadata for the latest version + $GZipFile = Save-File -Uri "$($res.Get.Update.MetadataUrl)/$($Latest.Url)" + $ExpandFile = Expand-GzipArchive -Path $GZipFile.FullName + + # Convert the metadata XML to an object + $MetadataXml = [System.Xml.XmlDocument](Get-Content -Path $ExpandFile -ErrorAction "Stop") + Write-Verbose -Message "$($MyInvocation.MyCommand): Found installer: $($MetadataXml.metadataResponse.bulletin.componentList.component.relativePath.'#text')" + $Url = "$(Split-Path $res.Get.Update.MetadataUrl -Parent)$($MetadataXml.metadataResponse.bulletin.componentList.component.relativePath.'#text')" + + # Output the object + [PSCustomObject]@{ + Version = $Latest.version + Type = Get-FileType -File $Url + URI = $Url + } | Write-Output + } + catch { + throw $_ + } + finally { + #Remove-Item -Path $GZipFile.FullName -ErrorAction "SilentlyContinue" + #Remove-Item -Path $ExpandFile -ErrorAction "SilentlyContinue" + } +} diff --git a/scripts/Test-VMware.ps1 b/scripts/Test-VMware.ps1 new file mode 100644 index 00000000..341da78c --- /dev/null +++ b/scripts/Test-VMware.ps1 @@ -0,0 +1,70 @@ +function Decompress-GZip($Path, $Destination) { + $inStream = New-Object System.IO.FileStream $Path, ([IO.FileMode]::Open), ([IO.FileAccess]::Read), ([IO.FileShare]::Read) + $gzipStream = New-Object System.IO.Compression.GZipStream $inStream, ([IO.Compression.CompressionMode]::Decompress) + $outStream = New-Object System.IO.FileStream $Destination, ([IO.FileMode]::Create), ([IO.FileAccess]::Write), ([IO.FileShare]::None) + $buffer = New-Object byte[](1024) + while (($read = $gzipStream.Read($buffer, 0, 1024)) -gt 0) { + $outStream.Write($buffer, 0, $read) + } + $gzipStream.Close() + $outStream.Close() + $inStream.Close() +} + + +$Products = @( + @{ + ProductName = 'VMware Workstation Pro' + URL = 'https://softwareupdate.vmware.com/cds/vmw-desktop/ws-windows.xml' + MajorVersion = 17 + } + @{ + ProductName = 'VMware Workstation Player' + URL = 'https://softwareupdate.vmware.com/cds/vmw-desktop/player-windows.xml' + MajorVersion = 17 + } + @{ + ProductName = 'VMware Remote Console' + URL = 'https://softwareupdate.vmware.com/cds/vmw-desktop/vmrc-windows.xml' + #MajorVersion = 12 + } +) + +foreach ($Product in $Products) { + try { + $XML = Invoke-RestMethod -Uri $Product.URL -DisableKeepAlive + } + catch { + Write-Error "Failed to download $($Product.URL): $_" + continue + } + + $MajorVersions = ($XML.metaList.metadata.url | Select-String -Pattern '\d+').Matches.Groups.Value | Sort-Object -Unique + if ($Product.MajorVersion) { + $MajorVersions = $MajorVersions | Where-Object { $_ -eq $Product.MajorVersion } + } + + foreach ($MajorVersion in $MajorVersions) { + try { + $Version = (($XML.metaList.metadata.url | Select-String -Pattern "$MajorVersion(?:\.\d+)+").Matches.Groups.Value | ForEach-Object { [version]$_ } | Sort-Object -Descending | Select-Object -First 1).ToString() + $MetadataURL = 'https://softwareupdate.vmware.com/cds/vmw-desktop/' + ($XML.metaList.metadata.url | Where-Object { $_ -match "/$Version/(?!.*packages)" }) + $Download = Save-File -Uri $MetadataURL + $MetadataPath = $Download.FullName -Replace '\.gz$' + Decompress-GZip -Path $Download.FullName -Destination $MetadataPath + $MetadataXML = [xml](Get-Content -Path $MetadataPath) + + $URL = (Split-Path $MetadataURL -Parent) + $MetadataXML.metadataResponse.bulletin.componentList.component.relativePath.'#text' + + [PSCustomObject]@{ + Name = $Product.ProductName + MajorVersion = $MajorVersion + Version = $Version + URI = $URL + } + } + catch { + Write-Error "Error: $_" + continue + } + } +} From 7532e28a99194b3c616d223378c3ce2c6783518c Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Wed, 3 Jul 2024 21:54:55 +1000 Subject: [PATCH 5/5] #708 --- .../Apps/Get-MicrosoftAzureDataStudio.ps1 | 55 +++++++------------ .../Manifests/MicrosoftAzureDataStudio.json | 10 +--- 2 files changed, 23 insertions(+), 42 deletions(-) diff --git a/Evergreen/Apps/Get-MicrosoftAzureDataStudio.ps1 b/Evergreen/Apps/Get-MicrosoftAzureDataStudio.ps1 index e94631e5..b18143c4 100644 --- a/Evergreen/Apps/Get-MicrosoftAzureDataStudio.ps1 +++ b/Evergreen/Apps/Get-MicrosoftAzureDataStudio.ps1 @@ -18,44 +18,31 @@ function Get-MicrosoftAzureDataStudio { $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) ) - # Get the commit details - $params = @{ - Uri = $res.Get.Update.Version.Uri - ErrorAction = "Stop" - } - $Commit = (Invoke-EvergreenRestMethod @params).($res.Get.Update.Version.Property) - - # Walk through each platform - if ([System.String]::IsNullOrEmpty($Commit)) { - throw "$($MyInvocation.MyCommand): No value found for property: $($res.Get.Update.Version.Property)." - } - else { - foreach ($platform in $res.Get.Update.Platform) { - Write-Verbose -Message "$($MyInvocation.MyCommand): Getting release info for $platform." + foreach ($platform in $res.Get.Update.Platform) { + Write-Verbose -Message "$($MyInvocation.MyCommand): Getting release info for $platform." - # Walk through each channel in the platform - foreach ($channel in $res.Get.Update.Channel) { + # Walk through each channel in the platform + foreach ($channel in $res.Get.Update.Channel) { - # Read the version details from the API, format and return to the pipeline - $params = @{ - Uri = "$($res.Get.Update.Uri)/$($platform.ToLower())/$($channel.ToLower())/$Commit" - ErrorAction = "Stop" - } - $updateFeed = Invoke-EvergreenRestMethod @params + # Resolve details for the update feed + $params = @{ + Uri = $res.Get.Update.Uri -replace "#platform", $platform.ToLower() -replace "#channel", $channel.ToLower() + ErrorAction = "Stop" + } + $UpdateFeed = Invoke-EvergreenRestMethod @params - if ([System.String]::IsNullOrEmpty($updateFeed)) { - throw "$($MyInvocation.MyCommand): No update feed found for $platform and $channel." - } - else { - $PSObject = [PSCustomObject] @{ - Version = $updateFeed.productVersion -replace $res.Get.Update.ReplaceText, "" - Platform = $platform - Channel = $channel - Sha256 = $updateFeed.sha256hash - URI = $updateFeed.url - } - Write-Output -InputObject $PSObject + # If we have a valid response, output the details + if ($null -ne $UpdateFeed) { + $Url = $(Resolve-SystemNetWebRequest -Uri $UpdateFeed.url).ResponseUri.AbsoluteUri + $PSObject = [PSCustomObject] @{ + Version = $UpdateFeed.productVersion + Channel = $channel + Platform = $platform + Sha256 = $UpdateFeed.sha256hash + Type = Get-FileType -File $Url + URI = $Url } + Write-Output -InputObject $PSObject } } } diff --git a/Evergreen/Manifests/MicrosoftAzureDataStudio.json b/Evergreen/Manifests/MicrosoftAzureDataStudio.json index a0858ded..8fcebda2 100644 --- a/Evergreen/Manifests/MicrosoftAzureDataStudio.json +++ b/Evergreen/Manifests/MicrosoftAzureDataStudio.json @@ -3,20 +3,14 @@ "Source": "https://docs.microsoft.com/en-us/sql/azure-data-studio/", "Get": { "Update": { - "Version": { - "Uri": "https://raw.githubusercontent.com/microsoft/azuredatastudio/main/product.json", - "Property": "commit" - }, - "Uri": "https://azuredatastudio-update.azurewebsites.net/api/update", + "Uri": "https://azuredatastudio-update.azurewebsites.net/api/update/#platform/#channel/latest", "Platform": [ "win32-x64", "win32-x64-user" ], "Channel": [ - "Insider", "Stable" - ], - "ReplaceText": "-insider" + ] } }, "Install": {