Saher El-Neklawy A blog

Portable Meld on Windows

Often I need to compare and merge files or folders together for changes between them. Gladly, many applications exist for such a task. This can come as using the diff command line tool, sadly it is not visually pleasant. Therefore several visual interfaces to ease the comparison side by side. Examples of such are:

A detailed comparison between the them and others can be found here. My personal favorite of these is meld (specially for folder comparison). On a Linux system, it is quite easy to set up, specially if it is deb bases because there is a package for it. A problem shows up when wanting to use meld in Windows. After some googling I found this guide showing how to install it for windows. Using this guide, I managed to get it to work, but I prefer a portable installation to take it anywhere.

Following are the steps I followed to get a portable version of meld up and running. Take care that performing the steps need administrative rights, but it can run anywhere.

  1. Create a directory to contain meld binaries and its dependencies. Let us reference to it as <meld install dir>
  2. Download portable python 2.6, and install it under <meld install dir>\Python26
  3. Add the portable python installation to the registry. This is done by opening the portable python interpretor an running the script from here
  4. Download the GKT+ 2.2 run time all in one bundle from here. Extract it to <meld install dir>\gtk+
  5. Download an install the latest PyGTK libraries. These are the PyGTKPyCairo, and PyGObject modules. This will install to the correct python based on the registry entry from step 3.
  6. Download meld 1.5 from here. Extract it to <meld install dir>\meld-src
  7. Create a file "<meld install dir>\start-meld.bat". The content of this file is:
    [sourcecode language="bash"]
    @echo off
    set PATH=%CD%\Python26\App;%CD%\gtk+\bin
    python meld-src\bin\meld
    [/sourcecode]

And that is it, run start-meld.bat and enjoy :)