]> 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" \r
2   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr">\r
4 <head>\r
5   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>\r
6   <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U="/>\r
7   <title>ImageMagick: Advanced Windows Source Installation</title>
8   <meta http-equiv="Content-Language" content="en-US"/>
9   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
10   <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
11   <meta name="Application-name" content="ImageMagick"/>
12   <meta name="Description" content="ImageMagick is a software suite to create, edit, compose, or convert bitmap images in a variety of formats. Use ImageMagick to scale, rotate, shear, distort and transform images."/>
13   <meta name="Application-url" content="http://www.imagemagick.org"/>
14   <meta name="Generator" content="PHP"/>
15   <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"/>
16   <meta name="Rating" content="GENERAL"/>
17   <meta name="Robots" content="INDEX, FOLLOW"/>
18   <meta name="Generator" content="ImageMagick Studio LLC"/>
19   <meta name="Author" content="ImageMagick Studio LLC"/>
20   <meta name="Revisit-after" content="2 DAYS"/>
21   <meta name="Resource-type" content="document"/>
22   <meta name="Copyright" content="Copyright (c) 1999-2011 ImageMagick Studio LLC"/>
23   <meta name="Distribution" content="Global"/>
24   <link rel="icon" href="../images/wand.png"/>
25   <link rel="shortcut icon" href="../images/wand.ico"  type="images/x-icon"/>
26   <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>\r
27   <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />\r
28   <style type="text/css" media="all">\r
29     @import url("../www/magick.css");\r
30   </style>\r
31   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>\r
32   <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>\r
33   <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />\r
34   <script type="text/javascript">\r
35     $(document).ready(function() {\r
36       $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({\r
37         'transitionIn'  : 'elastic',\r
38         'transitionOut' : 'elastic',\r
39         'overlayShow'   : false,\r
40         'opacity'       : true\r
41       });\r
42     });\r
43   </script>\r
44 </head>\r
45 \r
46 <body id="www-imagemagick-org">\r
47 <div class="titlebar">\r
48 <a href="../index.html">\r
49   <img src="../images/script.png" alt="[ImageMagick]"\r
50   style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>\r
51 <a href="http://www.networkredux.com">\r
52   <img src="../images/networkredux.png" alt="[sponsor]"\r
53   style="margin-top: 42px; border: 0px; float: left;" /></a>\r
54 <a href="http://www.imagemagick.org/discourse-server/">\r
55   <img src="../images/logo.jpg" alt=""\r
56   style="width: 123px; height: 118px; border: 0px; float: right;" /></a>\r
57 <a href="../index.html">\r
58   <img src="../images/sprite.jpg" alt=""\r
59   style="width: 114px; height: 118px; border: 0px; float: right;" /></a>\r
60 </div>\r
61 \r
62 <div class="westbar">\r
63 \r
64 <div class="menu">
65   <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
66 </div>
67 <div class="sep"></div>\r
68 <div class="menu">
69   <a title="Binary Releases" href="../www/binary-releases.html">Binary Releases</a>
70 </div>
71 <div class="sub">
72     <a title="Binary Release: Unix" href="../www/binary-releases.html#unix">Unix</a>
73 </div>
74 <div class="sub">
75     <a title="Binary Release: MacOS X" href="../www/binary-releases.html#macosx">Mac OS X</a>
76 </div>
77 <div class="sub">
78     <a title="Binary Release: Windows" href="../www/binary-releases.html#windows">Windows</a>
79 </div>
80 <div class="sep"></div>\r
81 <div class="menu">
82   <a title="Command-line Tools" href="../www/command-line-tools.html">Command-line Tools</a>
83 </div>
84 <div class="sub">
85     <a title="Command-line Tools: Processing" href="../www/command-line-processing.html">Processing</a>
86 </div>
87 <div class="sub">
88     <a title="Command-line Tools: Options" href="../www/command-line-options.html">Options</a>
89 </div>
90 <div class="sub">
91     <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
92 </div>
93 <div class="menu">
94   <a title="Program Interfaces" href="../www/api.html">Program Interfaces</a>
95 </div>
96 <div class="sub">
97     <a title="Program Interface: MagickWand" href="../www/magick-wand.html">MagickWand</a>
98 </div>
99 <div class="sub">
100     <a title="Program Interface: MagickCore" href="../www/magick-core.html">MagickCore</a>
101 </div>
102 <div class="sub">
103     <a title="Program Interface: PerlMagick" href="../www/perl-magick.html">PerlMagick</a>
104 </div>
105 <div class="sub">
106     <a title="Program Interface: Magick++" href="../www/magick++.html">Magick++</a>
107 </div>
108 <div class="sep"></div>\r
109 <div  class="menu">
110    <a title="Install from Source" href="../www/install-source.html">Install from Source</a>
111 </div>
112 <div class="sub">
113     <a title="Install from Source: Unix" href="../www/install-source.html#unix">Unix</a>
114 </div>
115 <div class="sub">
116     <a title="Install from Source: Windows" href="../www/install-source.html#windows">Windows</a>
117  </div>
118 <div class="menu">
119   <a title="Resources" href="../www/resources.html">Resources</a>
120 </div>
121 <div class="menu">
122   <a title="Architecture" href="../www/architecture.html">Architecture</a>
123 </div>
124 <div class="menu">
125   <a title="Download" href="../www/download.html">Download</a>
126 </div>
127 <div class="sep"></div>\r
128 <div class="menu">
129   <a title="Search" href="../www/search.html">Search</a>
130 </div>
131 <div class="sep"></div>\r
132 <div class="menu">
133   <a title="Site Map" href="../www/sitemap.html">Site Map</a>
134 </div>
135 <div  class="sub">
136   <a title="Site Map: Links" href="../www/links.html">Links</a>
137 </div>
138 <div class="sep"></div>\r
139 <div  class="menu">
140   <a title="Sponsors" href="../www/sponsors.html">Sponsors:</a>
141
142 <div class="sponsbox">
143 <div  class="sponsor">
144   <a title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201106010240 -->
145 </div>
146 <div class="sponsor">
147   <a title="Sponsor: Web Hosting" href="http://www.bodhost.com/hosting.shtml">Web Hosting</a><!-- 201104010090 -->
148 </div>
149 <div  class="sponsor">
150   <a title="Sponsor: Image Converter" href="http://www.batchphoto.com">Image Converter</a><!-- 201103010900 Bits Coffee-->
151 </div>
152 <div  class="sponsor">
153   <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
154 </div>
155 <div  class="sponsor">
156   <a title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
157 </div>
158 <div  class="sponsor">
159    <a title="Sponsor: Free Catalogs" href="http://www.who-sells-it.com/">Free Catalogs</a><!-- 20120801000600 -->
160 </div>
161 </div>
162 </div>
163 </div>\r
164 \r
165 <div class="eastbar">\r
166   <script type="text/javascript">\r
167   <!--\r
168     google_ad_client = "pub-3129977114552745";\r
169     google_ad_slot = "0574824969";\r
170     google_ad_width = 160;\r
171     google_ad_height = 600;\r
172   //-->\r
173   </script>\r
174   <script type="text/javascript"\r
175     src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
176   </script>\r
177 </div>\r
178 \r
179 <div class="main">\r
180 \r
181 \r
182 <h1>ImageMagick Advanced Windows Installation</h1>
183 <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>
184
185 <div class="doc-section">
186 <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>
187 </div>
188
189 <h2><a id="download"></a>Download &amp; Unpack</h2>
190 <div class="doc-section">
191
192 <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>
193
194 <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>
195
196 <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>
197
198 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>unzip ImageMagick-windows.zip</span></p>
199 <p>Now that you have the ImageMagick Windows source distribution unpacked, let's configure it.</p>
200
201 </div>
202
203 <h2><a id="configure"></a>Configure</h2>
204 <div class="doc-section">
205
206 <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>
207
208 <ol>
209   <li>Dynamic Multi-threaded DLL runtimes (VisualDynamicMT).</li>
210   <li>Static Single-threaded runtimes (VisualStaticST).</li>
211         <li>Static Multi-threaded runtimes (VisualStaticMT).</li>
212         <li>Static Multi-threaded DLL runtimes (VisualStaticMTDLL).</li>
213 </ol>
214
215 <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>
216
217 <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>
218
219 <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>
220
221 <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>
222
223 <p>The configure program has a button entitled:</p>
224
225 <p class="text">
226   Edit "magick_config.h"
227 </p>
228
229 <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>
230
231 <p>Key user defines in <kbd>magick_config.h</kbd> include:</p>
232
233 <dl class="doc">
234 <dt> MAGICKCORE_QUANTUM_DEPTH (default 16)</dt>
235   <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>
236 <dt>MAGICKCORE_INSTALLED_SUPPORT (default undefined)</dt>
237   <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>
238 <dt>ProvideDllMain (default defined)</dt>
239   <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>
240 </dl>
241
242 <p>ImageMagick is now configured and ready to build.</p>
243
244 <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>
245
246 </div>
247
248 <h2><a id="Build"></a>Build</h2>
249 <div class="doc-section">
250
251 <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>
252
253 <ol>
254   <li>Right click on the All project and select <em>Set As Active Project</em></li>
255   <li>Select "Build=>Clean Solution"</li>
256         <li>Select "Build=>Build Solution"</li>
257 </ol>
258
259 <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>
260
261 <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>
262
263 <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>
264
265 <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>
266
267 <p class="text">
268   Include all demo and test programs
269 </p>
270
271 <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>
272
273 <p>This the checkbox:</p>
274
275 <p class="text">
276   Generate all utility projects with full paths rather then relative paths.
277 </p>
278
279 <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>
280
281 <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>
282
283 <p>With this feature enabled, you should be able to nab a copy of</p>
284
285 <p class="text">
286   VisualMagick\utilities\UTIL_convert_xxx_exe.dsp  (for C) or  <br/>
287   VisualMagick\Magick++\demo\UTIL_demo_xxx_exe.dsp (for C++)
288 </p>
289
290 <p>and pop it into Notepad, modify it (carefully) to your needs and be on your way to happy compiling and linking.</p>
291
292 <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>
293
294 <p>The choice of what to use as a starting point is very easy.</p>
295
296 <p>For straight C API command line applications use something from:</p>
297
298 <p class="text">
299   ImageMagick\tests or  <br/>
300   ImageMagick\utilities (source code) or <br/>
301   ImageMagick\VisualMagick\tests or  <br/>
302   ImageMagick\Visualmagick\utilities (project - DSP)
303 </p>
304
305 <p>For C++ and Magick++ command line applications use something from:</p>
306
307 <p class="text">
308   ImageMagick\Magick++\tests or ImageMagick\Magick++\demo (source code) or <br/>
309   ImageMagick\VisualMagick\Magick++\tests or  <br/>
310   ImageMagick\VisualMagick\Magick++\demo (project - DSP)
311 </p>
312
313 <p>For C++ and Magick++ and MFC windows applications use:</p>
314
315 <p class="text">
316   ImageMagick\contrib\win32\MFC\NtMagick (source code) or <br/>
317   ImageMagick\VisualMagick\contrib\win32\MFC\NtMagick (project - DSP)
318 </p>
319
320 <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>
321
322 <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>
323
324 <p>The folder containing the executables and DLLs should contain the following files:</p>
325
326 <ol>
327   <li>magic.xml</li>
328   <li>delegates.xml</li>
329   <li>modules.xml</li>
330   <li>colors.xml</li>
331 </ol>
332
333 <p>among others.</p>
334
335 <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>
336
337 <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>
338
339 <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>
340
341         <h3>ENVIRONMENT VARIABLES</h3>
342         <div class="doc-section">
343
344                 <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>
345
346                 <h4>PATH</h4>
347                 <div class="doc-section">
348                   <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>
349
350
351                         <p class="text">
352                           C:\ImageMagick\VisualMagick\bin
353                         </p>
354
355                 </div>
356
357                 <h4>MAGICK_HOME</h4>
358                 <div class="doc-section">
359                   <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>
360
361                         <p class="text">
362                           C:\ImageMagick\coders
363                         </p>
364
365                         <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>
366                 </div>
367         </div>
368
369 <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>
370
371 <p>Always keep the XC format, since ImageMagick uses it internally.</p>
372
373 <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>
374
375 <p class="text">
376   #define MagickConfigurePath  "C:\\ImageMagick\\"
377 </p>
378
379 <p>To view any image in a Microsoft window, type</p>
380
381 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>convert image.ext win:</span></p>
382 <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>
383
384 <p>You may use any standard web browser (e.g. Internet Explorer) to browse the ImageMagick documentation.</p>
385
386 <p>The Win2K executables will work under Windows 98.</p>
387
388 <p>ImageMagick is now configured and built. You can optionally install it on your system as discussed below.</p>
389
390 <p>If you are looking to install the ImageMagick COM+ object, see <a href="../www/ImageMagickObject.html">Installing the ImageMagickObject COM+ Component</a>.</p>
391
392 </div>
393
394 <h2><a id="Install"></a>Install</h2>
395 <div class="doc-section">
396
397 <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>
398
399 <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>
400
401 </div>
402
403 <h2><a id="binary"></a>Create a Self-Installing Binary Distribution</h2>
404 <div class="doc-section">
405
406 <h3>Prerequisites</h3>
407
408         <ol>
409         <li>Download and install <a href="http://www.jrsoftware.org/isinfo.html">Inno Setup 5</a>.</li>
410         <li>Download and install <a href="http://www.activestate.com/activeperl/download/">ActiveState ActivePerl</a>.</li>
411         </ol>
412
413 <h3>Run the Configure Wizard</h3>
414
415         <ol>
416         <li>Double-click on <kbd>VisualMagick/configure/configure.sln</kbd> to build the configure wizard.</li>
417         <li>Select <kbd>Rebuild All</kbd> and launch the configure wizard.</li>
418         <li>Uncheck <kbd>Use X11 Stubs</kbd> and check <kbd>Build demo and test programs</kbd>.</li>
419         <li>Click on <kbd>Edit magick_config.h</kbd> and define <kbd>MAGICKCORE_INSTALLED_SUPPORT</kbd>.</li>
420         <li>Complete the configure wizard screens to create the ImageMagick Visual C++ workspace.</li>
421         </ol>
422
423 <h3>Build ImageMagick</h3>
424
425         <ol>
426         <li>Double-click on <kbd>VisualMagick/VisualDynamicMT.sln</kbd> to launch the ImageMagick Visual workspace.</li>
427         <li>Set the active configuration to <kbd>Win32 Release</kbd>.</li>
428         <li>Select <kbd>Rebuild All</kbd> to build the ImageMagick binary distribution.</li>
429         </ol>
430
431 <h3>Build ImageMagickObject</h3>
432
433         <ol>
434         <li>Launch the MS-DOS Command Prompt application and move to the <kbd>contrib\win32\ATL7\ImageMagickObject</kbd> folder.</li>
435         <li>Build ImageMagickObject with these commands:
436         <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>
437         </ol>
438
439 <h3>Build PerlMagick</h3>
440
441         <ol>
442         <li>Launch the MS-DOS Command Prompt application and move to the <kbd>PerlMagick</kbd> folder.</li>
443         <li>Build PerlMagick with these commands:
444         <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>
445         </ol>
446
447 <h3>Create the Self-installing ImageMagick Binary Distribution</h3>
448
449         <ol>
450         <li>Double-click on <kbd>VisualMagick/installer/im-dll-16.iss</kbd> to launch the Inno Setup 5 wizard.</li>
451         <li>Select <kbd>File->Compile</kbd>.</li>
452         </ol>
453
454 <h3>Install the Binary Distribution</h3>
455
456         <ol>
457         <li>Double-click on
458         <kbd>VisualMagick/bin/ImageMagick-6.6.7-3-Q16-windows-dll.exe</kbd>
459         to launch the ImageMagick binary distribution.</li>
460         <li>Complete the installer screens to install ImageMagick on your system.</li>
461         </ol>
462
463 <h3>Test the Binary Distribution</h3>
464
465         <ol>
466         <li>Launch the MS-DOS Command Prompt application and move to the <kbd>PerlMagick</kbd> folder and type
467         <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>nmake test</span></p></li>
468
469         <li>Move to the <kbd>VisualMagick/tests</kbd> folder and type
470         <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>validate</span></p></li>
471         <li>Move to the <kbd>VisualMagick/Magick++/tests</kbd> folder and type
472         <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>run_tests.bat</span></p></li>
473         <li>Move to the <kbd>VisualMagick/Magick++/demo</kbd> folder and type
474         <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>run_demos.bat</span></p></li>
475         </ol>
476
477 <p>If all the tests pass without complaint, the ImageMagick self-install binary distribution is ready for use.</p>
478
479 </div>
480
481 <h2><a id="problems"></a>Dealing with Unexpected Problems</h2>
482 <div class="doc-section">
483
484 <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>
485
486 <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>
487
488 </div>
489
490 <h2><a id="project"></a>Building Your Custom Project</h2>
491 <div class="doc-section">
492
493 <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>
494 </p
495 <pre class="text">
496   NDEBUG
497   WIN32
498   _CONSOLE
499   _VISUALC_
500   NeedFunctionPrototypes
501   _DLL
502   _MAGICKMOD_
503 </pre>
504
505 </div>
506 \r
507 </div>\r
508 \r
509 <div id="linkbar">\r
510     <span id="linkbar-west">&nbsp;</span>\r
511     <span id="linkbar-center">\r
512       <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;\r
513       <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>\r
514     </span>\r
515     <span id="linkbar-east">&nbsp;</span>\r
516   </div>\r
517   <div class="footer">\r
518     <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>\r
519     <span id="footer-east"> <a href="http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>\r
520   </div>\r
521   <div style="clear: both; margin: 0; width: 100%; "></div>\r
522   <script type="text/javascript">\r
523     var _gaq = _gaq || [];\r
524     _gaq.push(['_setAccount', 'UA-17690367-1']);\r
525     _gaq.push(['_trackPageview']);\r
526 \r
527     (function() {\r
528       var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\r
529       ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\r
530       var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\r
531     })();\r
532   </script>\r
533 </body>\r
534 </html>\r