Rasterbator with mono

From Wicked

Jump to: navigation, search

How To: Rasterbator with mono on Linux( Ubuntu Edgy, also tested on Hardy 8.04 )

The Rasterbator creates huge, rasterized images from any picture. Upload an image, print the resulting multi-page pdf file and assemble the pages into extremely cool looking poster up to 20 meters in size.

You can find binaries and source-code of the standalone version on the creators' site http://homokaasu.org/rasterbator/

I order to compile the C# code on Linux we use mono. ( http://www.mono-project.com/ )

To use the rasterbator under Linux I had to puzzle a little since I had no experience with C# nor mono. This is the working result on an ubuntu edgy ( takes about 10 minutes ):

bash:

 $ sudo apt-get update
 $ sudo apt-get upgrade
 $ sudo apt-get install mono mono-mcs libgtk-cil libgtksourceview-cil libgecko-cil monodevelop monodoc
  • Get some packages ( thnx bozi )
ii libmono-accessibility1.0-cil 1.1.18-3 Mono Accessibility library
ii libmono-corlib1.0-cil 1.1.18-3 Mono core library (1.0) 
ii libmono-data-tds1.0-cil 1.1.18-3 Mono Data library
ii libmono-dev 1.1.18-3 libraries for the Mono JIT - Development fil
ii libmono-peapi1.0-cil 1.1.18-3 Mono PEAPI library
ii libmono-relaxng1.0-cil 1.1.18-3 Mono Relaxng library
ii libmono-security1.0-cil 1.1.18-3 Mono Security library
ii libmono-sharpzip0.84-cil 1.1.18-3 Mono SharpZipLib library
ii libmono-system-data1.0-cil 1.1.18-3 Mono System.Data library
ii libmono-system-runtime1.0-cil 1.1.18-3 Mono System.Runtime library
ii libmono-system-web1.0-cil 1.1.18-3 Mono System.Web library
ii libmono-system1.0-cil 1.1.18-3 Mono System libraries (1.0)
ii libmono-winforms1.0-cil 1.1.18-3 Mono System.Windows.Forms library
ii libmono0 1.1.18-3 libraries for the Mono JIT
ii libmono1.0-cil 1.1.18-3 Mono libraries (1.0)
ii mono-classlib-1.0 1.1.18-1 Mono class library (1.0) - transition packag
ii mono-common 1.1.18-3 common files for Mono
ii mono-gac 1.1.18-3 Mono GAC tool   <=== !! PROBABLY not needed
ii mono-jit 1.1.18-3 fast CLI JIT/AOT compiler for Mono
ii mono-mcs 1.1.18-3 Mono C# compiler
ii mono-runtime 1.1.18-3 Mono runtime 
  • So you should type:
 $ sudo aptitude install libmono-acccessibility1.0-cil libmono-corlib1.0-cil libmono-data-tds1.0-cil libmono-dev libmono-peapi1.0-cil
 $ sudo aptitude install libmono-relaxng1.0-cil libmono-security1.0-cil libmono-sharpzip0.84-cil libmono-system-data1.0-cil
 $ sudo aptitude install libmono-system-runtime1.0-cil libmono-system-web1.0-cil libmono-system1.0-cil libmono-winforms1.0-cil
 $ sudo aptitude install libmono0 1.1.18-3 libmono1.0-cil mono-classlib-1.0 1.1.18-1 mono-common mono-gac mono-jit mono-mcs mono-runtime

(this may produce unfound packages, this is normal. use aptitude instead of apt-get so it will continue to install the ones that it DOES find)

  • Get The Rasterbator Standalone Source and unpack it
http://arje.net/rasterbator

for example:

$ wget http://arje.net/files/Rasterbator_Standalone_1.2.zip
$ unzip Rasterbator_Standalone_1.21.zip
  • Get the patch

Rasterbator seems to assume that directory separator is "\" while it can also be e.g. "/" on some *NIX systems. With help from slashdot user "lupus-slash" Timo managed to build and run rasterbator with MONO on debian GNU/Linux.

As Nick pointed out, there is a slight bug in Timo's patch (original patch by timo: http://iki.fi/lindi/Rasterbator.buildfix1.diff )

From Nick at 26.03.2006 09:47 (10 months ago)

Regarding Timo Lindfors' diff above, I think there's a mistake. ApplicationDirectory=ApplicationDirectory.Replace("file:///","").Replace("%20", " "); should be ApplicationDirectory=ApplicationDirectory.Replace("file:///","/").Replace("%20", " "); otherwise there won't be a slash at the start of the path ("home/somebody" instead of "/home/somebody"). Other than that, I can confirm that this builds and runs on (at least) Debian Testing with the latest MONO. I might have a go at making the GUI optional if I could be bothered. All the buttons and windows forms and MS-Windows GUI (which for one reason or another looks wonky on Mono Winforms atm, though it works fine) is annoying :) Thanks for the cool software!

  • Retrieving the patch (only do the first command if you are not currently in the source directory)
$ cd Rasterbator\ Standalone/source/
$ wget http://screamz.madoka.be/Rasterbator.buildfix1.diff
  • Patch the source
$ patch -i Rasterbator.buildfix1.diff
The output should look like this
patching file MainForm.cs
Hunk #2 FAILED at 1713.
1 out of 2 hunks FAILED -- saving rejects to file MainForm.cs.rej
patching file Makefile

If those errors do not appear, and it just shows both files being patched, that works as well. Ignore these Hunk errors, Rasterbator still works.

  • build
$ make

It will generate 2 warnings, but the rasterbator works fine

  • execute
$ mono ../Rasterbator.exe


This manual is based on information found on http://arje.net/rasterbator from Timo Lindfors, Nick and Bozi.

Mac OS X users can find a nice how to at http://fmpfilms.com/Rast/index.html

Keep on rasterbating!

Shao-Chen Yu

comments are welcome at screamz |AT| isw |DOT| student |DOT| khleuven |DOT| be !

Personal tools