Re: PackageMaker questions
Re: PackageMaker questions
- Subject: Re: PackageMaker questions
- From: Stéphane Sudre <email@hidden>
- Date: Mon, 26 Sep 2005 23:10:29 +0200
On lundi, septembre 26, 2005, at 10:44 PM, Steve Sappington wrote:
I’ve built an installer for my Tiger Application using Packagemaker-
It’s working well except for two things:
-I need to be able to create an alias to my application, which is
installed in the applications folder, on the desktop
From the list archive:
"- launch a self-made tool creating an Alias file: This can be done
using the source code at
http://homepage.mac.com/nathan_day/pages/source.html
This gives something like this:
#import <Foundation/Foundation.h>
#import "NDAlias+AliasFile.h"
void usage(void)
{
(void)fprintf(stderr, "%s\n","usage: bristow file alias ");
exit(1);
}
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
if (argc==3)
{
NSString * tFile;
tFile=[NSString stringWithUTF8String:argv[1]];
if (tFile!=nil)
{
NSFileManager * tFileManager;
tFileManager=[NSFileManager defaultManager];
if ([tFileManager fileExistsAtPath:tFile]==YES)
{
NSString * tAliasFile;
tAliasFile=[NSString stringWithUTF8String:argv[2]];
if (tAliasFile!=nil)
{
if ([tFileManager fileExistsAtPath:tAliasFile]==NO)
{
[[NDAlias aliasWithPath:tFile]
writeToFile:tAliasFile];
}
else
{
(void)fprintf(stderr, "file \"%s\" already
exists.\n",argv[2]);
exit(1);
}
}
}
else
{
(void)fprintf(stderr, "file \"%s\" does not
exist.\n",argv[1]);
exit(1);
}
}
}
else
{
usage();
}
[pool release];
return 0;
}
"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden