KLone on Windows (MinGW)

babongo edited this page Oct 9, 2012 · 1 revision

Bootstrap Klone 2.x/3.x on Windows with MinGW

Install MinGW

Download from: http://switch.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe, or download it from http://ufpr.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe

Run the installer (using the default destination paths and options) and select the g++ package from the list of optional packages.

Install MSYS, the MinGW shell

Download From: http://switch.dl.sourceforge.net/sourceforge/mingw/MSYS-1.0.10.exe or download it from : http://ufpr.dl.sourceforge.net/sourceforge/mingw/MSYS-1.0.10.exe

Run the installer (use the default destination paths and options).

At the end of this installation, the place of your files (i.e., when you start the MinGW shell and issue the pwd command) would be C:\msys\1.0\home\<username>, to be possible to you put the other file (mentioned below) on it and follow the installation ... ;)

Install wget, a command line download manager

Download from: http://heanet.dl.sourceforge.net/sourceforge/mingw/wget-1.9.1-mingwPORT.tar.bz2

Put this file in C:\msys\1.0\home\<username>, as mentioned above...

Open a MSYS shell from the Windows Start menu (Programs → MinGW → MSYS → msys), or choose the MSYS icon in the desktp, if you choosed to be there...

Untar the package and copy the wget.exe file found in the package to c:/mingw/bin/:

$ tar jxvf wget-1.9.1-mingwPORT.tar.bz2
$ cp wget-1.9.1/mingwPORT/wget.exe /c/MinGW/bin/

Build KLone

Still in a MSYS shell create the top-level Makefile in an empty directory:

$ mkdir klone
$ cd klone
$ wget http://koanlogic.com/download/klone/klone-3.0.0-tolerant-setsockopt.patch
$ vi Makefile
... (Makefile follows) ...
KLONE_TARGET_PATCH_FILE = $(CURDIR)/klone-3.0.0-tolerant-setsockopt.patch
include klapp.mk
klapp.mk: ; wget -O $@ -c http://koanlogic.com/klone/klapp.mk

KLone configuration on Windows requires setup of target filesystem paths since MinGW’s internal mount points don’t seem to be detected. This applies to both logging (without syslog) and creation of temporary files (for file upload for example).

Sample configuration snippets follow:

    type                file
    file.basename       c:\tmp\klone.log

    temp_dir    c:\tmp

assuming c:\tmp has been previously created.

Build all (this will download and compile KLone):

$ make

Register KLone as a Windows service and start it:

$ kloned -i
$ net start kloned

Fetch the index page:

$ wget http://localhost:8080/

Run your browser and put in the address to be reached the following url: http://localhost:8080/

If you did all these steps and viewed these results appear in your screen, stop kloned service to do the other steps in the tutorial, as described below:

$ net stop kloned

In order to launch kloned automatically upon Windows startup you may need to set its Startup Type to Automatic using the services.msc programme.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.