diff --git a/src/client/distren.c b/src/client/distren.c --- a/src/client/distren.c +++ b/src/client/distren.c @@ -176,21 +176,24 @@ int main(int argc, char *argv[]) // ------------------------------ // Ok, this is just to do something to keep distren aliveish... Kill if needed/wanted/meh'd. Borrowed some code from matt's blender.c - // We need calls to populate os. This is pretty rudimentary. Should be moved to shared, or use bultin something. Change on compiletime? - char *os = "nix"; - if(os == 'win32'){char *bin = 'blender.exe'} - else{char *bin = 'blender'} // mac/*nix + +// Vars to fill: + int os=1; + unsigned int frame_to_render; // initialize this somewhere else... + frame_to_render = 10; // temporary, the number 10 will be replaced with a function call + char *filename; + + + if(os == 1){char *bin = 'blender.exe';} + else{char *bin = 'blender';} // mac/*nix // Placeholders? figure out what the last one is... char *format = "%s -b \"%s\" -o %s -f %d -F JPEG -x 1",bin,input,output; /* the format string to pass to sprintf */ + size_t blenderstrlen; - unsigned int frame_to_render; // initialize this somewhere else... - size_t blenderstrlen; - frame_to_render = 10; // temporary, the number 10 will be replaced with a function call - -// This seems pretty ridik. Just sayin'. We gotta switch this up. + // This seems pretty ridik. Just sayin'. We gotta switch this up. blenderstrlen = strlen(format) - 2 * 2 /* format string minus placeholders */ + strlen(filename) + intstrlen(frame_to_render) + 1 /* NULL terminator */; - blendercmd = malloc(blenderstrlen); + char *blendercmd = malloc(blenderstrlen); snprintf(blendercmd, blenderstrlen, format, filename, frame_to_render); fprintf(stderr, "will run job num. %d ``%s''\n",jobid,blendercmd);