THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/01/2009 at 10:39, xxxxxxxx wrote:
Cinema 4D Version: R10+
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
As the topic implies, what I'm looking for is a portable means of (effectively) calling GeExecuteProgram() , while being able to pass command-line arguements to the application/utility being spawned. Example:
utility.exe -t filename.ext
...as noted in several previous threads, the basic problem is that GeExecuteProgram() only takes two arguments - the name of the executable and the name of some file to pass to it for processing - there is no means of adding command-line arguements.
This morning, I even figured out how to fool Filename() into allowing me to add the arguments in front of the filename being passed in, but it was a wild-goose-chase, since GeExecuteProgram() effectively forces the entire string as argv , foiling my efforts (this would allow for spaces in filenames, for example).
The next option, as far as I can tell, would be to generate a 'batch' file and (after needing to set an 'executable' bit on the file?) use GeExecuteFile() instead. However, this would not be portable to Mac and it sounds like there may even be other file ownership-related issues on the Mac (and who knows, Vista as well?).
What I (and others, based on several previous posts on this topic) really need is either something like:
GeExecuteProgram(progname, filename, args, ... ) // vaiable number of args
GeExecuteProgram(progname, space_delimited_arg_string, filename);
...where the arguement string is split up internally by GeExecuteProgram() into separate argv[n] values when launching the app.
Any chance of us getting the above added to the SDK in a portable manor?
Anyone have suggestions on how to do this in the meantime?