Get Version from Application Plugin

Cyberghost
New Contributor III

Hi folks,

we use Casper to get Informations about installed Plugins for indesign CS5 and Incopy CS5. My Problem is how to get the Version of the Plugins if they are build as a framework? That means the Info.plist is not in Contents but in Versions - A - Resources.

Any ideas? Hope you understand what I mean.

Thanks

Thorsten

1 ACCEPTED SOLUTION

acidprime
New Contributor III

Should be something like this

#!/bin/bash
VERSION="$(defaults read "/Applications/Adobe Photoshop CS5/Plug-Ins/File Formats/Pixar.plugin/Contents/Resources/Info 2>/dev/null)"

printf "<result>%s</result>
" "${VERSION:="0"}"

EDIT , but I see your asking if this is a framework , that should be in something like ./Versions/Current/Resources/Info.plist

As long as the path is consistent it should not be an issue.

defaults can read this data without the need to parse it , just note that I am reading Info not Info.plist which is a pucurliarity of pre 10.7 defaults syntax and I am trapping the variable with :="0" , which is to say if this value does not exist be 0

View solution in original post

3 REPLIES 3

jarednichols
Honored Contributor

Sounds like an extension attribute of some sort. I don't have Adobe products to test with, sorry.

rob_potvin
Contributor III

You want to use an extention attribute like jarednichols said.

For example Illustrator 5.1 with the CS 5.5 suite or Photoshop, if you right click on the plugin and select "Show Package Contents" you can see in the Contents folder an Info.plist file

The 5 or so plugins from Illustrator and Photoshop that I check all had key called the "CFBundleVersion" and below it there was the version number.

If you have a specific plugin that you want to check you could use this Extension attribute that I use that has been kicking around, sorry can't remember who wrote it, was on the mailserv before..

#!/bin/bash

# get the current version of the flash player plug in

aiverion=`/bin/cat PATHTtopluginPLIST | grep -A 1 -m 1 CFBundleVersion | grep string | sed 's/[/]//' | sed 's/<string>//g'`

echo "<result>$version</result>"

exit 0

exit 0

acidprime
New Contributor III

Should be something like this

#!/bin/bash
VERSION="$(defaults read "/Applications/Adobe Photoshop CS5/Plug-Ins/File Formats/Pixar.plugin/Contents/Resources/Info 2>/dev/null)"

printf "<result>%s</result>
" "${VERSION:="0"}"

EDIT , but I see your asking if this is a framework , that should be in something like ./Versions/Current/Resources/Info.plist

As long as the path is consistent it should not be an issue.

defaults can read this data without the need to parse it , just note that I am reading Info not Info.plist which is a pucurliarity of pre 10.7 defaults syntax and I am trapping the variable with :="0" , which is to say if this value does not exist be 0

View solution in original post