Build FieldWorks

From LSDevLinux
Revision as of 15:03, 15 May 2009 by Mayhewn (talk | contribs) (pure-swf Branch Instructions: Wrap svn URLs in <nowiki> tags)

Jump to: navigation, search

These are instructions to build the currently-working parts of FieldWorks on Linux.

Check out from VCS

Make a working directory somewhere on your system and cd to it. Check out the FieldWorks and COM repositories into this directory using these commands:

$ svn co http://linux.lsdev.sil.org/svn/FieldWorks/trunk/FieldWorks
$ svn co http://linux.lsdev.sil.org/svn/COM/trunk/{COM,Win32Base,Win32More}

If you structure it differently than the above, you will need to modify the build configuration.

Unless specified otherwise, all following commands are to be executed from the FieldWorks directory that was checked out above. To go there now, immediately after executing the commands above:

$ cd FieldWorks

Install and build build dependencies

Install build dependency packages

In Ubuntu or Debian, install these dependencies:

$ sudo apt-get install build-essential tofrodos unixodbc-dev libgtkmm-2.4-dev \
  uuid-dev libmagick++9-dev mono-1.0-devel libmono-winforms1.0-cil \
  libgraphite-dev mono-gmcs libmono-winforms2.0-cil firebird2.0-dev \
  g++ automake mono-2.0-devel gawk libtool gtk-sharp2 libmono-cairo2.0-cil \
  libenchant-dev subversion xutils-dev libmono-dev

Automake 1.10 works. You may also need a Java runtime installed, e.g. openjdk-6-jre

Also if running Intrepid there is bug in the firebird package that creates an incorrect link. To fix this, sudo ln -sf libfbclient.so.2 /usr/lib/libfbclient.so

Currently, you need a very recent version of mono (2.5 or later) to be able to run FieldWorks. If your distro doesn't have this you will need to obtain a specially-built package or build mono from source.

Set up our customized ICU

$ pushd Lib/src/icu/source
$ mkdir -p build$(uname -m) && cd build$(uname -m)
$ ../configure --prefix="$(cd ../..&&pwd)/install$(uname -m)" && make && make install
$ popd

Create a user-specific configuration file

$ cp -p Bld/_user.mak.lnx{.example,}

Then edit the resulting Bld/_user.mak.lnx to specify any system-specific build information you may have. However, this is not usually necessary.

Build

Optionally clean everything out

$ make tools-clean clean

Build everything

$ make tools all

Later update from VCS

$ svn up . ../COM ../Win32{Base,More}

Edit code

Open FieldWorks.mds in MonoDevelop to open the FieldWorks solution.

Run WorldPad

$ make -C Src/WorldPadGTK run

To start WorldPad in the gdb debugger:

$ make -C Src/WorldPadGTK run MONO='gdb --args mono'

pure-swf Branch Instructions

To work with the pure-swf branch, check out FieldWorks by typing

$ svn co http://linux.lsdev.sil.org/svn/FieldWorks/branches/pure-swf/FieldWorks

or switch an existing FieldWorks directory using:

$ svn switch http://linux.lsdev.sil.org/svn/FieldWorks/branches/pure-swf/FieldWorks

Then build using

$ make Unit++-package TE

Building Unit++-package only has to be done the first time.

Before running TE for the first time, run

$ make setup

Edit the resulting environ file and modify the line

DATABASE_SERVER=""

to contain the IP or name of a remote Windows machine running a FieldWorks SQL database.

Run Translation Editor using

$ make TE-run