Developer Notes¶
Building WeSay on Linux from source¶
The build environment can be installed from the packages.palaso.org repository.
1. Add the following lines to /etc/apt/sources.list
Change lucid to the version of Ubuntu you are running
deb http://packages.sil.org/ubuntu lucid main deb http://packages.palaso.org/ubuntu lucid main deb http://ppa.palaso.org/ubuntu lucid main deb-src http://packages.palaso.org/ubuntu lucid main deb-src http://ppa.palaso.org/ubuntu lucid main
2. Update your package list
sudo apt-get update
3. Install the WeSay build dependencies
apt-get build-dep wesay
4. Install mercurial
apt-get install mercurial
5. Download the WeSay source code.
hg clone http://hg.palaso.org/wesay hg clone http://hg.palaso.org/chorus hg clone http://hg.palaso.org/palaso
Checkout the default mono branch in each project.
hg update DefaultMono
6. Build WeSay
First build palaso. From root of palaso source code, here /media/mono/palaso
xbuild "/target:Clean;Compile" /p:Configuration=DebugMono /p:RootDir=/media/mono/palaso build/build.mono.proj
Copy the dlls that it produces in output/DebugMono into chorus/lib/DebugMono
Then build chorus. From root of chorus source code, here /media/mono/chorus
xbuild "/target:Clean;Compile" /p:Configuration=DebugMono /p:RootDir=/media/mono/chorus build/build.mono.proj
Copy the Palaso dlls from palaso/output/DebugMono to wesay/lib/DebugMono
Copy the Chorus dlls and exes from chorus/output/DebugMono to wesay/lib/DebugMono
Finally from root of the WeSay source code, here /media/mono/wesay
xbuild "/target:Clean;Compile" /p:Configuration=DebugMono /p:RootDir=/media/mono/wesay build/build.mono.proj
The output is placed under the output folder.
Note about mono¶
Currently we don't really need a custom build of mono, although we did in the past. Currently however, we are building against a custom version of mono 2.10.5 available in ppa.palaso.org. Building against any version of mono should be possible, but of course, any mono related bugs will naturally appear in WeSay.
We are keeping this custom mono system as it is likely we will have a custom mono build available for the upcoming non roman / text handling work.
Using MonoDevelop to build WeSay¶
MonoDevelop 2.8 can be used to build and debug WeSay. MonoDevelop 2.8 can be built from source.
- MonoDevelop doesn't expand variables used in .csproj files. To work around this limitation it is necessary to copy the lib/DebugMono folder to lib/$(Configuration).
cd lib mkdir "\$(Configuration)" cp -a DebugMono "\$(Configuration)"
- MonoDevelop ignores conditionals in the .csproj files. As a result it tries to copy the icu40 dlls used in Windows to the output folder. These dlls cannot be found so the build fails. To work around this limitation 'fake' zero byte dlls can be made in the lib/$(Configuration) folder.
cd lib/$(Configuration) > icuuc40.dll > icudt40.dll > icuin40.dll