Add Camtasia as a macOS & Windows FMA (#36449)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package externalrefs
|
||||
|
||||
import (
|
||||
maintained_apps "github.com/fleetdm/fleet/v4/ee/maintained-apps"
|
||||
)
|
||||
|
||||
// CamtasiaVersionTransformer prepends "20" to the version to match what osquery reports.
|
||||
// Homebrew reports "26.0.2" but osquery reports "2026.0.2" (year-based versioning).
|
||||
// This ensures the output always contains the real version that osquery reports.
|
||||
func CamtasiaVersionTransformer(app *maintained_apps.FMAManifestApp) (*maintained_apps.FMAManifestApp, error) {
|
||||
app.Version = "20" + app.Version
|
||||
return app, nil
|
||||
}
|
||||
@@ -18,6 +18,7 @@ var Funcs = map[string][]func(*maintained_apps.FMAManifestApp) (*maintained_apps
|
||||
"parallels/darwin": {ParallelsVersionShortener},
|
||||
"github/darwin": {GitHubDesktopVersionShortener},
|
||||
"onedrive/darwin": {OneDriveVersionTransformer},
|
||||
"camtasia/darwin": {CamtasiaVersionTransformer},
|
||||
}
|
||||
|
||||
func ChromePKGInstaller(app *maintained_apps.FMAManifestApp) (*maintained_apps.FMAManifestApp, error) {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "Camtasia",
|
||||
"unique_identifier": "com.techsmith.camtasia",
|
||||
"token": "camtasia",
|
||||
"installer_format": "dmg",
|
||||
"slug": "camtasia/darwin",
|
||||
"default_categories": ["Productivity"]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "Camtasia",
|
||||
"slug": "camtasia/windows",
|
||||
"package_identifier": "TechSmith.Camtasia",
|
||||
"unique_identifier": "Camtasia",
|
||||
"installer_arch": "x64",
|
||||
"installer_type": "msi",
|
||||
"installer_scope": "machine",
|
||||
"default_categories": ["Productivity"]
|
||||
}
|
||||
@@ -134,6 +134,20 @@
|
||||
"unique_identifier": "Brave",
|
||||
"description": "Brave is a web browser designed with privacy, blocking ads and trackers by default while maintaining fast speed."
|
||||
},
|
||||
{
|
||||
"name": "Camtasia",
|
||||
"slug": "camtasia/darwin",
|
||||
"platform": "darwin",
|
||||
"unique_identifier": "com.techsmith.camtasia",
|
||||
"description": "Camtasia is a screen recorder and video editor."
|
||||
},
|
||||
{
|
||||
"name": "Camtasia",
|
||||
"slug": "camtasia/windows",
|
||||
"platform": "windows",
|
||||
"unique_identifier": "Camtasia",
|
||||
"description": "Camtasia is a screen recorder and video editor."
|
||||
},
|
||||
{
|
||||
"name": "Canva",
|
||||
"slug": "canva/darwin",
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "2026.0.2",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.techsmith.camtasia';"
|
||||
},
|
||||
"installer_url": "https://download.techsmith.com/camtasiamac/releases/2602/Camtasia.dmg",
|
||||
"install_script_ref": "06429a10",
|
||||
"uninstall_script_ref": "f5df5a28",
|
||||
"sha256": "4714ff6719d8a0116b155c73d4d17fd7c7da56bda02a2267e4be6e27ddee7ac2",
|
||||
"default_categories": [
|
||||
"Productivity"
|
||||
]
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"06429a10": "#!/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 'com.techsmith.camtasia'\nif [ -d \"$APPDIR/Camtasia.app\" ]; then\n\tsudo mv \"$APPDIR/Camtasia.app\" \"$TMPDIR/Camtasia.app.bkp\"\nfi\nsudo cp -R \"$TMPDIR/Camtasia.app\" \"$APPDIR\"\n",
|
||||
"f5df5a28": "#!/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/Camtasia.app\"\ntrash $LOGGED_IN_USER '/Users/Shared/TechSmith/Camtasia'\ntrash $LOGGED_IN_USER '~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.techsmith.camtasia26.sfl*'\ntrash $LOGGED_IN_USER '~/Library/Application Support/TechSmith/Camtasia*'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.plausiblelabs.crashreporter.data/com.techsmith.camtasia*'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.techsmith.camtasia*'\ntrash $LOGGED_IN_USER '~/Library/HTTPStorages/com.techsmith.camtasia*'\ntrash $LOGGED_IN_USER '~/Library/HTTPStorages/com.techsmith.camtasia*.binarycookies'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.techsmith.camtasia*.plist'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/com.techsmith.camtasia*.savedState'\ntrash $LOGGED_IN_USER '~/Library/WebKit/com.techsmith.camtasia*'\n"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "26.0.0.13551",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE name = 'Camtasia' AND publisher = 'TechSmith Corporation';"
|
||||
},
|
||||
"installer_url": "https://download.techsmith.com/camtasiastudio/releases/2600/camtasia.msi",
|
||||
"install_script_ref": "8959087b",
|
||||
"uninstall_script_ref": "c46900c3",
|
||||
"sha256": "749fa288b055154c4a7aeab8189b9b710d79b2ef936b0fa02f35e00da44d01be",
|
||||
"default_categories": [
|
||||
"Productivity"
|
||||
],
|
||||
"upgrade_code": "{CD4AC9D7-E484-41BE-AAFA-6DE4745AE6A1}"
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"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",
|
||||
"c46900c3": "# 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(\"{CD4AC9D7-E484-41BE-AAFA-6DE4745AE6A1}\")) {\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"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user