wiki:StartUp

Starting the tool

RefactorErl can be started either as a standalone or as an embedded application.

Standalone application

Normal mode

To start the tool, simply execute our startup script from the base directory of your RefactorErl copy:

(In Linux)

bin/referl

(In Windows)

bin/referl.bat

Note that if you do not specify the back-end to be used, the tool uses the mnesia-based database by default. If you would like to use another back-end, for example, the The Kyoto Cabinet based storage, you should start the tool like this:

bin/referl -db kcmini

Options

The following table details the possible startup options. You can get this list any time by using the -help option.

-build TARGET Build TARGET (e.g. tool, doc, clean)
-bufsrv Build bufferserver (use with '-build tool')
-igraph PATH Path to the Igraph lib directory (use with '-build tool')
-qt_gui Build Qt GUI (use with '-build tool')
-client Start in client mode (no server is started)
-db DB [mnesia|nif|kcmini] The database engine to use (default: mnesia)
-dir DIR Sets the RefactorErl data directory
-base PATH Path to the RefactorErl base directory
-pos POS [abs|rel] The positioning mode to use (default: abs)
-erl PATH Path to the Erlang executable to use
-g++ PATH Path of the g++ compiler to use
-synchronize Database synchronization
-help Print this help text
-server Start in server mode (no shell is started)
-sname NAME Short name of the Erlang node
-name NAME Full name of the Erlang node
-srvname NAME Name of the Erlang server node to connect
-client Start in client mode (no server is started)
-emacs Start as an Emacs client
-vim Start as a Vim client
-wx Start as a Wx client
-web Start with the web interface
-yaws_path PATH Path to the Yaws ebin directory (need /ebin at the end)
-yaws_name NAME Set Yaws server name
-yaws_port PORT Set Yaws port
-yaws_listen IP Set Yaws IP
-browser_root Set the file browser root directory
-restricted_mode Set restricted mode on the web interface or on a RefactorErl started as server

Configuration File

The same Options may be used in the user configuration file ${HOME}/.referlrc.
This can be useful when multiple long command line switches are required to start the bin/referel tool.
The tool first reads the specified switches from the ${HOME}/.referlrc and then applies the command line arguments, if any.
Please note, this feature is currently not available on Windows.

Example configuration file:

% User configuration file
% single entries are just plain strings like: nitrogen
% entries with user defined second argument are tuples eg.: {erl, path_to_erl}
%
% {erl,path_to_erl}
% {base,basedir}
% {name,instancename}
% {sname,servername}
% {srvname,yourservername}
% server
% emacs
% wx
% qt
% vim
% web
% {browser_root,browserroot}
% yaws
% {yaws_path,path}
% {yaws_name,name}
% {yaws_port,port}
% {yaws_listen,ipaddress}
% gcc
% g++
% build
% no_cpp
% bufsrv
% ericsson
% {igraph,path}
% yaws_189
% client
% synchronize
% {wrangler,path}
% dbtype = mnesia nif kcmini
% {db,dbtype}
% {dbmod,dbmod}
% {dir,referldir}
% {dbargs,dbargs}
% {pos,posi}
% qt_gui

Server mode

RefactorErl can be run as a server, you only have to specify a name with -name or -sname when starting the tool. If you do not need a command line access to the server, you can use the -server option, which starts the tool in server-only mode.

Client mode

If you already have a running RefactorErl instance (a running "server") started with -name or -sname, then you can connect to this server with a command line client and you can enter Erlang commands that will be executed on the server. To start a client, use the -client option and specify the name of the server (the name you have used in -name or -sname while starting the server) with the -srvname option.

Embedded application

User interfaces like Emacs are capable of starting their embedded instance of RefactorErl. For further information visit the pages of various interfaces.

Last modified 14 months ago Last modified on Oct 10, 2023, 11:39:04 PM