views:

61

answers:

3

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.

+1  A: 

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.

jwismar
That's not really what I'm after. I'm only looking for information about packaging the components required to support an application written using the API, not the entire ImageMagick suite.
John Gardeniers
+2  A: 

I can suggest two methods:

  1. Use static libraries (binaries available on ImageMagick site) and compile your application using those (might not be feasible if your application is in .NET or similar)
  2. Check which DLLs are loaded by your application and put them in the same directory as executable during installation/unpacking, since Windows always includes current directory in its search for DLLs
  3. You can, in theory, play with SxS and make your package register the libraries with SxS store and have your application depend on them. While I'm personally an advocate of SxS, I suspect it would bring unnecessary complication given that ImageMagick team doesn't seem to have SxS version by themselves, reducing the value gained from using SxS (which is DLL sharing)
p_l
For #2, you can probably use DEPENDS.EXE (http://www.dependencywalker.com/) to see which DLLs are required.
ewall
+3  A: 

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.

SB