KIN DB 2004 Project - KinGUI Installation Hints for Win32 target
Project hosted at:
These are simple instructions to install the KinGUI application on a Win32 target.
This is not intended as a comprehensive manual, but as
a "quick guide" with basic common procedures and ideas.
Note on updating sources: issue a make clean from src
directory before trying to compile after a sources update to avoid messing up code
and have a troubleless build.
Please read INSTALL file present at distribution
SVN download) for complete instructions. This is a (probably successful)
KinGUI installation is already done.
- Get the sources. It is strongly recommended to get them from
SVN (pretty simple instructions provided
there). If you get the package instead of SVN, uncompress it where you want to
build (a temporary place is Ok, usually it is on your home directory). Use something
tar zxvf kingui-dev-0.5-alpha.tgz
(use real package file name). If your tar version can't pipe through gzip, first
tar xvf kingui-dev-0.5-alpha.tar
You also will need some third party libraries:
- MinGW: you can download it from several sites offering a complete package,
like in http://inkscape.modevia.com/win32libs/ (in that case, you
can download mingw-xxx for native compilation, or xmingw-xxx for cross-compilation).
As project is Linux based, we take as an example the cross-compilation case, but
it works the same for native option (except where otherwise noted).
You can unpack it anywhere you prefer, just create a link to xmingw from /usr/local/xmingw
to have a consistent path after all (and include /usr/local/xmingw/bin in your path).
- SDL: you can download and install from libSDL site.
There's also one package available here.
You will need sdl.dll installed on the target machine (this is found in binary packages
for Win32 targets). For compilation, you also need header files installed into your
mingw include directory (in previous example, it will be in
/usr/local/xmingw/i686-pc-mingw32/include, e.g. set the SDL headers directory
(one full of SDL_xxx.h files) as /usr/local/xmingw/i686-pc-mingw32/include/SDL.
Finally, you will also need library files (the ones with .a extension) where the
(cross)compliler/linker will look for them, like in /usr/local/xmingw/lib.
It is important to install Win32 version of headers and library files, and to
do it into given paths, as the (maybe) existing version on you machine is for Linux
(if you're cross compiling) and will break compilation.
Same rules apply for SDL_image
and SDL_ttf libraries.
- Cairo: you can download and install from its site,
this repository or
here. Same rules apply here as for SDL.
- Graphic formats libraries:
- libjpeg: available at its site and also
- libtiff: available at its site
and also here.
- Go to kingui-dev directory
from where you SVN'd (for the first time) or untar'ed.
- There's a lot of subdirs. If you have to change standard configuration (for an
instance, if you want kinGUI to reside on a place other than /usr/local/kingui), go to
src directory, and edit do_config shell script. You may want to
change variables like tS to set it to your CPU family (there's examples
right there, but if you're not sure, just don't change the default 'local' which
lets the script to autodetect it, provided it is an x86 or x86-64 based CPU);
you may also want to change tB for a 64bit build, dm to
enable or disable debug version, or mb to enable or disable modularized
Be sure to change Win32 value to 1 (native) or 2
Other variables have defaults that are ok for most people, so first, try it with
no further modifications.
Go to src
directory. Here type
and wait. For the first time, some files may be created (like config.h), then
compilation starts. If lots of errors arise with the first build line (guilib) or when
linking application (kingui one), probably you don't have an usable SDL library or
headers. It is expected in a place like /usr/local/xmingw/i686-pc-mingw32/include/SDL,
required parts are main one (SDL.h), image loading library (SDL_image.h) and TrueType
font manager (SDL_ttf.h).
You will need the dinamic libSDL (DLL) when executing KinGUI application.
If all goes right, make will end with no errors.
- To install KinGUI application, and basic modules, first we have to create
installation directories. For Win32, this is usually c:\kingui and a few more
inside; for cross compilation, never do a make install but just get
into kingui directory and type
make link to get the Win32
executable. To have a smooth start, you should also copy your preferred font
into the kingui/font directory.
When cross compiling, you should create every single file required to work manually
on the target machine, but as this is quite hard, it is preferred that you create a
/usr/local/kingui directory and make install with a Linux target first,
so you get that tree populated; then copy everything into the Win32 target machine,
and install win32 binary over it (c:\kingui\bin is also a good place to copy all the
required third party DLLs).
- Go to configuration directory (default is /usr/local/kingui/conf) and edit
kingui.cfg-sample to suit your needs. Then rename it as kingui.cfg. Basic
data to change is your user and group (if you decided to use a diferent than kin),
the size of kinGUI window, and maybe your Language (if available). Maybe
you should also set Public Listen to a valid value on your system (where your
kin cluster is listening to client connections -the CM- ) so you can issue the
login request that comes with this basic system.
- To run it (it doesn't need a Kin cluster running, actually, if you only pretend
to see the desktop interface), just type
If you found some trouble trying to compile KinGUI, please refer first to the README file
that comes with your distribution or better, from SVN. If anything fails, please
provide me some information as what you did and some piece of the result on your
console, or at least, the message you get, posting at project's
- If you downloaded a package, try downloading/updating from
SVN. If you used SVN, ensure you did it from
the topmost directory (e.g. you where at least inside kingui-dev):
sometimes a generic makefile is changed, and that's above the usual src
- You may try make clean before compiling.
- If there's lots of errors about not finding some sort of *SDL*, ensure you
have such headers in your system. If you compiled but it doesn't execute, just
check if you have the necessary libraries.
- If you find that application opens, but there's no text and most fields seem to
be cropped, it is very likely that you have no font path, or that your system font
is not found there. Check which font you're defining as system font (in
kingui.cfg), and that you have a directory called font in your
kingui directory (like c:\kingui\font) and has such font inside.
- Application is still on alpha stage on Win32 platform, so there're some things
that are not completely implemented.
These are some commonly implemented make options for this project:
This simply checks and builds dependancies, and object files ("compiles")
Links object files to build an executable or library (where applicable)
Installs linked executables or libraries. First links them if no object files are available.
Deletes all the compilation results (dependancies, object files, and executables/libraries)
Creates the installation dirs (if not already created and have enough privileges)