1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
3 xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml"
4 xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
5 xmlns:scilab="http://www.scilab.org" xml:id="scilab" xml:lang="pt">
6 <refnamediv xml:id="wscilex">
8 <refnamediv xml:id="scilex">
11 <refname>scilex | scilab</refname>
12 <refpurpose>principal script para executar o Scilab e ferramentas de miscelânea
16 <title>Sqeüência de Chamamento</title>
18 # MS Windows | # Linux / Unix / Mac OS X
19 wscilex <Options> | scilab <Options>
20 wscilex -nw <Options> | scilab-adv-cli <Options>
21 scilex <Options> | scilab-cli <Options>
24 <refsection role="arguments">
25 <title>Parâmetros</title>
28 <term>-args arg#1 arg#2 ..</term>
31 This option allows to send some data to the Scilab session:
33 <listitem>Consecutive data are separated by one or several spaces.
35 <listitem>An expression between double-quotes is a single data.
37 <listitem>To include a double-quote in a data, write <literal>\"</literal> instead of <literal>"</literal>.
39 <listitem>The single quote <literal>'</literal> is a regular character. It has no special meaning.
44 Inside the opened session, these data can be retrieved as separated strings with <link linkend="sciargs">sciargs()</link>.
48 <screen><![CDATA[C:\Users\Me> scilex -nb -args "Hello \"%USERNAME%\"" 1.2345 \"%cd%\"]]></screen>
49 <programlisting><![CDATA[
50 // Inside the opened session:
55 "This session has been launched from " + a(i+3)
59 --> // Inside the opened session:
62 !c:\SCIdir\bin\scilex -nw -nb -noatomsautoload -args Hello "John" 1.2345 "C:\Users\Me" !
64 --> i = find(a=="-args")
76 --> "This session has been launched from " + a(i+3)
78 This session has been launched from "C:\Users\Me"
84 <note>Using <literal>-args</literal> as the <emphasis role="italic">last</emphasis> command line option is safer.
90 <term>-display Display</term>
92 <para>Para uso apenas em sistemas Xwindow para ajustar um display de
93 servidor X. O display padrão é unix:0.0
96 <literal>-display</literal> pode ser abreviado por
102 <term>-e Instructions</term>
105 No final de toda a sessão de inicialização, esta opção
108 <para>Define o diretório de trabalho atual para o diretório shell do qual o Scilab foi lançado. Por favor veja o exemplo dado aqui-abaixo para a opção <literal> -f </literal>. Então,
112 <para>executa dado Scilab <literal>Instructions</literal>. Exemplo :
113 <screen><![CDATA[ scilab-cli -e "disp(\"Hello\"); a=%pi+%i; disp(exp(a)); exit;" -nb]]></screen>
119 As opções <literal>-e</literal> e <literal>-f</literal> são mutuamente exclusivas.
127 If this option is used, then at the beginning of the Scilab session, after the execution of the scilab and user startup files, and after the setting of user Preferences -- including the working directory ones --,
131 the current Scilab working directory is set to the shell directory from which Scilab has been launched. For instance,
132 <screen><![CDATA[ D:\users\me\scilab\dev> C:\scilab-5.5.2\bin\scilex -f ..\test.sce]]></screen>
133 will do a <literal>cd("D:\users\me\scilab\dev")</literal>.
138 the Scilab script <literal>file</literal> is executed. If a relative path is used (default <literal>.\</literal>, or like <literal>..\</literal> in the sample here-above), it refers to the new Scilab working directory.
144 A file with .xcos extension will be opened by Xcos.
151 <para>This option forces scilab to always exit after the instruction(s) passed with the <literal>-e</literal>
152 option, or the script referred to by the <literal>-f</literal> option, have been executed,
153 even in case of a runtime error. This option should always be used in batch mode.
154 It is ignored if neither <literal>-e</literal> nor <literal>-f</literal> options are present.
159 <term>-l idioma</term>
161 <para>Se esta opção estiver presente, ela fica o idioma do usuário.
162 Os possíveis valores para <literal>idioma</literal> são
163 <literal>'fr'</literal> para francês, <literal>'en'</literal> para
164 inglês e 'br' para português brasileiro. O idioma padrão é inglês. O
165 valor padrão é fixado no arquivo
166 <literal>scilab.start</literal>.
173 <para>"no banner" : Se esta opção está presente, então o cartão de boas-vindas não é impresso.
180 <para>"No Startup files" : Se esta opção está presente, o arquivo de inicialização
181 <literal>SCI/etc/scilab.start</literal> e os arquivos de
182 inicialização do usuário <literal>SCIHOME/.scilab</literal>,
183 <literal>SCIHOME/scilab.ini</literal> não são executados.
188 <term>-nouserstartup</term>
190 <para>Se esta opção estiver presente, os arquivos de inicialização
191 do usuário <literal>SCIHOME/.scilab</literal>,
192 <literal>SCIHOME/scilab.ini</literal> não são executados.
199 <para>Se esta opção estiver presente, então o Scilab não é executado
200 em uma janela específica.
205 <term>-nwni / -nogui</term>
208 This mode prevents loading the Java Virtual Machine.
209 It starts faster and uses less memory.
211 <para>Se esta opção estiver presente, então o Scilab não é executado
212 em uma janela específica e não aceita interação do usuário
213 (graphics, export, xcos, scinotes, help browser, Java module,...).
218 <term>--texmacs</term>
220 <para>Esta opção é reservada para TexMacs.</para>
224 <term>-version</term>
226 <para>Esta opção imprime a versão do Scilab.</para>
231 <refsection role="arguments">
232 <title>Additional options for Unix/Linux and Mac OS X</title>
233 <para>Advice: use theses options on a Scilab source tree.</para>
238 <para>Inicia o Scilab no debugger gdb.</para>
240 The variable <literal>SCILAB_GDB_OPT</literal> may be set to add custom options to gdb.
245 <term>-debug-kdbg</term>
247 <para>Start Scilab under kdbg.</para>
251 <term>-profiling</term>
253 <para>Start Scilab under valgrind.</para>
254 <para>The variable SCILAB_VALGRIND_OPT may be set to add custom options
255 to valgrind (and override the existing valgrind options).
260 <term>-profiling-visu</term>
262 <para>Start Scilab under callgrind.</para>
263 <para>The variable SCILAB_VALGRIND_OPT may be set to add custom options
264 to callgrind (and override the existing callgrind options).
269 <term>-electric-fence</term>
271 <para>Start Scilab with the Electric Fence.</para>
276 <refsection role="description">
277 <title>Environment variables</title>
280 <term>SCIVERBOSE</term>
283 If this variable is present, Scilab startup script will show a startup debug information.
284 Mainly used for bug report and debugging purposes.
289 <term>JAVA_HOME</term>
292 Specify which Java to use. For example,
293 <literal>JAVA_HOME=/usr/lib/jvm/java-7-openjdk/ scilab</literal> will start Scilab with Java 7.
298 <term>SCI_DISABLE_TK</term>
300 <para>Disable Tk (but not Tcl) features.</para>
304 <term>SCI_JAVA_ENABLE_HEADLESS</term>
307 Enable Java Headless VM (i.e. without GUI features).
313 <refsection role="description">
314 <title>Java Virtual Machine options</title>
316 The options described here-below are useless and are cancelled if the option <literal>-nwni</literal> is used.
318 <para>Starting from Scilab 5.0, the graphical user interface (GUI) and the
319 build documentation are based on Java features. In some cases, it can be
320 important to edit the JVM options (Java Virtual Machine).
322 <para>These options are available in the
323 <emphasis>jvm_options.xml</emphasis> file.
325 <para>In version 5.0.X and 5.1.X, this file is stored as
326 <emphasis>SCI/modules/jvm/etc/jvm_options.xml</emphasis>.
328 <para>In version >= 5.2.0, the file is available in
329 <emphasis>etc/jvm_options.xml</emphasis>.
333 By default, the three following options are
334 easily accessible in the configuration file:
339 <term>-XmxXXXm</term>
341 <para>This option set the amount of memory available by the Java
342 Virtual Machine. By default, 256M are allocated. If you change this
343 value, check that the value does not exceed the memory available on
346 <para>Since Scilab 5.4.0, this value can be changed in the preferences menu.</para>
350 <term>-Djava.compiler=JIT</term>
353 This option with the argument <emphasis>JIT</emphasis> enables
354 the Java Just In Time compiler. It is activated by default.
355 <emphasis>NONE</emphasis> disables the JIT and decreases
356 dramatically performances.
361 <term>-verbose:jni / -Xcheck:jni</term>
363 <para>These options enable more checks and output from the JNI
364 calls. These options are useful in case of debugging and are
365 disabled by default since they decreases performances.
370 <para>Many more options are available. They can improve the performances,
371 change look and feel, change memory managements... See: <ulink url="http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html">http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html</ulink>.
374 <refsection role="examples">
375 <title>Exemplos</title>
377 # Let's start Scilab in profiling mode without attaching a gdb once a SIGSEGV is met.
378 # We are under Bash shell
379 export SCILAB_VALGRIND_OPT="--db-attach=no --log-file=myfile.txt"
382 # Let's start Scilab in debug mode without stopping after each SIGSEGV
383 # First, we write a small command file
384 echo "handle SIGSEGV nostop" &> debug.txt
385 # Now set the custom option
386 # We are under Bash shell
387 export SCILAB_GDB_OPT="--command=debug.txt"
388 # Start Scilab in debug mode
389 scilab -debug ]]></screen>
392 # Under GNU/Linux, Mac OS X or Unix:
393 $ echo "disp(%pi)"|scilab-cli
395 $ echo "disp(%pi)"|scilab -nwni
397 # Only open the Scilab help window:
398 $ scilab-adv-cli -e "help()"
400 $ scilab -nw -e "help()"
403 # Scilab can be used for scripting aspects:
404 echo "if 1<>2 then exit(99) end"|scilab-cli
407 <refsection role="see also">
408 <title>Ver também</title>
409 <simplelist type="inline">
411 <link linkend="startup">startup</link>
414 <link linkend="sciargs">sciargs</link>
417 <link linkend="getpid">getpid</link>
420 <link linkend="getenv">getenv</link>
423 <link linkend="getenv">getversion</link>
426 <link linkend="consolebox">consolebox</link>
429 <link linkend="exit">exit</link>
433 <refsection role="history">
434 <title>Histórico</title>
437 <revnumber>5.4.0</revnumber>
438 <revremark>-noatomsautoload added.</revremark>
441 <revnumber>5.4.1</revnumber>
442 <revremark>scinotes and xcos individual scripts introduced. See SEP #87.</revremark>
445 <revnumber>6.0.0</revnumber>
447 <literal>-quit</literal> option added. <literal>-mem</literal> option removed.