add adobe acrobat reader for windows (#27642)
> for https://github.com/fleetdm/fleet/issues/26658 # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Ian Littman <iansltx@gmail.com>
This commit is contained in:
co-authored by
Ian Littman
parent
96af3ded70
commit
edb0587061
@@ -241,10 +241,12 @@ func (i *wingetIngester) ingestOne(ctx context.Context, input inputApp) (*mainta
|
||||
if installScript == "" {
|
||||
installScript = file.GetInstallScript(installerTypeMSI)
|
||||
}
|
||||
}
|
||||
|
||||
if (input.InstallerType == installerTypeMSI || input.UninstallType == installerTypeMSI) && input.InstallerScope == machineScope {
|
||||
if uninstallScript == "" {
|
||||
uninstallScript = file.GetUninstallScript(installerTypeMSI)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if installScript == "" {
|
||||
@@ -328,6 +330,7 @@ type inputApp struct {
|
||||
InstallerType string `json:"installer_type"`
|
||||
InstallerScope string `json:"installer_scope"`
|
||||
ProgramPublisher string `json:"program_publisher"`
|
||||
UninstallType string `json:"uninstall_type"`
|
||||
}
|
||||
|
||||
type installerManifest struct {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "Adobe Acrobat Reader",
|
||||
"slug": "adobe-acrobat-reader/windows",
|
||||
"package_identifier": "Adobe.Acrobat.Reader.64-bit",
|
||||
"unique_identifier": "Adobe Acrobat (64-bit)",
|
||||
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/adobe_acrobat_reader_install.ps1",
|
||||
"installer_arch": "x64",
|
||||
"installer_type": "exe",
|
||||
"installer_scope": "machine",
|
||||
"uninstall_type": "msi"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
$exeFilePath = "${env:INSTALLER_PATH}"
|
||||
|
||||
try {
|
||||
|
||||
# Add argument to install silently
|
||||
# Argument to make install silent depends on installer,
|
||||
# each installer might use different argument (usually it's "/S" or "/s")
|
||||
$processOptions = @{
|
||||
FilePath = "$exeFilePath"
|
||||
ArgumentList = "-sfx_nu /sAll /rs /msi"
|
||||
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,19 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "25.001.20435",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE name = 'Adobe Acrobat (64-bit)' AND publisher = 'Adobe';"
|
||||
},
|
||||
"installer_url": "https://ardownload2.adobe.com/pub/adobe/acrobat/win/AcrobatDC/2500120435/AcroRdrDCx642500120435_MUI.exe",
|
||||
"unique_identifier": "Adobe Acrobat (64-bit)",
|
||||
"install_script_ref": "711949d2",
|
||||
"uninstall_script_ref": "9cd69460",
|
||||
"sha256": "e99032e377e7ab4489b338f8f050464a75c2d2ce570f6012533e914023903c3e"
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"711949d2": "$exeFilePath = \"${env:INSTALLER_PATH}\"\n\ntry {\n\n# Add argument to install silently\n# Argument to make install silent depends on installer,\n# each installer might use different argument (usually it's \"/S\" or \"/s\")\n$processOptions = @{\n FilePath = \"$exeFilePath\"\n ArgumentList = \"-sfx_nu /sAll /rs /msi\"\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",
|
||||
"9cd69460": "$product_code = {AC76BA86-1033-FF00-7760-BC15014EA700}\n\n# Fleet uninstalls app using product code that's extracted on upload\nmsiexec /quiet /x $product_code\nExit $LASTEXITCODE\n"
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,13 @@
|
||||
"unique_identifier": "com.adobe.Reader",
|
||||
"description": "Adobe Acrobat Reader is the industry-standard tool for viewing, printing, and commenting on PDF documents."
|
||||
},
|
||||
{
|
||||
"name": "Adobe Acrobat Reader",
|
||||
"slug": "adobe-acrobat-reader/windows",
|
||||
"platform": "windows",
|
||||
"unique_identifier": "Adobe Acrobat (64-bit)",
|
||||
"description": "Adobe Acrobat Reader is the industry-standard tool for viewing, printing, and commenting on PDF documents."
|
||||
},
|
||||
{
|
||||
"name": "Box Drive",
|
||||
"slug": "box-drive/darwin",
|
||||
@@ -247,4 +254,4 @@
|
||||
"description": "Zoom is a leading video communication platform for meetings, webinars, and collaboration."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16486,8 +16486,7 @@ func (s *integrationEnterpriseTestSuite) TestMaintainedApps() {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, 1, resp.Count)
|
||||
title = resp.SoftwareTitles[0]
|
||||
require.NotNil(t, title.BundleIdentifier)
|
||||
require.Equal(t, ptr.String(mapp.UniqueIdentifier), title.BundleIdentifier)
|
||||
require.Nil(t, title.BundleIdentifier)
|
||||
require.Equal(t, title.ID, *mapp.TitleID)
|
||||
require.Equal(t, mapp.Version, title.SoftwarePackage.Version)
|
||||
require.Equal(t, "installer.zip", title.SoftwarePackage.Name)
|
||||
@@ -16496,7 +16495,7 @@ func (s *integrationEnterpriseTestSuite) TestMaintainedApps() {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, ptr.Uint(4), i.FleetMaintainedAppID)
|
||||
require.Equal(t, mapp.SHA256, i.StorageID)
|
||||
require.Equal(t, "darwin", i.Platform)
|
||||
require.Equal(t, "windows", i.Platform)
|
||||
require.NotEmpty(t, i.InstallScriptContentID)
|
||||
require.Equal(t, req.PreInstallQuery, i.PreInstallQuery)
|
||||
install, err = s.ds.GetAnyScriptContents(ctx, i.InstallScriptContentID)
|
||||
|
||||
Reference in New Issue
Block a user