Changeset 1897


Ignore:
Timestamp:
Aug 31, 2010 8:25:36 PM (11 years ago)
Author:
gah
Message:

re-merge with latest trunk changes

Location:
branches/blt4
Files:
38 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/configure.in

    r1881 r1897  
    130130        TCLSH="$with_tclsh/bin/tclsh"
    131131    else
    132         if test -x "$with_tclsh"
     132       if test -x "$with_tclsh"
    133133        then
    134134            echo Found tclsh in $with_tclsh
    135135            TCLSH="$with_tclsh"
    136136        else
    137             AC_PATH_PROG(TCLSH, tclsh)
     137            if test -x "${exec_prefix}/bin/tclsh"
     138            then
     139                echo Found tclsh in ${exec_prefix}/bin/tclsh
     140                TCLSH="${exec_prefix}/bin/tclsh"
     141            else
     142                for v in 8.4 8.5 8.6 ; do
     143                    if test -x "${exec_prefix}/bin/tclsh${v}"
     144                    then
     145                        echo Found tclsh in ${exec_prefix}/bin/tclsh${v}
     146                        TCLSH="${exec_prefix}/bin/tclsh${v}"
     147                        break
     148                    fi
     149                done
     150            fi
    138151        fi
    139152    fi
    140 fi
     153    if ! test -x ${TCLSH}
     154    then
     155        AC_PATH_PROG(TCLSH, tclsh)
     156    fi
     157fi
     158
    141159AC_MSG_RESULT([${TCLSH}])
    142160AC_SUBST(TCLSH)
     
    187205    do
    188206      for vtk in $path/vtk-* ; do
    189         if test -d "${vtk}" ; then
    190           VTKDIR=${vtk}
    191         fi
     207        if test -d "${vtk}" ; then
     208          VTKDIR=${vtk}
     209        fi
    192210      done
    193211      if test "x${VTKDIR}" != "x" ; then
    194         break
     212        break
    195213      fi
    196214    done
     
    271289    AC_PATH_PROG(MKOCTFILE, mkoctfile)
    272290  else
    273     AC_PATH_PROG(OCTAVE, octave, [], [${with_octave}/bin:${with_octave}])
    274     AC_PATH_PROG(MKOCTFILE, mkoctfile, [],
    275         [${with_octave}/bin:${with_octave}])
    276   fi
    277   if test "x${OCTAVE}" != "x" ; then
    278     OCTAVE_VERSION=`${OCTAVE} -v | grep version | cut -d' ' -f4`
    279     OCTAVE_VERSION_MAJOR=`echo ${OCTAVE_VERSION} | cut -d'.' -f1`
    280     if test "${OCTAVE_VERSION_MAJOR}" == "3" ; then
    281       OCTAVE3=$OCTAVE
    282       MKOCTFILE3=$MKOCTFILE
    283     fi
    284     if test "${OCTAVE_VERSION_MAJOR}" == "2" ; then
    285       OCTAVE2=$OCTAVE
    286       MKOCTFILE2=$MKOCTFILE
    287     fi
     291    MKOCTFILE=$with_octave
     292    OCTAVE=$with_octave
     293  fi
     294fi
     295if test "x${OCTAVE}" != "x" ; then
     296  OCTAVE_VERSION=`${OCTAVE} -v | grep version | cut -d' ' -f4`
     297  OCTAVE_VERSION_MAJOR=`echo ${OCTAVE_VERSION} | cut -d'.' -f1`
     298  if test "${OCTAVE_VERSION_MAJOR}" == "3" ; then
     299    OCTAVE3=$OCTAVE
     300    MKOCTFILE3=$MKOCTFILE
     301  fi
     302  if test "${OCTAVE_VERSION_MAJOR}" == "2" ; then
     303    OCTAVE2=$OCTAVE
     304    MKOCTFILE2=$MKOCTFILE
    288305  fi
    289306fi
     
    298315
    299316if test "$with_octave2" != "no" ; then
    300   AC_MSG_CHECKING([for octave and mkoctfile])
    301   AC_PATH_PROG(octave2, octave, [], [${with_octave2}/bin:${with_octave2}])
    302   AC_PATH_PROG(mkoctfile2, mkoctfile, [],
    303         [${with_octave2}/bin:${with_octave2}])
    304   if test "x${octave2}" != "x" ; then
    305     version=`${octave2} -v | grep version | cut -d' ' -f4`
    306     version_major=`echo ${version} | cut -d'.' -f1`
    307     if test "$version_major" = "2" ; then
    308       OCTAVE2=$octave2
    309       MKOCTFILE2=$mkoctfile2
    310     fi
    311   fi
    312 fi
     317  if test "$with_octave2" = "yes" ; then
     318    AC_MSG_CHECKING([for octave and mkoctfile])
     319    AC_PATH_PROG(octave2, octave)
     320    AC_PATH_PROG(mkoctfile2, mkoctfile)
     321  else
     322    octave2=$with_octave2
     323    mkoctfile2=`dirname $with_octave2`/mkoctfile
     324  fi
     325fi
     326if test "x${octave2}" != "x" ; then
     327  version=`${octave2} -v | grep version | cut -d' ' -f4`
     328  version_major=`echo ${version} | cut -d'.' -f1`
     329  if test "$version_major" = "2" ; then
     330    OCTAVE2=$octave2
     331    MKOCTFILE2=$mkoctfile2
     332  fi
     333fi
     334
    313335# Check if octave3 was designated *in addition* to the installed version.
     336
    314337AC_ARG_WITH(
    315338    [octave3],
     
    318341    [with_octave3=$withval],
    319342    [with_octave3=no])
     343
     344echo with_octave3=$with_octave3
    320345if test "$with_octave3" != "no" ; then
    321   AC_MSG_CHECKING([for octave and mkoctfile])
    322   AC_PATH_PROG(octave3, octave, [], [${with_octave3}/bin:${with_octave3}])
    323   AC_PATH_PROG(mkoctfile3, mkoctfile, [],
    324         [${with_octave3}/bin:${with_octave3}])
    325   if test "x${octave3}" != "x" ; then
    326     version=`${octave3} -v | grep version | cut -d' ' -f4`
    327     version_major=`echo ${version} | cut -d'.' -f1`
    328     if test "$version_major" = "3" ; then
    329       OCTAVE3=$with_octave3
    330       MKOCTFILE3=$mkoctfile3
    331     fi
     346  if test "$with_octave3" = "yes" ; then
     347    AC_MSG_CHECKING([for octave and mkoctfile])
     348    AC_PATH_PROG(octave3, octave)
     349    AC_PATH_PROG(mkoctfile3, mkoctfile)
     350  else
     351    octave3=$with_octave3
     352    mkoctfile3=`dirname $with_octave3`/mkoctfile
     353  fi
     354fi
     355
     356echo octave3=$octave3
     357if test "x${octave3}" != "x" ; then
     358  echo version="${octave3} -v | grep version | cut -d' ' -f4"
     359  version=`${octave3} -v | grep version | cut -d' ' -f4`
     360  echo version=$version
     361  version_major=`echo ${version} | cut -d'.' -f1`
     362  echo version_major=$version_major
     363  if test "$version_major" = "3" ; then
     364    OCTAVE3=$with_octave3
     365    MKOCTFILE3=$mkoctfile3
    332366  fi
    333367fi
     
    341375AC_SUBST(MKOCTFILE2)
    342376AC_SUBST(MKOCTFILE3)
     377
     378AC_ARG_WITH(
     379    [perl],
     380    [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=yes@:>@])],
     381    [],
     382    [with_perl=yes])
    343383
    344384PERL=
     
    498538AC_SUBST(HAVE_PYTHON_DISTUTILS)
    499539
    500 with_ruby="yes"
     540rappture_with_ruby="yes"
    501541
    502542RUBY=""
     
    505545AC_ARG_WITH(ruby,
    506546  AS_HELP_STRING([--with-ruby=PATH], [absolute path to ruby executable]),
    507   [with_ruby=$with_val])
    508 if test "${with_ruby}" != "no" ; then
    509   if test "${with_ruby}" = "yes" ; then
     547  [rappture_with_ruby=$with_val])
     548if test "${rappture_with_ruby}" != "no" ; then
     549  if test "${rappture_with_ruby}" = "yes" ; then
    510550    AC_PATH_PROG(RUBY, ruby)
    511551  else
    512552    AC_PATH_PROG(RUBY, ruby, [],
    513       [${with_ruby}/bin/ruby:${with_ruby}])
     553      [${rappture_with_ruby}/bin/ruby:${rappture_with_ruby}])
    514554  fi
    515555fi
     
    532572AC_SUBST(RUBY_PLATFORM)
    533573
    534 with_java="yes"
     574rappture_with_java="yes"
    535575JAVA=""
    536576JAVAH=""
     
    538578JAVA_DEV_PKG="no"
    539579
     580AC_ARG_WITH(java,
     581  AS_HELP_STRING([--with-java=PATH], [absolute path to java executable]),
     582  [rappture_with_java=$with_val])
     583if test "${rappture_with_java}" != "no" ; then
     584  if test "${rappture_with_java}" = "yes" ; then
     585    AC_PATH_PROG(JAVA, java)
     586    AC_PATH_PROG(JAVAC, javac)
     587    AC_PATH_PROG(JAVAH, javah)
     588  else
     589    AC_PATH_PROG(JAVA, java, [],
     590      [${rappture_with_java}/bin/java:${rappture_with_java}])
     591    AC_PATH_PROG(JAVAC, javac, [],
     592      [${rappture_with_java}/bin/java:${rappture_with_java}])
     593    AC_PATH_PROG(JAVAH, javah, [],
     594      [${rappture_with_java}/bin/java:${rappture_with_java}])
     595  fi
     596fi
    540597JDK=
    541598JAVA_HOME=
     
    546603if test "x${JAVA}" != "x" ; then
    547604  for d in \
    548    ${with_java} \
    549    /usr/lib/jvm/java-6-sun \
    550605   /apps/java/jdk1.6.0_01 \
     606   /usr/lib/jvm/*sun-1.6* \
     607   /opt/sun-jdk-1.6* \
    551608   /opt/icedtea6-* \
    552    /opt/sun-jdk-1.6* \
    553    /opt/sun-jdk-1.5*
    554   do 
     609   /opt/sun-jdk-1.5* \
     610   /usr/lib/jvm/*sun-1.5*
     611  do
    555612    if test -r "${d}/include/jni.h" ; then
    556613      JDK=${d}
     
    563620fi
    564621
    565 AC_ARG_WITH(java,
    566   AS_HELP_STRING([--with-java=PATH], [absolute path to java executable]),
    567   [with_java=$with_val])
    568 if test "${with_java}" != "no" ; then
    569   if test "${with_java}" = "yes" ; then
    570     AC_PATH_PROG(JAVA, java)
    571     AC_PATH_PROG(JAVAC, javac)
    572     AC_PATH_PROG(JAVAH, javah)
    573   else
    574     AC_PATH_PROG(JAVA, java, [],
    575       [${with_java}/bin:${with_java}])
    576     AC_PATH_PROG(JAVAC, javac, [],
    577       [${with_java}/bin:${with_java}])
    578     AC_PATH_PROG(JAVAH, javah, [],
    579       [${with_java}/bin:${with_java}])
    580   fi
    581 fi
    582 
    583622AC_SUBST(JAVA)
    584623AC_SUBST(JAVAC)
     
    587626AC_SUBST(JAVA_INC_DIR)
    588627AC_SUBST(JAVA_INC_SPEC)
    589 
    590 AC_MSG_CHECKING([for OpenDX headers])
    591 DX_INC_DIR=""
    592 for dir in \
    593  /apps/rappture/include \
    594  /usr/dx/include \
    595  /usr/include
    596 do
    597   if test -r "${dir}/dx/dx.h" ; then
    598     DX_INC_DIR="$dir"
    599     break
    600   fi
    601 done
    602 
    603 if test "${DX_INC_DIR}" = "/usr/include" ; then
    604   DX_INC_SPEC=""
    605 else
    606   DX_INC_SPEC="-I{DX_INC_DIR}"
    607 fi
    608 AC_SUBST(DX_INC_SPEC)
    609 AC_MSG_RESULT([${DX_INC_DIR}])
    610 
    611 AC_MSG_CHECKING([for OpenDX libraries])
    612 DX_LIB_DIR=""
    613 for dir in \
    614  /apps/rappture/lib \
    615  /usr/lib/dx/lib_linux \
    616  /usr/dx/lib_linux \
    617  /usr/lib
    618 do
    619   if test -r "${dir}/libDXcallm.a" ; then
    620     DX_LIB_DIR="$dir"
    621     break
    622   fi
    623 done
    624 
    625 if test "${DX_LIB_DIR}" = "/usr" ; then
    626   DX_LIB_SPEC=""
    627 else
    628   DX_LIB_SPEC="-L${DX_LIB_DIR}"
    629 fi
    630 
    631 AC_SUBST(DX_LIB_SPEC)
    632 AC_MSG_RESULT([${DX_LIB_DIR}])
    633628
    634629RP_BASE=`pwd`
     
    651646AC_SUBST(SHLIB_SUFFIX)
    652647
    653 if test -f "${exec_prefix}/lib/tclConfig.sh" ; then 
     648if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
    654649  . ${exec_prefix}/lib/tclConfig.sh
    655650fi
    656 if test -f "${exec_prefix}/lib/tclConfig.sh" ; then 
    657   . ${exec_prefix}/lib/tkConfig.sh     
     651if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
     652  . ${exec_prefix}/lib/tkConfig.sh
    658653fi
    659654AC_SUBST(TCL_VERSION)
     
    684679
    685680#--------------------------------------------------------------------
    686 # Set the default compiler switches based on the --enable-symbols 
     681# Set the default compiler switches based on the --enable-symbols
    687682# option.
    688683#--------------------------------------------------------------------
    689684
    690685SC_ENABLE_SYMBOLS
     686
     687
     688#--------------------------------------------------------------------
     689# search for ffmpeg libraries libavcodec, libavformat, libswscale
     690#--------------------------------------------------------------------
     691
     692AC_CHECK_HEADERS(ffmpeg/avcodec.h,[],[],
     693[[#define __STDC_CONSTANT_MACROS 1
     694  #ifdef HAVE_FFMPEG_AVCODEC_H
     695  # include <ffmpeg/avcodec.h>
     696  #endif
     697]])
     698
     699AC_CHECK_HEADERS(libavcodec/avcodec.h,[],[],
     700[[#define __STDC_CONSTANT_MACROS 1
     701  #ifdef HAVE_LIBAVCODEC_AVCODEC_H
     702  # include <libavcodec/avcodec.h>
     703  #endif
     704]])
     705
     706AC_CHECK_HEADERS([ffmpeg/avformat.h],[],[],
     707[[#define __STDC_CONSTANT_MACROS 1
     708  #ifdef HAVE_FFMPEG_AVFORMAT_H
     709  # include <ffmpeg/avformat.h>
     710  #endif
     711]])
     712
     713AC_CHECK_HEADERS([libavformat/avformat.h],[],[],
     714[[#define __STDC_CONSTANT_MACROS 1
     715  #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
     716  # include <libavformat/avformat.h>
     717  #endif
     718]])
     719
     720AC_CHECK_HEADERS([ffmpeg/avutil.h],[],[],
     721[[#define __STDC_CONSTANT_MACROS 1
     722  #ifdef HAVE_FFMPEG_AVUTIL_H
     723  # include <ffmpeg/avutil.h>
     724  #endif
     725]])
     726
     727AC_CHECK_HEADERS([libavutil/avutil.h],[],[],
     728[[#define __STDC_CONSTANT_MACROS 1
     729  #ifdef HAVE_LIBAVUTIL_AVUTIL_H
     730  # include <libavutil/avutil.h>
     731  #endif
     732]])
     733
     734AC_CHECK_HEADERS([ffmpeg/swscale.h],[],[],
     735[[#define __STDC_CONSTANT_MACROS 1
     736  #ifdef HAVE_FFMPEG_SWSCALE_H
     737  # include <ffmpeg/swscale.h>
     738  #endif
     739]])
     740
     741AC_CHECK_HEADERS([libswscale/swscale.h],[],[],
     742[[#define __STDC_CONSTANT_MACROS 1
     743  #ifdef HAVE_LIBSWSCALE_SWSCALE_H
     744  # include <libswscale/swscale.h>
     745  #endif
     746]])
     747
     748HAVE_FFMPEG_LIBS=""
     749if [[ \( "${ac_cv_header_ffmpeg_avcodec_h}" = "yes" -o \
     750        "${ac_cv_header_libavcodec_avcodec_h}" = "yes" \) -a \
     751     \( "${ac_cv_header_ffmpeg_avformat_h}" = "yes" -o \
     752        "${ac_cv_header_libavformat_avformat_h}" = "yes" \) -a \
     753     \( "${ac_cv_header_ffmpeg_avutil_h}" = "yes" -o \
     754        "${ac_cv_header_libavutil_avutil_h}" = "yes" \) -a \
     755     \( "${ac_cv_header_ffmpeg_swscale_h}" = "yes" -o \
     756        "${ac_cv_header_libswscale_swscale_h}" = "yes" \) ]] ; then
     757  HAVE_FFMPEG_LIBS="yes"
     758  AC_DEFINE(BUILD_with_ffmpeg, 1, [Build rappture with ffmpeg widgets])
     759else
     760  HAVE_FFMPEG_LIBS=""
     761fi
     762
     763AC_CHECK_FUNCS(img_convert)
     764AC_CHECK_FUNCS(sws_scale)
     765AC_SUBST(HAVE_FFMPEG_LIBS)
    691766
    692767ac_configure_args="--disable-threads --enable-shared"
     
    726801    lang/matlab/Makefile
    727802    lang/octave/Makefile
    728     lang/octave/RpOctaveInterface.h
     803    lang/octave/octave2/Makefile
     804    lang/octave/octave3/Makefile
    729805    lang/ruby/Makefile
    730806    lang/ruby/build.rb
     
    754830    examples/app-fermi/wrapper/Makefile
    755831    examples/app-fermi/wrapper/cee/Makefile
     832    examples/app-fermi/wrapper/perl/Makefile
    756833    examples/app-fermi/wrapper/python/Makefile
    757834    examples/app-fermi/wrapper/tcl/Makefile
     
    788865    examples/zoo/enable/Makefile
    789866    examples/zoo/field/Makefile
    790     examples/zoo/filechoice/Makefile
     867    examples/zoo/filelist/Makefile
    791868    examples/zoo/group/Makefile
    792869    examples/zoo/image/Makefile
  • branches/blt4/examples/app-fermi/wrapper/perl/Makefile.in

    r1895 r1897  
    11
    22bindir          = @bindir@
    3 datadir         = @datadir@
    4 datarootdir     = @datarootdir@
     3datadir         = @datadir@
     4datarootdir     = @datarootdir@
    55exec_prefix     = @exec_prefix@
    66includedir      = @includedir@
     
    88mandir          = @mandir@
    99prefix          = @prefix@
    10 srcdir          = @srcdir@
     10srcdir          = @srcdir@
    1111
    12 destdir         = $(prefix)/examples/app-fermi/wrapper/python
     12destdir         = $(prefix)/examples/app-fermi/wrapper/perl
    1313
    14 INSTALL         = @INSTALL@
    15 MKDIR_P         = @MKDIR_P@
     14INSTALL         = @INSTALL@
     15MKDIR_P         = @MKDIR_P@
    1616
    17 FILES           = \
    18                 $(srcdir)/fermi.py \
     17FILES = \
     18                $(srcdir)/fermi.pl \
    1919                $(srcdir)/fermi.m \
    2020                $(srcdir)/tool.xml
    2121all:
    2222
    23 install: 
     23install:
    2424        $(MKDIR_P) $(destdir)
    2525        for i in $(FILES) ; do \
  • branches/blt4/examples/app-fermi/wrapper/perl/test/defaults.xml

    r1895 r1897  
    33    <tool>
    44        <about>Press Simulate to view results.</about>
    5         <command>python @tool/fermi.py @driver</command>
     5        <command>perl @tool/fermi.pl @driver</command>
    66        <name>Workspace (800x600)</name>
    77        <version>
    88            <rappture>
    9                 <language>python</language>
     9                <revision>$LastChangedRevision: 1018 $</revision>
     10                <modified>$LastChangedDate: 2008-06-08 21:24:34 -0400 (Sun, 08 Jun 2008) $</modified>
     11                <language>tcl</language>
    1012            </rappture>
    1113        </version>
     
    4951    <output>
    5052        <log>Enter the Fermi level (eV):
    51  Ef = 0.0
     53 Ef = 0
    5254Enter the temperature (K):
    53  T = 300.0
    54 warning: fopen: default open mode is now binary</log>
     55 T = 300
     56=RAPPTURE-ERROR=&gt;warning: fopen: default open mode is now binary
     57=RAPPTURE-ERROR=&gt;
     58</log>
    5559        <curve id="f12">
    5660            <about>
     
    6569            </yaxis>
    6670            <component>
    67                 <xy>0.999944 -0.253324
     71                <xy>0.99995 -0.255922
     720.999944 -0.253324
    68730.999939 -0.250726
    69740.999932 -0.248127
     
    266271            </component>
    267272        </curve>
     273        <time>Wed Dec 10 03:01:10 EST 2008</time>
     274        <status>ok</status>
     275        <user>dkearney</user>
    268276    </output>
    269277</run>
     278
  • branches/blt4/examples/app-fermi/wrapper/perl/tool.xml

    r1895 r1897  
    33    <tool>
    44        <about>Press Simulate to view results.</about>
    5         <command>python @tool/fermi.py @driver</command>
     5        <command>perl @tool/fermi.pl @driver</command>
    66    </tool>
    77    <input>
  • branches/blt4/examples/demo.bash.in

    r1596 r1897  
    4747  ./app-fermi/cee \
    4848  ./app-fermi/tcl \
     49  ./app-fermi/java \
    4950  ./app-fermi/perl \
    5051  ./app-fermi/ruby \
  • branches/blt4/gui/apps/Makefile.in

    r1633 r1897  
    11
    22SHELL           = @SHELL@
    3 
     3TCLSH           = @TCLSH@
    44srcdir          = @srcdir@
    55prefix          = @prefix@
  • branches/blt4/gui/apps/about.in

    r1206 r1897  
    1919# ======================================================================
    2020#\
     21. rappture.env \
    2122exec wish "$0" $*
    2223# ----------------------------------------------------------------------
  • branches/blt4/gui/apps/encodedata.in

    r1280 r1897  
    88# ======================================================================
    99#\
    10 RAPPTURE_INSTALL_DIR=@prefix@ ; \
    11 . $RAPPTURE_INSTALL_DIR/bin/rappture.env ; \
    1210exec wish "$0" $*
    1311
  • branches/blt4/gui/apps/flowvis-test

    r1492 r1897  
    1616# ======================================================================
    1717#\
     18bindir=`basename $0` ; \
     19. $bindir/rappture.env ; \
    1820exec wish "$0" $*
    1921# ----------------------------------------------------------------------
    2022# wish executes everything from here on...
    2123
    22 lappend auto_path /usr/local/rappture/lib /usr/local/rappture/lib/vtk /usr/local/rappture/lib/vtk/tcl
     24set installdir [file root $argv0]
     25set libdir [file join $installdir "lib"]
     26
     27lappend auto_path $libdir $libdir/vtk $libdir/vtk/tcl
    2328
    2429package require Itcl
  • branches/blt4/gui/apps/nanovis-test

    r1292 r1897  
    1717# ======================================================================
    1818#\
    19 exec wish "$0" $*
     19bindir=`dirname $0` ; \
     20exec $bindir/wish "$0" $*
    2021# ----------------------------------------------------------------------
    2122# wish executes everything from here on...
    2223
    23 lappend auto_path /usr/local/rappture/lib /usr/local/rappture/lib/vtk /usr/local/rappture/lib/vtk/tcl
     24set installdir [file root $argv0]
     25set libdir [file join $installdir "lib"]
     26
     27lappend auto_path $libdir $libdir/vtk $libdir/vtk/tcl
    2428
    2529package require Itcl
     
    171175        set cmd $last_command
    172176    }
    173     namespace eval Rappture::NanovisViewer [list $widgets(nanovis) _send $cmd]
     177    namespace eval Rappture::NanovisViewer [list $widgets(nanovis) SendCmd $cmd]
    174178    $widgets(command) delete 0 end
    175179}
  • branches/blt4/gui/apps/rappture-csh.env.in

    r1747 r1897  
    2424set python_version=@PYTHON_VERSION@
    2525set tcl_version=@TCL_VERSION@
     26set octave_version=@OCTAVE_VERSION@
    2627
    2728set path = ( $bindir $path )
     
    5253
    5354if ( $?OCTAVE_LOADPATH ) then
    54   setenv OCTAVE_LOADPATH "${libdir}/octave:$OCTAVE_LOADPATH"
     55  setenv OCTAVE_LOADPATH "${libdir}/octave${octave_version}:$OCTAVE_LOADPATH"
    5556else
    56   setenv OCTAVE_LOADPATH "${libdir}/octave"
     57  setenv OCTAVE_LOADPATH "${libdir}/octave${octave_version}"
    5758endif
    5859
     
    9394endif
    9495
    95 # Can we do this without putting dot in the path?
    9696if ( $?CLASSPATH ) then
    97   setenv CLASSPATH  ".:${libdir}/java:$CLASSPATH"
    98 else 
    99   setenv CLASSPATH ".:${libdir}/java"
     97  setenv CLASSPATH "${libdir}/java:$CLASSPATH"
     98else
     99  setenv CLASSPATH "${libdir}/java"
    100100endif
     101 
     102
  • branches/blt4/gui/apps/rappture.env.in

    r1746 r1897  
    2323python_version=@PYTHON_VERSION@
    2424tcl_version=@TCL_VERSION@
     25octave_version=@OCTAVE_VERSION_MAJOR@
    2526
    2627# No need to edit anything else
     
    3536
    3637MATLABPATH=${libdir}/matlab:$MATLABPATH
    37 OCTAVE_LOADPATH=:${libdir}/octave:$OCTAVE_LOADPATH
    38 OCTAVE_PATH=:${libdir}/octave:$OCTAVE_PATH
     38OCTAVE_LOADPATH=:${libdir}/octave${octave_version}:$OCTAVE_LOADPATH
     39OCTAVE_PATH=:${libdir}/octave${octave_version}:$OCTAVE_PATH
    3940
    4041export MATLABPATH OCTAVE_PATH OCTAVE_LOADPATH
     
    5253export TCL_LIBRARY TK_LIBRARY TCLLIBPATH
    5354
    54 # Can we do this without putting dot in the path?
    5555CLASSPATH=.:${libdir}/java:$CLASSPATH
    56 export CLASSPATH
     56
     57export CLASSPATH
     58
  • branches/blt4/gui/apps/rappture.use.in

    r1746 r1897  
    1515tcl_version=@TCL_VERSION@
    1616
    17 prepend PATH ${bindir}/bin
     17prepend PATH ${bindir}
    1818
    1919prepend LD_LIBRARY_PATH ${vtkdir}
     
    3434prepend TK_LIBRARY ${libdir}/tk${tcl_version}
    3535
    36 prepend CLASSPATH .:${libdir}/java
     36tags DEVEL
  • branches/blt4/gui/apps/rerun.in

    r1206 r1897  
    3030#
    3131#
    32 
    33 RAPPTURE_INSTALL_DIR=@prefix@
    34 
    35 . $RAPPTURE_INSTALL_DIR/bin/rappture.env
    36 exec $RAPPTURE_INSTALL_DIR/bin/driver -nosim true -load $*
     32exec rappture -nosim true -load $*
  • branches/blt4/gui/apps/simsim.in

    r1612 r1897  
    88# ======================================================================
    99#\
    10 RAPPTURE_INSTALL_DIR=@prefix@ ; \
    11 . $RAPPTURE_INSTALL_DIR/bin/rappture.env ; \
     10. rappture.env \
    1211exec wish "$0" $*
    1312
     
    204203    } else {
    205204        set optList [$child children -as object -type option]
     205        set optLib ""
    206206        set value ""
    207         if {"random" == $valType} {
    208             set optIdx [expr {int(rand()*[llength $optList])}]
    209             set optLib [lindex $optList $optIdx]
    210             set value [$optLib get value]
    211         } elseif {"default" == $valType} {
    212             set defaultVal [$child get default]
    213             foreach optLib $optList {
    214                 set label [$optLib get about.label]
    215                 set valTag [$optLib get value]
    216                 if {($defaultVal == $label) || ($defaultVal == $valTag)} {
    217                     set value $valTag
    218                     break
     207        if {[llength $optList] > 0} {
     208            if {"random" == $valType} {
     209                set optIdx [expr {int(rand()*[llength $optList])}]
     210                set optLib [lindex $optList $optIdx]
     211                set value [$optLib get value]
     212            } elseif {"default" == $valType} {
     213                set defaultVal [$child get default]
     214                foreach optLib $optList {
     215                    set label [$optLib get about.label]
     216                    set valTag [$optLib get value]
     217                    if {($defaultVal == $label) || ($defaultVal == $valTag)} {
     218                        set value $valTag
     219                        break
     220                    }
    219221                }
    220222            }
    221         }
    222 
    223         if {"" == $value} {
    224             set value [$optLib get about.label]
     223
     224            if {"" == $value} {
     225                set optLib [lindex $optList 0]
     226                set value [$optLib get value]
     227                if {"" == $value} {
     228                    set value [$optLib get about.label]
     229                }
     230            }
    225231        }
    226232        $child put "current" $value
  • branches/blt4/gui/apps/table

    r1212 r1897  
     1
    12package require Rappture
    23package require RapptureGUI
  • branches/blt4/gui/apps/xmldiff.in

    r1206 r1897  
    1313# ======================================================================
    1414
    15 RAPPTURE_INSTALL_DIR=@prefix@
    16 
    17 . $RAPPTURE_INSTALL_DIR/bin/rappture.env
    18 exec $RAPPTURE_INSTALL_DIR/bin/simsim --nosim --tool $1 --compare $2
     15exec simsim --nosim --tool $1 --compare $2
  • branches/blt4/gui/scripts/Makefile.in

    r1879 r1897  
    1414INSTALL         = @INSTALL@
    1515MKDIR_P         = @MKDIR_P@
    16 TCL_VERSION     = @TCL_VERSION@
    17 TCLSH           = $(bindir)/tclsh$(TCL_VERSION)
     16TCLSH           = @TCLSH@
    1817VPATH           = $(srcdir)
    1918PACKAGE_VERSION = @PACKAGE_VERSION@
     
    115114                $(srcdir)/utils.tcl \
    116115                $(srcdir)/valueresult.tcl \
     116                $(srcdir)/videoviewer.tcl \
    117117                $(srcdir)/visviewer.tcl \
    118118                $(srcdir)/vtkviewer.tcl \
  • branches/blt4/gui/scripts/analyzer.tcl

    r1879 r1897  
    433433
    434434    if {$status != 0} {
    435         $itk_component(runinfo) configure -state normal
    436         $itk_component(runinfo) delete 1.0 end
    437         $itk_component(runinfo) insert end "Problem launching job:\n\n" text
    438         _simOutput $result
    439         $itk_component(runinfo) configure -state disabled
    440         $itk_component(runinfo) see 1.0
    441 
    442         # Try to create a support ticket for this error.
    443         # It may be a real problem.
    444         if {[Rappture::bugreport::shouldReport for jobs]} {
    445             Rappture::bugreport::register "Problem launching job:\n\n$result\n== RAPPTURE INPUT ==\n[$_tool xml xml]"
    446         }
     435        $itk_component(runinfo) configure -state normal
     436        $itk_component(runinfo) delete 1.0 end
     437        $itk_component(runinfo) insert end "Problem launching job:\n\n" text
     438        _simOutput $result
     439        $itk_component(runinfo) configure -state disabled
     440        $itk_component(runinfo) see 1.0
     441
     442        # Try to create a support ticket for this error.
     443        # It may be a real problem.
     444        if {[Rappture::bugreport::shouldReport for jobs]} {
     445            set ::errorInfo "== RAPPTURE INPUT ==\n[$_tool xml xml]"
     446            Rappture::bugreport::register "Problem launching job:\n$result"
     447            Rappture::bugreport::send
     448        }
    447449    } else {
    448450        $itk_component(notebook) current analyze
  • branches/blt4/gui/scripts/balloon.tcl

    r1719 r1897  
    217217        # window). So for now, better to place the balloon window somewhere
    218218        # than to fail with a bad geometry.
    219         #
    220         # Update: This answer could be that the root window (deskop) is
    221         #         resized but XHeightOfScreen XWidthOfScreen still
    222         #         report the initial size.
    223         #
    224         #         Fixed in new BLT.
    225         #
    226219        wm geometry $p +$px+$py
    227220    } else {
  • branches/blt4/gui/scripts/bugreport.tcl

    r1651 r1897  
    1111#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    1212# ======================================================================
     13option add *BugReport*Label.font {Helvetica -12} startupFile
    1314option add *BugReport*banner*foreground white startupFile
    1415option add *BugReport*banner*background #a9a9a9 startupFile
    1516option add *BugReport*banner*highlightBackground #a9a9a9 startupFile
    16 option add *BugReport*banner*font \
    17     -*-helvetica-bold-r-normal-*-18-* startupFile
    18 option add *BugReport*Label.font \
    19     -*-helvetica-medium-r-normal-*-12-* startupFile
     17option add *BugReport*banner.title.font {Helvetica -18 bold} startupFile
    2018option add *BugReport*xmit*wrapLength 3i startupFile
    2119option add *BugReport*expl.width 50 startupFile
    22 option add *BugReport*expl.font \
    23     -*-helvetica-medium-r-normal-*-12-* startupFile
    24 option add *BugReport*expl.boldFont \
    25     -*-helvetica-bold-r-normal-*-12-* startupFile
     20option add *BugReport*expl.font {Helvetica -12} startupFile
     21option add *BugReport*expl.boldFont {Helvetica -12 bold} startupFile
     22option add *BugReport*comments.l.font {Helvetica -12 italic} startupFile
     23option add *BugReport*comments.info.text.font {Helvetica -12} startupFile
     24option add *BugReport*details*font {Courier -12} startupFile
    2625
    2726namespace eval Rappture::bugreport {
     27    # details from the current trouble report
     28    variable details
     29
    2830    # assume that if there's a problem launching a job, we should know it
    2931    variable reportJobFailures 1
     
    5052proc Rappture::bugreport::activate {err} {
    5153    global env errorInfo
     54    variable details
    5255
    5356    if {"@SHOWDETAILS" == $err} {
     57        pack propagate .bugreport yes
     58        pack forget .bugreport.expl
    5459        pack forget .bugreport.xmit
    55         pack forget .bugreport.ok
     60        pack forget .bugreport.done
     61        pack forget .bugreport.cntls.show
     62        pack .bugreport.cntls -after .bugreport.banner -side bottom -fill x
    5663        pack .bugreport.details -after .bugreport.banner \
    5764            -expand yes -fill both -padx 8 -pady 8
    58         focus .bugreport.details.cntls.ok
     65        pack .bugreport.comments -after .bugreport.details \
     66            -expand yes -fill both -padx 8 -pady {0 8}
    5967        return
    6068    }
    6169
    62     # always fill in details so we can submit trouble reports later
     70    # gather details so we can submit trouble reports later
     71    # do this now, before we do anything with "catch" down below
     72    # that might mask the errorInfo
     73    register $err
     74
     75    pack propagate .bugreport yes
     76    pack forget .bugreport.details
     77    pack forget .bugreport.xmit
     78    pack forget .bugreport.done
     79    pack .bugreport.cntls.show -side right
     80    pack .bugreport.cntls -after .bugreport.banner -side bottom -fill x
     81    pack .bugreport.expl -after .bugreport.banner \
     82        -expand yes -fill both -padx 8 -pady 8
     83    pack .bugreport.comments -after .bugreport.expl \
     84        -expand yes -fill both -padx 8 -pady {0 8}
     85
     86    .bugreport.expl configure -state normal
     87    .bugreport.expl delete 1.0 end
     88
     89    set url [Rappture::Tool::resources -huburl]
     90    if {"" != $url} {
     91        .bugreport.expl insert end "Something went wrong with this tool.  Help us understand what happened by submitting a trouble report, so we can fix the problem.  If you continue having trouble with this tool, please close it and restart."
     92        .bugreport.cntls.send configure -state normal
     93        focus .bugreport.cntls.send
     94    } else {
     95        .bugreport.expl insert end "Something went wrong with this tool.  We would ask you to submit a trouble report about the error, but we can't tell what hub it should be submitted to.  If you continue having trouble with this tool, please close it and restart."
     96        pack forget .bugreport.comments
     97        .bugreport.cntls.send configure -state disabled
     98        focus .bugreport.cntls.ok
     99    }
     100    fixTextHeight .bugreport.expl
     101    .bugreport.expl configure -state disabled
     102
    63103    .bugreport.details.info.text configure -state normal
    64104    .bugreport.details.info.text delete 1.0 end
    65     .bugreport.details.info.text insert end "$err\n-----\n$errorInfo"
     105    .bugreport.details.info.text insert end "    USER: $details(login)\n"
     106    .bugreport.details.info.text insert end "HOSTNAME: $details(hostname)\n"
     107    .bugreport.details.info.text insert end "    TOOL: $details(referrer)\n"
     108    .bugreport.details.info.text insert end " SESSION: $details(session)\n"
     109    .bugreport.details.info.text insert end "CATEGORY: $details(category)\n"
     110    .bugreport.details.info.text insert end " SUMMARY: $details(summary)\n"
     111    .bugreport.details.info.text insert end "---------\n"
     112    .bugreport.details.info.text insert end $details(stackTrace)
    66113    .bugreport.details.info.text configure -state disabled
    67 
    68     if {[shouldReport for oops]} {
    69         pack forget .bugreport.details
    70         pack forget .bugreport.expl
    71         pack .bugreport.ok -side bottom -after .bugreport.banner -pady {0 8}
    72         pack .bugreport.xmit -after .bugreport.ok -padx 8 -pady 8
    73         focus .bugreport.ok
    74         set dosubmit 1
    75     } else {
    76         pack forget .bugreport.expl
    77         pack forget .bugreport.xmit
    78         pack forget .bugreport.ok
    79         pack .bugreport.details -after .bugreport.banner \
    80             -expand yes -fill both -padx 8 -pady 8
    81         focus .bugreport.details.cntls.ok
    82         set dosubmit 0
    83     }
    84114
    85115    set w [winfo reqwidth .bugreport]
    86116    set h [winfo reqheight .bugreport]
    87117    set x [expr {([winfo screenwidth .bugreport]-$w)/2}]
    88     set y [expr {([winfo screenheight .bugreport]-$w)/2}]
     118    if {$x < 0} {set x 0}
     119    set y [expr {([winfo screenheight .bugreport]-$h)/2}]
     120    if {$y < 0} {set y 0}
    89121
    90122    wm geometry .bugreport +$x+$y
     
    94126    catch {grab set .bugreport}
    95127    update
    96 
    97     if {$dosubmit} {
    98         submit
    99     }
    100128}
    101129
     
    123151    set info [.bugreport.details.info.text get 1.0 end]
    124152
     153    pack propagate .bugreport no
    125154    pack forget .bugreport.details
    126     pack .bugreport.ok -side bottom -after .bugreport.banner -pady {0 8}
    127     pack .bugreport.xmit -after .bugreport.ok -padx 8 -pady 8
     155    pack forget .bugreport.expl
     156    pack forget .bugreport.comments
     157    pack forget .bugreport.cntls
     158    pack .bugreport.xmit -after .bugreport.banner -padx 8 -pady 8
    128159    .bugreport.xmit.title configure -text "Sending trouble report to [Rappture::Tool::resources -hubname]..."
    129     focus .bugreport.ok
    130160
    131161    # send off the trouble report...
    132162    .bugreport.xmit.icon start
    133     set status [catch {register $info} result]
     163    set status [catch send result]
    134164    .bugreport.xmit.icon stop
    135165
     166    pack propagate .bugreport yes
    136167    pack forget .bugreport.xmit
    137     pack .bugreport.expl -after .bugreport.ok -padx 8 -pady 8
     168    pack .bugreport.expl -after .bugreport.banner -padx 8 -pady 8
    138169    .bugreport.expl configure -state normal
    139170    .bugreport.expl delete 1.0 end
     
    146177        .bugreport.details.info.text configure -state disabled
    147178
    148         .bugreport.expl insert end "This tool encountered an unexpected error.  We tried to submit a trouble report automatically, but that failed.  If you want to report this incident, you can file your own trouble report.  Look for the \"Help\" or \"Support\" links on the main navigation bar of the web site.\n\nIf you continue having trouble with this tool, please close it and launch another session."
     179        .bugreport.expl insert end "Oops! Ticket submission failed:\n$result\n\nIf you want to report the original problem, you can file your own trouble report by going to the web site and clicking on the \"Help\" or \"Support\" link on the main navigation bar.  If you continue having trouble with this tool, please close it and restart."
    149180    } elseif {[regexp {Ticket #([0-9]*) +\((.*?)\) +([0-9]+) +times} $result match ticket extra times]} {
    150         .bugreport.expl insert end "This tool encountered an unexpected error.  The problem has been reported as " "" "Ticket #$ticket" bold " in our system." ""
     181        .bugreport.expl insert end "This problem has been reported as " "" "Ticket #$ticket" bold " in our system." ""
    151182        if {[string is integer $times] && $times > 1} {
    152183            .bugreport.expl insert end "  This particular problem has been reported $times times."
    153184        }
    154         .bugreport.expl insert end "\n\nIf you continue having trouble with this tool, please close it and launch another session."
     185        .bugreport.expl insert end "\n\nIf you continue having trouble with this tool, please close it and restart.  Thanks for reporting the problem and helping us improve things!"
    155186    } else {
    156         .bugreport.expl insert end "This tool encountered an unexpected error, and the problem was reported.  Here is the response from the hub, which may contain information about your ticket:\n" "" $result bold "\n\nIf you continue having trouble with this tool, please close it and launch another session." ""
    157     }
    158     for {set h 1} {$h < 50} {incr h} {
    159         .bugreport.expl configure -height $h
    160         .bugreport.expl see 1.0
    161         update idletasks
    162         if {"" != [.bugreport.expl bbox end-1char]} {
    163             break
    164         }
    165     }
     187        .bugreport.expl insert end "This problem has been reported.  Here is the response from the hub, which may contain information about your ticket:\n" "" $result bold "\n\nIf you continue having trouble with this tool, please close it and restart.  Thanks for reporting the problem and helping us improve things!" ""
     188    }
     189    fixTextHeight .bugreport.expl
    166190    .bugreport.expl configure -state disabled
    167 }
    168 
    169 # ----------------------------------------------------------------------
    170 # USAGE: download
    171 #
    172 # Used to download the current ticket information to the user's
    173 # desktop.
    174 # ----------------------------------------------------------------------
    175 proc Rappture::bugreport::download {} {
    176     set info [.bugreport.details.info.text get 1.0 end]
    177     Rappture::filexfer::download $info bugreport.txt
    178 }
    179 
    180 # ----------------------------------------------------------------------
    181 # USAGE: register <stackTrace>
    182 #
    183 # Low-level function used to send bug reports back to the hub site.
    184 # Error details in the <stackTrace> are posted to a URL that creates
    185 # a support ticket.  Returns a string of the following form,
    186 # representing details about the new or existing ticket:
    187 #   Ticket #XX (XXXXXX) XX times
    188 # ----------------------------------------------------------------------
    189 proc Rappture::bugreport::register {stackTrace} {
    190     global env tcl_platform
    191 
    192     package require http
    193     package require tls
    194     http::register https 443 ::tls::socket
    195 
     191    pack .bugreport.done -side bottom -padx 8 -pady 8
     192    focus .bugreport.done
     193}
     194
     195# ----------------------------------------------------------------------
     196# USAGE: register <err>
     197#
     198# Low-level function used to capture information about a bug report
     199# prior to calling "send", which actually sends the ticket.  We usually
     200# let the user preview the information and decide whether or not to
     201# send the ticket.
     202# ----------------------------------------------------------------------
     203proc Rappture::bugreport::register {err} {
     204    global errorInfo tcl_platform
     205    variable details
     206
     207    #
     208    # Figure out exactly what we'll send if the bug report is
     209    # submitted, so we can show the user.
     210    #
     211    set stackTrace "$err\n---------\n$errorInfo"
    196212    if {![regexp {^([^\n]+)\n} $stackTrace match summary]} {
    197213        if {[string length $stackTrace] == 0} {
     
    246262    }
    247263
     264    set details(summary) $summary
     265    set details(category) $category
     266    set details(stackTrace) $stackTrace
     267    set details(login) $tcl_platform(user)
     268    set details(hostname) [info hostname]
     269    set details(session) [Rappture::Tool::resources -session]
     270    set details(referrer) "tool \"[Rappture::Tool::resources -appname]\""
     271}
     272
     273# ----------------------------------------------------------------------
     274# USAGE: send
     275#
     276# Low-level function used to send bug reports back to the hub site.
     277# Error details gathered by a previous call to "register" are sent
     278# along as a support ticket.  Returns a string of the following form,
     279# representing details about the new or existing ticket:
     280#   Ticket #XX (XXXXXX) XX times
     281# ----------------------------------------------------------------------
     282proc Rappture::bugreport::send {} {
     283    variable details
     284
     285    package require http
     286    package require tls
     287    http::register https 443 ::tls::socket
     288
     289    set report $details(stackTrace)
     290    set cmts [string trim [.bugreport.comments.info.text get 1.0 end]]
     291    if {[string length $cmts] > 0} {
     292        set report "$cmts\n[string repeat = 72]\n$report"
     293    }
     294
    248295    set query [http::formatQuery \
    249296        option com_support \
    250297        task create \
    251298        no_html 1 \
    252         report $stackTrace \
    253         login $tcl_platform(user) \
    254         sesstoken [Rappture::Tool::resources -session] \
    255         hostname [info hostname] \
    256         category $category \
    257         summary $summary \
    258         referrer "tool \"[Rappture::Tool::resources -appname]\"" \
     299        report $report \
     300        login $details(login) \
     301        sesstoken $details(session) \
     302        hostname $details(hostname) \
     303        category $details(category) \
     304        summary $details(summary) \
     305        referrer $details(referrer) \
    259306    ]
    260307   
     
    282329
    283330# ----------------------------------------------------------------------
     331# USAGE: fixTextHeight <widget>
     332#
     333# Used internally to adjust the height of a text widget so it is just
     334# tall enough to show the info within it.
     335# ----------------------------------------------------------------------
     336proc Rappture::bugreport::fixTextHeight {widget} {
     337    #
     338    # HACK ALERT!  In Tk8.5, we can count display lines directly.
     339    #   But for earlier versions, we have to cook up something
     340    #   similar.
     341    #
     342    if {[catch {$widget count -displaylines 1.0 end} h] == 0 && $h > 0} {
     343        $widget configure -height $h
     344    } else {
     345        for {set h 1} {$h < 15} {incr h} {
     346            $widget configure -height $h
     347            $widget see 1.0
     348            update idletasks
     349            if {"" != [$widget bbox end-1char]} {
     350                break
     351            }
     352        }
     353    }
     354}
     355
     356# ----------------------------------------------------------------------
    284357# USAGE: shouldReport jobfailures <boolean>
    285358# USAGE: shouldReport for ?oops|jobs?
     
    304377        }
    305378        for {
    306             # is this a tool in production?
    307             if {![info exists env(RAPPTURE_VERSION)]
    308                   || $env(RAPPTURE_VERSION) != "current"} {
    309                 return 0
    310             }
    311 
    312379            # is it being run within a workspace?
    313380            set appname [Rappture::Tool::resources -appname]
     
    343410label .bugreport.banner.icon -image [Rappture::icon alert]
    344411pack .bugreport.banner.icon -side left -padx 2 -pady 2
    345 label .bugreport.banner.title -text "Oops! Unexpected Error"
     412label .bugreport.banner.title -text "Oops! Internal Error"
    346413pack .bugreport.banner.title -side left -padx {0 8} -pady 2
    347414
     
    352419    Rappture::bugreport::deactivate
    353420
    354 button .bugreport.ok -text "Dismiss" -command Rappture::bugreport::deactivate
    355 pack .bugreport.ok -side bottom -pady {0 8}
     421set bg [.bugreport cget -background]
     422text .bugreport.expl -borderwidth 0 -highlightthickness 0 -background $bg \
     423    -height 3 -wrap word
     424.bugreport.expl tag configure bold \
     425    -font [option get .bugreport.expl boldFont Font]
     426#
     427# HACK ALERT!  We have problems with fixTextHeight working correctly
     428#   on Windows for Tk8.4 and earlier.  To make it work properly, we
     429#   add the binding below.  At some point, we'll ditch 8.4 and we can
     430#   use the new "count -displaylines" option in Tk8.5.
     431#
     432bind .bugreport.expl <Map> {Rappture::bugreport::fixTextHeight %W}
     433
     434frame .bugreport.comments
     435label .bugreport.comments.l -text "What were you doing just before this error?" -anchor w
     436pack .bugreport.comments.l -side top -anchor w
     437Rappture::Scroller .bugreport.comments.info -xscrollmode none -yscrollmode auto
     438text .bugreport.comments.info.text -width 30 -height 3 -wrap word
     439.bugreport.comments.info contents .bugreport.comments.info.text
     440bind .bugreport.comments.info.text <ButtonPress> {focus %W}
     441pack .bugreport.comments.info -expand yes -fill both
     442
     443frame .bugreport.cntls
     444pack .bugreport.cntls -side bottom -fill x
     445button .bugreport.cntls.ok -text "Ignore" -command {
     446    Rappture::bugreport::deactivate
     447}
     448pack .bugreport.cntls.ok -side left -padx {4 20} -pady 8
     449button .bugreport.cntls.send -text "Send Trouble Report" -command {
     450    Rappture::bugreport::submit
     451}
     452pack .bugreport.cntls.send -side right -padx 4 -pady 8
     453
     454button .bugreport.cntls.show -text "Show Details..." \
     455    -command {Rappture::bugreport::activate @SHOWDETAILS}
     456pack .bugreport.cntls.show -side right
     457
     458
     459frame .bugreport.details
     460Rappture::Scroller .bugreport.details.info -xscrollmode auto -yscrollmode auto
     461text .bugreport.details.info.text -width 50 -height 15 -wrap none
     462.bugreport.details.info contents .bugreport.details.info.text
     463pack .bugreport.details.info -expand yes -fill both
    356464
    357465frame .bugreport.xmit
     
    364472pack .bugreport.xmit.title -side left -expand yes -fill x
    365473
    366 text .bugreport.expl -borderwidth 0 -highlightthickness 0 -wrap word
    367 .bugreport.expl tag configure bold \
    368     -font [option get .bugreport.expl boldFont Font]
    369 
    370 bind .bugreport.expl <Control-1><Control-1><Control-3><Control-3> {
    371     Rappture::bugreport::activate @SHOWDETAILS
    372 }
    373 
    374 bind .bugreport.expl <Control-1><Control-1><Control-Shift-1><Control-Shift-1> {
    375     Rappture::bugreport::activate @SHOWDETAILS
    376 }
    377 
    378 frame .bugreport.details
    379 frame .bugreport.details.cntls
    380 pack .bugreport.details.cntls -side bottom -fill x
    381 button .bugreport.details.cntls.ok -text "Dismiss" -command {
    382     Rappture::bugreport::deactivate
    383 }
    384 pack .bugreport.details.cntls.ok -side right -padx 2 -pady 4
    385 button .bugreport.details.cntls.send -text "Send Trouble Report" -command {
    386     Rappture::bugreport::submit
    387 }
    388 pack .bugreport.details.cntls.send -side left -padx 2 -pady 4
    389 button .bugreport.details.cntls.dload -text "Download" -command {
    390     Rappture::bugreport::download
    391 }
    392 pack .bugreport.details.cntls.dload -side left -padx 2 -pady 4
    393 
    394 set scrollset .bugreport.details.info
    395 blt::scrollset $scrollset -xscrollbar $scrollset.xs -yscrollbar $scrollset.ys \
    396     -window $scrollset.text
    397 blt::tk::scrollbar $scrollset.xs
    398 blt::tk::scrollbar $scrollset.ys
    399 text .bugreport.details.info.text -width 50 -height 15 -wrap none
    400 pack .bugreport.details.info -expand yes -fill both
     474button .bugreport.done -text "Done" \
     475    -command Rappture::bugreport::deactivate
    401476
    402477# this binding keeps the bugreport window on top
  • branches/blt4/gui/scripts/combobox.tcl

    r1646 r1897  
    134134            $itk_component(entry) configure -state disabled
    135135        }
    136         set cmd [list event generate $itk_component(hull) <<Value>>]
    137         after 10 [list catch $cmd]
     136
     137        after 10 [list catch [list event generate $itk_component(hull) <<Value>>]]
    138138    } elseif {[llength $args] != 0} {
    139139        error "wrong # args: should be \"value ?newval?\""
  • branches/blt4/gui/scripts/filexfer.tcl

    r1587 r1897  
    338338              /apps/bin/clientaction
    339339              /apps/xvnc/bin/clientaction
     340              /usr/lib/mw/bin/clientaction
    340341              ""
    341342        } {
  • branches/blt4/gui/scripts/grab.tcl

    r1342 r1897  
    6565        }
    6666
     67        # if the window is already on the stack, then skip it
     68        if {[string equal [lindex $::Rappture::grab::stack 0] $window]} {
     69            return $window
     70        }
     71
    6772        # add the current configuration to the grab stack
    6873        set ::Rappture::grab::stack \
  • branches/blt4/gui/scripts/moleculeViewer.tcl

    r1719 r1897  
    700700}
    701701
    702 itcl::body Rappture::DeviceEditor::snap { w h } {
     702itcl::body Rappture::MoleculeViewer::snap { w h } {
    703703    if { $w <= 0 || $h <= 0 } {
    704704        set w [winfo width $itk_component(area)]
  • branches/blt4/gui/scripts/sidebarframe.tcl

    r1764 r1897  
    451451        release {
    452452            set minw [winfo reqwidth $itk_component(controlbar)]
    453             if { $_width != "auto" && ($_width-$minw) < 40} {
     453            if {$_width-$minw < 40} {
    454454                set _width "auto"
    455455                pop close
  • branches/blt4/gui/scripts/textentry.tcl

    r1862 r1897  
    231231        # take down any existing widget
    232232        foreach win [pack slaves $itk_interior] {
    233             pack forget $win
     233            if { [winfo name $win] != "hints" } {
     234                pack forget $win
     235            }
    234236        }
    235237
  • branches/blt4/gui/scripts/utils.tcl

    r1719 r1897  
    2323proc Rappture::utils::hexdump {args} {
    2424    Rappture::getopts args params {
    25         value -lines unlimited
     25        value -lines unlimited
    2626    }
    2727    if {[llength $args] != 1} {
    28         error "wrong # args: should be \"hexdump ?-lines num? data\""
     28        error "wrong # args: should be \"hexdump ?-lines num? data\""
    2929    }
    3030    set newval [lindex $args 0]
     
    3434
    3535    if {$params(-lines) != "unlimited" && $params(-lines) <= 0} {
    36         return $rval
     36        return $rval
    3737    }
    3838
     
    4040    set len [string length $newval]
    4141    for {set i 0} {$i < $len} {incr i 8} {
    42         append rval [format "%#06x: " $i]
    43         set ascii ""
    44         for {set j 0} {$j < 8} {incr j} {
    45             if {$i+$j < $len} {
    46                 set char [string index $newval [expr {$i+$j}]]
    47                 binary scan $char c ichar
    48                 set hexchar [format "%02x" [expr {0xff & $ichar}]]
    49             } else {
    50                 set char " "
    51                 set hexchar "  "
    52             }
    53             append rval "$hexchar "
    54             if {[regexp {[\000-\037\177-\377]} $char]} {
    55                 append ascii "."
    56             } else {
    57                 append ascii $char
    58             }
    59         }
    60         append rval " | $ascii\n"
     42        append rval [format "%#06x: " $i]
     43        set ascii ""
     44        for {set j 0} {$j < 8} {incr j} {
     45            if {$i+$j < $len} {
     46                set char [string index $newval [expr {$i+$j}]]
     47                binary scan $char c ichar
     48                set hexchar [format "%02x" [expr {0xff & $ichar}]]
     49            } else {
     50                set char " "
     51                set hexchar "  "
     52            }
     53            append rval "$hexchar "
     54            if {[regexp {[\000-\037\177-\377]} $char]} {
     55                append ascii "."
     56            } else {
     57                append ascii $char
     58            }
     59        }
     60        append rval " | $ascii\n"
    6161
    62         if {"unlimited" != $params(-lines) && $i/8+1 >= $params(-lines)} {
    63             if {$i < $len-1} {
    64                 append rval "more..."
    65             }
    66             break
    67         }
     62        if {"unlimited" != $params(-lines) && $i/8+1 >= $params(-lines)} {
     63            if {$i < $len-1} {
     64                append rval "more..."
     65            }
     66            break
     67        }
    6868    }
    6969    return $rval
     
    7878proc Rappture::utils::binsize {size} {
    7979    foreach {factor units} {
    80         1073741824 GB
    81         1048576 MB
    82         1024 kB
    83         1 bytes
     80        1073741824 GB
     81        1048576 MB
     82        1024 kB
     83        1 bytes
    8484    } {
    85         if {$size/$factor > 0} {
    86             if {$factor > 1} {
    87                 set size [format "%.1f" [expr {double($size)/$factor}]]
    88             }
    89             break
    90         }
     85        if {$size/$factor > 0} {
     86            if {$factor > 1} {
     87                set size [format "%.1f" [expr {double($size)/$factor}]]
     88            }
     89            break
     90        }
    9191    }
    9292    return "$size $units"
     
    127127    return $desc
    128128}
     129
     130# ----------------------------------------------------------------------
     131# USAGE: expandPath <path>
     132#
     133# Returns the true location of the provided path,
     134# automatically expanding links to form an absolute path.
     135# ----------------------------------------------------------------------
     136proc Rappture::utils::expandPath {args} {
     137    set path ""
     138    set dirs [file split [lindex $args 0]]
     139
     140    while {[llength $dirs] > 0} {
     141        set d [lindex $dirs 0]
     142        set dirs [lrange $dirs 1 end]
     143        if {[catch {file link [file join $path $d]} out] == 0} {
     144            # directory d is a link, follow it
     145            set outdirs [file split $out]
     146            if {[string compare "/" [lindex $outdirs 0]] == 0} {
     147                # directory leads back to root
     148                # clear path
     149                # reset dirs list
     150                set path ""
     151                set dirs $outdirs
     152            } else {
     153                # relative path for the link
     154                # prepend directory to dirs list
     155                set dirs [concat $outdirs $dirs]
     156            }
     157        } else {
     158            set path [file join $path $d]
     159        }
     160    }
     161    return $path
     162}
     163
  • branches/blt4/gui/scripts/xyresult.tcl

    r1804 r1897  
    279279        -brightness 0
    280280        -width 1
    281         -type "histogram"
     281        -type "line"
    282282        -raise 0
    283283        -linestyle solid
  • branches/blt4/lang/perl/Makefile.in

    r1148 r1897  
    2121CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
    2222LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
    23 CFLAGS          = @CFLAGS@
     23CFLAGS          = @CFLAGS@ -fPIC
    2424
    2525AR              = ar
  • branches/blt4/lang/tcl/src/Makefile.in

    r1643 r1897  
    2525CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
    2626LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
    27 CFLAGS          = @CFLAGS@
    28 TCL_VERSION     = @TCL_VERSION@
     27CFLAGS          = @CFLAGS@ -fPIC
     28TCL_VERSION     = @TCL_VERSION@
    2929TCL_LIB_SPEC    = @TCL_LIB_SPEC@
    3030
     
    3535  -I../../../src/core \
    3636  -I$(srcdir)/../../../src/core \
     37  -I$(srcdir)/../../../src/objects \
    3738  -I$(includedir)
    3839version         = @PACKAGE_VERSION@
     
    6869endif
    6970
     71FFMPEG          = @HAVE_FFMPEG_LIBS@
     72ifeq ($(FFMPEG),yes)
     73    OBJS += RpMediaPlayerTclInterface.o
     74    LIBS += -L../../../src/objects -lRpObjects
     75endif
     76
     77
    7078# Not using     RpLibraryTclInterface.o \
    7179
  • branches/blt4/lang/tcl/src/Rappture_Init.c

    r1578 r1897  
    1515
    1616#include <tcl.h>
     17#include "config.h"
    1718
    1819#ifdef BUILD_rappture
     
    3536extern Tcl_AppInitProc RpEncoding_Init;
    3637extern Tcl_AppInitProc RpUtils_Init;
     38
     39#ifdef BUILD_with_ffmpeg
     40extern Tcl_AppInitProc RpMediaPlayer_Init;
     41#endif
    3742
    3843#ifdef BUILD_Rappture
     
    6570        return TCL_ERROR;
    6671    }
     72#ifdef BUILD_with_ffmpeg
     73    if (RpMediaPlayer_Init(interp) != TCL_OK) {
     74        return TCL_ERROR;
     75    }
     76#endif
    6777    if (RpRlimit_Init(interp) != TCL_OK) {
    6878        return TCL_ERROR;
  • branches/blt4/src/core/Makefile.in

    r1780 r1897  
    2929CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
    3030LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
    31 CFLAGS          = @CFLAGS@
     31CFLAGS          = @CFLAGS@ -fPIC
    3232DX_LIB_SPEC     = @DX_LIB_SPEC@
    3333DX_INC_SPEC     = @DX_INC_SPEC@
     
    7979                rappture.h
    8080
     81LOCAL_HEADERS = \
     82                config.h
    8183
    8284SCEW_HEADERS    = \
     
    181183          $(INSTALL) -m 444  $(srcdir)/$$i $(incdir) ; \
    182184        done
     185        for i in $(LOCAL_HEADERS) ; do \
     186          $(INSTALL) -m 444  $$i $(incdir) ; \
     187        done
    183188
    184189.cc.o:
  • branches/blt4/src/core/RpSimpleBuffer.h

    r1560 r1897  
    749749
    750750/**
    751  * Read data from the buffer into a memory location provided by caller
     751 * Move the internal position tracker to the beginning of the buffer.
    752752 */
    753753template<class T>
  • branches/blt4/src/core/config.h.in

    r1548 r1897  
    11/* src/core/config.h.in.  Generated from configure.in by autoheader.  */
     2
     3/* Define if building universal (internal helper macro) */
     4#undef AC_APPLE_UNIVERSAL_BUILD
     5
     6/* Build rappture with ffmpeg widgets */
     7#undef BUILD_with_ffmpeg
    28
    39/* Define to 1 if you have the <algorithm> header file. */
     
    3137#undef HAVE_ERRNO_H
    3238
     39/* Define to 1 if you have the <ffmpeg/avcodec.h> header file. */
     40#undef HAVE_FFMPEG_AVCODEC_H
     41
     42/* Define to 1 if you have the <ffmpeg/avformat.h> header file. */
     43#undef HAVE_FFMPEG_AVFORMAT_H
     44
     45/* Define to 1 if you have the <ffmpeg/avutil.h> header file. */
     46#undef HAVE_FFMPEG_AVUTIL_H
     47
     48/* Define to 1 if you have the <ffmpeg/swscale.h> header file. */
     49#undef HAVE_FFMPEG_SWSCALE_H
     50
    3351/* Define to 1 if you have the <float.h> header file. */
    3452#undef HAVE_FLOAT_H
     
    3654/* Define to 1 if you have the <fstream> header file. */
    3755#undef HAVE_FSTREAM
     56
     57/* Define to 1 if you have the `img_convert' function. */
     58#undef HAVE_IMG_CONVERT
    3859
    3960/* Define to 1 if you have the <inttypes.h> header file. */
     
    4667#undef HAVE_ITERATOR
    4768
     69/* Define to 1 if you have the <libavcodec/avcodec.h> header file. */
     70#undef HAVE_LIBAVCODEC_AVCODEC_H
     71
     72/* Define to 1 if you have the <libavformat/avformat.h> header file. */
     73#undef HAVE_LIBAVFORMAT_AVFORMAT_H
     74
     75/* Define to 1 if you have the <libavutil/avutil.h> header file. */
     76#undef HAVE_LIBAVUTIL_AVUTIL_H
     77
    4878/* Define to 1 if you have the `m' library (-lm). */
    4979#undef HAVE_LIBM
     
    5181/* Define to 1 if you have the `stdc++' library (-lstdc++). */
    5282#undef HAVE_LIBSTDC__
     83
     84/* Define to 1 if you have the <libswscale/swscale.h> header file. */
     85#undef HAVE_LIBSWSCALE_SWSCALE_H
    5386
    5487/* Define to 1 if you have the <limits.h> header file. */
     
    91124#undef HAVE_STRING_H
    92125
     126/* Define to 1 if you have the `sws_scale' function. */
     127#undef HAVE_SWS_SCALE
     128
    93129/* Define to 1 if you have the `sysinfo' function. */
    94130#undef HAVE_SYSINFO
     
    121157#undef PACKAGE_TARNAME
    122158
     159/* Define to the home page for this package. */
     160#undef PACKAGE_URL
     161
    123162/* Define to the version of this package. */
    124163#undef PACKAGE_VERSION
     
    139178#undef STDC_HEADERS
    140179
    141 /* Define to 1 if your processor stores words with the most significant byte
    142    first (like Motorola and SPARC, unlike Intel and VAX). */
    143 #undef WORDS_BIGENDIAN
     180/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
     181   significant byte first (like Motorola and SPARC, unlike Intel). */
     182#if defined AC_APPLE_UNIVERSAL_BUILD
     183# if defined __BIG_ENDIAN__
     184#  define WORDS_BIGENDIAN 1
     185# endif
     186#else
     187# ifndef WORDS_BIGENDIAN
     188#  undef WORDS_BIGENDIAN
     189# endif
     190#endif
  • branches/blt4/src/core2/Makefile.in

    r1082 r1897  
    3737CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
    3838LIB_SEARCH_DIRS = -L../core @LIB_SEARCH_DIRS@
    39 CFLAGS          = @CFLAGS@
     39CFLAGS          = @CFLAGS@ -fPIC
    4040CPP             = @CPP@
    4141
  • branches/blt4/src/objects/Makefile.in

    r1581 r1897  
    2626CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
    2727LIB_SEARCH_DIRS = @LIB_SEARCH_DIRS@
    28 CFLAGS          = @CFLAGS@
     28CFLAGS          = @CFLAGS@ -fPIC
     29FFMPEG          = @HAVE_FFMPEG_LIBS@
    2930RM              = rm -f
    3031CC_SWITCHES = $(CFLAGS) $(INCLUDES) $(DEFINES) $(CFLAGS_DEBUG)
     
    3738                -I$(includedir)
    3839LIBS        = -L../core -lrappture
     40
    3941
    4042RANLIB      = @RANLIB@
     
    110112                RpObject.o
    111113
     114ifeq ($(FFMPEG),yes)
     115  # since ffmpeg libraries are available,
     116  # include them in compilation
     117  LIBS += -lavcodec -lavformat -lswscale
     118  HEADERS += RpMediaPlayer.h
     119  OBJS += RpMediaPlayer.o
     120endif
     121
    112122
    113123name        = RpObjects
  • branches/blt4/src/objects/RpObject.cc

    r1586 r1897  
    274274    }
    275275
    276     v = strchrnul(hint,'=');
     276    v = strchr(hint,'=');
    277277    *hintKey = hint;
    278     if ((*v == '\0') || (*(v+1) == '\0')) {
     278    if ((v == NULL) || (*v == '\0') || (*(v+1) == '\0')) {
    279279        // incomplete hint string
    280280        *hintVal = NULL;
Note: See TracChangeset for help on using the changeset viewer.