discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running a separate script from my app using NSBundle, NSTask


From: Fred Kiefer
Subject: Re: Running a separate script from my app using NSBundle, NSTask
Date: Wed, 03 Nov 2010 01:38:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.14) Gecko/20101013 SUSE/3.0.9 Thunderbird/3.0.9

Hi Pal,

thank you for the download link. I looked at your program and the
current problem is really caused by including all the different C
applications into your main program. You will have to remove the
LPT_Interface_C_FILES definition to get you application to compile.

The next problem will be that you don't specify the program that should
be executed by NSTask. Somehow you seem to expect that the variable name
gets added to the path that you set. It definitely isn't, variable names
are just that, names. You will have to concatenate the executable name
to the path.

But I really don't like the over all structure of your application. Even
with the above and a few more bugs fixed it just looks wrong to me.

Fred


Am 02.11.2010 18:28, schrieb Csanyi Pal:
> Fred Kiefer <fredkiefer@gmx.de> writes:
>> I don't quite understand what you are trying to do here. Your last
>> mail that probably explained it a bit more was too long ago for me to
>> remember. 
> 
> Well, English is'nt my first language, sorry. 
> 
>> What I understand from the error messages that you posted is that all
>> the different C files are in themselves complete applications with their
>> own main function. If this is the case, you will have to compile each of
>> this as a separate application with its own make file or at least a
>> separate entry in the main make file. But then why would you want to
>> write an application like that?
> 
> The parallel port can be accessed only if the application get permission
> for that using 'ioperm()' function. After that the application can write
> and read the parallel port with functions outb() and inb(). But, this 
> application must run with root access: with sudo, or must to be set with
> command: 'sudo chmod +s application', and must to be compiled first wit
> command: 'sudo gcc -ggdb -O application.c -o application'.
> 
> Say, I have application's source file: DPResetBit0.c
> Then I must do the following commands to compile it and give it SETUID
> permission: 
> 
>  $ sudo gcc -ggdb -O DPResetBit0.c -o DPResetBit0
>  $ sudo chmod +s DPResetBit0
> 
> After that I can to run it successfully with command:
> 
>  $ ./DPSetBit0
> 
>> Why don't you just call your C code directly from Objective-C?
> 
> How can I do that?
> (I started to read the documentation of the installed GNUstep on my
> Debian GNU/Linux Squeeze, specially the Developer doc's.)
> 
>> Is it possible for you to post your whole application code (including 
>> some of the C files and the make file) to this list or privately to
>> me? 
>> Maybe that way I understand what you are doing here and whether this is
>> the best way to achieve it.
> 
> Thanks! :)
> 
> Anonymous CVS Access
> 
> This project's CVS repository can be checked out through anonymous CVS
> with the following instruction set. The module you wish to check out
> must be specified as the modulename. 
> Software repository:
> 
> cvs -z3 \
> -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/lpt-interface \
> co lpt-interface
> 
> Webpages repository:
> 
> cvs -z3 \
> -d:pserver:anonymous@cvs.savannah.nongnu.org:/web/lpt-interface \
> co lpt-interface
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]