Include an executable without hard coding the path
Include an executable without hard coding the path
- Subject: Include an executable without hard coding the path
- From: Rick Schmidt <email@hidden>
- Date: Fri, 17 Jul 2009 22:38:35 -0500
I'm sure this comes up a lot I'm just not sure what it is called. I
need to include an executable in my project when it runs. I right
clicked my project and added an existing file pointing to the
executable, but how to I reference it in my code without a hard coded
full file path to my local drive? This is a bioinformatics app and I
am using a lot of executables from ncbi, so I can't plan on the user
having these installed in any /usr/bin for example. Similarly how do
I have a path for the output to be saved in the program?
Example
NSTask *task;
task=[[NSTask alloc]init];
[task setLaunchPath:@"blastcl3"];
NSMutableArray *blastArgs=[NSMutableArray array];
[blastArgs addObject:@"-p"];
[blastArgs addObject:@"blastn"];
[blastArgs addObject:@"-i"];
[blastArgs addObject:inputPath];
[blastArgs addObject:@"-p"];
[blastArgs addObject:@"blastn"];
[blastArgs addObject:@"-d"];
[blastArgs addObject:@"nr"];
[blastArgs addObject:@"-o"];
[blastArgs addObject:@"~/out.txt"];
Thank you,
Rick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden