Hey, did anybody make any progress on command line version for windows. I'd really like to be able to render batches of .cfdg files to pngs.
I am prepared to try cygwin, but thought I'd check noone else had made any progress first.
Non-Gui, console only
Moderators: MtnViewJohn, chris, mtnviewmark
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
I'm trying this again but there are a few Posix components that are not present in Windows: signals/setitimer, getopt, and libpng (very easily). There are some easy-to-use timer functions, but they are not present in Win98/Win ME. Switching from libpng to GDI+ for generating the PNG file is not too hard, the code already exists elsewhere in Context Free. And I found a decent command line parser class.
HELP!!
I'm trying to run a program written in java using cygwin.
How exactly do you use the command line to execute the program.
When i type "./cfdg" it comes up with this error: "cannot execute binary file"
At the moment my program reads in from a .cfdg template and is trying to convert it to .png unfortunately it works perfectly on a mac but i'm not sure what I have to change to get it to work using cygwin.
How exactly do you use the command line to execute the program.
When i type "./cfdg" it comes up with this error: "cannot execute binary file"
At the moment my program reads in from a .cfdg template and is trying to convert it to .png unfortunately it works perfectly on a mac but i'm not sure what I have to change to get it to work using cygwin.
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
[edit]The release of CF 2.2beta2 makes the following obsolete so use that instead, 'kay? [/edit]
I'm no bash guru, but this script might be useful to fellow linux/console users.
It's a wrapper for cfdg that just calls cfdg normally, but replaces '_vc_' with the variation code in the output filename, if the given filename uses '_vc_'.
(Just don't use '-q' )
I'm no bash guru, but this script might be useful to fellow linux/console users.
It's a wrapper for cfdg that just calls cfdg normally, but replaces '_vc_' with the variation code in the output filename, if the given filename uses '_vc_'.
Code: Select all
#!/bin/bash
t=`expr ${@:(-1)} : '.*\(_vc_\)'`
if [ "$t" != "" ];then
while read x;do
if [ ! ${varcode} ]; then varcode=`expr "${x}" : '.*[[:blank:]]\([[:upper:]]*\)[^[:alnum:]]'`;fi
echo $x #output normally
done < <(./cfdg "$@")
fname=${@:(-1)}
if [ -f ${fname} ];then mv ${fname} ${fname//_vc_/$varcode};fi
else
./cfdg "$@"
fi