forked from dlech/robertalab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathora-help.txt
60 lines (50 loc) · 5.22 KB
/
ora-help.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
General Remarks For Using OpenRoberta From The Command Line.
The OpenRoberta sources are contained in a git repository. First generate the software artifacts by calling
'mvn clean install' from the directory 'OpenRobertaParent' (this is the mvn parent project of OpenRoberta).
Top level in the git repository is a script 'ora.sh' to be used from the command line to configure the OpenRoberta application.
Remark about the database:
The database may be run in 'embedded' mode,
- the DATABASEURL is "jdbc:hsqldb:file:<some-basedir>/db-<serverversion>/openroberta-db;ifexists=true"
- the database is locked by the process accessing the database. Thus no concurrent access (with a sql client) is possible.
The database may be run in 'server' mode,
- the DATABASEURL is "jdbc:hsqldb:hsql://localhost/openroberta-db"
- you can get access to the database used by the server concurrently with a sql client, for instance. Be careful and ...
- better set autocommit to off and DON'T terminate the database server with SHUTDOWN erroneously
- DON'T block the server (e.g. by issuing an insert/update without committing immediately afterwards)
Commands of the ora.sh script:
--help get help (this text)
--export INSTALLATION-DIR [gzip] create a self-contained installation. The installation dir must NOT exist. Parameter 'gzip' compresses in directory
staticResources suitable files (as *.js, *.css, etc.) to save bandwith when staticResources are loaded.
You are responsible to copy a usable database into directory 'db-<serverVersion>'.
In the INSTALLATION-DIR there are two scripts for starting OpenRoberta:
- start-ora-server-with-db-embedded.sh uses an embedded hsqldb. For small systems (Raspberry Pi, for instance).
- start-ora-server-and-db-server.sh starts database and a server process. For large systems (the official release, e.g.)
Both scripts detect any database from an earlier versions and upgrade them to the actual version. if NO database at all is found,
an empty database will be created.
Further scripts in the INSTALLATION-DIR (ONLY USABLE IN SERVER MODE!):
- dbBackup.sh to backup the database as tgz into directory backup
- dbShutdown.sh shutdown the database and terminate the VM running the database server
- start-sql-client.sh start a SQL client (embedded mode works, if the database is not blocked)
--createEmptydb [{VERSION}] create an empty database with all tables initialized as needed at path "OpenRobertaServer/db-VERSION". If the optional
parameter VERSION is missing, the VERSION is retrieved by calling the server. In this case, "mvn install" must have run before
- if the database exists, it is not recreated
- if a table "PROGRAM" is found, it is assumed, that the setup has already been done and nothing happens.
--start-from-git [-rdbg] if a developer wants to start the server from a Git working tree in embedded mode (that is fine for test), use this command.
Note, that running the server from an IDE as eclipse is PREFERRED. You need a valid database. Command '--createEmptydb' creates it.
if '-rdbg' is found, a remote debug session (e.g. from an IDE as Eclipse) can be attached to the server (on port 8000).
Note: if you change a static resource using an IDE or editor, the browser has got your changes after a reload ("live update").
--gui-sql-client [{VERSION}] start a sql client from a Git working tree in embedded mode using the actual db version or the (optional) VERSION.
This command fails if an openroberta server is running in embedded mode. You have to terminate the server to get access.
The database URL is assumed to be "jdbc:hsqldb:file:OpenRobertaServer/db-<VERSION>/openroberta-db;ifexists=true"
The following commands are used rarely:
--java check whether java and javac are on the path and the JDK version is ok (used internally)
--alive {SERVERURL} {-q} {EVERY} {TIMEOUT} {MAIL} check after EVERY sec (default: 60) if the server is alive.
The server is assumed to have crashed, if it does not answer within TIMEOUT sec (default: 10).
If the server is assumed to have crashed, send a mail by calling the script MAIL (default: NO)
-q is the quiet mode: report crashes only
a usefull call, reporting to stdout, is e.g. ora.sh --alive localhost:1999 60 10
--update-lejos {SERVERURL} {LEJOSVERSION} update an ev3 robot running the lejos os. Its ip-address is expected in lejosipaddr.
If a password is requested: it is "", thus simply hit 'return'
- scp the ev3menu.jar, which replaces the original lejos menu
- scp openroberta specific libraries needed by the user programs at runtime
- create a file on the lejos based robot with the address of the server