executer un script sh dans objc pour lancer aurora
bonjour,
Actuellement je me lance dans objc.
et je souhaiterai lancer un script .sh depuis objc .
d'après ce que j'ai vu sur le net il faut utiliser les NSTask.
mais quand je fait un run j'ai une fenetre blanche qui s'ouvre.
et le script ne se lance pas.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#import "AppDelegate.h"
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
NSTask *tache;
tache = [[NSTask alloc] init];
/*
[tache setCurrentDirectoryPath:@"/perso/test3/instMac"];
[tache setLaunchPath:@"/perso/test3/instMac/launcher.sh"];
[tache launch];
} |
la question est il faut-il utiliser <foundation Framework> pour executer le script sh ?