Menu

#1 vrmlviewer configuration

open
nobody
None
5
2002-10-09
2002-10-09
Anonymous
No

Instead of using "vrmlview" as VRML viewer program,
it is more usefull, to make a similar configuration
option.

If you use the following patches:

$ diff h3d-v-0.9/configure.in
h3d-v-0.9.orig/configure.in
34,38d33
< AC_ARG_WITH(vrmlviewer, --with-vrmlviewer
Specify program to view VRML97 files,
< CFLAGS="$CFLAGS
-DVRMLVIEWER=\"\\\"$withval\"\\\""
< )
<

$ diff h3d-v-0.9/src/callbacks.c
h3d-v-0.9.orig/src/callbacks.c
818,827d817
< #ifdef VRMLVIEWER
< {
< char* viewercall;
< viewercall=malloc(strlen(VRMLVIEWER)+strlen(" tmp.wrl
&")+1);
< strcpy(viewercall,VRMLVIEWER);
< strcat(viewercall," tmp.wrl &");
< system(viewercall);
< free(viewercall);
< }
< #else
829d818
< #endif

Or in other words, exchange the line 818 in callbacks.c

system("vrmlview tmp.wrl &");

with

#ifdef VRMLVIEWER
{
char* viewercall;
viewercall=malloc(strlen(VRMLVIEWER)+strlen(" tmp.wrl
&")+1);
strcpy(viewercall,VRMLVIEWER);
strcat(viewercall," tmp.wrl &");
system(viewercall);
free(viewercall);
}
#else
system("vrmlview tmp.wrl &");
#endif
}

and add the lines

AC_ARG_WITH(vrmlviewer, --with-vrmlviewer
Specify program to view VRML$
CFLAGS="$CFLAGS
-DVRMLVIEWER=\"\\\"$withval\"\\\""
)

to line 34 of configure.in, you can e.g.
configure h3d with

./autogen.sh --with-vrmlviewer="dune -nostereo"

to use the white_dune program

http://www.csv.ica.uni-stuttgart.de/vrml/dune/

with the argument "-nostereo" as vrmlviewer

Discussion

  • Nobody/Anonymous

    Logged In: NO

    oops, bug.

    It should be

    AC_ARG_WITH(vrmlviewer, --with-vrmlviewer Specify
    program to view VRML97 files,

    instead of

    AC_ARG_WITH(vrmlviewer, --with-vrmlviewer
    Specify program to view VRML$

     
  • Nobody/Anonymous

    Logged In: NO

    oops, bug.

    It should be

    AC_ARG_WITH(vrmlviewer, --with-vrmlviewer Specify
    program to view VRML97 files,

    instead of

    AC_ARG_WITH(vrmlviewer, --with-vrmlviewer
    Specify program to view VRML$

     
  • Nobody/Anonymous

    Logged In: NO

    uups, bug - too long line 8-(

    AC_ARG_WITH(vrmlviewer, --with-vrmlviewer
    Specify program to view VRML$

    should be

    AC_ARG_WITH(vrmlviewer, --with-vrmlviewer Specify
    program to view VRML97 files,

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.