<?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>cloud goes social &#187; tutorial</title>
	<atom:link href="http://www.cloudgoessocial.net/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cloudgoessocial.net</link>
	<description>computer, travel, movies, music, cuisine and more</description>
	<lastBuildDate>Mon, 21 Mar 2011 21:58:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>ImageMagick on iPhone (with jpeg + png)</title>
		<link>http://www.cloudgoessocial.net/2009/06/09/imagemagick-on-iphone-with-jpeg-png/</link>
		<comments>http://www.cloudgoessocial.net/2009/06/09/imagemagick-on-iphone-with-jpeg-png/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 21:37:13 +0000</pubDate>
		<dc:creator>Cloud</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[tips & howtos]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.cloudgoessocial.net/?p=165</guid>
		<description><![CDATA[UPDATE: iOS4.3 and Xcode4 PLEASE READ THE UPDATE I&#8217;m working on some iPhone applications, which need some image filtering. For now, I won&#8217;t say more! Stay tuned for the news when it comes out! Long story short, I soon found the need (ant the challenge was a good one) to get ImageMagick static libraries so [...]]]></description>
			<content:encoded><![CDATA[<h2>UPDATE: <a href="http://www.cloudgoessocial.net/2011/03/21/im-xcode4-ios4-3/">iOS4.3 and Xcode4</a></h2>
<h2><a href="http://www.cloudgoessocial.net/2010/02/10/imagemagick-for-iphone-via-snowleopard/">PLEASE READ THE UPDATE</a> </h2>
<p>I&#8217;m working on some iPhone applications, which need some <em>image filtering</em>. For now, I won&#8217;t say more! Stay tuned for the news when it comes out!</p>
<p>Long story short, I soon found the need (ant the challenge was a good one) to get <a href="http://www.imagemagick.org">ImageMagick</a> static libraries so that I can use it on the iPhone. Not only that, but with <a href="http://www.ijg.org/">jpeg</a> and <a href="http://www.libpng.org/pub/png/libpng.html">png</a> support. That&#8217;s what I need.</p>
<p>After a fast search through the net, I couldn&#8217;t find a single <strong>_GOOD_</strong> post on how to do that. Just some <a href="http://www.modmyi.com/forums/iphone-ipod-touch-sdk-development-discussion/30788-imagemagick-ipod-touch.html">bits</a> and <a href="http://latenitesoft.blogspot.com/2008/10/iphone-programming-tips-building-unix.html">bytes</a> &#8211; Nothing complete.</p>
<p>I soon set on a mission to get ImageMagick to work on the iPhone, as a library. And here&#8217;s<a href="http://www.cloudgoessocial.net/im_iphone/compile_im.sh"> the result</a> of my quest (around 1 day of search, trials and errors, and at last some light!)</p>
<h3>Setting</h3>
<p>I&#8217;m running MacOSX 10.5.7, with the latest <a href="http://www.macports.org/">MacPorts</a> installed. If you don&#8217;t, get it! I have many <em>ports</em> installed, the ones I <em>&#8220;think&#8221;</em> are important are:</p>
<ul>
<li>jpeg</li>
<li>libpng</li>
</ul>
<p>Also, I&#8217;m testing everything with the latest beta of the iPhoneOS 3.0 &#8211; It should be working also for 2.2.1 and the final 3.0 when it comes out.</p>
<h3>The Script</h3>
<p>I now provide you with a <a href="http://www.cloudgoessocial.net/im_iphone/compile_im.sh">shell script</a> that should do the whole trick of creating the static libraries needed in Xcode for iPhone development.</p>
<p>Just <a href="http://www.cloudgoessocial.net/im_iphone/compile_im.sh">download it</a>, give it run permission (<code>chmod +x ./compile_im.sh</code>), and launch it. It will ask for your password because it needs to copy a file that is not owned by you, the user.</p>
<p>Before complaining that it&#8217;s not working, open it, and look at the <em>required</em> directory structure for it to work.<br />
In particular you will need:</p>
<ul>
<li>a Desktop folder named cross_compile</li>
<li>ImageMagick source: <a href="ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz">ImageMagick</a></li>
<li>jpeg source: <a href="http://www.cloudgoessocial.net/im_iphone/jpeg6b.zip">jpeg</a></li>
<p> &#8211; to which I&#8217;ve added the MacPorts patches</p>
<li>libpng source: <a href="http://ftp.fifi.org/ImageMagick/delegates/libpng-1.2.37.tar.gz">libpng</a></li>
<li>Untar ImageMagick source and place it into ~/Desktop/cross_compile/i_m</li>
<li>Untar/Unzip jpeg/libpng source and place it into: ~/Desktop/cross_compile/i_m/IMDelegates/jpeg-6b and ~/Desktop/cross_compile/i_m/IMDelegates/libpng-1.2.37</li>
</ul>
<p>Now you can run the script :)</p>
<h3>Result</h3>
<p>The result will be stored under: <strong>~/Desktop/tmp_target</strong>. In particular you can find all the header files needed while developing your application under: <strong>~/Desktop/tmp_target/im_libs/includes</strong> (divided by library). While all the static libraries are inside <strong>~/Desktop/tmp_target/im_libs/</strong>:</p>
<ul>
<li>libjpeg.a</li>
<li>libpng.a</li>
<li>libMagickCore.a</li>
<li>libMagickWand.a</li>
</ul>
<p>Please note that the script joins both the i386 and the arm build inside one single .a static library to ease up developing (for testing both on the Simulator and on the device itself. When finishing up the application you may want to put only the arm library to make the overall application lighter.</p>
<h3>XCode configuration</h3>
<h2>Step 1</h2>
<p>To work with your libraries you need to put some easy adjustments to your Project in XCode. I&#8217;ve found that the best thing to do, especially in a shared environment with multiple developers, to just put everything inside the XCode project. To do so do:</p>
<ul>
<li>Project->Add To Project->Select all the .a libraries->Click &#8216;ADD&#8217;</li>
<li>Project->Add To Project->Select the folders inside the ~/Desktop/tmp_target/im_libs/include->Click &#8216;ADD&#8217;</li>
</ul>
<h2>Step 2</h2>
<p>Click on <strong>Project->Edit Project Settings</strong> and edit (in the <strong>Build</strong>:</p>
<ul>
<li>Other Linker Flags: -lMagickCore -lMagickWand -lz -lbz2 -ljpeg -lpng</li>
<li>Header Search Paths: $(SRCROOT) &#8211; make it Recursive</li>
<li>Library Search Paths: $(SRCROOT) &#8211; make it Recursive</li>
<li>On the lower left click on the small-wheel and select: Add User-Defined Setting</li>
<ul>
<li>Key: OTHER_CFLAGS</li>
<li>Value: -Dmacinsoth=1</li>
</ul>
</ul>
<p>This should be enough to make you start.</p>
<h3>For the Lazy</h3>
<p>If you&#8217;re lazy, don&#8217;t manage or for whatever other reason you can just download the whole <a href="http://www.cloudgoessocial.net/im_iphone/ImageMagick_compiled.zip">compiled package</a></p>
<h3>Last note</h3>
<p>In case the script doesn&#8217;t work, you have questions/suggestions/support please don&#8217;t hesitate to contact me, and in case you need help with the script please send me the FULL output in a file.<br />
<code>./compile_im.sh > file_to_send.txt</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cloudgoessocial.net/2009/06/09/imagemagick-on-iphone-with-jpeg-png/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>ROR on Xampp on Win</title>
		<link>http://www.cloudgoessocial.net/2009/05/17/ror-on-xampp-on-win/</link>
		<comments>http://www.cloudgoessocial.net/2009/05/17/ror-on-xampp-on-win/#comments</comments>
		<pubDate>Sun, 17 May 2009 10:39:00 +0000</pubDate>
		<dc:creator>Cloud</dc:creator>
				<category><![CDATA[tips & howtos]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[xampp]]></category>

		<guid isPermaLink="false">http://www.cloudgoessocial.net/?p=94</guid>
		<description><![CDATA[For those who don&#8217;t understand the title don&#8217;t worry, this is a &#8220;technical&#8221; post: installing Ruby on Rails (ROR) over an existing XAMPP (Apache, PHP, MySQL, &#8230;) installation in Windows. For all of those who have somehow a Windows &#8220;server&#8221; used to test websites and want to install Ruby and the fantastic Ruby on Rails [...]]]></description>
			<content:encoded><![CDATA[<p>For those who don&#8217;t understand the title don&#8217;t worry, this is a <em>&#8220;technical&#8221;</em> post: installing Ruby on Rails (ROR) over an existing <a href="http://www.apachefriends.org/en/index.html">XAMPP</a> (Apache, PHP, MySQL, &#8230;) installation in Windows. For all of those who have somehow a Windows <em>&#8220;server&#8221;</em> used to test websites and want to install <a href="http://www.ruby-lang.org/en/">Ruby</a> and the fantastic <a href="http://www.rubyonrails.org/">Ruby on Rails</a> framework.</p>
<p><strong>Prerequisites</strong>: a working installation of XAMPP, in my example installed under: <strong>C:\xampp</strong>.</p>
<ol>
<li>Install ROR via the <em>&#8220;one click installer&#8221;</em> which can be found on the ROR site: <a href="http://rubyforge.org/frs/?group_id=167">installers list</a>. To have everything in one <em>&#8220;web-development directory&#8221;</em> when prompted by the installer choose <strong>C:\xampp\ruby</strong></li>
<li>Open the dreaded DOS-prompt or <strong>cmd</strong>: Start->Run->cmd</li>
<li>First off update gem, The version installed will stop whenever an update fails, to solve this update gem first. Let&#8217;s navigate to the ruby bin directory: <br /><code>cd C:\xampp\ruby\bin</code><br /> and then the command: <br /><code>gem update --system</code></li>
<li>Now all the <em>gems</em> are updated, install rails with this command:<br /><code>gem install rails --include-dependencies</code><br /> This will take a while especially for generating the whole documentation, don&#8217;t worry, everything is going all right, wait and be patient</li>
<li>Create a test application with the command:<br /><code>rails C:/xampp/htdocs/testapp</code><br /> If all went fine you will see some output saying that some files have been created. Rails is installed all fine</li>
<li>Now it&#8217;s time to create a Virtual Host in apache to test out our installation. Edit the file: <strong>C:xamppapacheconfextrahttpd-vhosts.conf</strong> with your favourite <em>good</em> editor. I always have installed <a href="http://notepad-plus.sourceforge.net/uk/site.htm">Notepad++</a> and at the end add the following lines:
<pre class="brush: plain; title: ; notranslate">
## ROR
Listen 3000
&lt;VirtualHost *:3000&gt;
	ServerName ROR
	DocumentRoot &quot;C:\xampp\htdocs&quot;
	&lt;Directory &quot;C:\xampp\htdocs&quot;&gt;
		Options ExecCGI FollowSymLinks
		AllowOverride all
		Allow from all
		Order allow,deny
		AddHandler cgi-script .cgi
		AddHandler fastcgi-script .fcgi
	&lt;/Directory&gt;
&lt;/VirtualHost&gt;
## END-ROR
</pre>
</li>
<li>Restart apache from the XAMPP control panel and then go, on your favorite browser to:<br /><code>http://localhost:3000/testapp/public</code><br />To see if everything went fine, the page should look like this screenshot<br />
<div id="attachment_110" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.cloudgoessocial.net/wp-content/uploads/2009/05/picture-1.png" rel="lightbox[94]"><img src="http://www.cloudgoessocial.net/wp-content/uploads/2009/05/picture-1-300x210.png" alt="ROR installed on XAMPP in Windows" title="ROR installed and working" width="300" height="210" class="size-medium wp-image-110" /></a><p class="wp-caption-text">ROR installed on XAMPP in Windows</p></div>
</li>
</ol>
<h3>Versions</h3>
<p>At the moment of this writing this is the list of version numbers for the installed applications running and working as configured in this post:</p>
<ul>
<li>XAMPP: 1.6.6a</li>
<li>ruby -v: ruby 1.8.6 <2008-08-11 patchlevel 287> [i386-mswin32]</li>
<li>gem -v: 1.3.3</li>
<li>rails -v: Rails 2.3.2</li>
</ul>
<p>I would like to thank the author of <a href="http://peri.me/?p=73">this post</a> which is the starting point of my post. I just did some minor changes to remove some errors, especially when updating gems. Also I changed the file to edit to add the Virtual Host to keep things more clean in the <em>http.conf</em> file.</p>
<p>For any trouble don&#8217;t hesitate to contact me!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cloudgoessocial.net/2009/05/17/ror-on-xampp-on-win/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

