]> 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.0 Strict//EN"\r
2     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
4 <head>\r
5   <meta http-equiv="Content-Type" value="application/xhtml+xml" />\r
6   <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U=" />\r
7   <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf" />\r
8   <style type="text/css" media="screen,projection"><!--\r
9     @import url("../www/magick.css");\r
10   --></style>\r
11   <link rel="shortcut icon" href="../images/wand.ico"  type="images/vnd.microsoft.icon"/>
12   <title>ImageMagick: Advanced Windows Source Installation</title>
13   <meta http-equiv="Content-Language" content="en-US"/>
14   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
15   <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
16   <meta name="Generator" content="PHP"/>
17   <meta name="Keywords" content="advanced, windows, source, installation, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
18   <meta name="Description" content="ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.  ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems.  The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically."/>
19   <meta name="Rating" content="GENERAL"/>
20   <meta name="Robots" content="INDEX, FOLLOW"/>
21   <meta name="Generator" content="ImageMagick Studio LLC"/>
22   <meta name="Author" content="ImageMagick Studio LLC"/>
23   <meta name="Revisit-after" content="2 DAYS"/>
24   <meta name="Resource-type" content="document"/>
25   <meta name="Copyright" content="Copyright (c) 1999-2010 ImageMagick Studio LLC"/>
26   <meta name="Distribution" content="Global"/>
27 </head>\r
28 \r
29 <body id="www-imagemagick-org">\r
30 <div class="titlebar">\r
31 <a href="../index.html">\r
32   <img src="../images/script.png" alt="[ImageMagick]"\r
33   style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>\r
34 <a href="http://www.networkredux.com">\r
35   <img src="../images/networkredux.png" alt="[sponsor]"\r
36   style="margin: 45px auto; border: 0px; float: left;" /></a>\r
37 <a href="http://www.imagemagick.org/discourse-server/">\r
38   <img src="../images/logo.jpg" alt=""\r
39   style="width: 114px; height: 118px; border: 0px; float: right;" /></a>\r
40 <a href="../index.html">\r
41   <img src="../images/sprite.jpg" alt=""\r
42   style="width: 114px; height: 118px; border: 0px; float: right;" /></a>\r
43 </div>\r
44 \r
45 <div class="eastbar">\r
46 \r
47 <div class="menu">
48   <a href="../index.html">About ImageMagick</a>
49 </div>
50 <div class="sep"></div>\r
51 <div class="menu">
52   <a href="../www/command-line-tools.html">Command-line Tools</a>
53 </div>
54 <div class="sub">
55     <a href="../www/command-line-processing.html">Processing</a>
56 </div>
57 <div class="sub">
58     <a href="../www/command-line-options.html">Options</a>
59 </div>
60 <div class="sub">
61     <a href="http://www.imagemagick.org/Usage/">Usage</a>
62 </div>
63 <div class="menu">
64   <a href="../www/api.html">Program Interfaces</a>
65 </div>
66 <div class="sub">
67     <a href="../www/magick-wand.html">MagickWand</a>
68 </div>
69 <div class="sub">
70     <a href="../www/magick-core.html">MagickCore</a>
71 </div>
72 <div class="sub">
73     <a href="../www/perl-magick.html">PerlMagick</a>
74 </div>
75 <div class="sub">
76     <a href="../Magick++/">Magick++</a>
77 </div>
78 <div class="menu">
79   <a href="../www/architecture.html">Architecture</a>
80 </div>
81 <div class="sep"></div>\r
82 <div  class="menu">
83    <a href="../www/install-source.html">Install from Source</a>
84 </div>
85 <div class="sub">
86     <a href="../www/install-source.html#unix">Unix</a>
87 </div>
88 <div class="sub">
89     <a href="../www/install-source.html#windows">Windows</a>
90  </div>
91 <div class="menu">
92   <a href="../www/binary-releases.html">Binary Releases</a>
93 </div>
94 <div class="sub">
95     <a href="../www/binary-releases.html#unix">Unix</a>
96 </div>
97 <div class="sub">
98     <a href="../www/binary-releases.html#macosx">Mac OS X</a>
99 </div>
100 <div class="sub">
101     <a href="../www/binary-releases.html#windows">Windows</a>
102 </div>
103 <div class="menu">
104   <a href="../www/resources.html">Resources</a>
105 </div>
106 <div class="sep"></div>\r
107 <div class="menu">
108   <a href="../www/download.html">Download</a>
109 </div>
110 <div class="sep"></div>\r
111 <div class="menu">
112   <a href="http://www.imagemagick.org/script/search.php">Search</a>
113 </div>
114 <div class="sep"></div>\r
115 <div class="menu">
116   <a href="../www/sitemap.html">Site Map</a>
117 </div>
118 <div  class="sub">
119     <a href="../www/links.html">Links</a>
120 </div>
121 <div class="sep"></div>\r
122 <div  class="menu">
123   <a href="../www/sponsors.html">Sponsors:</a>
124
125 <div class="sponsbox">
126 <div  class="sponsor">
127    <a href="http://www.geschenke-elsen.de/" title="Lampe Berger">Lampe Berger</a><!-- 20106101000040 -->
128 </div>
129 <div  class="sponsor">
130   <a href="http://www.deko.net">Deko.net</a><!-- 201101010600 Peterssen-->
131 </div>
132 <div  class="sponsor">
133   <a href="http://www.tomsgutscheine.de">Tom's Gutscheine</a><!-- 201005010360 invendio.de-->
134 </div>
135 <div  class="sponsor">
136   <a href="http://www.online-kredit-index.de">Kredit</a><!-- 201007010120 Buchhorn -->
137 </div>
138 <div  class="sponsor">
139   <a href="http://www.blumenversender.com">Blumenversand</a><!-- 201005010120 -->
140 </div>
141 <div  class="sponsor">
142   <a href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
143 </div>
144 <div  class="sponsor">
145    <a href="http://www.goyax.de">Börse</a><!-- 201004010240 Gewiese digital-finance.de -->
146 </div>
147 <div  class="sponsor">
148    <a href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012011200 allesdruck.de-->
149 </div>
150 </div>
151 </div>
152 \r
153 \r
154 </div>\r
155 \r
156 <div class="main">\r
157 \r
158 \r
159 <p class="navigation-index">[<a href="#download">Download &amp; Unpack</a> &bull; <a href="#configure">Configure</a>  &bull; <a href="#build">Build</a> &bull; <a href="#install">Install</a> &bull; <a href="#binary">Create a Self-installing Binary Distribution</a> &bull; <a href="#problems">Dealing with Unexpected Problems</a> &bull; <a href="#project">Building Your Custom Project</a>]</p>
160
161 <div class="doc-section">
162 <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="../www/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="../www/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>
163 </div>
164
165 <h2><a name="download"></a>Download &amp; Unpack</h2>
166 <div class="doc-section">
167
168 <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="../www/binary-releases.html#windows">binary release</a>.</p>
169
170 <p>Download <a href="ftp://ftp.imagemagick.org/pub/ImageMagick/windows/ImageMagick-windows.zip">ImageMagick-windows.zip</a> from <a href="ftp://ftp.imagemagick.org/pub/ImageMagick/windows">ftp.imagemagick.org</a> or its <a href="../www/download.html">mirrors</a> and verify the distribution against its <a href="http://www.imagemagick.org/download/windows/digest.rdf">message digest</a>.</p>
171
172 <p>You can unpack the distribution with <a href="http://www.winzip.com">WinZip</a> or type the following from any MS-DOS Command Prompt window:</p>
173
174 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>unzip ImageMagick-windows.zip</span></p>
175 <p>Now that you have the ImageMagick Windows source distribution unpacked, let's configure it.</p>
176
177 </div>
178
179 <h2><a name="configure"></a>Configure</h2>
180 <div class="doc-section">
181
182 <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 <kbd>configure</kbd> 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 <kbd>configure</kbd> program creates a set of build files that are consistent for a specific runtime selection listed here:</p>
183
184 <ol>
185   <li>Dynamic Multi-threaded DLL runtimes (VisualDynamicMT).</li>
186   <li>Static Single-threaded runtimes (VisualStaticST).</li>
187         <li>Static Multi-threaded runtimes (VisualStaticMT).</li>
188         <li>Static Multi-threaded DLL runtimes (VisualStaticMTDLL).</li>
189 </ol>
190
191 <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 <kbd>animate</kbd>, <kbd>display</kbd>, and <kbd>import</kbd> program depends on the X11 delegate libraries, these programs will no work if you choose not to include X11 support.</p>
192
193 <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>
194
195 <p>To create a workspace for your requirements, simply go to the <kbd>VisualMagick\configure</kbd> folder and open the <kbd>configure.dsw</kbd> workspace (for Visual Studio 6) or <kbd>configure.sln</kbd> (for Visual Studio 7 or 8). Set the build configuration to <em>Release</em>.</p>
196
197 <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>
198
199 <p>The configure program has a button entitled:</p>
200
201 <p class="text">
202   Edit "magick_config.h"
203 </p>
204
205 <p>Click on this button to bring up <kbd>magick-config.h</kbd> in Windows Notepad.  Review and optionally change any preprocessor defines in ImageMagick's <kbd>magick_config.h</kbd> file to suit your needs.  This file is copied to <kbd>magick\magick_config.h</kbd>.  You may safely open <kbd>magick\magick_config.h</kbd>, 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 <kbd>magick_config.h</kbd> file.</p>
206
207 <p>Key user defines in <kbd>magick_config.h</kbd> include:</p>
208
209 <dl class="doc">
210 <dt> MAGICKCORE_QUANTUM_DEPTH (default 16)</dt>
211   <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>
212 <dt>MAGICKCORE_INSTALLED_SUPPORT (default undefined)</dt>
213   <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="#install">installing</a> ImageMagick on your system.</dd>
214 <dt>ProvideDllMain (default defined)</dt>
215   <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 IntializeMagick() from dependent applications is only useful for DLL builds.</dd>
216 </dl>
217
218 <p>ImageMagick is now configured and ready to build.</p>
219
220 <p>The default build is WIN32.  For 64-bit, open a newly created static 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.</p>
221
222 </div>
223
224 <h2><a name="Build"></a>Build</h2>
225 <div class="doc-section">
226
227 <p>After creating your build environment, proceed to open the DSW (or SLN) workspace in the <kbd>VisualMagick</kbd> 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>
228
229 <ol>
230   <li>Right click on the All project and select <em>Set As Active Project</em></li>
231   <li>Select "Build=>Clean Solution"</li>
232         <li>Select "Build=>Build Solution"</li>
233 </ol>
234
235 <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>
236
237 <p>After a successful build, all of the required files that are needed to run any of the <a href="../www/command-line-tools.html">command line tools</a> are located in the <kbd>VisualMagick\bin</kbd> 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>
238
239 <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 <kbd>ImageMagick\Magick++\demo</kbd>, and <kbd>ImageMagick\Magick++\tests</kbd>. There are also a variety of tests that use the straight C API as well in ImageMagick\tests.</p>
240
241 <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>
242
243 <p class="text">
244   Include all demo and test programs
245 </p>
246
247 <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>
248
249 <p>This the checkbox:</p>
250
251 <p class="text">
252   Generate all utility projects with full paths rather then relative paths.
253 </p>
254
255 <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>
256
257 <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>
258
259 <p>With this feature enabled, you should be able to nab a copy of</p>
260
261 <p class="text">
262   VisualMagick\utilities\UTIL_convert_xxx_exe.dsp  (for C) or  <br/>
263   VisualMagick\Magick++\demo\UTIL_demo_xxx_exe.dsp (for C++)
264 </p>
265
266 <p>and pop it into Notepad, modify it (carefully) to your needs and be on your way to happy compiling and linking.</p>
267
268 <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>
269
270 <p>The choice of what to use as a starting point is very easy.</p>
271
272 <p>For straight C API command line applications use something from:</p>
273
274 <p class="text">
275   ImageMagick\tests or  <br/>
276   ImageMagick\utilities (source code) or <br/>
277   ImageMagick\VisualMagick\tests or  <br/>
278   ImageMagick\Visualmagick\utilities (project - DSP)
279 </p>
280
281 <p>For C++ and Magick++ command line applications use something from:</p>
282
283 <p class="text">
284   ImageMagick\Magick++\tests or ImageMagick\Magick++\demo (source code) or <br/>
285   ImageMagick\VisualMagick\Magick++\tests or  <br/>
286   ImageMagick\VisualMagick\Magick++\demo (project - DSP)
287 </p>
288
289 <p>For C++ and Magick++ and MFC windows applications use:</p>
290
291 <p class="text">
292   ImageMagick\contrib\win32\MFC\NtMagick (source code) or <br/>
293   ImageMagick\VisualMagick\contrib\win32\MFC\NtMagick (project - DSP)
294 </p>
295
296 <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>
297
298 <p>The default options are all targeted at having all the components in one place (e.g. the <kbd>bin</kbd> directory of the VisualMagick build tree). These components may be copied to another folder (such as to another computer).</p>
299
300 <p>The folder containing the executables and DLLs should contain the following files:</p>
301
302 <ol>
303   <li>magic.xml</li>
304   <li>delegates.xml</li>
305   <li>modules.xml</li>
306   <li>colors.xml</li>
307 </ol>
308
309 <p>among others.</p>
310
311 <p>The <kbd>bin</kbd> folder should contains all EXE's and DLL's as well as the very important <kbd>modules.xml</kbd> file.</p>
312
313 <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 <kbd>pushd e:\xxx\yyy\bin</kbd> in any scripts you write to execute <em>out of</em> this directory.</p>
314
315 <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>
316
317         <h3>ENVIRONMENT VARIABLES</h3>
318         <div class="doc-section">
319
320                 <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>
321
322                 <h4>PATH</h4>
323                 <div class="doc-section">
324                   <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 <kbd>bin</kbd> directory in. For instance, to do this for the default build environment like I do, you might add:</p>
325
326
327                         <p class="text">
328                           C:\ImageMagick\VisualMagick\bin
329                         </p>
330
331                 </div>
332
333                 <h4>MAGICK_HOME</h4>
334                 <div class="doc-section">
335                   <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 <kbd>bin</kbd> - 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>
336
337                         <p class="text">
338                           C:\ImageMagick\coders
339                         </p>
340
341                         <p>This also the place were ImageMagick expects to find the <kbd>colors.xml</kbd>, <kbd>delegates.xml</kbd>, <kbd>magic.xml</kbd>, <kbd>modules.xml</kbd>, and <kbd>type.xml</kbd> files.</p>
342                 </div>
343         </div>
344
345 <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>
346
347 <p>Always keep the XC format, since ImageMagick uses it internally.</p>
348
349 <p>You can elect to changes these things the good old <em>hard-coded</em> way. This define is applicable in <kbd>magick-config.h</kbd>:</p>
350
351 <p class="text">
352   #define MagickConfigurePath  "C:\\ImageMagick\\"
353 </p>
354
355 <p>To view any image in a Microsoft window, type</p>
356
357 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>convert image.ext win:</span></p>
358 <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>
359
360 <p>You may use any standard web browser (e.g. Internet Explorer) to browse the ImageMagick documentation.</p>
361
362 <p>The Win2K executables will work under Windows 98.</p>
363
364 <p>ImageMagick is now configured and built. You can optionally install it on your system as discussed below.</p>
365
366 <p>If you are looking to install the ImageMagick COM+ object, see <a href="../www/ImageMagickObject.html">Installing the ImageMagickObject COM+ Component</a>.</p>
367
368 </div>
369
370 <h2><a name="Install"></a>Install</h2>
371 <div class="doc-section">
372
373 <p>You can run ImageMagick command line utilities directly from the <kbd>VisualMagick\bin</kbd> 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="#configure">configure</a> time to utilize the installer scripts.</p>
374
375 <p>To get started building a self-installing ImageMagick executable, go to <kbd>VisualMagick\installer</kbd> folder and click on a script that matches your build environment.  Press F9 to build and install ImageMagick.  The default location is <kbd>C:Program Files\ImageMagick-6.?.?\Q?</kbd>.  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>
376
377 </div>
378
379 <h2><a name="binary"></a>Create a Self-Installing Binary Distribution</h2>
380 <div class="doc-section">
381
382 <h3>Prerequisites</h3>
383
384         <ol>
385         <li>Download and install <a href="http://www.jrsoftware.org/isinfo.html">Inno Setup 5</a>.</li>
386         <li>Download and install <a href="http://www.activestate.com/activeperl/download/">ActiveState ActivePerl</a>.</li>
387         </ol>
388
389 <h3>Run the Configure Wizard</h3>
390
391         <ol>
392         <li>Double-click on <kbd>VisualMagick/configure/configure.sln</kbd> to build the configure wizard.</li>
393         <li>Select <kbd>Rebuild All</kbd> and launch the configure wizard.</li>
394         <li>Uncheck <kbd>Use X11 Stubs</kbd> and check <kbd>Build demo and test programs</kbd>.</li>
395         <li>Click on <kbd>Edit magick_config.h</kbd> and define <kbd>MAGICKCORE_INSTALLED_SUPPORT</kbd>.</li>
396         <li>Complete the configure wizard screens to create the ImageMagick Visual C++ workspace.</li>
397         </ol>
398
399 <h3>Build ImageMagick</h3>
400
401         <ol>
402         <li>Double-click on <kbd>VisualMagick/VisualDynamicMT.sln</kbd> to launch the ImageMagick Visual workspace.</li>
403         <li>Set the active configuration to <kbd>Win32 Release</kbd>.</li>
404         <li>Select <kbd>Rebuild All</kbd> to build the ImageMagick binary distribution.</li>
405         </ol>
406
407 <h3>Build ImageMagickObject</h3>
408
409         <ol>
410         <li>Launch the MS-DOS Command Prompt application and move to the <kbd>contrib\win32\ATL7\ImageMagickObject</kbd> folder.</li>
411         <li>Build ImageMagickObject with these commands:
412         <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>BuildImageMagickObject clean</span><span class='crtout'></span><span class="crtprompt"> $magick&gt; </span><span class='crtin'>BuildImageMagickObject release</span></p></li>
413         </ol>
414
415 <h3>Build PerlMagick</h3>
416
417         <ol>
418         <li>Launch the MS-DOS Command Prompt application and move to the <kbd>PerlMagick</kbd> folder.</li>
419         <li>Build PerlMagick with these commands:
420         <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>perl Makefile.nt</span><span class='crtout'></span><span class="crtprompt"> $magick&gt; </span><span class='crtin'>nmake release</span></p></li>
421         </ol>
422
423 <h3>Create the Self-installing ImageMagick Binary Distribution</h3>
424
425         <ol>
426         <li>Double-click on <kbd>VisualMagick/installer/im-dll-16.iss</kbd> to launch the Inno Setup 5 wizard.</li>
427         <li>Select <kbd>File->Compile</kbd>.</li>
428         </ol>
429
430 <h3>Install the Binary Distribution</h3>
431
432         <ol>
433         <li>Double-click on
434         <kbd>VisualMagick/bin/ImageMagick-6.6.0-4-Q16-windows-dll.exe</kbd>
435         to launch the ImageMagick binary distribution.</li>
436         <li>Complete the installer screens to install ImageMagick on your system.</li>
437         </ol>
438
439 <h3>Test the Binary Distribution</h3>
440
441         <ol>
442         <li>Launch the MS-DOS Command Prompt application and move to the <kbd>PerlMagick</kbd> folder and type
443         <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>nmake test</span></p></li>
444
445         <li>Move to the <kbd>VisualMagick/tests</kbd> folder and type
446         <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>validate</span></p></li>
447         <li>Move to the <kbd>VisualMagick/Magick++/tests</kbd> folder and type
448         <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>run_tests.bat</span></p></li>
449         <li>Move to the <kbd>VisualMagick/Magick++/demo</kbd> folder and type
450         <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>run_demos.bat</span></p></li>
451         </ol>
452
453 <p>If all the tests pass without complaint, the ImageMagick self-install binary distribution is ready for use.</p>
454
455 </div>
456
457 <h2><a name="problems"></a>Dealing with Unexpected Problems</h2>
458 <div class="doc-section">
459
460 <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>
461
462 <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>
463
464 </div>
465
466 <h2><a name="project"></a>Building Your Custom Project</h2>
467 <div class="doc-section">
468
469 <p>The Windows <a href="../www/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 <kbd>c:/Program Files/ImageMagick-6.5.5-0/Magick++_demos</kbd> folder.  If not, be sure to select <kbd>Configuration Properties->C/C++->Preprocessor</kbd> and set these definitions:</p>
470 </p
471 <pre class="text">
472   NDEBUG
473   WIN32
474   _CONSOLE
475   _VISUALC_
476   NeedFunctionPrototypes
477   _DLL
478   _MAGICKMOD_
479 </pre>
480
481 </div>
482 \r
483 </div>\r
484 \r
485 <div id="linkbar">\r
486  <!--    <span id="linkbar-west">&nbsp;</span>  -->\r
487     <span id="linkbar-center">\r
488       <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;\r
489     <a href="http://studio.webbyland.com/ImageMagick/MagickStudio/scripts/MagickStudio.cgi">Studio</a>\r
490     </span>\r
491     <span id="linkbar-east">&nbsp;</span>\r
492   </div>\r
493   <div class="footer">\r
494     <span id="footer-west">&copy; 1999-2010 ImageMagick Studio LLC</span>\r
495     <span id="footer-east"> <a href="http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>\r
496   </div>\r
497   <div style="clear: both; margin: 0; width: 100%; "></div>\r
498 </body>\r
499 </html>\r