Add Comet as a macOS & Windows FMA (#47027)

This pull request adds support for the Comet browser (an AI-integrated
browser from Perplexity) to the maintained apps catalog for both macOS
and Windows. It introduces metadata, installation, and uninstallation
scripts, as well as versioned definitions for both platforms.

**New application support: Comet browser**

*Metadata and catalog integration:*
- Added `comet.json` metadata files for Homebrew (macOS) and Winget
(Windows) in the `inputs` directory, defining identifiers, installer
types, and categories.
[[1]](diffhunk://#diff-60e2346d602b7538ba08314f7adfdde98ca8e802dd3706c65bb75273fe7bbbd4R1-R8)
[[2]](diffhunk://#diff-ecdccc5ed1a1f1e6f2b66439941fcd74419b2706c1df155cb4bc1940abd6bfa7R1-R13)
- Updated `apps.json` to include Comet for both `darwin` (macOS) and
`windows` platforms with descriptive text.

*macOS support:*
- Added `outputs/comet/darwin.json` with versioned app definition,
install/uninstall queries, download URL, and references to
install/uninstall scripts.

*Windows support:*
- Added `outputs/comet/windows.json` with versioned app definition,
install/uninstall queries, download URL, SHA256, and references to
install/uninstall scripts.
- Added PowerShell scripts for silent installation (`comet_install.ps1`)
and uninstallation (`comet_uninstall.ps1`) of Comet, handling
machine-wide deployment and proper exit codes.
[[1]](diffhunk://#diff-5b9c60857fd2a49958f05124e8744394683297127503578e9b4eaf227470f1f7R1-R31)
[[2]](diffhunk://#diff-3433e05da3c0601490c7d90084264d4a793d0feef4211569b4aff884f85116dbR1-R101)
This commit is contained in:
Allen Houchins
2026-06-06 23:34:28 -05:00
committed by GitHub
parent 0611cdbdf8
commit fbabd079d1
10 changed files with 227 additions and 0 deletions
@@ -0,0 +1,8 @@
{
"name": "Comet",
"slug": "comet/darwin",
"unique_identifier": "ai.perplexity.comet",
"token": "comet",
"installer_format": "dmg",
"default_categories": ["Browsers"]
}
@@ -0,0 +1,13 @@
{
"name": "Comet",
"slug": "comet/windows",
"package_identifier": "Perplexity.Comet",
"unique_identifier": "Comet",
"program_publisher": "PERPLEXITY AI, INC.",
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/comet_install.ps1",
"uninstall_script_path": "ee/maintained-apps/inputs/winget/scripts/comet_uninstall.ps1",
"installer_arch": "x64",
"installer_type": "exe",
"installer_scope": "machine",
"default_categories": ["Browsers"]
}
@@ -0,0 +1,31 @@
# Learn more about .exe install scripts:
# http://fleetdm.com/learn-more-about/exe-install-scripts
#
# Comet ships a Chromium/Omaha-based machine-scope installer
# (comet_*_system.exe). Fleet runs as SYSTEM, so it installs machine-wide.
$exeFilePath = "${env:INSTALLER_PATH}"
try {
# Add arguments to install silently machine-wide.
# --install --silent -> silent machine-scope install
$processOptions = @{
FilePath = "$exeFilePath"
ArgumentList = "--install --silent"
PassThru = $true
Wait = $true
}
# Start process and track exit code
$process = Start-Process @processOptions
$exitCode = $process.ExitCode
# Prints the exit code
Write-Host "Install exit code: $exitCode"
Exit $exitCode
} catch {
Write-Host "Error: $_"
Exit 1
}
@@ -0,0 +1,101 @@
# Fleet extracts name from installer (EXE) and saves it to PACKAGE_ID
# variable
$softwareName = "Comet"
# It is recommended to use exact software name here if possible to avoid
# uninstalling unintended software.
$softwareNameLike = "*$softwareName*"
# Comet uses a Chromium/Omaha uninstaller. Its UninstallString already
# contains "--uninstall --system-level"; "--force-uninstall" runs it silently
# without a confirmation prompt.
$uninstallArgs = "--force-uninstall"
# Comet installs machine-wide, so look in the per-machine uninstall keys.
$machineKey = `
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*'
$machineKey32on64 = `
'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
# Define acceptable/expected exit codes (19 = uninstall requires reboot)
$ExpectedExitCodes = @(0, 19)
$exitCode = 0
try {
[array]$uninstallKeys = Get-ChildItem `
-Path @($machineKey, $machineKey32on64) `
-ErrorAction SilentlyContinue |
ForEach-Object { Get-ItemProperty $_.PSPath }
$foundUninstaller = $false
foreach ($key in $uninstallKeys) {
# If needed, add -notlike to the comparison to exclude certain similar
# software
if ($key.DisplayName -like $softwareNameLike) {
$foundUninstaller = $true
# Get the uninstall command. Some uninstallers do not include
# 'QuietUninstallString' and require a flag to run silently.
$uninstallCommand = if ($key.QuietUninstallString) {
$key.QuietUninstallString
} else {
$key.UninstallString
}
# The uninstall command may contain command and args, like:
# "C:\Program Files\Software\uninstall.exe" --uninstall --silent
# Split the command and args
$splitArgs = $uninstallCommand.Split('"')
if ($splitArgs.Length -gt 1) {
if ($splitArgs.Length -eq 3) {
$uninstallArgs = "$( $splitArgs[2] ) $uninstallArgs".Trim()
} elseif ($splitArgs.Length -gt 3) {
Throw `
"Uninstall command contains multiple quoted strings. " +
"Please update the uninstall script.`n" +
"Uninstall command: $uninstallCommand"
}
$uninstallCommand = $splitArgs[1]
}
Write-Host "Uninstall command: $uninstallCommand"
Write-Host "Uninstall args: $uninstallArgs"
$processOptions = @{
FilePath = $uninstallCommand
PassThru = $true
Wait = $true
}
if ($uninstallArgs -ne '') {
$processOptions.ArgumentList = "$uninstallArgs"
}
# Start process and track exit code
$process = Start-Process @processOptions
$exitCode = $process.ExitCode
# Prints the exit code
Write-Host "Uninstall exit code: $exitCode"
# Exit the loop once the software is found and uninstalled.
break
}
}
if (-not $foundUninstaller) {
Write-Host "Uninstaller for '$softwareName' not found."
# Change exit code to 0 if you don't want to fail if uninstaller is not
# found. This could happen if program was already uninstalled.
$exitCode = 1
}
} catch {
Write-Host "Error: $_"
$exitCode = 1
}
# Treat acceptable exit codes as success
if ($ExpectedExitCodes -contains $exitCode) {
Exit 0
} else {
Exit $exitCode
}
+14
View File
@@ -673,6 +673,20 @@
"unique_identifier": "Cloudflare WARP",
"description": "Cloudflare WARP enhances internet safety and performance by encrypting your data and optimizing connections for privacy."
},
{
"name": "Comet",
"slug": "comet/darwin",
"platform": "darwin",
"unique_identifier": "ai.perplexity.comet",
"description": "Comet is a web browser with an integrated AI assistant from Perplexity."
},
{
"name": "Comet",
"slug": "comet/windows",
"platform": "windows",
"unique_identifier": "Comet",
"description": "Comet is a web browser with an integrated AI assistant from Perplexity."
},
{
"name": "Connect Fonts",
"slug": "connect-fonts/darwin",
@@ -0,0 +1,22 @@
{
"versions": [
{
"version": "148.0.7778.1016",
"queries": {
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'ai.perplexity.comet';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'ai.perplexity.comet' AND version_compare(bundle_short_version, '148.0.7778.1016') < 0);"
},
"installer_url": "https://www.perplexity.ai/rest/browser/download?channel=stable&platform=mac_arm64",
"install_script_ref": "af8d196c",
"uninstall_script_ref": "e2a92aa5",
"sha256": "no_check",
"default_categories": [
"Browsers"
]
}
],
"refs": {
"af8d196c": "#!/bin/bash\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)\nyes | hdiutil attach -plist -nobrowse -readonly -mountpoint \"$MOUNT_POINT\" \"$INSTALLER_PATH\" || exit 1\nsudo cp -R \"$MOUNT_POINT\"/* \"$TMPDIR\"\nhdiutil detach \"$MOUNT_POINT\" || true\n# copy to the applications folder\nquit_and_track_application 'ai.perplexity.comet'\nif [ -d \"$APPDIR/Comet.app\" ]; then\n\tsudo mv \"$APPDIR/Comet.app\" \"$TMPDIR/Comet.app.bkp\"\nfi\nsudo cp -R \"$TMPDIR/Comet.app\" \"$APPDIR\"\nrelaunch_application 'ai.perplexity.comet'\n",
"e2a92aa5": "#!/bin/bash\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\n # If the target contains glob characters, expand it and move each match.\n if [[ \"$target_file\" == *[*?[]* ]]; then\n local file file_name\n local matched=false\n local i=0\n # compgen -G expands the (quoted) pattern itself, so paths containing\n # spaces glob correctly; reading line by line keeps each match intact.\n while IFS= read -r file; do\n [[ -n \"$file\" ]] || continue\n [[ -e \"$file\" || -L \"$file\" ]] || continue\n matched=true\n i=$((i + 1))\n file_name=\"$(basename \"$file\")\"\n echo \"removing $file.\"\n # The per-match counter keeps matches that share a basename from\n # overwriting each other in the trash.\n mv -f \"$file\" \"$trash/${file_name}_${timestamp}_${rand}_${i}\"\n done < <(compgen -G \"$target_file\" 2>/dev/null)\n if [[ \"$matched\" == false ]]; then\n echo \"$target_file doesn't exist.\"\n fi\n return\n fi\n\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/Comet.app\"\ntrash $LOGGED_IN_USER '~/Library/Application Support/ai.perplexity.comet'\ntrash $LOGGED_IN_USER '~/Library/Application Support/Comet'\ntrash $LOGGED_IN_USER '~/Library/Caches/ai.perplexity.comet'\ntrash $LOGGED_IN_USER '~/Library/Caches/Comet'\ntrash $LOGGED_IN_USER '~/Library/Preferences/ai.perplexity.comet.plist'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/ai.perplexity.comet.savedState'\ntrash $LOGGED_IN_USER '~/Library/WebKit/ai.perplexity.comet'\n"
}
}
@@ -0,0 +1,22 @@
{
"versions": [
{
"version": "148.0.7778.1018",
"queries": {
"exists": "SELECT 1 FROM programs WHERE name = 'Comet' AND publisher = 'PERPLEXITY AI, INC.';",
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE name = 'Comet' AND publisher = 'PERPLEXITY AI, INC.' AND version_compare(version, '148.0.7778.1018') < 0);"
},
"installer_url": "https://www.perplexity.ai/rest/browser/download?platform=win_x64&channel=stable",
"install_script_ref": "9f163ee3",
"uninstall_script_ref": "faa38912",
"sha256": "3d85ad9e2be15a1258d88e0b280a27131a2f2ca7b01e2f24e40bda5bc600d537",
"default_categories": [
"Browsers"
]
}
],
"refs": {
"9f163ee3": "# Learn more about .exe install scripts:\n# http://fleetdm.com/learn-more-about/exe-install-scripts\n#\n# Comet ships a Chromium/Omaha-based machine-scope installer\n# (comet_*_system.exe). Fleet runs as SYSTEM, so it installs machine-wide.\n\n$exeFilePath = \"${env:INSTALLER_PATH}\"\n\ntry {\n\n# Add arguments to install silently machine-wide.\n# --install --silent -> silent machine-scope install\n$processOptions = @{\n FilePath = \"$exeFilePath\"\n ArgumentList = \"--install --silent\"\n PassThru = $true\n Wait = $true\n}\n\n# Start process and track exit code\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\n# Prints the exit code\nWrite-Host \"Install exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n",
"faa38912": "# Fleet extracts name from installer (EXE) and saves it to PACKAGE_ID\n# variable\n$softwareName = \"Comet\"\n\n# It is recommended to use exact software name here if possible to avoid\n# uninstalling unintended software.\n$softwareNameLike = \"*$softwareName*\"\n\n# Comet uses a Chromium/Omaha uninstaller. Its UninstallString already\n# contains \"--uninstall --system-level\"; \"--force-uninstall\" runs it silently\n# without a confirmation prompt.\n$uninstallArgs = \"--force-uninstall\"\n\n# Comet installs machine-wide, so look in the per-machine uninstall keys.\n$machineKey = `\n 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*'\n$machineKey32on64 = `\n 'HKLM:\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*'\n\n# Define acceptable/expected exit codes (19 = uninstall requires reboot)\n$ExpectedExitCodes = @(0, 19)\n\n$exitCode = 0\n\ntry {\n\n[array]$uninstallKeys = Get-ChildItem `\n -Path @($machineKey, $machineKey32on64) `\n -ErrorAction SilentlyContinue |\n ForEach-Object { Get-ItemProperty $_.PSPath }\n\n$foundUninstaller = $false\nforeach ($key in $uninstallKeys) {\n # If needed, add -notlike to the comparison to exclude certain similar\n # software\n if ($key.DisplayName -like $softwareNameLike) {\n $foundUninstaller = $true\n # Get the uninstall command. Some uninstallers do not include\n # 'QuietUninstallString' and require a flag to run silently.\n $uninstallCommand = if ($key.QuietUninstallString) {\n $key.QuietUninstallString\n } else {\n $key.UninstallString\n }\n\n # The uninstall command may contain command and args, like:\n # \"C:\\Program Files\\Software\\uninstall.exe\" --uninstall --silent\n # Split the command and args\n $splitArgs = $uninstallCommand.Split('\"')\n if ($splitArgs.Length -gt 1) {\n if ($splitArgs.Length -eq 3) {\n $uninstallArgs = \"$( $splitArgs[2] ) $uninstallArgs\".Trim()\n } elseif ($splitArgs.Length -gt 3) {\n Throw `\n \"Uninstall command contains multiple quoted strings. \" +\n \"Please update the uninstall script.`n\" +\n \"Uninstall command: $uninstallCommand\"\n }\n $uninstallCommand = $splitArgs[1]\n }\n Write-Host \"Uninstall command: $uninstallCommand\"\n Write-Host \"Uninstall args: $uninstallArgs\"\n\n $processOptions = @{\n FilePath = $uninstallCommand\n PassThru = $true\n Wait = $true\n }\n if ($uninstallArgs -ne '') {\n $processOptions.ArgumentList = \"$uninstallArgs\"\n }\n\n # Start process and track exit code\n $process = Start-Process @processOptions\n $exitCode = $process.ExitCode\n\n # Prints the exit code\n Write-Host \"Uninstall exit code: $exitCode\"\n # Exit the loop once the software is found and uninstalled.\n break\n }\n}\n\nif (-not $foundUninstaller) {\n Write-Host \"Uninstaller for '$softwareName' not found.\"\n # Change exit code to 0 if you don't want to fail if uninstaller is not\n # found. This could happen if program was already uninstalled.\n $exitCode = 1\n}\n\n} catch {\n Write-Host \"Error: $_\"\n $exitCode = 1\n}\n\n# Treat acceptable exit codes as success\nif ($ExpectedExitCodes -contains $exitCode) {\n Exit 0\n} else {\n Exit $exitCode\n}\n"
}
}
File diff suppressed because one or more lines are too long
@@ -22,6 +22,7 @@ import Charles from "./Charles";
import ChromeRemoteDesktop from "./ChromeRemoteDesktop";
import Cinc from "./Cinc";
import ClickShare from "./ClickShare";
import Comet from "./Comet";
import ConnectFonts from "./ConnectFonts";
import CrashPlan from "./CrashPlan";
import Cryptomator from "./Cryptomator";
@@ -384,6 +385,7 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
"clockify desktop": ClockifyDesktop,
cloudflare: Cloudflare,
code: VisualStudioCode,
comet: Comet,
"company portal": IntuneCompanyPortal,
"connect fonts": ConnectFonts,
crashplan: CrashPlan,
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB