|
Compiling anything in Windows can be a bit of a chore, but stick with it and you will succeed.
Introduction
In order to create a native Win32 compatible searchmonkey executable, you need the following:
Installing MINGW
Download, and run the MinGW-5.0.2.exe installation tool:
- Choose you local mirror, and check the download as needed and install option. Click Next.
- Choose the current MinGW package to install. Click Next.
- Finally select the minimal type of install, and click Next to begin.
This can take some time downloading and installing the packages.
Installing MSYS
Download, and run MSYS-1.0.10.exe:
- Just accept all the defaults and click next.
- During the post install, answer 'y' to all questions, and insert C:/mingw at the folder prompt.
Installing MSYS DTK
This gives support
Download, and run msysDTK-1.0.1.exe:
- Just accept all the defaults (installs to C:\MSYS)
Installing Gtk+2
Gtk 2.6.2 comprises of a whole host of libraries, and dependancies - but there is a pretty good website detailing the Windows port of Gtk. To make things easier, I have compiled an independant list of everything needed for Gtk and its dependancies - just click on every link, and install them all to c:\MinGW\msys\1.0
Getting pkg-config-0.20 to work
Due to have a bug, pkg-config must be installed in /mingw/bin (not /bin), and then the environment must be set:
export PKG_CONFIG_PATH=/lib/pkgconfig
To check that pkg-config is working, run these simple tests:
which pkg-config # Should return /mingw/bin/pkg-config, and not /bin/pkg-config pkg-config --help # Should return the help message, if it fails an error message will be displayed pkg-config --list-all # Should return a list containing most of the above packages
Special hacks required to get it to compile on Searchmonkey 0.6.3
Due to a couple of library bugs, and because Windows does not include all of the POSIX standard lirbaries (e.g. pthread, regex), a couple of changes/patches are required. These hacks only apply to Searchmonkey 0.6.3 as they will hopefully get fixed for the next release.
- /lib/zdll.lib needs renaming to z.lib so that it can be found by pkg-config
- /source/searchmonkey-0.6.3/configure.in needs a minor patch
- Add pthread and gnu_regex to the package list
- pkg-config files need to be generated for both pthread and gnu_regex
- Create files to match those found in /lib/pkgconfig/*.pc
Once those changes are complete, autogen.sh must be run to recreate the make scripts:
./autogen.sh
Assuming all is correct, and error free, proceed to the next section!
Compiling Searchmonkey
To compile searchmonkey:
./configure ./make ./make install
Running searchmonkey
Users of the Windows version of searchmonkey need to have some of the DLLs installed in C:\WINNT\system32 (or equivalent).
To achieve this:
- Copy gnu_regex.dll, pthreadGC2.dll and zlib.dll to C:\WINDOWS\system32
- Make sure that the Gtk DLL files are all added to C:\WINDOWS\system32
- Add a shortcut to searchmonkey.exe, and install it within C:\Programs\searchmonkey\.
The program's only complaint is that no icon is present - this is a minor issue, and will be resolved in future upgrades, along with the external DLL dependancy issues!
|