Friday, May 24, 2013

Compiling Geany on Windows

Can't remember exactly how many times I've tried compiling Geany or even thought of trying to compile it on Windows.  But I remember that my last try was last 2011 -- about February or March.

It's been a while that I've been trying to find a stable and reliable free and open source (not to mention cross-platform) Source Code Editing software so I could strip it down to provide an IDE specifically functioning for my open source game creation project called KAGE.  Finally, -- finally! -- I successfully compiled it yesterday!

I know that Geany's project page has a how-to page for compiling it on Windows but I still had bumps along the way.  This tutorial is simply to compliment what seems to be missing in the official tutorial.

So, just a recap. You need to have this things done already:

Not sure if we also need the GtkMM for Scintilla, but I did have that installed on my machine before I tried compiling Geany for the last time.

Before we proceed, let's make sure that you had the contents of GCC and GTK+ under C:\libs directory.  And that C:\libs\bin is added on your %PATH%, as well as C:\libs\msys\1.0\bin.

Now, for the `complimentary' part of my tutorial.

First, download the Manifest file from Geany's Git repo, which was not included in the downloadable zipped source code.

Rename win32-config.h to config.h then change the content of makefile.win32 from

all: config.h
 $(MAKE) -C tagmanager/ctags -f makefile.win32
 $(MAKE) -C tagmanager/mio -f makefile.win32
 $(MAKE) -C tagmanager/src -f makefile.win32
 $(MAKE) -C scintilla -f makefile.win32
 $(MAKE) -C plugins -f makefile.win32
 $(MAKE) -C src -f makefile.win32

config.h: win32-config.h
 $(CP) $< $@


to this

all: $(MAKE) -C tagmanager/ctags -f makefile.win32
 $(MAKE) -C tagmanager/mio -f makefile.win32
 $(MAKE) -C tagmanager/src -f makefile.win32
 $(MAKE) -C scintilla -f makefile.win32
 $(MAKE) -C plugins -f makefile.win32
 $(MAKE) -C src -f makefile.win32


The reason behind is that, there seems to be wrong with the makefile that the command COPY thinks config.h is supposed to be a directory.

Now, open a command line then run cd to the directory where you extracted Geany's source code.

Finally, type-in: make -f makefile.win32

Wait for it to compile and you'll then end up a very fresh build of Geany on Windows.

~creek23

No comments: