Add BlueJ as a Windows FMA (#46222)
Add BlueJ as a maintained Windows app: new winget input manifest (ee/maintained-apps/inputs/winget/bluej.json), PowerShell install and uninstall scripts (ee/maintained-apps/inputs/winget/scripts/bluej_install.ps1 and bluej_uninstall.ps1), and output metadata (ee/maintained-apps/outputs/bluej/windows.json). Also update apps index (ee/maintained-apps/outputs/apps.json) to include BlueJ. The install script passes ALLUSERS=2 so the per-user WiX MSI installs per-machine when run elevated; the uninstall script finds related product codes for the app's upgrade code and uninstalls each with a timeout. The outputs include version 5.5.0, installer URL, checksum, and embedded script refs.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "BlueJ",
|
||||
"slug": "bluej/windows",
|
||||
"package_identifier": "BlueJTeam.BlueJ",
|
||||
"unique_identifier": "BlueJ",
|
||||
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/bluej_install.ps1",
|
||||
"uninstall_script_path": "ee/maintained-apps/inputs/winget/scripts/bluej_uninstall.ps1",
|
||||
"installer_arch": "x64",
|
||||
"installer_type": "msi",
|
||||
"installer_scope": "user",
|
||||
"default_categories": ["Developer tools"]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# BlueJ ships a per-user WiX MSI. Fleet runs installs elevated (SYSTEM), so we
|
||||
# pass ALLUSERS=2 — the same switch winget uses — which resolves to a per-machine
|
||||
# install (into %ProgramFiles%\BlueJ) when run elevated.
|
||||
|
||||
$logFile = "${env:TEMP}/fleet-install-software.log"
|
||||
|
||||
try {
|
||||
|
||||
$installProcess = Start-Process msiexec.exe `
|
||||
-ArgumentList "/quiet /norestart /lv ${logFile} /i `"${env:INSTALLER_PATH}`" ALLUSERS=2" `
|
||||
-PassThru -Verb RunAs -Wait
|
||||
|
||||
Get-Content $logFile -Tail 500
|
||||
|
||||
Exit $installProcess.ExitCode
|
||||
|
||||
} catch {
|
||||
Write-Host "Error: $_"
|
||||
Exit 1
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
# Fleet uninstalls app by finding all related product codes for the specified upgrade code
|
||||
$inst = New-Object -ComObject "WindowsInstaller.Installer"
|
||||
$timeoutSeconds = 300 # 5 minute timeout per product
|
||||
|
||||
foreach ($product_code in $inst.RelatedProducts('{F4B4357E-6101-4CB1-8E38-3D4F3AFB4BE2}')) {
|
||||
$process = Start-Process msiexec -ArgumentList @("/quiet", "/x", $product_code, "/norestart") -PassThru
|
||||
|
||||
# Wait for process with timeout
|
||||
$completed = $process.WaitForExit($timeoutSeconds * 1000)
|
||||
|
||||
if (-not $completed) {
|
||||
Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue
|
||||
Exit 1603 # ERROR_UNINSTALL_FAILURE
|
||||
}
|
||||
|
||||
# If the uninstall failed, bail
|
||||
if ($process.ExitCode -ne 0) {
|
||||
Write-Output "Uninstall for $($product_code) exited $($process.ExitCode)"
|
||||
Exit $process.ExitCode
|
||||
}
|
||||
}
|
||||
|
||||
# All uninstalls succeeded; exit success
|
||||
Exit 0
|
||||
@@ -288,6 +288,13 @@
|
||||
"unique_identifier": "Blender",
|
||||
"description": "Blender is a 3D creation suite."
|
||||
},
|
||||
{
|
||||
"name": "BlueJ",
|
||||
"slug": "bluej/windows",
|
||||
"platform": "windows",
|
||||
"unique_identifier": "BlueJ",
|
||||
"description": "BlueJ is a free Java development environment designed for beginners."
|
||||
},
|
||||
{
|
||||
"name": "Box Drive",
|
||||
"slug": "box-drive/darwin",
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "5.5.0",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE name = 'BlueJ' AND publisher = 'BlueJ Team';",
|
||||
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name = 'BlueJ' AND publisher = 'BlueJ Team' AND version_compare(version, '5.5.0') < 0);"
|
||||
},
|
||||
"installer_url": "https://github.com/k-pet-group/BlueJ-Greenfoot/releases/download/BLUEJ-RELEASE-5.5.0/BlueJ-windows-5.5.0.msi",
|
||||
"install_script_ref": "29a9338f",
|
||||
"uninstall_script_ref": "d85b3e22",
|
||||
"sha256": "697404b7f704235878861bd4133e24480e17e74942f0a9d31db08ddfe4ee21c0",
|
||||
"default_categories": [
|
||||
"Developer tools"
|
||||
]
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"29a9338f": "# BlueJ ships a per-user WiX MSI. Fleet runs installs elevated (SYSTEM), so we\n# pass ALLUSERS=2 — the same switch winget uses — which resolves to a per-machine\n# install (into %ProgramFiles%\\BlueJ) when run elevated.\n\n$logFile = \"${env:TEMP}/fleet-install-software.log\"\n\ntry {\n\n$installProcess = Start-Process msiexec.exe `\n -ArgumentList \"/quiet /norestart /lv ${logFile} /i `\"${env:INSTALLER_PATH}`\" ALLUSERS=2\" `\n -PassThru -Verb RunAs -Wait\n\nGet-Content $logFile -Tail 500\n\nExit $installProcess.ExitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n",
|
||||
"d85b3e22": "# Fleet uninstalls app by finding all related product codes for the specified upgrade code\n$inst = New-Object -ComObject \"WindowsInstaller.Installer\"\n$timeoutSeconds = 300 # 5 minute timeout per product\n\nforeach ($product_code in $inst.RelatedProducts('{F4B4357E-6101-4CB1-8E38-3D4F3AFB4BE2}')) {\n $process = Start-Process msiexec -ArgumentList @(\"/quiet\", \"/x\", $product_code, \"/norestart\") -PassThru\n\n # Wait for process with timeout\n $completed = $process.WaitForExit($timeoutSeconds * 1000)\n\n if (-not $completed) {\n Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue\n Exit 1603 # ERROR_UNINSTALL_FAILURE\n }\n\n # If the uninstall failed, bail\n if ($process.ExitCode -ne 0) {\n Write-Output \"Uninstall for $($product_code) exited $($process.ExitCode)\"\n Exit $process.ExitCode\n }\n}\n\n# All uninstalls succeeded; exit success\nExit 0\n"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -7,6 +7,7 @@ import { matchLoosePrefixToKey } from "utilities/strings/stringUtils";
|
||||
|
||||
import Backblaze from "./Backblaze";
|
||||
import BetterDisplay from "./BetterDisplay";
|
||||
import Bluej from "./Bluej";
|
||||
import Cavalry from "./Cavalry";
|
||||
import Charles from "./Charles";
|
||||
import ConnectFonts from "./ConnectFonts";
|
||||
@@ -303,6 +304,7 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
|
||||
"beyond compare": BeyondCompare,
|
||||
bitwarden: Bitwarden,
|
||||
blender: Blender,
|
||||
bluej: Bluej,
|
||||
box: Box,
|
||||
brave: Brave,
|
||||
bruno: Bruno,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user