Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
15117:3735a0e783cb | 15137:16a6b0a6855d |
---|---|
40 | 40 |
41 d1_path=`echo "$d1_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` | 41 d1_path=`echo "$d1_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` |
42 d2_path=`echo "$d2_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` | 42 d2_path=`echo "$d2_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` |
43 d3_path=`echo "$d3_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` | 43 d3_path=`echo "$d3_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'` |
44 | 44 |
45 octave_executable="$builddir/src/octave" | |
46 | |
45 LOADPATH="$d1_path:$d2_path:$d3_path" | 47 LOADPATH="$d1_path:$d2_path:$d3_path" |
46 IMAGEPATH="$top_srcdir/scripts/image" | 48 IMAGEPATH="$top_srcdir/scripts/image" |
47 DOCFILE="$builddir/doc/interpreter/doc-cache" | 49 DOCFILE="$builddir/doc/interpreter/doc-cache" |
48 TEXIMACROSFILE="$top_srcdir/doc/interpreter/macros.texi" | 50 TEXIMACROSFILE="$top_srcdir/doc/interpreter/macros.texi" |
49 INFOFILE="$top_srcdir/doc/interpreter/octave.info" | 51 INFOFILE="$top_srcdir/doc/interpreter/octave.info" |
62 driver="valgrind --tool=memcheck" | 64 driver="valgrind --tool=memcheck" |
63 shift | 65 shift |
64 elif [ "x$1" = "x-strace" ]; then | 66 elif [ "x$1" = "x-strace" ]; then |
65 driver="strace -o octave.trace" | 67 driver="strace -o octave.trace" |
66 shift | 68 shift |
69 elif [ "x$1" = "x-gui" ]; then | |
70 octave_executable="$builddir/gui/src/octave-gui" | |
71 shift | |
67 fi | 72 fi |
68 fi | 73 fi |
69 | 74 |
70 OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \ | 75 OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \ |
71 exec $builddir/libtool --mode=execute $driver \ | 76 exec $builddir/libtool --mode=execute $driver \ |
72 "$builddir/src/octave" --no-init-path --path="$LOADPATH" \ | 77 "$octave_executable" --no-init-path --path="$LOADPATH" \ |
73 --image-path="$IMAGEPATH" --doc-cache-file="$DOCFILE" \ | 78 --image-path="$IMAGEPATH" --doc-cache-file="$DOCFILE" \ |
74 --texi-macros-file="$TEXIMACROSFILE" --info-file="$INFOFILE" "$@" | 79 --texi-macros-file="$TEXIMACROSFILE" --info-file="$INFOFILE" "$@" |