I've created a little Windows app that uses the ImageMagick C API but have run into a bit of a brick wall. The app works fine and I'm ready to share it with a few others in our organisation but I can't find documentation on distributing such an app without installing ImageMagick on the target machine.
Does anyone here have information, or a link to information, that details how to package this up for distribution? What DLLs are required and which one(s) need to registered with Windows? The target users will be on a mix of XP and Win7.
Never found a solution either so here's what i found out:
Using imageMagikNet.dll and (underlying) imageMagik dlls, seem these lib needs some registry keys to run properly.
Here is my packaging of ImageMagikNet application that works...
x11.dll from the installation of ImageMagik 6.5.3-10
A registry Key that looks like the following:
[HKEY_LOCAL_MACHINE\SOFTWARE\ImageMagick]
[HKEY_LOCAL_MACHINE\SOFTWARE\ImageMagick\6.5.3]
[HKEY_LOCAL_MACHINE\SOFTWARE\ImageMagick\6.5.3\Q:16] "BinPath"="[TARGETDIR]" "LibPath"="[TARGETDIR]" "CoderModulesPath"="[TARGETDIR]"
[HKEY_LOCAL_MACHINE\SOFTWARE\ImageMagick\Current] "Version"="6.5.3" "QuantumDepth"=dword:00000010 "BinPath"="[TARGETDIR]" "LibPath"="[TARGETDIR]" "CoderModulesPath"="[TARGETDIR]"
I Know that might not be a clean way to go since i simulate an installation of imageMagik in the registry and i don't know how it will work if a client intall ImageMagik on his machine, but so far, that's the only way i found.
My .net app use ImageMagik only to crop images.
Hope it helps...
As well as packaging all of the binary files and modules folder, you can simply set the
MAGICK_CODER_MODULE_PATH
andMAGICK_FILTER_MODULE_PATH
environment variables, no need to make registry entries.See
module.c
in ImageMagick source code, functionGetMagickModulePath
.I had to do something similar, though I built Imagemagick myself so I could trim the fat. What you can do is on your machine, install the dlls using the exe they provide. In the install process, make sure you check the box that says install C and C++ development headers and libraries.
The install dir will then contain the headers in the include directory, and dlls throughout the tree. You will find libs that you need to link against in lib. There are a ton of dlls though, which makes this a bit of a problem.
What I ended up doing when I built was just create a single ImageMagick dll and a .lib file to link against. I created my own project from the source and built a dll. Then you can ship the dll and the lib you create with the headers from source.
EDIT: I should also state that the install process only occurs on your machine. You can then copy the dlls/libs/headers from the install path and ship them with your package, rather than requiring the user to install anything but your app.
I can suggest two methods:
From the description on this page, it looks like the last Windows package listed, ImageMagick-6.6.2-Q16-windows.zip, is packaged without an installer, and is intended for use with applications that want to do their own installation and distribution. This sounds closest to what you're looking for.