My first week at Collabora was mainly stuffed with acclimating tasks (reading wikis) and getting all set with my three-platform system. One annoying thing every cross-platform developer come across at some point is setting up clients and programs once for each platform and for each box in the office. My office’s got 2 main machines with 3 OS each. So do the maths ! Even if I tend to speed things up by installing programs with already-copied config files, the installation process must be done manually (I don’t want to ghost my disks !) for each platform/system.
One program I had to install, amongt others, was Collabora’s version of gTimeLog. This home-hacked version enhanced this renowned timeloging client by adding server-side features and standardized tasks lists. My task, hereafter, is to offer the web a clear mini-tutorial of the how-to for installing TimeLog under Windows XP.
- First, you need a good linux-like environment and a native software port. I like to use MinGW for that. You can easily get “MozillaBuild” which includes MinGW and Msys along with a bundle of tools, from “Mozilla’s build prerequisites” page under the MozillaBuild header. At the time of writing this paper, the newest version was 1.4, available here.
- Start by downloading gtimelog sources (For those working for Collabora, download the git repository instead, as explained here).
- Run a new MinGW shell by double-clicking on C:\mozilla-build\start-msvc8.bat (for those who have Microsoft Visual C++ 2005 – if you’ve got another version, choose the .bat accordingly). You should get a black shell. You can close it for now.
- Install the PyGTK dependencies
- Download and install the most recent GTK+ bundle for Windows found here. At the time of writing this article, the newest gtk+-bundle was 2.16.4. (To fully install this bundle you need to uncompress its contents in a folder and manually add the bin subfolder to the system path by adding “SET PATH=%PATH%;C:\<path_to_your_GTK+-bin_dir>” to your start-msvcXX.bat file and restarting the minWG shell)
- Download and install the most recent version of PyCairo and be careful to choose a version that matches your current Python version (see the XX in C:\mozilla-build\pythonXX for version info)
- Download and install the most recent version of PyGObject and be careful to choose a version that matches your current Python version (see the XX in C:\mozilla-build\pythonXX for version info)
- Download and install the most recent version of PyGtk and be careful to choose a version that matches your current Python version (see the XX in C:\mozilla-build\pythonXX for version info)
- Download and install the most recent version of libGlade
- Install the gTimeLog dependencies
- Download and install the right M2Crypto toolkit for your python version from here.
- Build and install gTimelog by opening another minGW shell and by typing :
cd <dir_to_gtimelog_sources> python setup.py build python setup.py install
- You should find no error messages in the associated output. If you’ve got something like “The application has failed to start because libglib-2.0-2.dll was not found”, then be sure to add “SET PATH=%PATH%;C:\<path_to_your _GTK+-bin_dir>” to your start-msvcXX.bat file and restart the minWG shell
- If you’re using the Collabora’s hack of gTimeLog, don’t forget to update .gtimelogrc to the example found at https://chronophage.collabora.co.uk/ before restarting the whole thing!