Add PostgreSQL 18 as a Windows FMA (#47045)
Add support for PostgreSQL 18 on Windows: new winget input manifest and per-machine installer/uninstaller PowerShell scripts; outputs metadata for version 18.4-1 (installer URL, sha256, and script refs) and app registration in apps.json. Also add frontend icon component and 60x60 image asset, and update icons index to include the new icon. This enables silent install/uninstall via the EnterpriseDB (BitRock) installer and exposes the app in the software listing.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "PostgreSQL 18",
|
||||
"slug": "postgresql-18/windows",
|
||||
"package_identifier": "PostgreSQL.PostgreSQL.18",
|
||||
"unique_identifier": "PostgreSQL 18",
|
||||
"installer_arch": "x64",
|
||||
"installer_type": "exe",
|
||||
"installer_scope": "machine",
|
||||
"default_categories": ["Developer tools"],
|
||||
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/postgresql-18_install.ps1",
|
||||
"uninstall_script_path": "ee/maintained-apps/inputs/winget/scripts/postgresql-18_uninstall.ps1"
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
$exeFilePath = "${env:INSTALLER_PATH}"
|
||||
|
||||
try {
|
||||
|
||||
# EnterpriseDB (BitRock InstallBuilder) installer. Switches from the winget
|
||||
# manifest: --mode unattended for a non-interactive install, --unattendedmodeui
|
||||
# none to suppress all progress UI. Installs per-machine under
|
||||
# C:\Program Files\PostgreSQL\18 and registers in HKLM Add/Remove Programs.
|
||||
$processOptions = @{
|
||||
FilePath = "$exeFilePath"
|
||||
ArgumentList = "--mode", "unattended", "--unattendedmodeui", "none"
|
||||
PassThru = $true
|
||||
Wait = $true
|
||||
}
|
||||
|
||||
$process = Start-Process @processOptions
|
||||
$exitCode = $process.ExitCode
|
||||
|
||||
Write-Host "Install exit code: $exitCode"
|
||||
Exit $exitCode
|
||||
|
||||
} catch {
|
||||
Write-Host "Error: $_"
|
||||
Exit 1
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
$displayNameLike = "PostgreSQL 18*"
|
||||
$publisher = "PostgreSQL Global Development Group"
|
||||
|
||||
$paths = @(
|
||||
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
|
||||
'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall',
|
||||
'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall',
|
||||
'HKCU:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
|
||||
)
|
||||
|
||||
$uninstall = $null
|
||||
foreach ($p in $paths) {
|
||||
$items = Get-ItemProperty "$p\*" -ErrorAction SilentlyContinue | Where-Object {
|
||||
$_.DisplayName -like $displayNameLike -and $_.Publisher -like "$publisher*"
|
||||
}
|
||||
if ($items) { $uninstall = $items | Select-Object -First 1; break }
|
||||
}
|
||||
|
||||
if (-not $uninstall -or (-not $uninstall.UninstallString -and -not $uninstall.QuietUninstallString)) {
|
||||
Write-Host "Uninstall entry not found"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
$uninstallCommand = if ($uninstall.QuietUninstallString) {
|
||||
$uninstall.QuietUninstallString
|
||||
} else {
|
||||
$uninstall.UninstallString
|
||||
}
|
||||
|
||||
# Registry uninstall strings come in three shapes; parse defensively. The EDB
|
||||
# uninstaller (uninstall-postgresql.exe) lives under a path with spaces
|
||||
# ("C:\Program Files\PostgreSQL\18\...") and is typically quoted.
|
||||
$exePath = ""
|
||||
$existingArgs = ""
|
||||
if ($uninstallCommand -match '^\s*"([^"]+)"\s*(.*)$') {
|
||||
$exePath = $matches[1]
|
||||
$existingArgs = $matches[2].Trim()
|
||||
} elseif ($uninstallCommand -match '(?i)^\s*(.+?\.exe)\s*(.*)$') {
|
||||
$exePath = $matches[1]
|
||||
$existingArgs = $matches[2].Trim()
|
||||
} elseif ($uninstallCommand -match '^\s*(\S+)\s*(.*)$') {
|
||||
$exePath = $matches[1]
|
||||
$existingArgs = $matches[2].Trim()
|
||||
} else {
|
||||
Throw "Could not parse uninstall string: $uninstallCommand"
|
||||
}
|
||||
|
||||
# BitRock uninstaller silent switch.
|
||||
if ($existingArgs -notmatch '(?i)--mode\s+unattended') {
|
||||
$existingArgs = ("$existingArgs --mode unattended").Trim()
|
||||
}
|
||||
|
||||
Write-Host "Uninstall command: $exePath"
|
||||
Write-Host "Uninstall args: $existingArgs"
|
||||
|
||||
try {
|
||||
$processOptions = @{
|
||||
FilePath = $exePath
|
||||
ArgumentList = $existingArgs
|
||||
NoNewWindow = $true
|
||||
PassThru = $true
|
||||
Wait = $true
|
||||
}
|
||||
|
||||
$process = Start-Process @processOptions
|
||||
$exitCode = $process.ExitCode
|
||||
Write-Host "Uninstall exit code: $exitCode"
|
||||
Exit $exitCode
|
||||
} catch {
|
||||
Write-Host "Error running uninstaller: $_"
|
||||
Exit 1
|
||||
}
|
||||
@@ -2129,6 +2129,13 @@
|
||||
"unique_identifier": "io.podmandesktop.PodmanDesktop",
|
||||
"description": "Open source tool for developers to work with containers and Kubernetes."
|
||||
},
|
||||
{
|
||||
"name": "PostgreSQL 18",
|
||||
"slug": "postgresql-18/windows",
|
||||
"platform": "windows",
|
||||
"unique_identifier": "PostgreSQL 18",
|
||||
"description": "PostgreSQL is a powerful, open source object-relational database system."
|
||||
},
|
||||
{
|
||||
"name": "Postman",
|
||||
"slug": "postman/darwin",
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "18.4-1",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE name = 'PostgreSQL 18' AND publisher = 'PostgreSQL Global Development Group';",
|
||||
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name = 'PostgreSQL 18' AND publisher = 'PostgreSQL Global Development Group' AND version_compare(version, '18.4-1') < 0);"
|
||||
},
|
||||
"installer_url": "https://get.enterprisedb.com/postgresql/postgresql-18.4-1-windows-x64.exe",
|
||||
"install_script_ref": "bc68ad4d",
|
||||
"uninstall_script_ref": "24e7779d",
|
||||
"sha256": "44b8187d2db7e866495952d8260a1d7252cbb5125843142e1f0bf30115d23279",
|
||||
"default_categories": [
|
||||
"Developer tools"
|
||||
]
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"24e7779d": "$displayNameLike = \"PostgreSQL 18*\"\n$publisher = \"PostgreSQL Global Development Group\"\n\n$paths = @(\n 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',\n 'HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall',\n 'HKCU:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',\n 'HKCU:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall'\n)\n\n$uninstall = $null\nforeach ($p in $paths) {\n $items = Get-ItemProperty \"$p\\*\" -ErrorAction SilentlyContinue | Where-Object {\n $_.DisplayName -like $displayNameLike -and $_.Publisher -like \"$publisher*\"\n }\n if ($items) { $uninstall = $items | Select-Object -First 1; break }\n}\n\nif (-not $uninstall -or (-not $uninstall.UninstallString -and -not $uninstall.QuietUninstallString)) {\n Write-Host \"Uninstall entry not found\"\n Exit 0\n}\n\n$uninstallCommand = if ($uninstall.QuietUninstallString) {\n $uninstall.QuietUninstallString\n} else {\n $uninstall.UninstallString\n}\n\n# Registry uninstall strings come in three shapes; parse defensively. The EDB\n# uninstaller (uninstall-postgresql.exe) lives under a path with spaces\n# (\"C:\\Program Files\\PostgreSQL\\18\\...\") and is typically quoted.\n$exePath = \"\"\n$existingArgs = \"\"\nif ($uninstallCommand -match '^\\s*\"([^\"]+)\"\\s*(.*)$') {\n $exePath = $matches[1]\n $existingArgs = $matches[2].Trim()\n} elseif ($uninstallCommand -match '(?i)^\\s*(.+?\\.exe)\\s*(.*)$') {\n $exePath = $matches[1]\n $existingArgs = $matches[2].Trim()\n} elseif ($uninstallCommand -match '^\\s*(\\S+)\\s*(.*)$') {\n $exePath = $matches[1]\n $existingArgs = $matches[2].Trim()\n} else {\n Throw \"Could not parse uninstall string: $uninstallCommand\"\n}\n\n# BitRock uninstaller silent switch.\nif ($existingArgs -notmatch '(?i)--mode\\s+unattended') {\n $existingArgs = (\"$existingArgs --mode unattended\").Trim()\n}\n\nWrite-Host \"Uninstall command: $exePath\"\nWrite-Host \"Uninstall args: $existingArgs\"\n\ntry {\n $processOptions = @{\n FilePath = $exePath\n ArgumentList = $existingArgs\n NoNewWindow = $true\n PassThru = $true\n Wait = $true\n }\n\n $process = Start-Process @processOptions\n $exitCode = $process.ExitCode\n Write-Host \"Uninstall exit code: $exitCode\"\n Exit $exitCode\n} catch {\n Write-Host \"Error running uninstaller: $_\"\n Exit 1\n}\n",
|
||||
"bc68ad4d": "$exeFilePath = \"${env:INSTALLER_PATH}\"\n\ntry {\n\n# EnterpriseDB (BitRock InstallBuilder) installer. Switches from the winget\n# manifest: --mode unattended for a non-interactive install, --unattendedmodeui\n# none to suppress all progress UI. Installs per-machine under\n# C:\\Program Files\\PostgreSQL\\18 and registers in HKLM Add/Remove Programs.\n$processOptions = @{\n FilePath = \"$exeFilePath\"\n ArgumentList = \"--mode\", \"unattended\", \"--unattendedmodeui\", \"none\"\n PassThru = $true\n Wait = $true\n}\n\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\nWrite-Host \"Install exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -61,6 +61,7 @@ import OktaVerify from "./OktaVerify";
|
||||
import Ollama from "./Ollama";
|
||||
import OpenvpnConnect from "./OpenvpnConnect";
|
||||
import PlantronicsHub from "./PlantronicsHub";
|
||||
import Postgresql18 from "./Postgresql18";
|
||||
import PowerAutomate from "./PowerAutomate";
|
||||
import PowerBi from "./PowerBi";
|
||||
import Plugdata from "./Plugdata";
|
||||
@@ -535,6 +536,7 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
|
||||
"plantronics hub": PlantronicsHub,
|
||||
plugdata: Plugdata,
|
||||
"podman desktop": PodmanDesktop,
|
||||
"postgresql 18": Postgresql18,
|
||||
postman: Postman,
|
||||
"power automate": PowerAutomate,
|
||||
"power bi": PowerBi,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Reference in New Issue
Block a user