wiki:Install

Version 3 (modified by manualwiki, 13 years ago) (diff)

typo fixed

Installing RefactorErl?

...

Required software

The following list contains all requierements for RefactorErl? that are used by one or more features. If a listed program depends on further ones, then they are not listed but we suppos that they are installed with the standard (default) way.

Base system

  • Erlang R14B04 or higher (currently WebInterface does not work with any higher version)
  • GCC 4.2 or higher
  • graphviz (TODO) (graph drawing, dependency visualization)

WebInterface

  • Yaws 1.89
  • Web browser (Mozilla Firefox 3.6 or higher, Google Chrome)

EmacsInterface

  • Emacs 23.3 or higher with erlang-mode and widget

EclipseInterface

  • Eclipse (TODO)

VimInterface

  • Vim 7.2 or higher

...

Local install instructions on Linux

You can install RefactorErl? on a system where you have no admin right. Follow the instructions below.

You need some packages installed by the admin, but they can be found in almost all Linux system. These are:

  • gcc >= 4.5
  • make
  • tar
  • bash
  • openssl (for yaws)
  • ncurses
  • (optional) wx

I will assume that you would like to install the tool into a local "root" directory. You should modify the next route to your one: E.g.: /home/olikas/local

export REFERL_ROOT=/path/to/localroot

The local "ghost" user will be 'referl' by default. Feel free to modify it.

export REFERL_GHOST_USER=referl

Run the next script to initialize the directory layout.

cd ~
mkdir $REFERL_ROOT
cd $REFERL_ROOT
mkdir home
cd home
mkdir $REFERL_GHOST_USER

To install Erlang

cd $REFERL_ROOT/$REFERL_GHOST_USER
wget www.erlang.org/download/otp_src_R14B04.tar.gz
tar xvvf otp_src_R14B04.tar.gz
cd otp_src_R14B04
./configure --prefix=$REFERL_ROOT
make
make install
cd ..
rm otp_src_R14B04.tar.gz

To install RefactorErl?:

cd $REFERL_ROOT/$REFERL_GHOST_USER
wget http://plc.inf.elte.hu/erlang/dl/refactorerl-0.9.12.01.tar.gz
tar xvvf refactorerl-0.9.12.01.tar.gz
cd refactorerl-0.9.12.01
bin/referl -erl $REFERL_ROOT/bin/erl -build tool
cd ..
rm refactorerl-0.9.12.01.tar.gz

Now you can start the tool:

cd $REFERL_ROOT/$REFERL_GHOST_USER/refactorerl-.9.12.01
bin/referl -erl $REFERL_ROOT/bin/erl

If you want to use the web based interface of the tool you have to install the proper version (1.89) of Yaws.

cd $REFERL_ROOT/$REFERL_GHOST_USER
wget http://yaws.hyber.org/download/yaws-1.89.tar.gz
tar xvvf yaws-1.89.tar.gz
cd yaws
export ERL=$REFERL_ROOT/bin/erl
export ERLC=$REFERL_ROOT/bin/erlc
./configure --prefix=$REFERL_ROOT --localstatedir=$REFERL_ROOT/var --sysconfdir=$REFERL_ROOT/etc
make
make install
cd ..
rm yaws-1.89.tar.gz

To run the tool execute the following commands. Remember to substitute your path to 'yaws_path' part. Do not forget to change the path to yours.

cd $REFERL_ROOT/$REFERL_GHOST_USER/refactorerl-.9.12.01
bin/referl -erl $REFERL_ROOT/bin/erl -db nif
ri:start_nitrogen([{yaws_path, "/path/to/localroot/lib/yaws/ebin/"}]).