• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Installer for a plug-in
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installer for a plug-in


  • Subject: Re: Installer for a plug-in
  • From: Hiroshi Saito <email@hidden>
  • Date: Thu, 3 Feb 2005 12:40:17 +0900

Hi Michael,

I think TokenDefinetions.plist is used to only decide new install or Upgrade.

I have made a installer of a plugin for Photoshop. It hasn't plugin itself
in the Archive.pax.gz. Instead of that I wrote small program like that;


// g++ -framework Cocoa whichapp.mm -o whichapp
#include <Cocoa/Cocoa.h>

int main(int argc, char* argv[])
{
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
    {
        NSString* appname = [NSString stringWithCString: argv[1]];
        NSString* path = [[NSWorkspace sharedWorkspace]
                             fullPathForApplication: appname];
        printf("%s¥n", [path UTF8String]);
    }
    [pool release];
    return 0;
}

You can get by this tool a result like this;
$ ./whichapp "Adobe Reader 7.0"
/Applications/Adobe Reader 7.0

I added this in Resources folder of .pkg, then I wrote a "postscript"
to use this tool to find photoshop then copy the plugin.

But now, I found "~/Library/Preferences/Adobe Photoshop 7.0 Paths". It contains
FSSpec to the path of photoshop. I changed script to use this information.


I hope this help you, or someone post a better one.
--
  Hiroshi Saito


On Feb 2, 2005, at 2:42, Michael Ditz wrote:

All,

I have the task to write an installer for an Adobe Reader 7.0 plug-in. What we want to do is use PackageMaker to write an installer for this. So we have a plug-in file that needs to go into 'Adobe Reader.app/Contents/Plug-ins'. The problem is that the user can install Reader anywhere, and rename the .app. Is there a way to do this with Token Definitions? Or how would you let the user pick the location? I expected I could write a UserLocation search to find the real location of Reader and install into that. Here's what I tried in TokenDefinitions.plist (minus DTD header info):

<dict>
<key>UserLocation</key>
<array>
<dict>
<key>searchPlugin</key>
<string>CommonAppSearch</string>
<key>path</key>
<string>/Applications/Adobe Reader 7.0/Adobe Reader 7.0.app</string>
<key>identifier</key>
<string>com.adobe.Reader</key>
</dict>
</array>
</dict>


And the section from info.plist:

    <key>IFPkgPathMappings</key>
    <dict>
        <key>./Applications/Adobe Reader 7.0/Adobe Reader 7.0.app</key>
        <string>{UserLocation}</string>
    </dict>

The IFPkgPathMappings key matches output from lsbom. I've tried many combos. I guess I don't understand how this matches up.

The code above seems to do nothing.

Any advice would be greatly appreciated on how to do this task.

Thanks,

   Mike

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Installer for a plug-in (From: Michael Ditz <email@hidden>)

  • Prev by Date: Re: [AppleScript Studio] Table View
  • Next by Date: Re: Method not seeing array as array
  • Previous by thread: Installer for a plug-in
  • Next by thread: NSFileManager and rename file
  • Index(es):
    • Date
    • Thread