Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Build and deploy tools for Cocoa apps using Sparkle for distributions and upgrades; it’s like Hoe but for Cocoa apps.

Merge pull request #12 from billymeltdown/master

Introduces "COMMON PROBLEMS" section to README.rdoc
latest commit f989bbc9d9
Dr Nic Williams authored August 31, 2011
Octocat-spinner-32 app_generators added s.defaults/s.project_type to allow alternate default background… July 29, 2010
Octocat-spinner-32 assets added purple background for textmate theme July 30, 2010
Octocat-spinner-32 bin Different readme outputs after install_choctop based on type July 29, 2010
Octocat-spinner-32 features Merge branch 'master' of http://github.com/george/choctop August 01, 2010
Octocat-spinner-32 lib add optional codesign_identity property, run codesign util before dmg… January 18, 2011
Octocat-spinner-32 script rename to choctop + some README January 19, 2009
Octocat-spinner-32 spec fixed failing 'unit' specs August 30, 2011
Octocat-spinner-32 .gitignore using bundler to describe development dependencies July 05, 2010
Octocat-spinner-32 .gitmodules migrated website -> gh-pages branch, and replaced with submodule link February 02, 2009
Octocat-spinner-32 .rspec renamed rspec opts file for rspec 2 July 05, 2010
Octocat-spinner-32 Gemfile Couldn't get bundle command to work with existing rake dependency and… January 31, 2011
Octocat-spinner-32 Gemfile.lock Couldn't get bundle command to work with existing rake dependency and… January 31, 2011
Octocat-spinner-32 History.txt bump to 0.14.1 with george's commits August 01, 2010
Octocat-spinner-32 Manifest.txt Regenerated Gemfile.lock, Manifest.txt and gemspec. January 31, 2011
Octocat-spinner-32 README.rdoc Merge commit 'drnic/master' January 31, 2011
Octocat-spinner-32 Rakefile Fix up gem dependencies; don't require newgem via bundler; do it via … July 05, 2010
Octocat-spinner-32 choctop.gemspec added rubigen dependency, otherwise install_choctop breaks after clea… August 30, 2011
README.rdoc

choctop

DESCRIPTION:

Build and deploy tools for Cocoa apps using Sparkle for distributions and upgrades; it’s like Hoe but for Cocoa apps.

Package up your OS X/Cocoa applications into Custom DMGs, generate Sparkle XML, and upload. Instead of hours, its only 30 seconds to release each new version of an application.

Build and deploy tools for Cocoa apps using Sparkle for distributions and upgrades; it's like Hoe but for Cocoa apps.

The main feature is a powerful rake task “rake appcast” which builds a release of your application, creates a DMG package, generates a Sparkle XML file, and posts the package and XML file to your remote host via rsync.

All rake tasks:

rake build               # Build Xcode Release

rake dmg[automount] # Create the dmg file for appcasting (`rake dmg`, or `rake dmg[automount]` to automatically mount the dmg)

rake feed                # Create/update the appcast file
rake upload              # Upload the appcast file to the host
rake version:bump:major  # Bump the gemspec by a major version.
rake version:bump:minor  # Bump the gemspec by a minor version.
rake version:bump:patch  # Bump the gemspec by a patch version.
rake version:current     # Display the current version

Why is it called 'ChocTop'?

In Australia, Choc-Tops are ice cream cones, with hardened chocolate on top, normally served at the movie cinemas. When we (mocra.com) were brainstorming a name for this project we combined “Sparkle” + “Cocoa” + “it's almost lunch time and we're hungry” to remember the wonderful Choc-Top ice creams. MMmmm.

Wikipedia: en.wikipedia.org/wiki/Choc-Top

FEATURES

ChocTop comes with rake tasks to instantly deploy your latest Cocoa app's version to a remote host, instantly activating all your users' Sparkle auto-updates.

  • builds a Release of your project from your Xcode project (via xcodebuild tool)

  • packages a DMG of your released app using Info.plist configuration (rake dmg)

  • generates Sparkle-formatted XML file

  • uploads the DMG and XML files to a remote host

  • optional code-signing of application bundle before dmg build

