site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Thread-index: Ack/XAPLOdRL707aS22c34Cqn01fOQ== Thread-topic: Getting real file path from installer plugin or script User-agent: Microsoft-Entourage/12.14.0.081024 In a script you can use DIR=`dirname $0` This can be called from a distribution script or from a post/pre script. It will most likely get you the Contents/Resources directory but at least you are in the package and can use that to get where you want. On 04/11/08 4:36 PM, "Iceberg-Dev" <dev.iceberg@gmail.com> wrote:
On Nov 4, 2008, at 6:33 PM, Neal Sidhwaney wrote:
I was never able to figure this out, unfortunately. If your plugin happens to run after preinstall, the preinstall script is passed some vars indicating where the original package is, and you can forward that to the plugin.
Use at your own risk.
---------------------------------
#import <Cocoa/Cocoa.h> #import <InstallerPlugins/InstallerPlugins.h>
@interface HowToMakeAnAppleEngineerScream : InstallerPane { }
@end
#import "HowToMakeAnAppleEngineerScream.h"
@interface PageController : NSObject { }
- (id)distribution;
@end
@interface IFDocument : NSObject { }
- (id)path;
@end
@implementation HowToMakeAnAppleEngineerScream
- (NSString *)title { return [[NSBundle bundleForClass:[self class]] localizedStringForKey:@"PaneTitle" value:nil table:nil]; }
- (void) didEnterPane:(InstallerSectionDirection) inDirection { NSWindow * tWindow; PageController * tPageController;
tWindow=[NSApp keyWindow]; // This should be improved IMHO
tPageController=(PageController *) [tWindow delegate];
if (tPageController!=nil) { NSLog(@"This is the package path: %@",[[tPageController distribution] path]); } }
@end
---------------------------------
_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/adampeck%40smarttech.co...
This email sent to adampeck@smarttech.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com