Difference between revisions of "Build FieldWorks"

From LSDevLinux
Jump to: navigation, search
(Clean up by assuming everything is done from the FieldWorks dir)
Line 3: Line 3:
 
__TOC__
 
__TOC__
 
==Check out from VCS==
 
==Check out from VCS==
Check out the FieldWorks and COM repositories into a <code>repo</code> directory using these commands:
+
Make a working directory somewhere on your system and cd to it.
$ mkdir .../repo && cd .../repo
+
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/FieldWorks/trunk/FieldWorks
 
  $ svn co http://linux.lsdev.sil.org/svn/COM/trunk/{COM,Win32Base,Win32More}
 
  $ 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.
 
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.
  
 
==Install and build build dependencies==
 
==Install and build build dependencies==
 
===Install build dependency packages===
 
===Install build dependency packages===
In Ubuntu Intrepid (or Hardy), install these dependencies:
+
In Ubuntu or Debian, install these dependencies:
 
  $ sudo apt-get install build-essential tofrodos unixodbc-dev libgtkmm-2.4-dev \
 
  $ 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 \
 
   uuid-dev libmagick++9-dev mono-1.0-devel libmono-winforms1.0-cil \
Line 22: Line 25:
  
 
Also if running Intrepid there is bug in the firebird package that creates an incorrect link.
 
Also if running Intrepid there is bug in the firebird package that creates an incorrect link.
To fix this go to /usr/lib and run  $ sudo ln -sf libfbclient.so.2.1.0 libfbclient.so
+
To fix this, <code>sudo ln -sf libfbclient.so.2 /usr/lib/libfbclient.so</code>
 
 
  
 
You will need to update mono if using mono version 1 with the appropriate packages from:
 
You will need to update mono if using mono version 1 with the appropriate packages from:
Line 29: Line 31:
  
 
===Set up our customized ICU===
 
===Set up our customized ICU===
  $ cd .../repo/FieldWorks/Lib/src/icu/source
+
  $ pushd Lib/src/icu/source
$ ./configure --prefix="$(cd ..&&pwd)/install" && make && make install
 
 
 
To use an architecture specific path instead, you can do:
 
$ cd .../repo/FieldWorks/Lib/src/icu/source
 
 
  $ mkdir -p build$(uname -m) && cd build$(uname -m)
 
  $ mkdir -p build$(uname -m) && cd build$(uname -m)
 
  $ ../configure --prefix="$(cd ../..&&pwd)/install$(uname -m)" && make && make install
 
  $ ../configure --prefix="$(cd ../..&&pwd)/install$(uname -m)" && make && make install
 +
$ popd
  
 
==Create a user-specific configuration file==
 
==Create a user-specific configuration file==
  $ cd .../repo/FieldWorks/Bld
+
  $ cp -p Bld/_user.mak.lnx{.example,}
$ cp _user.mak.lnx.example _user.mak.lnx
+
Then edit the resulting <code>Bld/_user.mak.lnx</code> to specify any system-specific build information you may have. However, this is not usually necessary.
Run the above commands and then edit the resulting <code>.../repo/FieldWorks/Bld/_user.mak.lnx</code> to specify any system-specific build information you may have, if any.
 
  
 
==Build==
 
==Build==
 
===Optionally clean everything out===
 
===Optionally clean everything out===
  $ cd .../repo/FieldWorks && make clean && make tools-clean
+
  $ make tools-clean clean
  
 
===Build everything===
 
===Build everything===
  $ cd repo/FieldWorks && make tools && make
+
  $ make tools all
  
 
==Later update from VCS==
 
==Later update from VCS==
  $ cd .../repo
+
  $ svn up . ../COM ../Win32{Base,More}
$ svn up *
 
  
If you have other files in <code>.../repo</code> and svn complains about them, then instead of <code>$ svn up *</code>, you could do
 
$ svn up FieldWorks COM Win32Base Win32More
 
to be more specific.
 
 
==Edit code==
 
==Edit code==
Open <code>.../repo/FieldWorks/FieldWorks.mds</code> in Monodevelop to open the FieldWorks solution.
+
Open <code>FieldWorks.mds</code> in MonoDevelop to open the FieldWorks solution.
 +
 
 
==Run WorldPad==
 
==Run WorldPad==
  $ cd .../repo/FieldWorks && make -C Src/WorldPadGTK run
+
  $ make -C Src/WorldPadGTK run
  
To start WorldPad in debugger:
+
To start WorldPad in the gdb debugger:
 
  $ make -C Src/WorldPadGTK run MONO='gdb --args mono'
 
  $ make -C Src/WorldPadGTK run MONO='gdb --args mono'

Revision as of 15:30, 14 May 2009

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.

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 also need 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

You will need to update mono if using mono version 1 with the appropriate packages from: http://linux.lsdev.sil.org/downloads/mono/

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'