Running Wandora

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
(Execution rights in Linux and MacOS)
(Wandora's shell scripts)
 
(10 intermediate revisions by one user not shown)
Line 14: Line 14:
 
* '''SetR''' contains all required settings for R language environment. You should not execute this script directly. If you want to use R environment with the Wandora application, you should check the settings in the SetR.
 
* '''SetR''' contains all required settings for R language environment. You should not execute this script directly. If you want to use R environment with the Wandora application, you should check the settings in the SetR.
 
* '''SetProcessing''' contains all required settings for Processing integration. You should not execute this script directly. If you want to use Processing in the Wandora application, you should check the settings in the SetProcessing.
 
* '''SetProcessing''' contains all required settings for Processing integration. You should not execute this script directly. If you want to use Processing in the Wandora application, you should check the settings in the SetProcessing.
 +
* '''SetTesseract''' is used to initialize all settings of the Tesseract OCR engine. You should not execute this script directly. Check the settings in the file if you are using the Tesseract OCR engine.
 
* '''Wandora''' sets JRE's memory to 1G and runs Wandora. This is the default script used to start Wandora application. Also, it executes all helper scripts described above.
 
* '''Wandora''' sets JRE's memory to 1G and runs Wandora. This is the default script used to start Wandora application. Also, it executes all helper scripts described above.
* '''Wandora-mini''' sets JRE's memory to 256M and runs Wandora. This script is handy in environments with a minimal memory footprint.
+
* '''Wandora-4g''' sets JRE's memory to 3G and runs Wandora. Script is targeted to 64 bit operating systems with a memory size of 4G at least.
* '''Wandora-huge''' sets JRE's memory to 1.4G and runs Wandora.
+
* '''Wandora-8g''' sets JRE's memory to 7G and runs Wandora. Script is targeted to 64 bit operating systems with a memory size of 8G at least.
* '''Wandora-4g''' sets JRE's memory to 3G and runs Wandora. Script is targeted to 64 bit operating systems with a memory size of at least 4G.
+
* '''Wandora-16g''' sets JRE's memory to 12G and runs Wandora. Script is targeted to 64 bit operating systems with a memory size of 16G at least.
* '''Wandora-8g''' sets JRE's memory to 7G and runs Wandora. Script is targeted to 64 bit operating systems with a memory size of at least 8G.
+
* '''Wandora-16g''' sets JRE's memory to 12G and runs Wandora. Script is targeted to 64 bit operating systems with a memory size of at least 16G.
+
  
If your operating system is not Windows or Linux or Unix you may need to customize scripts before successful execution of Wandora is possible.
+
If your operating system is not Windows or Linux or Unix you may need to customize scripts before successful execution of Wandora is possible.  See also [[Tuning Wandora for Mac OS]] if your operating system is OSX.
  
 
Running a shell script with memory settings beyond your physical memory ends up the Java refusing to start the application. You should always use a script with memory settings lower than your physical memory.
 
Running a shell script with memory settings beyond your physical memory ends up the Java refusing to start the application. You should always use a script with memory settings lower than your physical memory.
Line 36: Line 35:
 
  ./Wandora.sh
 
  ./Wandora.sh
  
Notice, your current directory must be '''bin'''. If you are a Mac OS user, please read also chapter '''Tuning Wandora for Mac OS''' below.
+
Notice, your current directory must be '''bin'''. If you are a Mac OS user, please read also chapter [[Tuning Wandora for Mac OS]].
  
 
== Command parameters ==
 
== Command parameters ==
Line 56: Line 55:
 
   java -classpath %WANDORACLASSES% org.wandora.application.Wandora
 
   java -classpath %WANDORACLASSES% org.wandora.application.Wandora
  
contains no path prefix. Command refers to the first Java version found in your computer system. Sometimes, when you have multiple Java virtual machine installations, the command may refer to older (than 6) Java version. This causes the Wandora execution to fail. To check which Java runtime environment the command refers you may use command
+
contains no path prefix. Command refers to the first Java version found in your computer system. Sometimes, when you have multiple Java virtual machine installations, the command may refer to older Java version. This causes the Wandora execution to fail. To check which Java runtime environment the command refers you may use command
  
 
   java -version
 
   java -version
  
If Java refers to older version, you should tweak general path settings of your computer or adjust Wandora's startup scripts. You could add absolute path for the Java 6 in front of Java command, for example.
+
If Java refers to older version, you should tweak general path settings of your computer or adjust Wandora's startup scripts. You could add absolute path for the Java 8 in front of the Java command, for example.
 
+
 
+
== Tuning Wandora for Mac OS ==
+
 
+
To make Wandora runnable in MAC OS with a double mouse click, rename startup script '''Wandora.sh''' to '''Wandora.command''' as shown below.
+
 
+
[[File:wandora_mac_01.png|center]]
+
 
+
Then edit the startup script and add line
+
 
+
cd $(dirname "$0")
+
 
+
before source commands. Add command selects the script folder as current directory. If you want to place the startup script outside Wandora's '''bin''' folder, add line
+
 
+
cd /Users/akivela/Desktop/wandora/bin/
+
 
+
to the script instead. Here the absolute path '''/Users/akivela/Desktop/wandora/bin/''' should address the bin folder of '''your''' Wandora installation. Next screen capture views the '''Wandora.command''' in default text editor after changes.
+
 
+
[[File:wandora_mac_02.png|center]]
+
 
+
Now you should be able to run Wandora application by double clicking the '''Wandora.command'''.
+
 
+
Next you, as the Mac OS user, might want to change the icon of '''Wandora.command'''. Select the icon, and choose menu option '''Get Info'''. Mac OS opens an info window as viewed below.
+
 
+
[[File:wandora_mac_03.png|center]]
+
 
+
Notice the icon viewed top-left of the window. Download Wandora's Mac OS icons here (TODO). After you have extracted the icon file, you can drag and drop it to the info window, over the default script file icon, and Mac OS changes the icon of '''Wandora.command''' startup script.
+
 
+
[[File:wandora_mac_04.png|center]]
+
 
+
Now you can close the info window.
+
 
+
[[File:wandora_mac_05.png|center]]
+
 
+
And double click the icon to run Wandora.
+
 
+
[[File:wandora_mac_06.png|center]]
+
  
  
 
__NOTOC__
 
__NOTOC__

Latest revision as of 15:26, 10 May 2016

This chapter expects that you have already successfully installed Wandora. Ready to run Wandora application. First, check system requirements. If your system is suitable for Wandora, browse shell scripts in bin directory and choose the script for your memory footprint.

To get your hands dirty you might want to try example projects found in samples folder. If you are not familiar with the Wandora I suggest you take a look at the Quickstart. Wandora documentation is here.


Wandora folder v2.gif


[edit] Wandora's shell scripts

Wandora startup scripts locate in bin directory. By default the bin contains several bat and sh scripts. Bat scripts are for Windows based operating systems while sh scripts are used in Linux and Unix type platforms.

  • SetClasspath contains all classpath settings of Wandora. You should not execute this script directly.
  • SetR contains all required settings for R language environment. You should not execute this script directly. If you want to use R environment with the Wandora application, you should check the settings in the SetR.
  • SetProcessing contains all required settings for Processing integration. You should not execute this script directly. If you want to use Processing in the Wandora application, you should check the settings in the SetProcessing.
  • SetTesseract is used to initialize all settings of the Tesseract OCR engine. You should not execute this script directly. Check the settings in the file if you are using the Tesseract OCR engine.
  • Wandora sets JRE's memory to 1G and runs Wandora. This is the default script used to start Wandora application. Also, it executes all helper scripts described above.
  • Wandora-4g sets JRE's memory to 3G and runs Wandora. Script is targeted to 64 bit operating systems with a memory size of 4G at least.
  • Wandora-8g sets JRE's memory to 7G and runs Wandora. Script is targeted to 64 bit operating systems with a memory size of 8G at least.
  • Wandora-16g sets JRE's memory to 12G and runs Wandora. Script is targeted to 64 bit operating systems with a memory size of 16G at least.

If your operating system is not Windows or Linux or Unix you may need to customize scripts before successful execution of Wandora is possible. See also Tuning Wandora for Mac OS if your operating system is OSX.

Running a shell script with memory settings beyond your physical memory ends up the Java refusing to start the application. You should always use a script with memory settings lower than your physical memory.

[edit] Execution rights in Linux and MacOS

We are developing Wandora in Windows. As a consequence shell scripts used to run Wandora application may have invalid execution rights. To make Wandora's shell script runnable in Linux you have to change it's execution rights with a command:

chmod a+x Wandora.sh

Then you can execute the script with commands

cd ./bin
./Wandora.sh

Notice, your current directory must be bin. If you are a Mac OS user, please read also chapter Tuning Wandora for Mac OS.

[edit] Command parameters

Wandora eventually runs with Java command

 java -classpath %WANDORACLASSES% org.wandora.application.Wandora

where %WANDORACLASSES% (or $WANDORACLASSES) is a shell variable defining all class paths for Wandora. Java class org.wandora.application.Wandora builds the main frame of the application. It also supports command parameters. You may attach XTM, LTM, RDF, N3 or WPR (Wandora project file) document name as a command parameter to the run command to load the document at startup. For example

 java -classpath %WANDORACLASSES% org.wandora.application.Wandora my_topicmap.xtm

imports XTM document my_topicmap.xtm to Wandora at startup.

[edit] Multiple JREs

Notice the used Java command

 java -classpath %WANDORACLASSES% org.wandora.application.Wandora

contains no path prefix. Command refers to the first Java version found in your computer system. Sometimes, when you have multiple Java virtual machine installations, the command may refer to older Java version. This causes the Wandora execution to fail. To check which Java runtime environment the command refers you may use command

 java -version

If Java refers to older version, you should tweak general path settings of your computer or adjust Wandora's startup scripts. You could add absolute path for the Java 8 in front of the Java command, for example.


Personal tools