diff --git a/ee/maintained-apps/inputs/winget/bluej.json b/ee/maintained-apps/inputs/winget/bluej.json new file mode 100644 index 0000000000..73a5837327 --- /dev/null +++ b/ee/maintained-apps/inputs/winget/bluej.json @@ -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"] +} diff --git a/ee/maintained-apps/inputs/winget/scripts/bluej_install.ps1 b/ee/maintained-apps/inputs/winget/scripts/bluej_install.ps1 new file mode 100644 index 0000000000..7f01579adb --- /dev/null +++ b/ee/maintained-apps/inputs/winget/scripts/bluej_install.ps1 @@ -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 +} diff --git a/ee/maintained-apps/inputs/winget/scripts/bluej_uninstall.ps1 b/ee/maintained-apps/inputs/winget/scripts/bluej_uninstall.ps1 new file mode 100644 index 0000000000..2806ec4b46 --- /dev/null +++ b/ee/maintained-apps/inputs/winget/scripts/bluej_uninstall.ps1 @@ -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 diff --git a/ee/maintained-apps/outputs/apps.json b/ee/maintained-apps/outputs/apps.json index 9ee7a24dcd..1e67daf7c4 100644 --- a/ee/maintained-apps/outputs/apps.json +++ b/ee/maintained-apps/outputs/apps.json @@ -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", diff --git a/ee/maintained-apps/outputs/bluej/windows.json b/ee/maintained-apps/outputs/bluej/windows.json new file mode 100644 index 0000000000..1e1e2e42c9 --- /dev/null +++ b/ee/maintained-apps/outputs/bluej/windows.json @@ -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" + } +} diff --git a/frontend/pages/SoftwarePage/components/icons/Bluej.tsx b/frontend/pages/SoftwarePage/components/icons/Bluej.tsx new file mode 100644 index 0000000000..1892a4ab5c --- /dev/null +++ b/frontend/pages/SoftwarePage/components/icons/Bluej.tsx @@ -0,0 +1,14 @@ +import * as React from "react"; + +import type { SVGProps } from "react"; + +const Bluej = (props: SVGProps) => ( + + + +); +export default Bluej; diff --git a/frontend/pages/SoftwarePage/components/icons/index.ts b/frontend/pages/SoftwarePage/components/icons/index.ts index 87b0388b0b..0dedbdc167 100644 --- a/frontend/pages/SoftwarePage/components/icons/index.ts +++ b/frontend/pages/SoftwarePage/components/icons/index.ts @@ -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, diff --git a/website/assets/images/app-icon-bluej-60x60@2x.png b/website/assets/images/app-icon-bluej-60x60@2x.png new file mode 100644 index 0000000000..15727adee6 Binary files /dev/null and b/website/assets/images/app-icon-bluej-60x60@2x.png differ