Skip to content

Commit

Permalink
Add AnalogDevicesLTspice
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronparker committed Feb 18, 2025
1 parent d7742eb commit 897313a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Evergreen/Apps/Get-AnalogDevicesLTspice.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
function Get-AnalogDevicesLTspice {
<#
.NOTES
Author: Aaron Parker
#>
[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 update feed
$params = @{
Uri = $res.Get.Update.Uri
UserAgent = $res.Get.Update.UserAgent
}
$UpdateFeed = Invoke-EvergreenRestMethod @params
if ($null -ne $UpdateFeed) {

# Convert the INI update feed to an object, replace strings that break conversion
$Updates = ConvertFrom-IniFile -InputObject ($UpdateFeed -replace ";aiu;")

# Output the latest version
[PSCustomObject]@{
Version = $Updates.Update.Version.Trim()
Date = $Updates.Update.ReleaseDate.Trim()
Size = $Updates.Update.Size.Trim()
Sha256 = $Updates.Update.SHA256.Trim()
Type = Get-FileType -File $Updates.Update.URL
URI = $Updates.Update.URL.Trim()
} | Write-Output
}
}
25 changes: 25 additions & 0 deletions Evergreen/Manifests/AnalogDevicesLTspice.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"Name": "Analog Devices LTspice",
"Source": "https://www.analog.com/en/resources/design-tools-and-calculators/ltspice-simulator.html",
"Get": {
"Update": {
"Uri": "https://ltspice.analog.com/download/updates.txt",
"ContentType": "text/plain; charset=utf-8",
"UserAgent": "AnalogDevicesLTspice"
},
"Download": {
"Uri": "https://ltspice.analog.com/software/LTspice64.msi"
}
},
"Install": {
"Setup": "",
"Physical": {
"Arguments": "",
"PostInstall": []
},
"Virtual": {
"Arguments": "",
"PostInstall": []
}
}
}

0 comments on commit 897313a

Please sign in to comment.