]> granicus.if.org Git - imagemagick/blob - www/advanced-windows-installation.html
(no commit message)
[imagemagick] / www / advanced-windows-installation.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en" xsi:schemaLocation="http://www.w3.org/1999/xhtml                           http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
3 <head>
4   <meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
5   <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4"></meta>
6   <title>ImageMagick: Advanced Windows Source Installation</title>
7   <meta http-equiv="content-language" content="en-US"></meta>
8   <meta http-equiv="content-type" content="text/html; charset=utf-8"></meta>
9   <meta http-equiv="reply-to" content="magick-users@imagemagick.org"></meta>
10   <meta name="application-name" content="ImageMagick"></meta>
11   <meta name="description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats.  In addition, resize, rotate, shear, distort or transform images automagically."></meta>
12   <meta name="application-url" content="http://www.imagemagick.org"></meta>
13   <meta name="generator" content="PHP"></meta>
14   <meta name="keywords" content="advanced, windows, source, installation, ImageMagick, PerlMagick, image processing, OpenMP, software development library, image, photo, software, Magick++, MagickWand"></meta>
15   <meta name="rating" content="GENERAL"></meta>
16   <meta name="robots" content="INDEX, FOLLOW"></meta>
17   <meta name="generator" content="ImageMagick Studio LLC"></meta>
18   <meta name="author" content="ImageMagick Studio LLC"></meta>
19   <meta name="revisit-after" content="2 DAYS"></meta>
20   <meta name="resource-type" content="document"></meta>
21   <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"></meta>
22   <meta name="distribution" content="Global"></meta>
23   <link rel="icon" href="../images/wand.png"></link>
24   <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon"></link>
25   <link rel="canonical" href="../index.html"></link>
26   <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"></link>
27
28   <!-- Add jQuery library -->
29   <script type="text/javascript" src="http://localhost/ajax/libs/jquery/1.7/jquery.min.js"></script>
30   
31   <!-- Add mousewheel plugin (this is optional) -->
32   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
33   
34   <!-- Add fancyBox -->
35   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/jquery.fancybox.css?v=2.0.6" type="text/css" media="screen"></link>
36   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/jquery.fancybox.pack.js?v=2.0.6"></script>
37   
38   <!-- Optionally add helpers - button, thumbnail and/or media -->
39   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.2" type="text/css" media="screen"></link>
40   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.2"></script>
41   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.0"></script>
42   
43   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=2.0.6" type="text/css" media="screen"></link>
44   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=2.0.6"></script>
45   
46   <script type="text/javascript">
47         $(document).ready(function() {
48                 $(".fancybox").fancybox();
49         });
50   </script>
51
52   <!-- ImageMagick style -->
53   <style type="text/css" media="all">
54     @import url("../www/magick.css");
55   </style>
56 </head>
57
58 <body id="www-imagemagick-org">
59
60
61
62 <div class="titlebar">
63 <div style="margin: 17px auto; float: left;">
64   <script type="text/javascript">
65   <!--
66     google_ad_client = "pub-3129977114552745";
67     google_ad_slot = "5439289906";
68     google_ad_width = 728;
69     google_ad_height = 90;
70   //-->
71   </script>
72   
73 </div>
74 <a href="../discourse-server">
75   <img src="../images/logo.jpg" alt="ImageMagick Logo" style="width: 123px; height: 118px; border: 0px; float: right;"></img></a>
76 <a href="../index.html">
77   <img src="../images/sprite.jpg" alt="ImageMagick Sprite" style="width: 114px; height: 118px; border: 0px; float: right;"></img></a>
78 </div>
79
80 <div class="westbar">
81
82 <div class="menu">
83   <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
84 </div>
85 <div class="menu">
86   <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
87 </div>
88 <div class="sub">
89     <a title="Binary Release: Unix" href="binary-releases.html#unix">Unix</a>
90 </div>
91 <div class="sub">
92     <a title="Binary Release: MacOS X" href="binary-releases.html#macosx">Mac OS X</a>
93 </div>
94 <div class="sub">
95     <a title="Binary Release: iOS" href="binary-releases.html#iOS">iOS</a>
96 </div>
97 <div class="sub">
98     <a title="Binary Release: Windows" href="binary-releases.html#windows">Windows</a>
99 </div>
100 <div class="sep"></div>
101 <div class="menu">
102   <a title="Command-line Tools" href="command-line-tools.html">Command-line Tools</a>
103 </div>
104 <div class="sub">
105     <a title="Command-line Tools: Processing" href="command-line-processing.html">Processing</a>
106 </div>
107 <div class="sub">
108     <a title="Command-line Tools: Options" href="command-line-options.html">Options</a>
109 </div>
110 <div class="sub">
111     <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
112 </div>
113 <div class="menu">
114   <a title="Program Interfaces" href="api.html">Program Interfaces</a>
115 </div>
116 <div class="sub">
117     <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
118 </div>
119 <div class="sub">
120     <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
121 </div>
122 <div class="sub">
123     <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
124 </div>
125 <div class="sub">
126     <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
127 </div>
128 <div class="sep"></div>
129 <div class="menu">
130    <a title="Install from Source" href="install-source.html">Install from Source</a>
131 </div>
132 <div class="sub">
133     <a title="Install from Source: Unix" href="install-source.html#unix">Unix</a>
134 </div>
135 <div class="sub">
136     <a title="Install from Source: Windows" href="install-source.html#windows">Windows</a>
137  </div>
138 <div class="menu">
139   <a title="Resources" href="resources.html">Resources</a>
140 </div>
141 <div class="menu">
142   <a title="Architecture" href="architecture.html">Architecture</a>
143 </div>
144 <div class="menu">
145   <a title="Download" href="download.html">Download</a>
146 </div>
147 <div class="sep"></div>
148 <div class="menu">
149   <a title="Search" href="search.html">Search</a>
150 </div>
151 <div class="sep"></div>
152 <div class="menu">
153   <a title="Site Map" href="sitemap.html">Site Map</a>
154 </div>
155 <div class="sub">
156   <a title="Site Map: Links" href="links.html">Links</a>
157 </div>
158 <div class="sep"></div>
159 <div class="menu">
160   <a title="Support ImageMagick Development" href="support.html">Support ImageMagick Development</a>
161 </div>
162 </div>
163
164 <div class="eastbar">
165   
166   <div> <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="../index.html"></a></div>
167   <noscript>
168     <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
169     <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width="93" height="20" border="0"></img></a>
170   </noscript>
171     
172     
173 </div>
174
175 <div class="main">
176
177
178 <h1>ImageMagick Advanced Windows Installation</h1>
179 <p class="navigation-index">[<a href="advanced-windows-installation.html#download">Download &amp; Unpack</a> • <a href="advanced-windows-installation.html#configure">Configure</a>  • <a href="advanced-windows-installation.html#build">Build</a> • <a href="advanced-windows-installation.html#install">Install</a> • <a href="advanced-windows-installation.html#binary">Create a Self-installing Binary Distribution</a> • <a href="advanced-windows-installation.html#problems">Dealing with Unexpected Problems</a> • <a href="advanced-windows-installation.html#project">Building Your Custom Project</a>]</p>
180
181 <div class="doc-section">
182 <p>It's possible you don't want to concern yourself with advanced installation under Windows.  If so, you also have the option of installing a self-installing <a href="binary-releases.html#windows">binary release</a> or if you still want to install from source without all the fuss see the simple <a href="install-source.html#windows">Install From Source</a> instructions.  However, if you want to customize the configuration and installation of ImageMagick under Windows, lets begin.</p>
183 </div>
184
185 <h2><a id="download"></a>Download &amp; Unpack</h2>
186 <div class="doc-section">
187
188 <p>Building ImageMagick source for Windows requires a modern version of Microsoft Visual Studio IDE.  Users have reported success with the Borland C++ compiler as well.  If you don't have a compiler you can still install a self-installing <a href="binary-releases.html#windows">binary release</a>.</p>
189
190 <p>Download <a href="http://www.imagemagick.org/download/windows/ImageMagick-windows.zip">ImageMagick-windows.zip</a> from <a href="http://www.imagemagick.org/download/windows">ftp.imagemagick.org</a> or its <a href="download.html">mirrors</a> and verify the distribution against its <a href="http://www.imagemagick.org/download/windows/digest.rdf">message digest</a>.</p>
191
192 <p>You can unpack the distribution with <a href="http://www.winzip.com">WinZip</a> or type the following from any Command Prompt window:</p>
193
194 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">unzip ImageMagick-windows.zip</span></p>
195 <p>Now that you have the ImageMagick Windows source distribution unpacked, let's configure it.</p>
196
197 </div>
198
199 <h2><a id="configure"></a>Configure</h2>
200 <div class="doc-section">
201
202 <p>These instructions are specific to building ImageMagick with the <a href="http://msdn.microsoft.com/vstudio/">Visual Studio</a> under Windows XP, Win2K, or Windows 98.  ImageMagick does not include any workspace (DSW) or project files (DSP) except for those included with third party libraries. Instead, there is a <code>configure</code> program that must be built and run which creates the Visual Studio workspaces for ImageMagick.  The Visual Studio system provides four different types of <em>runtime</em> environments that must match across all application, library, and dynamic-library (DLL) code that is built. The <code>configure</code> program creates a set of build files that are consistent for a specific runtime selection listed here:</p>
203
204 <ol>
205   <li>Dynamic Multi-threaded DLL runtimes (VisualDynamicMT).</li>
206   <li>Static Single-threaded runtimes (VisualStaticST).</li>
207         <li>Static Multi-threaded runtimes (VisualStaticMT).</li>
208         <li>Static Multi-threaded DLL runtimes (VisualStaticMTDLL).</li>
209 </ol>
210
211 <p>In addition to these runtimes, the VisualMagick build environment allows you to select whether to include the X11 libraries in the build or not.  X11 DLLs and headers are provided with the VisualMagick build environment.  Most Windows users are probably not interested in using X11, so you might prefer to build without X11 support.  Since the <code>animate</code>, <code>display</code>, and <code>import</code> program depends on the X11 delegate libraries, these programs will no work if you choose not to include X11 support.</p>
212
213 <p>This leads to five different possible build options. The default binary distribution is built using the Dynamic Multi-threaded DLL (VisualDynamicMT) option with the X11 libraries included.  This results in an X11 compatible build using all DLL's for everything and multi-threaded support (the only option for DLL's).</p>
214
215 <p>To create a workspace for your requirements, simply go to the <code>VisualMagick\configure</code> folder and open the <code>configure.dsw</code> workspace (for Visual Studio 6) or <code>configure.sln</code> (for Visual Studio 7 or 8). Set the build configuration to <em>Release</em>.</p>
216
217 <p>Build and execute the configure program and follow the on-screen instructions.  You should not change any of the defaults unless you have a specific reason to do so.</p>
218
219 <p>The configure program has a button entitled:</p>
220
221 <p class="text">
222   Edit "magick_config.h"
223 </p>
224
225 <p>Click on this button to bring up <code>magick-config.h</code> in Windows Notepad.  Review and optionally change any preprocessor defines in ImageMagick's <code>magick_config.h</code> file to suit your needs.  This file is copied to <code>magick\magick_config.h</code>.  You may safely open <code>magick\magick_config.h</code>, modify it, and recompile without re-running the configure program. In fact, using Notepad to edit the copied file may be preferable since it preserves the original <code>magick_config.h</code> file.</p>
226
227 <p>Key user defines in <code>magick_config.h</code> include:</p>
228
229 <dl class="doc">
230 <dt> MAGICKCORE_QUANTUM_DEPTH (default 16)</dt>
231   <dd>Specify the depth of the pixel component depth (8, 16, or 32).  A value of 8 uses half the memory than 16 and may run 30% faster, but provides 256 times less color resolution than a value of 16.  We recommend a quantum depth of 16 because 16-bit images are becoming more prevalent on the Internet.</dd>
232 <dt>MAGICKCORE_INSTALLED_SUPPORT (default undefined)</dt>
233   <dd>Define to build a ImageMagick which uses registry settings or embedded paths to locate installed components (coder modules and configuration files). The default is to look for all files in the same directory as the executable.  You will wand to define this value if you intend on <a href="advanced-windows-installation.html#install">installing</a> ImageMagick on your system.</dd>
234 <dt>ProvideDllMain (default defined)</dt>
235   <dd>Define to include a DllMain() function ensures that the ImageMagick DLL is properly initialized without participation from dependent applications. This avoids the requirement to invoke InitializeMagick() from dependent applications is only useful for DLL builds.</dd>
236 </dl>
237
238 <p>ImageMagick is now configured and ready to build.</p>
239
240 <p>The default build is WIN32.  For 64-bit, open a newly created solution and enter Configuration Manager. Add a x64 configuration, copying the configuration from Win32. Be sure  that it adds the configuration to all the projects.  Now compile.  For the 64-bit build, you will also need to disable X11 support.  Edit magick-config.h and undefine the MAGICKCORE_X11_DELEGATE define.</p>
241
242 </div>
243
244 <h2><a id="Build"></a>Build</h2>
245 <div class="doc-section">
246
247 <p>After creating your build environment, proceed to open the DSW (or SLN) workspace in the <code>VisualMagick</code> folder.  In the DSW file choose the <em>All</em> project to make it the <em>active</em> project.  Set the build configuration to the desired one (Debug, or Release) and <em>clean</em> and <em>build:</em></p>
248
249 <ol>
250   <li>Right click on the All project and select <em>Set As Active Project</em></li>
251   <li>Select "Build=&gt;Clean Solution"</li>
252         <li>Select "Build=&gt;Build Solution"</li>
253 </ol>
254
255 <p>The <em>clean</em> step is necessary in order to make sure that all of the target support libraries are updated with any patches needed to get them to compile properly under Visual Studio.</p>
256
257 <p>After a successful build, all of the required files that are needed to run any of the <a href="command-line-tools.html">command line tools</a> are located in the <code>VisualMagick\bin</code> folder.  This includes EXE, DLL libraries, and ImageMagick configuration files.  You should be able to test the build directly from this directory without having to move anything to any of the global SYSTEM or SYSTEM32 areas in the operating system installation.</p>
258
259 <p>The Visual Studio distribution of ImageMagick comes with the Magick++ C++ wrapper by default. This add-on layer has a large number of demo and test files that can be found in <code>ImageMagick\Magick++\demo</code>, and <code>ImageMagick\Magick++\tests</code>. There are also a variety of tests that use the straight C API as well in ImageMagick\tests.</p>
260
261 <p> All of these programs are <em>not</em> configured to be built in the default workspace created by the configure program. You can cause all of these demos and test programs to be built by checking the box in configure that says:</p>
262
263 <p class="text">
264   Include all demo and test programs
265 </p>
266
267 <p>In addition, there is another related checkbox (checked by default) that causes all generated project files to be created standalone so that they can be copied to other areas of you system.</p>
268
269 <p>This the checkbox:</p>
270
271 <p class="text">
272   Generate all utility projects with full paths rather then relative paths.
273 </p>
274
275 <p>Visual Studio uses a concept of <em>dependencies</em> that tell it what other components need to be build when a particular project is being build. This mechanism is also used to ensure that components link properly. In my normal development environment, I want to be able to make changes and debug the system as a whole, so I like and NEED to use dependencies. However, most end users don't want to work this way.</p>
276
277 <p>Instead they really just want to build the package and then get down to business working on their application. The solution is to make all the utility projects (UTIL_xxxx_yy_exe.dsp) use full absolute paths to all the things they need. This way the projects stand on their own and can actually be copied and used as templates to get a particular custom application compiling with little effort.</p>
278
279 <p>With this feature enabled, you should be able to nab a copy of</p>
280
281 <p class="text">
282   VisualMagick\utilities\UTIL_convert_xxx_exe.dsp  (for C) or  <br></br>
283   VisualMagick\Magick++\demo\UTIL_demo_xxx_exe.dsp (for C++)
284 </p>
285
286 <p>and pop it into Notepad, modify it (carefully) to your needs and be on your way to happy compiling and linking.</p>
287
288 <p> You can feel free to pick any of the standard utilities, tests, or demo programs as the basis for a new program by copying the project and the source and hacking away.</p>
289
290 <p>The choice of what to use as a starting point is very easy.</p>
291
292 <p>For straight C API command line applications use something from:</p>
293
294 <p class="text">
295   ImageMagick\tests or  <br></br>
296   ImageMagick\utilities (source code) or <br></br>
297   ImageMagick\VisualMagick\tests or  <br></br>
298   ImageMagick\Visualmagick\utilities (project - DSP)
299 </p>
300
301 <p>For C++ and Magick++ command line applications use something from:</p>
302
303 <p class="text">
304   ImageMagick\Magick++\tests or ImageMagick\Magick++\demo (source code) or <br></br>
305   ImageMagick\VisualMagick\Magick++\tests or  <br></br>
306   ImageMagick\VisualMagick\Magick++\demo (project - DSP)
307 </p>
308
309 <p>For C++ and Magick++ and MFC windows applications use:</p>
310
311 <p class="text">
312   ImageMagick\contrib\win32\MFC\NtMagick (source code) or <br></br>
313   ImageMagick\VisualMagick\contrib\win32\MFC\NtMagick (project - DSP)
314 </p>
315
316 <p>The ImageMagick distribution is very modular. The default configuration is there to get you rolling, but you need to make some serious choices when you wish to change things around.</p>
317
318 <p>The default options are all targeted at having all the components in one place (e.g. the <code>bin</code> directory of the VisualMagick build tree). These components may be copied to another folder (such as to another computer).</p>
319
320 <p>The folder containing the executables and DLLs should contain the following files:</p>
321
322 <ol>
323   <li>magic.xml</li>
324   <li>delegates.xml</li>
325   <li>modules.xml</li>
326   <li>colors.xml</li>
327 </ol>
328
329 <p>among others.</p>
330
331 <p>The <code>bin</code> folder should contains all EXE's and DLL's as well as the very important <code>modules.xml</code> file.</p>
332
333 <p>With this default setup, you can use any of the command line tools and run scripts as normal. You can actually get by quite nicely this way by doing something like <code>pushd e:\xxx\yyy\bin</code> in any scripts you write to execute <em>out of</em> this directory.</p>
334
335 <p>By default the core of ImageMagick on Win32 always looks in the place were the exe program is run from in order to find all of the files as well as the DLL's it needs.</p>
336
337         <h3>ENVIRONMENT VARIABLES</h3>
338         <div class="doc-section">
339
340                 <p>You can use the <em>System</em> control panel to allow you to add and delete what is in any of the environment variables. You can even have user specific environment variables if you wish.</p>
341
342                 <h4>PATH</h4>
343                 <div class="doc-section">
344                   <p>This environmental variable sets the default list of places were Windows looks for EXE's and DLL's. Windows CMD shell seems to look in the <em>current</em> directory first no matter what, which may make it unnecessary to update the PATH. If you wish to run any of utilities from another location then you must add the path to your <code>bin</code> directory in. For instance, to do this for the default build environment like I do, you might add:</p>
345
346
347                         <p class="text">
348                           C:\ImageMagick\VisualMagick\bin
349                         </p>
350
351                 </div>
352
353                 <h4>MAGICK_HOME</h4>
354                 <div class="doc-section">
355                   <p>If all you do is modify the PATH variable, the first problem you will run into is that ImageMagick may not be able to find any of its <em>modules</em>. Modules are all the IM_MOD*.DLL files you see in the distribution. There is one of these for each and every file format that ImageMagick supports. This environment variable tells the system were to look for these DLL's. The compiled in <em>default</em> is <em>execution path</em> - which says - look in the same place that the application is running <em>in</em>. If you are running from somewhere other then <code>bin</code> - this will no longer work and you must use this variable. If you elect to leave the modules in the same place as the EXE's (a good idea) then you can simply set this to the same place as you did the PATH variable. In my case:</p>
356
357                         <p class="text">
358                           C:\ImageMagick\coders
359                         </p>
360
361                         <p>This also the place were ImageMagick expects to find the <code>colors.xml</code>, <code>delegates.xml</code>, <code>magic.xml</code>, <code>modules.xml</code>, and <code>type.xml</code> files.</p>
362                 </div>
363         </div>
364
365 <p>One cool thing about the modules build of ImageMagick is that you can now leave out file formats and lighten you load. If all you ever need is GIF and JPEG, then simply drop all the other DLL's into the local trash can and get on with your life.</p>
366
367 <p>Always keep the XC format, since ImageMagick uses it internally.</p>
368
369 <p>You can elect to changes these things the good old <em>hard-coded</em> way. This define is applicable in <code>magick-config.h</code>:</p>
370
371 <p class="text">
372   #define MagickConfigurePath  "C:\\ImageMagick\\"
373 </p>
374
375 <p>To view any image in a Microsoft window, type</p>
376
377 <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">convert image.ext win:</span></p>
378 <p>Make sure <a href="http://www.cs.wisc.edu/~ghost/">Ghostscript</a> is installed, otherwise, you will be unable to convert or view a Postscript document, and Postscript standard fonts will not be available.</p>
379
380 <p>You may use any standard web browser (e.g. Internet Explorer) to browse the ImageMagick documentation.</p>
381
382 <p>The Win2K executables will work under Windows 98.</p>
383
384 <p>ImageMagick is now configured and built. You can optionally install it on your system as discussed below.</p>
385
386 <p>If you are looking to install the ImageMagick COM+ object, see <a href="ImageMagickObject.html">Installing the ImageMagickObject COM+ Component</a>.</p>
387
388 </div>
389
390 <h2><a id="Install"></a>Install</h2>
391 <div class="doc-section">
392
393 <p>You can run ImageMagick command line utilities directly from the <code>VisualMagick\bin</code> folder, however, in most cases you may want the convenience of an installer script.  ImageMagick provides <a href="http://www.jrsoftware.org">Inno Setup</a> scripts for this purpose.  Note, you must define MAGICKCORE_INSTALLED_SUPPORT at <a href="advanced-windows-installation.html#configure">configure</a> time to utilize the installer scripts.</p>
394
395 <p>To get started building a self-installing ImageMagick executable, go to <code>VisualMagick\installer</code> folder and click on a script that matches your build environment.  Press F9 to build and install ImageMagick.  The default location is <code>C:Program Files\ImageMagick-6.?.?\Q?</code>.  The exact folder name depends on the ImageMagick version and quantum depth.  Once installed, ImageMagick command line utilities and libraries are available to the MS Command Prompt, web scripts, or to meet your development needs.</p>
396
397 </div>
398
399 <h2><a id="binary"></a>Create a Self-Installing Binary Distribution</h2>
400 <div class="doc-section">
401
402 <h3>Prerequisites</h3>
403
404         <ol>
405         <li>Download and install <a href="http://www.jrsoftware.org/isdl.html">Inno Setup 5</a>.</li>
406         <li>Download and install <a href="http://www.activestate.com/activeperl/downloads">ActiveState ActivePerl</a>.</li>
407         </ol>
408
409 <h3>Run the Configure Wizard</h3>
410
411         <ol>
412         <li>Double-click on <code>VisualMagick/configure/configure.sln</code> to build the configure wizard.</li>
413         <li>Select <code>Rebuild All</code> and launch the configure wizard.</li>
414         <li>Uncheck <code>Use X11 Stubs</code> and check <code>Build demo and test programs</code>.</li>
415         <li>Click on <code>Edit magick_config.h</code> and define <code>MAGICKCORE_INSTALLED_SUPPORT</code>.</li>
416         <li>Complete the configure wizard screens to create the ImageMagick Visual C++ workspace.</li>
417         </ol>
418
419 <h3>Build ImageMagick</h3>
420
421         <ol>
422         <li>Double-click on <code>VisualMagick/VisualDynamicMT.sln</code> to launch the ImageMagick Visual workspace.</li>
423         <li>Set the active configuration to <code>Win32 Release</code>.</li>
424         <li>Select <code>Rebuild All</code> to build the ImageMagick binary distribution.</li>
425         </ol>
426
427 <h3>Build ImageMagickObject</h3>
428
429         <ol>
430         <li>Launch the Command Prompt application and move to the <code>contrib\win32\ATL7\ImageMagickObject</code> folder.</li>
431         <li>Build ImageMagickObject with these commands:
432         <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">BuildImageMagickObject clean</span><span class="crtout"></span><span class="crtprompt"> $ </span><span class="crtin">BuildImageMagickObject release</span></p></li>
433         </ol>
434
435 <h3>Build PerlMagick</h3>
436
437         <ol>
438         <li>Launch the Command Prompt application and move to the <code>PerlMagick</code> folder.</li>
439         <li>Build PerlMagick with these commands:
440         <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">perl Makefile.nt</span><span class="crtout"></span><span class="crtprompt"> $ </span><span class="crtin">nmake release</span></p></li>
441         </ol>
442
443 <h3>Create the Self-installing ImageMagick Binary Distribution</h3>
444
445         <ol>
446         <li>Double-click on <code>VisualMagick/installer/im-dll-16.iss</code> to launch the Inno Setup 5 wizard.</li>
447         <li>Select <code>File-&gt;Compile</code>.</li>
448         </ol>
449
450 <h3>Install the Binary Distribution</h3>
451
452         <ol>
453         <li>Double-click on
454         <code>VisualMagick/bin/ImageMagick-6.8.6-8-Q16-windows-dll.exe</code>
455         to launch the ImageMagick binary distribution.</li>
456         <li>Complete the installer screens to install ImageMagick on your system.</li>
457         </ol>
458
459 <h3>Test the Binary Distribution</h3>
460
461         <ol>
462         <li>Launch the Command Prompt application and move to the <code>PerlMagick</code> folder and type
463         <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">nmake test</span></p></li>
464
465         <li>Move to the <code>VisualMagick/tests</code> folder and type
466         <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">validate</span></p></li>
467         <li>Move to the <code>VisualMagick/Magick++/tests</code> folder and type
468         <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">run_tests.bat</span></p></li>
469         <li>Move to the <code>VisualMagick/Magick++/demo</code> folder and type
470         <p class="crt"><span class="crtprompt"> $ </span><span class="crtin">run_demos.bat</span></p></li>
471         </ol>
472
473 <p>If all the tests pass without complaint, the ImageMagick self-install binary distribution is ready for use.</p>
474
475 </div>
476
477 <h2><a id="problems"></a>Dealing with Unexpected Problems</h2>
478 <div class="doc-section">
479
480 <p>Chances are the download, configure, build, and install of ImageMagick went flawlessly as it is intended, however, certain systems and environments may cause one or more steps to fail.  We discuss a few problems we've run across and how to take corrective action to ensure you have a working release of ImageMagick.</p>
481
482 <p>If the compiler generates an error or if it quits unexpectedly, go to the <a href="http://msdn.microsoft.com/vstudio/">Visual Studio</a> web site and look for Visual Studio service packs.  Chances are, after you download and install all the Visual Studio service packs, ImageMagick will compile and build as expected.</p>
483
484 </div>
485
486 <h2><a id="project"></a>Building Your Custom Project</h2>
487 <div class="doc-section">
488
489 <p>The Windows <a href="binary-releases.html#windows">binary</a> distribution includes a number of demo projects that you can use as a template for your own custom project.  For example, start with the Button project, generally located in the <code>c:/Program Files/ImageMagick-6.5.5-0/Magick++_demos</code> folder.  If not, be sure to select <code>Configuration Properties-&gt;C/C++-&gt;Preprocessor</code> and set these definitions:</p>
490
491 <pre class="text">
492   NDEBUG
493   WIN32
494   _CONSOLE
495   _VISUALC_
496   NeedFunctionPrototypes
497   _DLL
498   _MAGICKMOD_
499 </pre>
500
501 </div>
502
503 </div>
504
505 <div id="linkbar">
506     <span id="linkbar-west"> </span>
507
508     <span id="linkbar-center">
509       <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
510       <a href="../discourse-server">Discourse Server</a> •
511       <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a> •
512       <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
513     </span>
514     <span id="linkbar-east"> </span>
515 </div>
516 <div class="footer">
517   <span id="footer-west">©  1999-2013 ImageMagick Studio LLC</span>
518   <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>
519 </div>
520 <div style="clear: both; margin: 0; width: 100%; "></div>
521 </body>
522 </html>