<?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>Dr Nic &#187; Cocoa</title>
	<atom:link href="http://drnicwilliams.com/category/cocoa/feed/" rel="self" type="application/rss+xml" />
	<link>http://drnicwilliams.com</link>
	<description>Ruby makes Rails, Javascript makes Ajax, Dr Nic makes Magic</description>
	<lastBuildDate>Sat, 12 Nov 2011 01:05:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>ChocTop &#8211; packaging and deployment of Cocoa applications</title>
		<link>http://drnicwilliams.com/2009/02/03/choctop-packaging-and-deployment-of-cocoa-applications/</link>
		<comments>http://drnicwilliams.com/2009/02/03/choctop-packaging-and-deployment-of-cocoa-applications/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 20:24:54 +0000</pubDate>
		<dc:creator>Dr Nic</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://drnicwilliams.com/?p=421</guid>
		<description><![CDATA[I&#8217;m getting close to releasing a new Cocoa application, CommitChat, a sexy interface to having conversations for each commit in each watched project in GitHub. It was time to start thinking about packaging and distribution. The result is a new project for all Cocoa developers, called ChocTop, and a 30-minute tutorial screencast on how to [...]


Related posts:<ol><li><a href='http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/' rel='bookmark' title='Permanent Link: Unit Testing iPhone apps with Ruby: rbiphonetest'>Unit Testing iPhone apps with Ruby: rbiphonetest</a> <small> Everything to love about Ruby: the concise, powerful language;...</small></li><li><a href='http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/' rel='bookmark' title='Permanent Link: Using Ruby within TextMate snippets and commands'>Using Ruby within TextMate snippets and commands</a> <small>I didn&#8217;t know you could run Ruby within TextMate snippets....</small></li></ol>]]></description>
			<content:encoded><![CDATA[<div class="thumbnail"><a href="http://drnic.github.com/choctop"><img class="alignright"  src="http://img.skitch.com/20090202-xgk24ef8894yids6ru8qn11exq.preview.jpg" alt="ChocTop" /></a></div>
<p>I&#8217;m getting close to releasing a new Cocoa application, <a href="http://commitchat.com/">CommitChat</a>, a sexy interface to having conversations for each commit in each watched project in GitHub. It was time to start thinking about packaging and distribution. </p>
<p>The result is a new project for all Cocoa developers, called <a href="http://en.wikipedia.org/wiki/Choc-Top">ChocTop</a>, and a 30-minute tutorial screencast on how to use it. ChocTop is to Cocoa apps what <a href="http://nubyonrails.com/articles/tutorial-publishing-rubygems-with-hoe">Hoe is to RubyGems</a>; except prettier.</p>
<h3 id="packaging_cocoa_apps">Packaging Cocoa apps</h3>
<p>You can package and release Cocoa apps in a number of ways. Each app is actually a folder, so they need some packaging. Zip files are easy and the bonus is they auto-open when people download them. But for me, without a doubt, is the DMG packaging with a custom background image and the embedded symlink to the Applications folder, like the one for CommitChat below.</p>
<div class="thumbnail"><a href="http://commitchat.com"><img src="http://img.skitch.com/20090202-g46y7e3fqpc74i64bipyhtk5eh.preview.jpg" alt="CommitChat DMG" /></a></div>
<p>I&#8217;ve always loved it. It made me as a user feel that this piece of software was special. A custom DMG is like a piece of magic.</p>
<p>Now like most magic, its really only magical when you don&#8217;t know how its done. </p>
<p>But there in lies a problem. You want to release your own Cocoa software with a beautiful custom DMG but you don&#8217;t want to know how to do it. You want the magic, even as a developer, but that means you can&#8217;t know how to do it.</p>
<p>And trust me you do NOT want to know how to do it. Ever.</p>
<p><span id="more-421"></span></p>
<p>Instead of writing a blog post about how to do it, what custom AppleScript you need, what special <code>SetFile -a</code> attributes you need to set, and what special file names you need to use, it seems more humane to not tell you. Ever. That&#8217;s a promise. It&#8217;s just that bad.</p>
<h3 id="introducing_choctop">Introducing ChocTop</h3>
<p><a href="http://drnic.github.com/choctop"><img src="http://img.skitch.com/20090202-89fmpsnemp52r4bqi51iyktngx.jpg"></a></p>
<p>ChocTop packages and deploys any Cocoa application in a custom DMG, with generated Sparkle XML support.</p>
<h3 id="screencast">Screencast</h3>
<p><object width="500" height="375"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3049180&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3049180&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=01AAEA&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="375"></embed></object></p>
<p><a href="http://vimeo.com/3049180">On Vimeo</a> | <a href="http://www.vimeo.com/download/video:87685244?e=1233561345&amp;h=73e93c78ab63146ed2f460e963bcdb72&amp;uh=ea4240c7d2ca97bf2c67dd997754d4b3">Download QuickTime Movie</a> from <a href="http://www.vimeo.com">Vimeo</a> (275Mb, 640x480px)</p>
<p>Vimeo has slightly offset the video + audio after uploading. Grab the original movie file if its causing you grief.</p>
<h3 id="instructions">Instructions</h3>
<p>ChocTop is a command-line installer plus rake tasks (watch the screencast if this is confusing), bundled<br />
as a RubyGem:</p>
<pre>sudo gem install choctop
install_choctop path/to/xcode/project</pre>
<p>Your project is given a Rakefile, a release<em>notes.txt and a release</em>notes_template.html.erb</p>
<p>You edit the Rakefile with your custom DMG asset information and/or remote file locations for the rsync upload process. CommitChat&#8217;s Rakefile includes:</p>
<pre lang="ruby">ChocTop.new do |s|
  s.host     = 'commitchat.com'
  s.base_url = 'http://commitchat.com/secret_path_to_beta'
  s.remote_dir = '/opt/apps/commitchat/secret_path_to_beta'

  s.background_file = "dmgbg.png"
  s.volume_icon = 'VolumeIcon.icns'
  s.app_icon_position = [106, 83]
  s.applications_icon_position = [422, 83]
end</pre>
<p>You also need to add <a href="http://sparkle.andymatuschak.org/" title="Sparkle: a free software update framework for the Mac">Sparkle</a> to your project, and the Info.plist properties such as <code>SUFeedURL</code>.</p>
<p>To generate a new DMG, run:</p>
<pre>rake dmg</pre>
<p>To generate a new DMG and push it up to the remote server, and subsequently have users automatically start downloading the latest + greatest automatically via Sparkle:</p>
<pre>rake dmg upload</pre>
<p>I&#8217;m very sorry. It is perhaps too easy. It probably should be harder to make it seem more useful.</p>
<p>The very cool part is that when the DMG is being designed + constructed from your Rakefile settings you actually can see it happening on the screen. The AppleScript that is executed actually operates upon the DMG whilst it is mounted, before unmounting it, compressing and read-only-ifying it. Its pretty to watch.</p>
<h3 id="more_information">More information</h3>
<ul>
<li>Homepage &#8211; <a href="http://drnic.github.com/choctop">http://drnic.github.com/choctop</a></li>
<li>Source &#8211; <a href="http://github.com/drnic/choctop" title="drnic's choctop at master - GitHub">http://github.com/drnic/choctop</a></li>
<li>Tickets &#8211; <a href="http://drnic.lighthouseapp.com/projects/24673-choctop">http://drnic.lighthouseapp.com/projects/24673-choctop</a></li>
</ul>
<h3 id="and_a_word_from_our_sponsor">And a word from our sponsor</h3>
<p><a href="http://mocra.com"><img src="http://mocra.com/wp-content/themes/mocra/images/mocra-logo.gif" height="48px" style="float: left; padding-right: 10px" /></a></p>
<p>Dr Nic works at <a href="http://mocra.com/" title="Mocra">Mocra</a>, a premier consultancy for Rails, iPhone and Cocoa development. We&#8217;re finishing some client projects soon and are available for new projects. <strong>Act fast!</strong></p>


<p>Related posts:<ol><li><a href='http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/' rel='bookmark' title='Permanent Link: Unit Testing iPhone apps with Ruby: rbiphonetest'>Unit Testing iPhone apps with Ruby: rbiphonetest</a> <small> Everything to love about Ruby: the concise, powerful language;...</small></li><li><a href='http://drnicwilliams.com/2008/06/11/using-ruby-within-textmate-snippets-and-commands/' rel='bookmark' title='Permanent Link: Using Ruby within TextMate snippets and commands'>Using Ruby within TextMate snippets and commands</a> <small>I didn&#8217;t know you could run Ruby within TextMate snippets....</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://drnicwilliams.com/2009/02/03/choctop-packaging-and-deployment-of-cocoa-applications/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>

