Add Blender as a macOS and Windows FMA (#36992)
This pull request adds support for managing Blender as a maintained app on both macOS and Windows platforms. It includes new app definitions, installation and uninstallation scripts, and integrates Blender’s icon into the frontend for display. **Blender app support (macOS & Windows):** * Added input definitions for Blender in `homebrew/blender.json` (macOS) and `winget/blender.json` (Windows), specifying installer formats and metadata. [[1]](diffhunk://#diff-891fa47f83954f81130e9a15f0fe60497916acb54a89b78478215cb08e9fb0e8R1-R8) [[2]](diffhunk://#diff-69ce1c29dce360a4dd0033a269811880ea700530661b9b73c1f02bbc37145f91R1-R10) * Updated `apps.json` to include Blender entries for both platforms, with descriptions and unique identifiers. * Created output manifests for Blender on macOS (`blender/darwin.json`) and Windows (`blender/windows.json`), including version info, installer URLs, SHA256 hashes, and install/uninstall scripts. [[1]](diffhunk://#diff-10617b0d1fdc87b778d38cf37a7a3ba479561eedb55b9c6cf8f5128abb224de1R1-R21) [[2]](diffhunk://#diff-a295dabd830631ee695b318097606d605b1d511cf32b46c9663c06ebbf24182bR1-R22) **Frontend integration:** * Added a new Blender SVG icon component (`Blender.tsx`) and registered it in the software icon map for display on the Software Page. [[1]](diffhunk://#diff-ba9ba14ef95d070975d2aa0e46b19d118bc9c167aeeb34b45ba48d2c1cc5848cR1-R14) [[2]](diffhunk://#diff-628095892e1d16090be1db6cc1a5c9cebc65248c32a8b1312385394818f2907bR22) [[3]](diffhunk://#diff-628095892e1d16090be1db6cc1a5c9cebc65248c32a8b1312385394818f2907bR179)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "Blender",
|
||||
"unique_identifier": "org.blenderfoundation.blender",
|
||||
"token": "blender",
|
||||
"installer_format": "dmg",
|
||||
"slug": "blender/darwin",
|
||||
"default_categories": ["Productivity"]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "Blender",
|
||||
"slug": "blender/windows",
|
||||
"package_identifier": "BlenderFoundation.Blender",
|
||||
"unique_identifier": "Blender",
|
||||
"installer_arch": "x64",
|
||||
"installer_type": "msi",
|
||||
"installer_scope": "machine",
|
||||
"default_categories": ["Productivity"]
|
||||
}
|
||||
@@ -120,6 +120,20 @@
|
||||
"unique_identifier": "com.bitwarden.desktop",
|
||||
"description": "Bitwarden is a desktop password and login vault."
|
||||
},
|
||||
{
|
||||
"name": "Blender",
|
||||
"slug": "blender/darwin",
|
||||
"platform": "darwin",
|
||||
"unique_identifier": "org.blenderfoundation.blender",
|
||||
"description": "Blender is a 3D creation suite."
|
||||
},
|
||||
{
|
||||
"name": "Blender",
|
||||
"slug": "blender/windows",
|
||||
"platform": "windows",
|
||||
"unique_identifier": "Blender",
|
||||
"description": "Blender is a 3D creation suite."
|
||||
},
|
||||
{
|
||||
"name": "Box Drive",
|
||||
"slug": "box-drive/darwin",
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "5.0.0",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'org.blenderfoundation.blender';"
|
||||
},
|
||||
"installer_url": "https://download.blender.org/release/Blender5.0/blender-5.0.0-macos-arm64.dmg",
|
||||
"install_script_ref": "a73ff8be",
|
||||
"uninstall_script_ref": "f1156a0f",
|
||||
"sha256": "b23984753ec8354878acc25cd4073a41ae195522013f1649903a593bccbfa54b",
|
||||
"default_categories": [
|
||||
"Productivity"
|
||||
]
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"a73ff8be": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nTMPDIR=$(dirname \"$(realpath $INSTALLER_PATH)\")\n# functions\n\nquit_application() {\n local bundle_id=\"$1\"\n local timeout_duration=10\n\n # check if the application is running\n if ! osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ $EUID -eq 0 && \"$console_user\" == \"root\" ]]; then\n echo \"Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'.\"\n return\n fi\n\n echo \"Quitting application '$bundle_id'...\"\n\n # try to quit the application within the timeout period\n local quit_success=false\n SECONDS=0\n while (( SECONDS < timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" >/dev/null 2>&1; then\n if ! pgrep -f \"$bundle_id\" >/dev/null 2>&1; then\n echo \"Application '$bundle_id' quit successfully.\"\n quit_success=true\n break\n fi\n fi\n sleep 1\n done\n\n if [[ \"$quit_success\" = false ]]; then\n echo \"Application '$bundle_id' did not quit.\"\n fi\n}\n\n\n# extract contents\nMOUNT_POINT=$(mktemp -d /tmp/dmg_mount_XXXXXX)\nhdiutil attach -plist -nobrowse -readonly -mountpoint \"$MOUNT_POINT\" \"$INSTALLER_PATH\"\nsudo cp -R \"$MOUNT_POINT\"/* \"$TMPDIR\"\nhdiutil detach \"$MOUNT_POINT\"\n# copy to the applications folder\nquit_application 'org.blenderfoundation.blender'\nif [ -d \"$APPDIR/Blender.app\" ]; then\n\tsudo mv \"$APPDIR/Blender.app\" \"$TMPDIR/Blender.app.bkp\"\nfi\nsudo cp -R \"$TMPDIR/Blender.app\" \"$APPDIR\"\n",
|
||||
"f1156a0f": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nLOGGED_IN_USER=$(scutil <<< \"show State:/Users/ConsoleUser\" | awk '/Name :/ { print $3 }')\n# functions\n\ntrash() {\n local logged_in_user=\"$1\"\n local target_file=\"$2\"\n local timestamp=\"$(date +%Y-%m-%d-%s)\"\n local rand=\"$(jot -r 1 0 99999)\"\n\n # replace ~ with /Users/$logged_in_user\n if [[ \"$target_file\" == ~* ]]; then\n target_file=\"/Users/$logged_in_user${target_file:1}\"\n fi\n\n local trash=\"/Users/$logged_in_user/.Trash\"\n local file_name=\"$(basename \"${target_file}\")\"\n\n if [[ -e \"$target_file\" ]]; then\n echo \"removing $target_file.\"\n mv -f \"$target_file\" \"$trash/${file_name}_${timestamp}_${rand}\"\n else\n echo \"$target_file doesn't exist.\"\n fi\n}\n\nsudo rm -rf \"$APPDIR/Blender.app\"\nsudo rm -rf 'blender'\ntrash $LOGGED_IN_USER '~/Library/Application Support/Blender'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/org.blenderfoundation.blender.savedState'\n"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "5.0.0",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE name = 'Blender' AND publisher = 'Blender Foundation';"
|
||||
},
|
||||
"installer_url": "https://download.blender.org/release/Blender5.0/blender-5.0.0-windows-x64.msi",
|
||||
"install_script_ref": "8959087b",
|
||||
"uninstall_script_ref": "2560ee0b",
|
||||
"sha256": "69f662f5c4adf3bfa3fa8ba60504ad6fed723ad1d33fe22d718cdeb47ef27895",
|
||||
"default_categories": [
|
||||
"Productivity"
|
||||
],
|
||||
"upgrade_code": "{004FFCA1-B269-51EE-8768-5C75526A8DE2}"
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"2560ee0b": "# 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(\"{004FFCA1-B269-51EE-8768-5C75526A8DE2}\")) {\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",
|
||||
"8959087b": "$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}`\"\" `\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"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -19,6 +19,7 @@ import Asana from "./Asana";
|
||||
import BBEdit from "./BBEdit";
|
||||
import BeyondCompare from "./BeyondCompare";
|
||||
import Bitwarden from "./Bitwarden";
|
||||
import Blender from "./Blender";
|
||||
import Box from "./Box";
|
||||
import Brave from "./Brave";
|
||||
import CLion from "./CLion";
|
||||
@@ -175,6 +176,7 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
|
||||
bbedit: BBEdit,
|
||||
"beyond compare": BeyondCompare,
|
||||
bitwarden: Bitwarden,
|
||||
blender: Blender,
|
||||
box: Box,
|
||||
brave: Brave,
|
||||
camtasia: Camtasia,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user