Kin icon

KIN DB 2004 Project - KinGUI Installation Hints for Win32 target

Project hosted at:
SourceForge.net Logo

 

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.

Index

Installing and compiling KinGUI

Please read INSTALL file present at distribution (package or SVN download) for complete instructions. This is a (probably successful) quick guide:

  1. 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 like
    tar zxvf kingui-dev-0.5-alpha.tgz
    (use real package file name). If your tar version can't pipe through gzip, first
    gunzip kingui-dev-0.5-alpha.tgz
    then
    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 here.
      • libtiff: available at its site and also here.
  2. Go to kingui-dev directory
    cd kingui-dev
    from where you SVN'd (for the first time) or untar'ed.
  3. 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 version.
    Be sure to change Win32 value to 1 (native) or 2 (cross complilation). Other variables have defaults that are ok for most people, so first, try it with no further modifications.
    Go to src
    cd src
    directory. Here type
    make
    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.
  4. 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).
  5. 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.
  6. To run it (it doesn't need a Kin cluster running, actually, if you only pretend to see the desktop interface), just type
    c:\kingui\bin\kingui1.exe
KinGUI installation is already done.

Installation Troubleshooting

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 bugtrack (thank you).