[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Find or determine an installed tool from my app and run it using NSBundl
From: |
Csanyi Pal |
Subject: |
Find or determine an installed tool from my app and run it using NSBundle and/or NSTask |
Date: |
Sat, 20 Nov 2010 21:11:24 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Hi,
is it possible to find (using NSBundle) or determine (using NSTask) an
installed tool (say this tool is installed in /usr/local/bin/ directory)
and when get it's path, then run it from my app as a subtask?
I'm trying this but without success:
[code]
NSTask *DPSetBit0;
DPSetBit0 = [[NSTask alloc] init];
[DPSetBit0 setLaunchPath: @"/usr/local/bin"];
[DPSetBit0 launch];
[/code]
but when compiling get errors:
Compiling file MainController.m ...
MainController.m: In function ‘-[MainController DPbitSetReset:]’:
MainController.m:133: error: a label can only be part of a statement and
a declaration is not a statement
make[3]: *** [obj/LPT_Interface.obj/MainController.m.o] Error 1
make[2]: *** [internal-app-run-compile-submake] Error 2
make[1]: *** [LPT_Interface.all.app.variables] Error 2
make: *** [internal-all] Error 2
--
Regards, Paul Chany
<http://sourceforge.net/projects/lptinterface/>
<http://savannah.nongnu.org/projects/lpt-interface/>
<http://csanyi-pal.info>
- Find or determine an installed tool from my app and run it using NSBundle and/or NSTask,
Csanyi Pal <=