<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>aaron vanderzwan &#187; Scripts</title>
	<atom:link href="http://www.aaronvanderzwan.com/blog/category/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aaronvanderzwan.com/blog</link>
	<description>Smile... It&#039;ll make you feel better.</description>
	<lastBuildDate>Tue, 31 Jan 2012 21:47:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MaxImage 2.0-beta2 Release &amp; jsFiddle with it</title>
		<link>http://www.aaronvanderzwan.com/blog/2011/11/maximage-2-0-beta-2-jsfiddle-with-it/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=maximage-2-0-beta-2-jsfiddle-with-it</link>
		<comments>http://www.aaronvanderzwan.com/blog/2011/11/maximage-2-0-beta-2-jsfiddle-with-it/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 20:37:41 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MaxImage]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[2.0]]></category>
		<category><![CDATA[Background]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[fullscreen]]></category>
		<category><![CDATA[Slideshow]]></category>

		<guid isPermaLink="false">http://www.aaronvanderzwan.com/blog/?p=32523</guid>
		<description><![CDATA[<p><img width="640" height="507" src="http://www.aaronvanderzwan.com/blog/wp-content/uploads/2011/11/maximage2.0-b2-640x507.jpg" class="attachment-featured-image wp-post-image" alt="maximage2.0-b2" title="maximage2.0-b2" /></p><br />MaxImage 2.0 is the first fullscreen background slideshow plugin that utilizes jQuery Cycle Plugin and all itâ€™s transitions / options. Â Check out the original post. I have been testing MaxImage 2.0 beta before it&#8217;s public launch and the tests have been extremely hopeful. Â I have successfully tested it in Firefox 3.6+ (Mac &#38; PC), Safari, [...]]]></description>
			<content:encoded><![CDATA[<p><img width="640" height="507" src="http://www.aaronvanderzwan.com/blog/wp-content/uploads/2011/11/maximage2.0-b2-640x507.jpg" class="attachment-featured-image wp-post-image" alt="maximage2.0-b2" title="maximage2.0-b2" /></p><br /><blockquote><p>MaxImage 2.0 is the first fullscreen background slideshow plugin that utilizes jQuery Cycle Plugin and all itâ€™s transitions / options. Â <a href="http://www.aaronvanderzwan.com/blog/2011/11/maximage-2-0-beta1-release/">Check out the original post</a>.</p></blockquote>
<p>I have been testing MaxImage 2.0 beta before it&#8217;s public launch and the tests have been extremely hopeful. Â I have successfully tested it in Firefox 3.6+ (Mac &amp; PC), Safari, Chrome, Opera and even IE back to IE7. Â All of the options I have tested work as expected. Â All of the 28 transitions that cycle supports have been tested and work as expected.</p>
<p>Here is the coolest part though&#8230; I have set up the plugin in jsFiddle so that anyone can play with it and see how sweet it is.</p>
<p><strong style="color:red">JSFiddle with it at <a title="jsFiddle with it" href="http://jsfiddle.net/akv292/sLEyE/">http://jsfiddle.net/akv292/sLEyE/</a>.</strong></p>
<p>Check out theÂ <a title="Beta1 Documentation and Demo" href="http://www.aaronvanderzwan.com/blog/maximage-2-0-beta1-release/">beta release documentation and demo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2011/11/maximage-2-0-beta-2-jsfiddle-with-it/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MaxImage 2.0-beta1 Release</title>
		<link>http://www.aaronvanderzwan.com/blog/2011/11/maximage-2-0-beta1-release/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=maximage-2-0-beta1-release</link>
		<comments>http://www.aaronvanderzwan.com/blog/2011/11/maximage-2-0-beta1-release/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 13:00:10 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MaxImage]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[2.0]]></category>
		<category><![CDATA[Background]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[Cycle]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Scaler]]></category>
		<category><![CDATA[Slideshow]]></category>

		<guid isPermaLink="false">http://www.aaronvanderzwan.com/blog/?p=32483</guid>
		<description><![CDATA[<p><img width="640" height="550" src="http://www.aaronvanderzwan.com/blog/wp-content/uploads/2011/11/maximage2.01-640x550.jpg" class="attachment-featured-image wp-post-image" alt="maximage2.0" title="maximage2.0" /></p><br />Introducing the first fullscreen background slideshow plugin that utilizes jQuery Cycle Plugin and all it&#8217;s transitions / options. November 10, 2011 UPDATE: MaxImage 2.0 beta 2 has been released This 2.0 release has been in the works for a while and I am happy to say that I think it is ready for beta launch. [...]]]></description>
			<content:encoded><![CDATA[<p><img width="640" height="550" src="http://www.aaronvanderzwan.com/blog/wp-content/uploads/2011/11/maximage2.01-640x550.jpg" class="attachment-featured-image wp-post-image" alt="maximage2.0" title="maximage2.0" /></p><br /><blockquote><p>Introducing the first fullscreen background slideshow plugin that utilizes jQuery Cycle Plugin and all it&#8217;s transitions / options.</p></blockquote>
<p><a href="http://www.aaronvanderzwan.com/blog/2011/11/maximage-2-0-beta-2-jsfiddle-with-it/" style="color:red;font-size:18px;font-family:arial;">November 10, 2011 UPDATE: MaxImage 2.0 beta 2 has been released</a></p>
<p>This 2.0 release has been in the works for a while and I am happy to say that I think it is ready for beta launch. Please note&#8230; It is absolutely going to have a lot of bugs, but if you feel like testing it and letting me know how it goes that would be fantastic.</p>
<p>&nbsp;</p>
<h2>Contents</h2>
<ul>
<li><a href="#whatsnew">What&#8217;s New</a></li>
<li><a href="#demo">Demo</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#download">Download</a></li>
<li><a href="#feedback">Feedback</a></li>
</ul>
<p><a name="whatsnew"></a></p>
<h2>What&#8217;s New</h2>
<p>There have been a number of changes since 1.0 but here are some of the biggest:</p>
<ul>
<li>MaxImage 2.0 uses the slideshow power from jQuery Cycle Plugin and allows you to utilize all of the options from Cycle but now for a background slideshow.</li>
<li>MaxImage 2.0 determines whether your browser can use CSS3&#8242;s background-size:cover. If it can, it uses it as to limit the amount of heavy lifting that jQuery has to do. That means the majority of your users will have a slim and smooth experience. That is so important with large image animations as it is. (still working on optimizing) If CSS3 is not available it falls back to the old way of sizing and centering background images.</li>
<li>MaxImage 1.0 made the mistake of assuming certain things about your design. I have tried to limit the amount of styling that MaxImage 2.0 does to give you the maximum amount of control. I&#8217;ve even pulled styles that were originally being set by JS into an external CSS.</li>
<li>MaxImage 2.0 has been completely rewritten to comply with current best practices</li>
</ul>
<p><a name="demo"></a></p>
<h2>Demo</h2>
<p><a href="http://www.aaronvanderzwan.com/maximage/2.0/" target="_blank">Check out a demo</a>.<br />
I am working on official documentation to release with the plugin when it is ready for a full release.</p>
<p><a name="installation"></a></p>
<h2>Installation</h2>
<h3>Step 1</h3>
<p>Download <a href="#download">jQuery MaxImage 2.0 CSS</a>, upload it to your server with FTP, and include it in your &lt;head&gt; tag:</p>
<pre class="brush: html; gutter: true; first-line: 1; highlight: []; html-script: false">&lt;link rel="stylesheet" href="styles/jquery.maximage.css" type="text/css" media="screen" title="CSS" charset="utf-8" /&gt;</pre>
<p>&nbsp;</p>
<h3>Step 2</h3>
<p>Link to jQuery Library, download <a title="Cycle Plugin" href="http://jquery.malsup.com/cycle/" target="_blank">jQuery Cycle Plugin</a>, <a title="Easing Plugin" href="http://gsgd.co.uk/sandbox/jquery/easing/" target="_blank">jQuery Easing plugin</a> (optional) and <a href="#download">MaxImage JS</a> and include them in your &lt;head&gt; tag or right before the &lt;/body&gt; tag.</p>
<pre class="brush: html; gutter: true; first-line: 1; highlight: []; html-script: false">&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.js"&gt;&lt;/script&gt;
&lt;script src="js/jquery.cycle.all.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
&lt;script src="js/jquery.easing.1.3.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
&lt;script src="js/jquery.maximage.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;</pre>
<p>&nbsp;</p>
<h3>Step 3</h3>
<p>Call maximage and pass cycle your options (these are options used for the demo):</p>
<pre class="brush: javascript; gutter: true; first-line: 1; highlight: []; html-script: false">&lt;script type="text/javascript" charset="utf-8"&gt;
$(function(){
    $('#maximage').maximage({
        cycleOptions: {
            fx:'scrollHorz',
            speed: 800,
            timeout: 8000,
            prev: '#arrow_left',
            next: '#arrow_right'
        },
        onFirstImageLoaded: function(){
            jQuery('#cycle-loader').hide();
            jQuery('#maximage').fadeIn('fast');
        }
    });
});
&lt;/script&gt;</pre>
<p><a name="download"></a></p>
<h2>Download</h2>
<p>You can <a href="http://plugins.jquery.com/content/maximage-20-beta-1" target="_blank">download Maximage2.0-beta1</a> at the jQuery plugin repository.  </p>
<p>You can also get the css and JS from the demo site:<br />
Cycle &#8211; <a href="http://jquery.malsup.com/cycle/download.html">http://jquery.malsup.com/cycle/download.html</a><br />
Maximage CSS &#8211; <a href="http://www.aaronvanderzwan.com/maximage/2.0/lib/css/jquery.maximage.css">http://www.aaronvanderzwan.com/maximage/2.0/lib/css/jquery.maximage.css</a><br />
Maximage JS &#8211; <a href="http://www.aaronvanderzwan.com/maximage/2.0/lib/js/jquery.maximage.js">http://www.aaronvanderzwan.com/maximage/2.0/lib/js/jquery.maximage.js</a>.</p>
<p><a name="feedback"></a></p>
<h2>Feedback</h2>
<p>As usual&#8230; let me know what you think and if you have any suggestions. I&#8217;d love to know if you encounter any bugs&#8230; as that is what I am testing right now. Along with create a forum / trac I have it in my notes to get this up to GitHub and allow people to fork / help me make this work even better.</p>
<p>Cheers.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2011/11/maximage-2-0-beta1-release/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>jQuery: RegExp for all occurances; Wrap all &#169; and &#174; with HTML</title>
		<link>http://www.aaronvanderzwan.com/blog/2010/03/jquery-regexp-for-all-occurances-treat-all-and-with-specific-css/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-regexp-for-all-occurances-treat-all-and-with-specific-css</link>
		<comments>http://www.aaronvanderzwan.com/blog/2010/03/jquery-regexp-for-all-occurances-treat-all-and-with-specific-css/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 20:33:45 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Hints / Tips]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[reg]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.aaronvanderzwan.com/blog/?p=246</guid>
		<description><![CDATA[This script will find all &#169; and &#174; on a page and wrap them a span around them with a &#8220;copy&#8221; or &#8220;reg&#8221; class accordingly. &#60;style> .copy, .reg {font-size:xx-small;vertical-align:text-top;} &#60;/style> &#60;script> $(function(){ var copy = new RegExp(&#8216;\u00a9&#8242;,&#8217;g'); var reg = new RegExp(&#8216;\u00ae&#8217;,'g&#8217;); var newBody = $(&#8216;body&#8217;).html().replace(copy, &#8216;&#60;span class=&#8221;copy&#8221;>&#38;copy;&#60;/span>&#8217;).replace(reg, &#8216;&#60;span class=&#8221;reg&#8221;>&#38;reg;&#60;/span>&#8217;); $(&#8216;body&#8217;).html(newBody); }); &#60;/script>]]></description>
			<content:encoded><![CDATA[<p>This script will find all &copy; and &reg; on a page and wrap them a span around them with a &#8220;copy&#8221; or &#8220;reg&#8221; class accordingly.</p>
<blockquote class="code"><p>&lt;style><br />
			.copy, .reg {font-size:xx-small;vertical-align:text-top;}<br />
		&lt;/style></p>
<p>		&lt;script><br />
			$(function(){<br />
				var copy = new RegExp(&#8216;\u00a9&#8242;,&#8217;g');<br />
				var reg = new RegExp(&#8216;\u00ae&#8217;,'g&#8217;);<br />
		   	var newBody = $(&#8216;body&#8217;).html().replace(copy, &#8216;&lt;span class=&#8221;copy&#8221;>&amp;copy;&lt;/span>&#8217;).replace(reg, &#8216;&lt;span class=&#8221;reg&#8221;>&amp;reg;&lt;/span>&#8217;);<br />
		   	$(&#8216;body&#8217;).html(newBody);<br />
			});<br />
		&lt;/script></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2010/03/jquery-regexp-for-all-occurances-treat-all-and-with-specific-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>focusMagic jQuery Plugin</title>
		<link>http://www.aaronvanderzwan.com/blog/2009/09/focusmagic-jquery-plugin/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=focusmagic-jquery-plugin</link>
		<comments>http://www.aaronvanderzwan.com/blog/2009/09/focusmagic-jquery-plugin/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 18:35:42 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[blur]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[focusmagic]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[textarea]]></category>
		<category><![CDATA[watermark]]></category>

		<guid isPermaLink="false">http://aaronvanderzwan.com/blog/?p=216</guid>
		<description><![CDATA[This plugin is meant to expedite the basic process of making form fields empty or clear on focus and refill on blur, depending on a few specs&#8230; a watermark. The three different scenarios that I have built for are represented. A normal form field watermark that empties on focus and refills on blur. A value [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin is meant to expedite the basic process of making form fields empty or clear on focus and refill on blur, depending on a few specs&#8230; a watermark. The three different scenarios that I have built for are represented.  </p>
<ol>
<li>A normal form field watermark that empties on focus and refills on blur.</li>
<li>A value that is set by the server trumps anything that the plugin does.  (Note: this way, if a user has to fill out the form again because one of the fields didn&#8217;t validate, the server can send values so that the user doesn&#8217;t have to refill the whole form)</li>
<li>There may be a time when you want to ignore the plugin and keep your label visible.  Just add a &#8216;ignore&#8217; class to your label and the plugin doesn&#8217;t touch it.</li>
<li>This is an extra couple of lines written so that validation works correctly.  What it does is it empties the fields that have not been touched by the user on submit.  That way, we can run our validation against those fields, and we don&#8217;t submit our label.</li>
</ol>
<p>This solution focuses on accessibility as it does not remove the label, just moves it off the viewport. This way, if a user does not have Javascript, CSS, or uses a screen reader, they will still get normal labels.</p>
<p><a href="http://www.aaronvanderzwan.com/focusmagic/">View a demo</a><br />
<a href="http://plugins.jquery.com/project/focusmagic">Download plugin</a> (link to jQuery plugins)</p>
<p>Please let me know what you think about it, or if there is anything I should do to improve.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2009/09/focusmagic-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Movable Type 4.2: Custom Fields on registration / sign up form</title>
		<link>http://www.aaronvanderzwan.com/blog/2008/08/movable-type-42-custom-fields-on-registration-sign-up-form/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=movable-type-42-custom-fields-on-registration-sign-up-form</link>
		<comments>http://www.aaronvanderzwan.com/blog/2008/08/movable-type-42-custom-fields-on-registration-sign-up-form/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 16:10:37 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Movable Type]]></category>
		<category><![CDATA[Photos]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[4.2.]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[fields]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[registration]]></category>
		<category><![CDATA[sign]]></category>
		<category><![CDATA[up]]></category>

		<guid isPermaLink="false">http://aaronvanderzwan.com/blog/?p=146</guid>
		<description><![CDATA[This is a blog post about Movable Type development. If you are uninterested in Movable Type development, then you don&#8217;t need to read this. I have been working on building a pretty substantial website with Movable Type for the last couple of months and have learned a few things along the way. This is one [...]]]></description>
			<content:encoded><![CDATA[<p>This is a blog post about Movable Type development.  If you are uninterested in Movable Type development, then you don&#8217;t need to read this.  I have been working on building a pretty substantial website with Movable Type for the last couple of months and have learned a few things along the way.  This is one of those things that I learned that isn&#8217;t really documented anywhere.  I thought I would try.</p>
<p>The website that I am building allows for users to signup/create usernames/login/post entries/etc.  The goal was to require a user, when signing up, to add what company they worked for.  This is not one of the standard fields that come with Movable Type&#8217;s sign up form (we purchased the Community Solution).  What is baked in to Movable Type is the ability to create custom fields on the user object.  This is good.  It means that we can add as many fields as we want, and associate the data to a specific user, (i.e. Company, Job Title, Birthday, etc.).  MT has some documentation on allowing a user to update this custom information on their profile page (<a href="http://www.movabletype.org/documentation/community/user-profiles.html" target="_blank">http://www.movabletype.org/documentation/community/user-profiles.html</a>).  Here is the code they suggest:</p>
<blockquote><p><code><mt:loop name="field_loop"><br />
    <mt:if name="__first__"></p>
<input type="hidden" name="customfield_beacon" value="1" id="customfield_beacon" />
    </mt:if><br />
    <!-- start-customfield_&lt;mt:var name="basename"> --><br />
    <mtapp:setting<br />
        id="$field_id"<br />
        label="$name"<br />
        hint="$description"<br />
        shown="$show_field"<br />
        show_hint="$show_hint"<br />
        required="$required"><br />
    <mt:var name="field_html"><br />
    </mtapp:setting><br />
    <!-- end-customfield_&lt;mt:var name="basename"> --><br />
</mt:loop><br />
</code></p></blockquote>
<p>This is great if you want a user to be able to enter all of the created custom field data at once because it just loops through all of your custom fields and creates input fields for each of them.  We had about 10 custom fields on the user object and only wanted the person signing up to enter the &#8216;Company&#8217; information on signup (as to not make them feel overwhelmed with so much information to input).</p>
<p>How I accomplished only writing one field is to throw an MT if statement in there based on what the $field_id is.  In other words what your custom field&#8217;s basename is preceded by &#8220;customfield_&#8221;.</p>
<blockquote><p><code><mt:if name="field_id" eq="customfield_company"><br />
</mt:if><br />
</code></p></blockquote>
<p>With &#8220;company&#8221; my field&#8217;s basename, that made the field_id I was looking for, customfield_company.</p>
<p>My final code to display only the company custom field on the user signup form (with MT4.2):</p>
<blockquote><p><code><mt:loop name="field_loop"><br />
    <mt:if name="__first__"></p>
<input type="hidden" name="customfield_beacon" value="1" id="customfield_beacon" />
    </mt:if><br />
    <!-- start-customfield_&lt;mt:var name="basename"> --><br />
    <mt:if name="field_id" eq="customfield_company"><br />
    <mtapp:setting<br />
        id="$field_id"<br />
        label="$name"<br />
        hint="$description"<br />
        shown="$show_field"<br />
        show_hint="$show_hint"<br />
        required="$required"><br />
    <mt:var name="field_html"><br />
    </mtapp:setting><br />
    </mt:if><br />
    <!-- end-customfield_&lt;mt:var name="basename"> --><br />
</mt:loop><br />
</code></p></blockquote>
<p><em><strong>Note:</strong> This is only possible on the user registration page after the release of <a href="http://www.movabletype.org/2008/08/movable_type_42_is_here.html" target="_blank">MovableType 4.2</a>.  Before that, I think this could only be done on the profile page.</em></p>
<p>I will update this if I learn any discrepancies in what I said.  If you find any, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2008/08/movable-type-42-custom-fields-on-registration-sign-up-form/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>RMagick &amp; ImageMagick from Source: Mac OSX Leopard</title>
		<link>http://www.aaronvanderzwan.com/blog/2008/04/rmagick-imagemagick-from-source-mac-osx-leopard/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rmagick-imagemagick-from-source-mac-osx-leopard</link>
		<comments>http://www.aaronvanderzwan.com/blog/2008/04/rmagick-imagemagick-from-source-mac-osx-leopard/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 17:23:35 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://aaronvanderzwan.com/blog/?p=108</guid>
		<description><![CDATA[The Problem I know that there are a lot of dependencies that go along with installing RMagick from source on Leopard.¬† For this reason, I was very interested in the idea of packing all of the commands into a script and just letting it run.¬† If you are like me, your past with scripts has [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: bold">The Problem</span></p>
<p>I know that there are a lot of dependencies that go along with installing RMagick from source on Leopard.¬† For this reason, I was very interested in the idea of packing all of the commands into a script and just letting it run.¬† If you are like me, your past with scripts has been grey at best; i.e. there always seems to be some sort of problem that kills your script.  Then you have to search through it to find where it broke and you spend a lot of time aligning yourself with something that might not even work.</p>
<p>The reason most of these scripts will fail is that references are now broken or code deprecated.  If it fails, I then have to make sure that http://whatever.com still exists and is hosting the file and version that I need. I got to thinking&#8230; so often I would like (at least) the option of using something that is a bit older, but can be run smoothly.
</p>
<p><strong>The &#8216;Dependencies&#8217;/Libraries</strong></p>
<p>This script uses Ruby to install ImageMagick and RMagick, with the necessary dependencies for gif, jpg, png, freetype, tiff,¬†libwmf (?),¬†littlecms (?), and¬†ghostscript (?). ¬†It rely&#8217;s on these libraries:</p>
<p>
JPEG:<br />
<a href="ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz ">ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz</a></p>
<p>PNG:<br />
<a href="http://superb-west.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.22.tar.bz2">http://superb-west.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.22.tar.bz2</a></p>
<p>Freetype:<br />
<a href="http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz">http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz</a></p>
<p>TIFF:<br />
<a href="ftp://ftp.remotesensing.org/libtiff/tiff-3.8.2.tar.gz">ftp://ftp.remotesensing.org/libtiff/tiff-3.8.2.tar.gz</a></p>
<p><a href="http://jaist.dl.sourceforge.net/sourceforge/wvware/libwmf-0.2.8.4.tar.gz">http://jaist.dl.sourceforge.net/sourceforge/wvware/libwmf-0.2.8.4.tar.gz</a></p>
<p>LittleCMS:<br />
<a href="http://www.littlecms.com/lcms-1.17.tar.gz">http://www.littlecms.com/lcms-1.17.tar.gz</a></p>
<p>Ghostscript:<br />
<a href="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs860/ghostscript-8.60.tar.gz">ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs860/ghostscript-8.60.tar.gz</a></p>
<p>Ghostscript Fonts:<br />
<a href="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/current/ghostscript-fonts-std-8.11.tar.gz">ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/current/ghostscript-fonts-std-8.11.tar.gz</a></p>
<p>ImageMagick:<br />
<a href="ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.3.8-11.tar.gz">ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.3.8-11.tar.gz</a></p>
<p>
When I found this script these URLs were built in so that if one of the URLs didn&#8217;t work, it would break.  That is fine, but it is not built to find the newest and greatest, or make sure that the newest still works with everything else.  So why not just package all of those url&#8217;s libraries together and make that downloadable here.  I may be breaking a law or something&#8230; (if I am let me know) but I think these are all open-source.
</p>
<p><strong>The Instructions</strong></p>
<p>So here is how it is done.  </p>
<p> &#8211; <a href="http://www.aaronvanderzwan.com/blog/wp-content/uploads/2008/01/Rmagick%20Installer%20for%20MacOSX%2010.5.zip">Download the zip</a> (39.5 MB)<br />
 &#8211; Unpack it<br />
 &#8211; Open Terminal.app</p>
<blockquote style="text-align:left;"><p>
<code>cd /to/inside/the/unzipped/dir<br />
ruby setup.rb</code>
</p></blockquote>
<p>Now just let it run.  (You may have to put in your password every once in a while because of the &#8216;sudo&#8217;s).
</p>
<p>I should also note that I had X11 (Applications &gt; Utilities &gt; X11) and Xcode 3.0 (Macintosh HD &gt; Developer &gt; Applications &gt; Xcode) installed when I ran this script. ¬†I am not sure how much this helped/effected the script running, but I do have these installed and runnable.
</p>
<p><strong>The Original</strong></p>
<p>Again, a special thanks to Solomon White who originally posted this script at¬†<a href="http://onrails.org/articles/2007/11/03/installing-rmagick-on-leopard-without-macports-or-fink" target="_blank">his blog</a>.</p>
<p style="text-align:left;">Here are some other references for this technique.</p>
<p>John Ford:<br />
<a href="http://www.aldenta.com/2007/11/26/installing-imagemagickrmagick-on-leopard/">http://www.aldenta.com/2007/11/26/installing-imagemagickrmagick-on-leopard/</a></p>
<p>Ben Reubenstein:<br />
<a href="http://www.benr75.com/articles/2008/03/16/install-rmagick-on-mac-os-x-leopard-from-source">http://www.benr75.com/articles/2008/03/16/install-rmagick-on-mac-os-x-leopard-from-source</a></p>
<p>Here is what I found at Solomon&#8217;s website.</p>
<blockquote style="text-align:left;"><p><code>#!/bin/sh<br />
curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz<br />
tar xzvf freetype-2.3.5.tar.gz<br />
cd freetype-2.3.5<br />
./configure --prefix=/usr/local<br />
make<br />
sudo make install<br />
cd ..</p>
<p>curl -O http://superb-west.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.22.tar.bz2<br />
tar jxvf libpng-1.2.22.tar.bz2<br />
cd libpng-1.2.22<br />
./configure --prefix=/usr/local<br />
make<br />
sudo make install<br />
cd ..</p>
<p>curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz<br />
tar xzvf jpegsrc.v6b.tar.gz<br />
cd jpeg-6b<br />
ln -s `which glibtool` ./libtool<br />
export MACOSX_DEPLOYMENT_TARGET=10.5<br />
./configure --enable-shared --prefix=/usr/local<br />
make<br />
sudo make install<br />
cd ..</p>
<p>curl -O ftp://ftp.remotesensing.org/libtiff/tiff-3.8.2.tar.gz<br />
tar xzvf tiff-3.8.2.tar.gz<br />
cd tiff-3.8.2<br />
./configure --prefix=/usr/local<br />
make<br />
sudo make install<br />
cd ..</p>
<p>curl -O http://jaist.dl.sourceforge.net/sourceforge/wvware/libwmf-0.2.8.4.tar.gz<br />
tar xzvf libwmf-0.2.8.4.tar.gz<br />
cd libwmf-0.2.8.4<br />
make clean<br />
./configure<br />
make<br />
sudo make install<br />
cd ..</p>
<p>curl -O http://www.littlecms.com/lcms-1.17.tar.gz<br />
tar xzvf lcms-1.17.tar.gz<br />
cd lcms-1.17<br />
make clean<br />
./configure<br />
make<br />
sudo make install<br />
cd ..</p>
<p>curl -O ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs860/ghostscript-8.60.tar.gz<br />
tar zxvf ghostscript-8.60.tar.gz<br />
cd ghostscript-8.60/<br />
./configure  --prefix=/usr/local<br />
make<br />
sudo make install<br />
cd ..</p>
<p>curl -O ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/current/ghostscript-fonts-std-8.11.tar.gz<br />
tar zxvf ghostscript-fonts-std-8.11.tar.gz<br />
sudo mv fonts /usr/local/share/ghostscript</p>
<p>curl -O ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.3.8-11.tar.gz<br />
tar -xzvf ImageMagick-6.3.8-11.tar.gz<br />
cd ImageMagick-6.3.8<br />
export CPPFLAGS=-I/usr/local/include<br />
export LDFLAGS=-L/usr/local/lib<br />
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --with-gs-font-dir=/usr/local/share/ghostscript/fonts<br />
make<br />
sudo make install<br />
cd ..</p>
<p>sudo gem install rmagick</p>
<p></code>
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2008/04/rmagick-imagemagick-from-source-mac-osx-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

