Skip to content

Commit

Permalink
Merge pull request #709 from aaronparker/apps
Browse files Browse the repository at this point in the history
Apps
  • Loading branch information
aaronparker authored Jul 3, 2024
2 parents ca3d3a8 + 7532e28 commit dda8402
Show file tree
Hide file tree
Showing 29 changed files with 662 additions and 102 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"notlike",
"notmatch",
"nupkg",
"Omnissa",
"ONLYOFFICE",
"Outfile",
"Pandoc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
31 changes: 31 additions & 0 deletions Disabled/MicrosoftOutlook.json
Original file line number Diff line number Diff line change
@@ -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": [
""
]
}
}
}
19 changes: 19 additions & 0 deletions Evergreen/Apps/Get-Elgato4KCaptureUtility.ps1
Original file line number Diff line number Diff line change
@@ -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
}
20 changes: 20 additions & 0 deletions Evergreen/Apps/Get-ElgatoAudioEffects.ps1
Original file line number Diff line number Diff line change
@@ -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
}
19 changes: 19 additions & 0 deletions Evergreen/Apps/Get-ElgatoCameraHub.ps1
Original file line number Diff line number Diff line change
@@ -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
}
19 changes: 19 additions & 0 deletions Evergreen/Apps/Get-ElgatoControlCenter.ps1
Original file line number Diff line number Diff line change
@@ -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
}
19 changes: 19 additions & 0 deletions Evergreen/Apps/Get-ElgatoEpocCam.ps1
Original file line number Diff line number Diff line change
@@ -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
}
19 changes: 19 additions & 0 deletions Evergreen/Apps/Get-ElgatoGameCapture.ps1
Original file line number Diff line number Diff line change
@@ -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
}
19 changes: 19 additions & 0 deletions Evergreen/Apps/Get-ElgatoStreamDeck.ps1
Original file line number Diff line number Diff line change
@@ -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
}
19 changes: 19 additions & 0 deletions Evergreen/Apps/Get-ElgatoVideoCapture.ps1
Original file line number Diff line number Diff line change
@@ -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
}
19 changes: 19 additions & 0 deletions Evergreen/Apps/Get-ElgatoWaveLink.ps1
Original file line number Diff line number Diff line change
@@ -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
}
55 changes: 21 additions & 34 deletions Evergreen/Apps/Get-MicrosoftAzureDataStudio.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down
38 changes: 38 additions & 0 deletions Evergreen/Apps/Get-OmnissaHorizonClient.ps1
Original file line number Diff line number Diff line change
@@ -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
}
}
22 changes: 22 additions & 0 deletions Evergreen/Manifests/Elgato4KCaptureUtility.json
Original file line number Diff line number Diff line change
@@ -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": []
}
}
}
Loading

0 comments on commit dda8402

Please sign in to comment.