SYNOPSIS:

cd to/my/cocoa/app
install_choctop .

Alternately, if you already have a Rakefile in your Xcode project, then add the following to the end:

require "choctop"

ChocTop::Configuration.new do |s|
  s.remote_dir = '/path/to/upload/root/of/app'

  # Optional, showing defaults
  s.host          = host from Info.plist['SUFeedURL']
  s.base_url      = "http://#{s.host}"
  s.release_notes = "release_notes.html"

  # Custom DMG
  s.background_file = "background.jpg"
  s.app_icon_position = [100, 90]
  s.applications_icon_position =  [400, 90]
  s.applications_icon =  "applications.icns"

  # Extra files
  s.add_file 'path/to/README.txt', :position => [250, 90]
  s.file :target_bundle, :position => [50, 100]
  s.file proc { 'README.txt' }, :position => [50, 100]
  s.file :position => [50, 100] { 'README.txt' }

  # Link to external URLs
  s.add_link 'http://github.com/drnic/choctop', 'Choctop', :position => [50, 100]
  s.link 'http://github.com/drnic/choctop', :name => 'Choctop', :position => [50, 100]

  # Even add the entire project (like a TextMate bundle)
  s.root :position => [100, 100]
  s.add_root :position => [100, 100]

  # Custom DMG options
  s.volume_icon = "dmg.icns"
  s.icon_size = 104

  # Code-signing (unused if property is not set)
  s.codesign_identity = 'Foo Widgets LLC'
end

In your Rakefile, update the ChocTop configuration with the host and remote_dir details. The rake tasks use rsync to upload the files, so ensure that you have ssh access to the remote server, with a password/ssh keys.

Also, in your project's Info.plist, remember to update/add the following keys:

CFBundleExecutable - name of your project
CFBundleVersion - version for next release, using X.Y.Z format
SUFeedURL - url to Sparkle URL (future: insert this automatically)

Then create the distribution, Sparkle XML file, and upload it to the remote host:

rake appcast

The build process uses your Xcode project file, via the xcodebuild command. If this fails, you may need to run the build process manually via Xcode. Set Configuration to Release (normally its set to Debug for development) and then Build. The “rake appcast” task should finish to completion.

REQUIREMENTS:

  • RubyCocoa (installed with OS X 10.5 Leopard)

  • Xcode 3+

INSTALL:

sudo gem install choctop

COMMON PROBLEMS:

  • Choctop is not building the project's target

  • The DMG's base-name does not match the executable name (e.g. “MyProjectDir.dmg” instead of “My App.dmg”)

  • The DMG does not contain the application bundle

These can be caused by a combination of any of the following:

  • You have set a custom PRODUCT_NAME in your project settings in XCode.

  • You have ${EXECUTABLE_NAME} set as the value of CFBundleExecutable in your Info.plist

  • Your target's name doesn't match the PRODUCT_NAME and/or the EXECUTABLE_NAME

  • You have set a customized Build Products directory in XCode's Preferences

None of these particulars is a problem, you just have to give Choctop a little more info. Example:

ChocTop::Configuration.new do |s|
  # ... snip ...
  s.name = 'Strip Sync'           # what my final .app bundle should be named
  s.build_target = 'StripSync'    # name of the target that should be built
                                  # and build_products is where the magic happens
  s.build_products = '/Users/frankmanowar/Documents/xcode-build/Release'
end

DEVELOPMENT:

This project uses bundler to describe the required rubygem dependencies for development:

sudo gem install bundler
bundle
rake

If you add/remove files, bump versions, etc then you need to update the Manifest.txt and the gemspec.

rake manifest
bundle
rake gemspec # optional
rake install_gem

To release a new version:

  • Bump version number in `lib/choctop.rb` - see `ChocTop::VERSION`

  • Rebuild the Manifest.txt and gemspec:

    rake manifest
    bundle
    rake gemspec
    rake release VERSION=X.Y.Z

ORIGINAL CODE IDEAS:

SPONSORED BY:

LICENSE:

(The MIT License)

Copyright © 2009 Dr Nic Williams, drnicwilliams@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.