Skip to content

Commit

Permalink
Merge pull request #627 from jms-du-se/Adobe-Digital-Editions
Browse files Browse the repository at this point in the history
[New App]: Adobe Digital Editons
  • Loading branch information
aaronparker authored Feb 13, 2024
2 parents 26beec9 + 0066d88 commit 6b06c01
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
44 changes: 44 additions & 0 deletions Evergreen/Apps/Get-AdobeDigitalEditions.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Function Get-AdobeDigitalEditions {

Check warning

Code scanning / PSScriptAnalyzer

The cmdlet 'Get-AdobeDigitalEditions' uses a plural noun. A singular noun should be used instead. Warning

The cmdlet 'Get-AdobeDigitalEditions' uses a plural noun. A singular noun should be used instead.
<#
.SYNOPSIS
Gets the version and download URLs for Adobe Digital Editions.
.NOTES
Author: Jasper Metselaar
E-mail: [email protected]
#>
[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])
)

$params = @{
Uri = $res.Get.Update.Uri
}
$updateFeed = Invoke-EvergreenRestMethod @params

# Removing first 3 bytes from array by selecting the full length and stripping first 3
Write-Verbose "Remove-ByteOrderMark (UTF8 BOM)"
$OutputBytes = $updateFeed[3..$updateFeed.Length]
$updateFeed = [System.Text.Encoding]::UTF8.GetString($OutputBytes) | ConvertFrom-Json

if ($Null -ne $updateFeed) {

# Output the object to the pipeline
foreach ($item in $updateFeed) {
$PSObject = [PSCustomObject] @{
Version = $item.version
URI = $item.SecuredDownloadPath
}
Write-Output -InputObject $PSObject
}

}
else {
Write-Error -Message "$($MyInvocation.MyCommand): unable to retrieve content from $($res.Get.Update.Uri)."
}
}
21 changes: 21 additions & 0 deletions Evergreen/Manifests/AdobeDigitalEditions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"Name": "Adobe Digital Editions",
"Source": "https://www.adobe.com/solutions/ebook/digital-editions.html",
"Get": {
"Update": {
"Uri": "https://adedownload.adobe.com/pub/adobe/digitaleditions/sha2/adeupdaterconfig.cfg"
}
},
"Install": {
"Preinstall": "",
"Setup": "ADE_*_Installer.exe",
"Physical": {
"Arguments": "/S",
"PostInstall": []
},
"Virtual": {
"Arguments": "",
"PostInstall": []
}
}
}

0 comments on commit 6b06c01

Please sign in to comment.