mirror of
https://github.com/fleetdm/fleet
synced 2026-05-02 10:57:25 +00:00
This pull request adds support for several new macOS applications to the maintained apps system. It introduces metadata and installer information for each app, including their categories, installation formats, and descriptions. The changes affect both the input definitions and the generated output listings, ensuring these apps are now recognized and manageable within the platform. **New application support:** * Added metadata and installation details for the following apps in the `ee/maintained-apps/inputs/homebrew` directory: FileMaker Pro, NordPass, OBS, Obsidian, OrbStack, pgAdmin4, RapidAPI, Royal TSX, Shottr, Splashtop Business, Splashtop Streamer, Stats, Sublime Merge, Surfshark, and Suspicious Package. [[1]](diffhunk://#diff-4110aafedd820ab411c58a2d1d6aa0dd6280e5f9462784933e351ac50e707180R1-R8) [[2]](diffhunk://#diff-58c420dc373e687e3fa2c3203279266db3b53ddbf8f785bd0fe81c302b391b03R1-R8) [[3]](diffhunk://#diff-a3be001759cc20b5b2beb576815bc7bab7d4a96e633462885b549d9ae16d81d7R1-R8) [[4]](diffhunk://#diff-3719ec4aede4178b68f34f4873badcf791b475f2d96dc98cb46072d22104aa7bR1-R8) [[5]](diffhunk://#diff-ba91b6976eae0e27e6f7ab7a169c493943011be440ad98028468c826e47b1d26R1-R8) [[6]](diffhunk://#diff-8f07dada0c342e599ff8b3fe14a3db9d35af2823edf15974b1f7e944988a8b3eR1-R8) [[7]](diffhunk://#diff-3dfe9b210eaf4845c66a78bac05ce92fa1b49f6e88ed58507571efcf38100e11R1-R8) [[8]](diffhunk://#diff-cd74cef2783aac3981106bf37145df1f7dddc6764f525ba796e49a14088b8f7eR1-R8) [[9]](diffhunk://#diff-991e41b0299e0199ef9935e25962e96fb6869619f91385f42559658cb354e15cR1-R8) [[10]](diffhunk://#diff-c80d444ade7092005119d3f9a49903fb9b9f680e1c8d4d2c119f7b25db69531bR1-R8) [[11]](diffhunk://#diff-8645def0d5c629d7814deb463500b0f54422b8d25f9ff8d9ecf26e908d9e5bf5R1-R8) [[12]](diffhunk://#diff-c655bdf41c305040cf0b1694fd40a3fac6d63e9b4e0a22dbb0fa0def502c32aaR1-R8) [[13]](diffhunk://#diff-b2549d65cd0dd12e9554dc82123b5935eff0673a76c631064f4a30eb088698dbR1-R8) [[14]](diffhunk://#diff-858e6b00e0f8ae199231d5cb1fb40f23a8e554fe8e3b3f5e0d097846e98bd4f4R1-R8) [[15]](diffhunk://#diff-a1ab3a19c9c8fd3a677e28bdd41f39fdc085b39935a85b44984dd3d886870cadR1-R8) **Output listings update:** * Updated `ee/maintained-apps/outputs/apps.json` to include the new apps with their names, slugs, platforms, unique identifiers, and descriptions, making them available for discovery and management. [[1]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R564-R570) [[2]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R942-R948) [[3]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R984-R997) [[4]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R1026-R1032) [[5]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R1047-R1053) [[6]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R1131-R1137) [[7]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R1159-R1165) [[8]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R1187-R1193) [[9]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R1236-R1270) [[10]](diffhunk://#diff-4c1446cfc02c6bb0bda874481e333c65b84e184fcea52f656b49a6489f73c9c2R1285-R1298) **Installer and uninstaller scripts:** * Added detailed versioning and installation/uninstallation scripts for FileMaker Pro in `ee/maintained-apps/outputs/filemaker-pro/darwin.json`, including script references and SHA256 checksum for integrity verification.
59 lines
1.7 KiB
Bash
Executable file
59 lines
1.7 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# variables
|
|
APPDIR="/Applications/"
|
|
TMPDIR=$(dirname "$(realpath $INSTALLER_PATH)")
|
|
|
|
# functions
|
|
|
|
quit_application() {
|
|
local bundle_id="$1"
|
|
local timeout_duration=10
|
|
|
|
# check if the application is running
|
|
if ! osascript -e "application id \"$bundle_id\" is running" 2>/dev/null; then
|
|
return
|
|
fi
|
|
|
|
local console_user
|
|
console_user=$(stat -f "%Su" /dev/console)
|
|
if [[ $EUID -eq 0 && "$console_user" == "root" ]]; then
|
|
echo "Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'."
|
|
return
|
|
fi
|
|
|
|
echo "Quitting application '$bundle_id'..."
|
|
|
|
# try to quit the application within the timeout period
|
|
local quit_success=false
|
|
SECONDS=0
|
|
while (( SECONDS < timeout_duration )); do
|
|
if osascript -e "tell application id \"$bundle_id\" to quit" >/dev/null 2>&1; then
|
|
if ! pgrep -f "$bundle_id" >/dev/null 2>&1; then
|
|
echo "Application '$bundle_id' quit successfully."
|
|
quit_success=true
|
|
break
|
|
fi
|
|
fi
|
|
sleep 1
|
|
done
|
|
|
|
if [[ "$quit_success" = false ]]; then
|
|
echo "Application '$bundle_id' did not quit."
|
|
fi
|
|
}
|
|
|
|
# extract contents
|
|
# Use 'yes' to automatically accept license agreement when mounting DMG
|
|
# This replicates Homebrew's behavior for DMG files with license agreements
|
|
MOUNT_POINT=$(mktemp -d /tmp/dmg_mount_XXXXXX)
|
|
yes | hdiutil attach -plist -nobrowse -readonly -mountpoint "$MOUNT_POINT" "$INSTALLER_PATH" || exit 1
|
|
sudo cp -R "$MOUNT_POINT"/* "$TMPDIR"
|
|
hdiutil detach "$MOUNT_POINT" || true
|
|
|
|
# copy to the applications folder
|
|
quit_application 'com.lemonmojo.RoyalTSX.App'
|
|
if [ -d "$APPDIR/Royal TSX.app" ]; then
|
|
sudo mv "$APPDIR/Royal TSX.app" "$TMPDIR/Royal TSX.app.bkp"
|
|
fi
|
|
sudo cp -R "$TMPDIR/Royal TSX.app" "$APPDIR"
|