Add Zen Browser as a macOS FMA (#44126)

This pull request adds support for the Zen Browser across the
application, including its metadata, installation scripts, and UI icon.
The changes ensure Zen Browser is now recognized as a maintained app,
can be installed/uninstalled via scripts, and displays its icon in the
frontend.

**Zen Browser Integration**

* Added Zen Browser metadata to the maintained apps input (`zen.json`)
and output (`apps.json`) files, making it available in the maintained
apps list.
[[1]](diffhunk://#diff-1227fd3d4a73fdd49df2d7e2977fc94f56c8fe606a444ae5d995916abbbccdb5R1-R8)
[[2]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R1957-R1963)
* Created a new versioned output file for Zen Browser
(`zen/darwin.json`), including installer and uninstaller scripts,
version information, and download details.

**Frontend/UI Updates**

* Added a new React SVG icon component for Zen Browser (`Zen.tsx`).
* Registered the Zen icon in the icon index and mapped the "zen"
software name to the new icon, enabling its display in the UI.
[[1]](diffhunk://#diff-628095892e1d16090be1db6cc1a5c9cebc65248c32a8b1312385394818f2907bR249)
[[2]](diffhunk://#diff-628095892e1d16090be1db6cc1a5c9cebc65248c32a8b1312385394818f2907bR514)
This commit is contained in:
Allen Houchins
2026-04-24 10:44:13 -05:00
committed by GitHub
parent 43e32d916e
commit bc94128c2b
6 changed files with 53 additions and 0 deletions
@@ -0,0 +1,8 @@
{
"name": "Zen Browser",
"unique_identifier": "app.zen-browser.zen",
"token": "zen",
"installer_format": "dmg",
"slug": "zen/darwin",
"default_categories": ["Browsers"]
}
+7
View File
@@ -1954,6 +1954,13 @@
"unique_identifier": "dev.zed.Zed",
"description": "Zed is a multiplayer code editor."
},
{
"name": "Zen Browser",
"slug": "zen/darwin",
"platform": "darwin",
"unique_identifier": "app.zen-browser.zen",
"description": "Zen Browser is a Gecko based web browser."
},
{
"name": "Zeplin",
"slug": "zeplin/darwin",
@@ -0,0 +1,22 @@
{
"versions": [
{
"version": "1.19.8b",
"queries": {
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'app.zen-browser.zen';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'app.zen-browser.zen' AND version_compare(bundle_short_version, '1.19.8b') < 0);"
},
"installer_url": "https://github.com/zen-browser/desktop/releases/download/1.19.8b/zen.macos-universal.dmg",
"install_script_ref": "b195d3bf",
"uninstall_script_ref": "045f019e",
"sha256": "08b06881fea899fc4f2adac93232c028a71334bbba6945a00268279e31108355",
"default_categories": [
"Browsers"
]
}
],
"refs": {
"045f019e": "#!/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/Zen.app\"\nsudo rmdir '~/Library/Caches/Mozilla'\ntrash $LOGGED_IN_USER '~/Library/Application Support/Zen'\ntrash $LOGGED_IN_USER '~/Library/Caches/Mozilla/updates/Applications/Zen Browser'\ntrash $LOGGED_IN_USER '~/Library/Caches/Mozilla/updates/Applications/Zen'\ntrash $LOGGED_IN_USER '~/Library/Caches/Zen'\ntrash $LOGGED_IN_USER '~/Library/Preferences/app.zen-browser.zen.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/org.mozilla.com.zen.browser.plist'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/app.zen-browser.zen.savedState'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/org.mozilla.com.zen.browser.savedState'\n",
"b195d3bf": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nTMPDIR=$(dirname \"$(realpath $INSTALLER_PATH)\")\n# functions\n\nquit_and_track_application() {\n local bundle_id=\"$1\"\n local var_name=\"APP_WAS_RUNNING_$(echo \"$bundle_id\" | tr '.-' '__')\"\n local timeout_duration=10\n\n # check if the application is running\n local app_running\n app_running=$(osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null)\n if [[ \"$app_running\" != \"true\" ]]; then\n eval \"export $var_name=0\"\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ -z \"$console_user\" || \"$console_user\" == \"root\" || \"$console_user\" == \"loginwindow\" ]]; then\n echo \"Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'.\"\n eval \"export $var_name=0\"\n return\n fi\n\n # App was running, mark it for relaunch\n eval \"export $var_name=1\"\n echo \"Application '$bundle_id' was running; will relaunch after installation.\"\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\nrelaunch_application() {\n local bundle_id=\"$1\"\n local var_name=\"APP_WAS_RUNNING_$(echo \"$bundle_id\" | tr '.-' '__')\"\n local was_running\n\n # Check if the app was running before installation\n eval \"was_running=\\$$var_name\"\n if [[ \"$was_running\" != \"1\" ]]; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ -z \"$console_user\" || \"$console_user\" == \"root\" || \"$console_user\" == \"loginwindow\" ]]; then\n echo \"Not logged into a non-root GUI; skipping relaunching application ID '$bundle_id'.\"\n return\n fi\n\n echo \"Relaunching application '$bundle_id'...\"\n\n # Launch the app in the logged-in user's GUI session. Apps launched by root\n # won't register with the user's Dock/GUI, so run 'open' as the console user.\n # Use 'launchctl asuser' to bootstrap into the console user's Mach namespace\n # and GUI session — 'sudo -u' alone doesn't do this, which can cause\n # LSOpenURLsWithRole() failures even when 'open' exits 0.\n local open_status=0\n if [[ $EUID -eq 0 ]]; then\n local console_uid\n console_uid=$(id -u \"$console_user\")\n /bin/launchctl asuser \"$console_uid\" sudo -u \"$console_user\" open -b \"$bundle_id\" >/dev/null 2>&1 || open_status=$?\n else\n open -b \"$bundle_id\" >/dev/null 2>&1 || open_status=$?\n fi\n\n if [[ $open_status -eq 0 ]]; then\n echo \"Application '$bundle_id' relaunched successfully.\"\n else\n echo \"Failed to relaunch application '$bundle_id'.\"\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_and_track_application 'app.zen-browser.zen'\nif [ -d \"$APPDIR/Zen.app\" ]; then\n\tsudo mv \"$APPDIR/Zen.app\" \"$TMPDIR/Zen.app.bkp\"\nfi\nsudo cp -R \"$TMPDIR/Zen.app\" \"$APPDIR\"\nrelaunch_application 'app.zen-browser.zen'\n"
}
}
File diff suppressed because one or more lines are too long
@@ -246,6 +246,7 @@ import WrikeForMac from "./WrikeForMac";
import YubicoAuthenticator from "./YubicoAuthenticator";
import YubikeyManager from "./YubikeyManager";
import Zed from "./Zed";
import Zen from "./Zen";
import Zeplin from "./Zeplin";
import ZeroOneZeroEditor from "./010Editor";
import Zoom from "./Zoom";
@@ -510,6 +511,7 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
"yubico authenticator": YubicoAuthenticator,
"yubikey manager": YubikeyManager,
zed: Zed,
zen: Zen,
zeplin: Zeplin,
zotero: Zotero,
} as const;
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB