Mercurial > octave-nkf
diff run-octave.in @ 15137:16a6b0a6855d gui
GUI: support for octave arguments and integrate with run-octave.
* src/octave.h (octave_initialize_interpreter, octave_execute_interpreter):
New functions.
(octave_cmdline_argc, octave_cmdline_argv, octave_embedded): New variables.
* src/octave.cc (octave_cmdline_argc, octave_cmdline_argv, octave_embedded):
New variables.
(octave_initialize_interpreter, octave_execute_interpreter): New functions.
(octave_main): Rewrite using them.
* run-octave.in (octave_executable): New variable.
(-gui): New option flag.
* gui/src/octave-adapter/octave-main-thread.cc (octave_main_thread::run):
Use octave_execute_interpreter.
* gui/src/octave-gui.cc (dissociate_terminal): New function.
(main): Use it. Also use octave_initialize_interpreter.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 05 Aug 2012 16:15:58 -0400 |
parents | 4e9dc46d4125 |
children | bfc220d1de67 |
line wrap: on
line diff
--- a/run-octave.in Sun Aug 05 16:43:55 2012 -0400 +++ b/run-octave.in Sun Aug 05 16:15:58 2012 -0400 @@ -42,6 +42,8 @@ d2_path=`echo "$d2_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` d3_path=`echo "$d3_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` +octave_executable="$builddir/src/octave" + LOADPATH="$d1_path:$d2_path:$d3_path" IMAGEPATH="$top_srcdir/scripts/image" DOCFILE="$builddir/doc/interpreter/doc-cache" @@ -64,11 +66,14 @@ elif [ "x$1" = "x-strace" ]; then driver="strace -o octave.trace" shift + elif [ "x$1" = "x-gui" ]; then + octave_executable="$builddir/gui/src/octave-gui" + shift fi fi OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \ exec $builddir/libtool --mode=execute $driver \ - "$builddir/src/octave" --no-init-path --path="$LOADPATH" \ + "$octave_executable" --no-init-path --path="$LOADPATH" \ --image-path="$IMAGEPATH" --doc-cache-file="$DOCFILE" \ --texi-macros-file="$TEXIMACROSFILE" --info-file="$INFOFILE" "$@"