I wanted to continue with the C# (Mono) on FreeBSD theme this week. The next C# (Mono) post for FreeBSD is simply running a .C# (Mono) app on FreeBSD. My first thought was this, “I wonder if there is a mono version of Paint.NET?”. Paint.NET is my favorite image editor for Windows. After a quick search, I found the Pintaproject, which is a Mono clone of Paint.NET.
Installing Pinta on FreeBSD
So anyway, the steps for running on FreeBSD are quite simple. This is a preview of my next FreeBSD Friday post, as I will continue the mono them to promote you app.
- Follow this post to get mono on FreeBSD.
- Download the Pinta tarball.
Note: Get the latest link from here: http://pinta-project.com/download
$ fetch http://cloud.github.com/downloads/PintaProject/Pinta/pinta-1.3.tar.gz
- Extract it:
$ tar -xzf pinta-0.5.tar.gz
- Change to the directory:
$ cd pinta-0.5
- Run configure.
- Compile the solution as follows:
$ mdtool build Pinta.sln
Note: I am not sure why, but “make” didn’t work, though I expected it to.
- Then as root or with sudo, run make install.
# make install
- Make the shell rehash the commands in PATH.
$ rehash1 Or depending on your shell... 1$ hash -r
- Now just run pinta.
Note: I am not entirely sure this is needed, but I did it because it was there.
$ mkdir ~/.tmp
Pinta is now installed and usable on FreeBSD or PC-BSD.
Pinta installs the following files
/usr/local/bin/pinta /usr/local/lib/pinta/ /usr/local/lib/pinta/Pinta.Core.dll /usr/local/lib/pinta/Pinta.Effects.dll /usr/local/lib/pinta/Pinta.Gui.Widgets.dll /usr/local/lib/pinta/Pinta.Resources.dll /usr/local/lib/pinta/Pinta.Tools.dll /usr/local/lib/pinta/Pinta.exe
The first file, /usr/local/bin/pinta, is a shell script that runs this:
#!/bin/sh exec /usr/local/bin/mono /usr/local/lib/pinta/Pinta.exe "$@"
The other files are the application. It is a little weird to see .exe and .dll files on FreeBSD, but I’ll get over it.
Adding Pinta to the KDE Menu
I use KDE so I was able to add a menu item for pinta easily. I used the same command that the shell script used:
/usr/local/bin/mono /usr/local/lib/pinta/Pinta.exe "$@"
I found a nice installed logo and used it for the menu icon:
Pinta in Ports
According to this Problem Report (PR), Pinta will be a port soon, if it isn’t already. http://www.freebsd.org/cgi/query-pr.cgi?pr=164309