Compile Psi on Windows
This HowTo is not for newbies!
In this post I’m going to explain how to compile the development Psi version for everyone that likes to live on the edge. Psi is a multi-platform jabber client, that in my humble opinion is the best one out there. It provides with most of the features that jabber can provide, it’s almost fully customizable to your own needs (if you aren’t afraid of editing some xml) and most important of all it has good, kind and active developers! What else can you ask for?
So if you are still reading this you might want to get started, don’t you? Let’s do it step-by-step, shall we?
STEP 1: Install subversion
- Visit Windows subversion download page and grab the newest package that ends with setup.exe, the newest when I posted this was svn-1.4.2-setup.exe
- Open the setup program by double clicking that file.
- Click next and yes, depending on what’s asking to everything, if Apache is installed you’ll have to choose if you want to install the modules, that’s your choice, tick the checkbox accordingly.
- If you are using Windows 98 or ME then take special attention on the last page for what you should do with your autoexec.bat file.
- Move to the next step.
STEP 2: Install Qt
- Visit Trolltech’s Qt/Windows Open Source download page and grab the package that ends with mingw.exe, the newest when I posted this was Qt 4.2.2
- Open the setup program by double clicking that file.
- Click Next until you reach MiniGW Installation page and annotate where you installed Qt, you’ll need it later.
- Tick ‘Download and install minimal MiniGW installation’ and click Next.
- On the last page untick both checkboxes and click Finish.
- Move to the next step.
STEP 3: Install OpenSSL
- Visit OpenSSL Windows version download page and grab the latest installer, the newest when I posted this was Win32 OpenSSL v0.9.8d
- Open the setup program by double clicking that file.
- Click Next until you finish, annotate where you installed OpenSSL, you’ll need it later.
- Move to the next step.
STEP 4: Install GNU Aspell
- Visit GNU Aspell download page and grab the newest full installer, newest dictionary of the language that you want, you can only use one for psi (I’m going to link to English), and finally the newest development package. The newest versions when I posted this are the ones I link to.
- Run the Full Installer by double clicking it.
- Click Next until you finish and remember to take note of the path where aspell is going to be installed (I’ll choose c:\aspell)
- Once the full installer finished, run the dictionary installer by double clicking on it and click Next until you finish. NOTE: You are going to see weird things when the dictionary installer is executed, it’s just creating a temporary directory and preparing the dictonary there. Don’t panic.
- Finally, open the zip file
- Unzip the contents of the folder inside the zip to where you installed aspell.
- Move to the next step.
STEP 5: Get Psi source and configure it
- Open up your Run dialog, to do this click on Start and then Run, there type cmd (or command if you are using Windows 98 or ME) and press OK.
- A command line will open, there you have to type
svn checkout http://svn.psi-im.org/psi/trunk psi
and press Enter.
- You’ll have to wait a while until it finishes.
- Let’s do again step one, without closing this command line. Open up your Run dialog, to do this click on Start and then Run, there type cmd (or command if you are using Windows 98 or ME) and press OK.
- The next thing that will do in that command line is copying some files that are needed for compiling and that are easier to explain how to do it in a command line than how to do it on a file explorer, it even is less error prone.
Now it’s time to remember the paths you annotated, do you remember them? - First let’s change the dir to the OpenSSL dir. To do that we are going to use the CLI (Command Line Interface) command called cd that stands for change dir. In all the following examples I’m going to use my directories, you should use yours but there is a high chance that mines are the same as yours.
cd c:OpenSSL
- Now we are supossed to be on the same directory, that’s good, we can now do exactly the same things and will result in the same outcomes. Let’s change dir once more to copy the needed files.
cd libMingW
- Now we are going to copy the files
copy *.a *.lib
That just copied all the files that end with the .a extension to the same name but with .lib extension.
- Now you can type
exit
to exit the current command line and select the other command line, the one that you kept open.
- From there you have to change the directory to the psi dir.
cd psi
and now that you are there we are going to edit some files we need before compiling Psi
- For first one conf_windows.pri, we are going to do this:
edit conf_windows.pri
that will open edit, a CLI text editor and there we have to find the following line
CONFIG += debug
and comment it, do that by adding a # at the start, the line that you will end with is going to be
#CONFIG += debug
the next line that we should find is this:
OPENSSL_PREFIX = /local
and we are going to change the directory there with the path of OpenSSL installation, the resulting line:
OPENSSL_PREFIX = c:/OpenSSL
After that we find the line
LIBS += -L$$OPENSSL_PREFIX/lib
and we’ll add /MinGW to get
LIBS += -L$$OPENSSL_PREFIX/lib/MinGW
And finally the last two changes, uncomment the following line
#DEFINES += HAVE_ASPELL
and end up with
DEFINES += HAVE_ASPELL
For the last change you’ll need the path to GNU Aspell, change the path on this line
ASPELL_PREFIX = ../../../aspell
to the path of aspell
ASPELL_PREFIX = c:/aspell
Now we are set with this file, press ALT+F and then X that will exit edit asking you to save, choose yes with the keyboard and press Enter.
- Now we are almost ready, just need to edit one more thing, edit one last file and we are all set.
edit win32/MakeFile
- There you have to set the paths to where you installed everything, change this lines
ASPELLDIR=C:aspell QTDIR=C:Qt4.2.0 MINGWDIR=c:MingW WINDOWSDIR=C:Winnt
accordingly to yours:
ASPELLDIR=C:aspell QTDIR=C:Qt4.2.2 MINGWDIR=c:MingW WINDOWSDIR=C:Windows
- Now we finally finished editing all the files. Exit the text editor like you did before, press ALT+F and then X that will exit edit asking you to save, choose yes with the keyboard and press Enter.
- Move to the next step.
STEP 6: Set the path and compile
- We need to extend PATH an environmental variable which is the used variable by several Operating Systems, in particular Windows too, to know where to look for the executables. For that we are going to to the following, adding the path to Qt Binaries and to MinGW binaries:
path=%path%;c:Qt4.2.2bin;c:MinGWbin
- Now run
qmake
that will configure Qt on the Psi source.
- Now run
mingw32-make
This step takes approximately twenty minutes and uses a lot of CPU. This is the moment where you go and drink coffee, take a bath, whatever you like.
- If everything succeeded, take special attention to the last few lines of the compilation to see that there are no errors, it’s time to package Psi, to do that run
mingw32-make -C win32
That will create the folder win32\psi with Psi in it.
- Copy those files whenever you want with File Explorer or with the command line like we did before.
- Enjoy Psi.
-
- Open up your Run dialog, to do this click on Start and then Run, there type cmd (or command if you are using Windows 98 or ME) and press OK.
- Change the dir to Psi dir
cd psi
- Update the source
svn update
- Clean the old compilation. You’ll need to have to set the PATH like we did before and after that
mingw32-make clean
- And now do like you did on Step 6 starting from here.
- Open up your Run dialog, to do this click on Start and then Run, there type cmd (or command if you are using Windows 98 or ME) and press OK.
I think it would be good to explain how to update the psi source and prepare everything to recompile
UPDATE STEP: Update psi source and compile again
This is my first post, I hope it’s clear enough and that you all understand it correctly, thanks for reading my blog. We’ll meet again when I have something else that I think it might be useful.
Special thanks to michalj who helped me out with the aspell partUPDATE: The official way to compile can be found here
-



Hey,
this is a very good straight forward descripiton of how to do it.
If anyone wants to compile Psi, I will point him to this site! Anyway, IMHO it should be linked in the wiki of Psi.
Ciao Ephraim
PS: If you are interessted in hosting more languages then english, I can help to translate it to german.