Compiling for the command line
Kem Tekinay
ktekinay at mactechnologies.com
Sun Oct 29 12:02:57 CST 2006
On 10/29/06 4:31 AM, Ruslan Zasukhin at sunshine at public.kherson.ua wrote:
> Such bug report already present in Mantis for V4RB UB 2.4.3.
> This is why I have ask you few days ago if you can compile console apps?
Yes, I see that now.
And a few days ago, I could compile. :-) It was only once I added a
declaration of ³db as VDatabase" that it stopped me, but Init and Shutdown
work fine.
> I think you can make it dependent on /usr/local/vcomponents,
> So it will be small for computer that have it..
If you mean that I should not include the vcomponents in the final project,
I agree. I envision this as a developer¹s tool, and a developer would
already have the latest Valentina installed.
> Then it should be e.g. Dropped into the same folder where is vserver,
> And its @executable_path should point on
>
> @executable_path../../../vserver_office/contents/vcomponents
Console apps developed in RB are annoying in two ways. First, AFAIK, there
is no way to do a useful interactive application. Sure, you can get a prompt
to appear that accepts input, but it will not allow you to edit using the
arrow keys, or use the up arrow to recall a history of commands, etc.
The second way it is annoying is that it requires you to type a double
command. For example, I am calling the app ³vdbsql² so the command to start
the app is ³vdbsql/vdbsql [options]². I¹m not sure how this would affect
your comment above.
Because of the first limitation, I am envisioning an app that would launch,
perform the specified query or function, print its output (or store it in a
specified file), then quit. You would have to specify things like the
database path or (optionally) cache size with each call.
The switches I am thinking about now are:
> -d | --database [path] : The path to the database to use
> -c | --cache-size [number] : The Valentina cache size in MB (default 20)
> -s | --sql [string] : The SQL query
> -e | --execute [string] : A command to execute
> -o | --output-file [path] : A file to print the results to
> -r | --record-delimiter [number] : ASCII code of the line delimiter
> (default System.EndOfLine)
> -f | --field-delimiter [number] : ASCII code of the field delimiter
> (default 9)
> -q | --quiet : Suppress console output
> -v | --verbose : Verbosity level from 0 to ?. (0 is the same as -q)
> -h | --help : Print a help screen
>
This is all very preliminary so I am open to suggestions.
__________________________________________________________________________
Kem Tekinay (212) 201-1465
MacTechnologies Consulting Fax (914) 242-7294
http://www.mactechnologies.com Pager (917) 491-5546
To join the MacTechnologies Consulting mailing list, send an e-mail to:
mactechnologies_consulting-subscribe at yahoogroups.com
More information about the Valentina
mailing list