Hi,
looks like I have to clearify some things about windows compatiblity of zimlib.
Zimlib is developed on linux but not for linux. It is as far as possible platform indipendent. To compile zimlib you first need to compile cxxtools. Both use autoconf and automake as the build system. This is a platform indipendend build system. The only prerequisites you need is a (bourne- compatible) shell and some simple tools like awk, sed and make. Cxxtools requires a c++-compiler. Zimlib depends on libz and libbz2. All of these are easily installable by your package manager of your operating system.
As you know, windows does not fulfil these simple requirements. It does not have a shell, nor sed or awk. It even does not have a C++-compiler or a package manager. So it is not that easy to just "emerge libz" or "apt-get install zlib-dev" or whatever. This is the main problem in porting zimlib to windows. You have to generate your build stuff on your own and manually install zlib, libbz2 and a c++-compiler. All this is freely availabe.
Ok - there is at least 2 things which won't work out of the box on windows. These are libiconv, which is needed by cxxtools and used in zimreader and opendir/readdir/closedir.
The libiconv stuff is not needed for zimlib. This can be excluded from the build of cxxtools if you write your build system.
Opendir/readdir/closedir is abstracted away by cxxtools. We just need a windows implementation.
Fortunately this opendir/readdir/closedir-stuff is adopted from pt-framework, which has this windows implementation. It is just a matter of adopt this into cxxtools.
Mutexes were used in libzeno but are not any more used in zimlib.
There may be some other problems, which need to be resolved, but I don't think there are real showstoppers. The work just need to be done. Nothing really difficult.
The patches I got from Guillaume mainly copied the pt-framework-directory-stuff into cxxtools. The other thing was to remove the mutex stuff from libzeno. This was really not much work. The main problem is to set up the build environment. This was not done. A Makefile for windows would be helpful, but I haven't got one from Guillaume. Or a document "howto setup my windows environment to compile cxxtools and libzeno".
Tommi
Hi,
as discussed yesterday I set up a virtual Windows Workstation (Windows XP professional) on our openZIM server. The license I got from a retired office computer in my company.
The virtual Windowx XP setup can be accessed with a VNC client which is available for all platforms (in KDE it is available under K->Internet->Krdc or you can install vncviewer for CLI). For security reasons the VNC server runs locally on the server, so you have to use your ssh account and redirect the port to your machine:
$ ssh -L 5901:127.0.0.1:5900 USERNAME@openzim.org
This will redirect the VNC running on display :0 on openzim.org to you local display :1. After logging in you can connect with vncviewer:
$ vncviewer localhost:1
The administrator password is "openzim".
If you can not connect to the VNC server, check if KVM is running on the server:
$ ps ax | grep kvm
if not, start it:
$ sudo WindowsXP.sh
KVM is configured to daemonize, so it runs in background, leaving the shell to your disposal.
On the virtual Windows machine currently is only installed: * current Windows updates (incl. SP3) * FreeAV (Avira antivirus personal edition) * 7-Zip * Mozilla Firefox
Please help to keep the setup clean. If you see a notice concerning Windows or antivirus updates, please install them. Thank you.
Note: The virtual machine is behind a virtual network (NAT) and has connectivity to the internet, but is not accessible from the internet, even not from the openzim.org server itself.
Have much fun and cheers,
Manuel
Today I have installed some more tools in Windows:
* MinGW * MSYS (GNU environment for MinGW, see shortcut on Desktop) * Symbian SDK * Eclipse ** Subversive
In Eclipse I have imported from SVN (use the "Team" submenu in the project context menu to update / commit): * cxxtools * tntnet * zimlib * zimreader * kiwix
Each one is an individual project in Eclipse, so you can start now and try to build it.
More information can be found on http://openzim.org/Development_Tools
Greets,
Manuel