Sunday, 2 May 2010

How to get Canon's Digital Photo Professional (dpp) to work under Linux

DPP can be made to work reasonably well under wine in Linux by using the version
under revision control, revert a patch, and apply another:

  1. Make sure you have git installed

    If you are running Debian you can do so with apt-get install git-core

  2. Get the build dependencies for wine.

    If you are using Debian, the simplest way is to add a sources list to /etc/apt/sources.list, and do:
    apt-get update
    apt-get build-dep wine

    I did not need everything for all the features, so I just installed some of these packages.
  3. Get wine from revision control:

    git clone git:// wine-git

  4. Fix DPP wine issues

    The issues with DPP under wine are covered on, specifically, at the time of this writing: Here you'll find problems and solutions. I only had 2 problems:

    12001 chemsketch won't display
    13344 DPP - Images with "Fit to window" corrupted

    Follow the instructions on these pages to resolve the issues. For me, on git branch master 93f9c32, this was:

    git revert accfce21d3e042638a5eac8a8379eda2964fcd0a
    .. strip out just the first patch. Basically you want the bit starting with ---a/dlls/gdi32/dib.c till
    just before the next line starting with ---
    Save this as /tmp/patchfile, and then from the wine-git directory, do:
    cat /tmp/patchfile | patch -p1

    This should tell you it patched the file.

  5. Compile

  6. Run from wine-git, or install system wide
    I have a script, called dpp, which checks for a locally modified wine. If it finds it under my home directory it runs dpp with that wine. This saves me from installing wine-git system wide:
    if [ -d /home/yourname/dl/w/wine-git ]
            echo "Found locally compiled wine. Setting path."
            export PATH="/home/yourname/dl/w/wine-git:/home/yourname/dl/w/wine-git/tools$PATH"
    wine ~/.wine/drive_c/Program\ Files/Canon/Digital\ Photo\ Professional/DPPViewer.exe $1
    If you want to install wine system wide, do
    sudo make install

No comments:

Post a Comment