Add Arc as a macOS FMA (#36996)
This pull request adds support for the Arc browser to both the backend maintained apps and the frontend software icons. The main changes include adding Arc's metadata and install/uninstall scripts, updating the apps listing, and providing a new SVG icon for Arc in the frontend. **Backend: Arc browser support** * Added Arc's metadata to `arc.json`, including its identifier, installer format, and default categories. * Created `arc/darwin.json` with version info, install/uninstall scripts, and installer details for Arc on macOS. * Updated `apps.json` to include Arc in the list of supported apps, with a user-friendly description. **Frontend: Arc browser icon** * Added a new SVG icon component for Arc in `Arc.tsx`. * Registered Arc in the icon index and mapped its name to the new icon for use in the software page. [[1]](diffhunk://#diff-628095892e1d16090be1db6cc1a5c9cebc65248c32a8b1312385394818f2907bR18) [[2]](diffhunk://#diff-628095892e1d16090be1db6cc1a5c9cebc65248c32a8b1312385394818f2907bR175)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "Arc",
|
||||
"unique_identifier": "company.thebrowser.Browser",
|
||||
"token": "arc",
|
||||
"installer_format": "zip",
|
||||
"slug": "arc/darwin",
|
||||
"default_categories": ["Browsers"]
|
||||
}
|
||||
@@ -85,6 +85,13 @@
|
||||
"unique_identifier": "com.philandro.anydesk",
|
||||
"description": "AnyDesk is an app that allows connection to a computer remotely."
|
||||
},
|
||||
{
|
||||
"name": "Arc",
|
||||
"slug": "arc/darwin",
|
||||
"platform": "darwin",
|
||||
"unique_identifier": "company.thebrowser.Browser",
|
||||
"description": "Arc is a productivity-focused browser."
|
||||
},
|
||||
{
|
||||
"name": "Asana",
|
||||
"slug": "asana/darwin",
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.124.0",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'company.thebrowser.Browser';"
|
||||
},
|
||||
"installer_url": "https://releases.arc.net/release/Arc-1.124.0-71787.zip",
|
||||
"install_script_ref": "076925e7",
|
||||
"uninstall_script_ref": "0b3739b1",
|
||||
"sha256": "422346bd9c1cb164a6682a727eab7fad0bb06d37b6b809fa9fbc173f1f558d5a",
|
||||
"default_categories": [
|
||||
"Browsers"
|
||||
]
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"076925e7": "#!/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\nunzip \"$INSTALLER_PATH\" -d \"$TMPDIR\"\n# copy to the applications folder\nquit_application 'company.thebrowser.Browser'\nif [ -d \"$APPDIR/Arc.app\" ]; then\n\tsudo mv \"$APPDIR/Arc.app\" \"$TMPDIR/Arc.app.bkp\"\nfi\nsudo cp -R \"$TMPDIR/Arc.app\" \"$APPDIR\"\n",
|
||||
"0b3739b1": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nLOGGED_IN_USER=$(scutil <<< \"show State:/Users/ConsoleUser\" | awk '/Name :/ { print $3 }')\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\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\nquit_application 'company.thebrowser.Browser'\nsudo rm -rf \"$APPDIR/Arc.app\"\ntrash $LOGGED_IN_USER '~/Library/Application Support/Arc'\ntrash $LOGGED_IN_USER '~/Library/Caches/Arc'\ntrash $LOGGED_IN_USER '~/Library/Caches/CloudKit/company.thebrowser.Browser'\ntrash $LOGGED_IN_USER '~/Library/Caches/company.thebrowser.Browser'\ntrash $LOGGED_IN_USER '~/Library/HTTPStorages/company.thebrowser.Browser'\ntrash $LOGGED_IN_USER '~/Library/HTTPStorages/company.thebrowser.Browser.binarycookies'\ntrash $LOGGED_IN_USER '~/Library/Preferences/company.thebrowser.Browser.plist'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/company.thebrowser.Browser.savedState'\ntrash $LOGGED_IN_USER '~/Library/WebKit/company.thebrowser.Browser'\n"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -15,6 +15,7 @@ import AndroidStudio from "./AndroidStudio";
|
||||
import AnyDesk from "./AnyDesk";
|
||||
import AppleApp from "./AppleApp";
|
||||
import AppleAppStore from "./AppleAppStore";
|
||||
import Arc from "./Arc";
|
||||
import Asana from "./Asana";
|
||||
import BBEdit from "./BBEdit";
|
||||
import BeyondCompare from "./BeyondCompare";
|
||||
@@ -172,6 +173,7 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
|
||||
"android studio": AndroidStudio,
|
||||
anydesk: AnyDesk,
|
||||
appleAppStore: AppleAppStore,
|
||||
arc: Arc,
|
||||
asana: Asana,
|
||||
bbedit: BBEdit,
|
||||
"beyond compare": BeyondCompare,
|
||||
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user