The talk focuses on the processes and requirements to ship a software, which was written with MacRuby, to the end user. I present libraries and tools, that are helpful for this purpose and show how to use them.
13. First Objective-C App
class Foo
! attr_writer :text_field
!
! def seed(sender)
! ! @text_field.StringValue = "Generator doesn't need to be seeded ;)"
! end
!
! def generate(sender)
! ! @text_field.StringValue = (rand(100) + 1)
! end
end
Ruby => Less Noise
44. Embed
- Meaning copying MacRubyFramework inside the application Bundle
- Updating file references to point inside the app. Bundle
45. Embed
your_project$ macruby_deploy --embed build/
release/IntegrityX.app
Helpfull script.
This is basicly the same what the embed target in XCode does
46. MacRubyFramework ~ 60MB
By Sergei Golyshev http://www.flickr.com/photos/29225114@N08/3112939993/ CC
Only Framework, no Gems, they will be excluded
47. Embed without Ruby StdLib
your_project$ macruby_deploy --embed --no-stdlib
build/release/IntegrityX.app
your_project$ macruby_deploy --embed --stdlib yml
build/release/IntegrityX.app
--no-stdlib will remove the entire std lib from the framework, eg. FileUtils, Net, openssl, zlib,
yml.
-> Not a big problem we have the Cocoa libs but they aren’t as nice to use as the stdlib ones.
--stlib can embed single stdlibs only
61. Adding Sparkle
1.Add Sparkle Framework to App Bundle
2.Add Check for Update Option
3.Generate Key Pair for Signing
4.Add Info where to find Updates and PubKey
A Video to show it.
62. In the original presentation was a video here to show
how to setup Sparkle but you can follow the
instructions in this article:
http://foolsworkshop.com/rubycocoa/2008/06/adding-
a-check-updates-feature-for-rubycocoa-and-macruby/
63. Release with Sparkle
1.Create Signature for your App Bundle
2.Create AppCastFeed with current Signature
3.Add Release Note
Yes there is a script for that:
http://github.com/CraigWilliams/appcastautomation
66. ChocTop
All you need at your command line
rake build # Build Xcode Release
rake dmg # Create the dmg file for appcasting
rake feed # Create/update the appcast file
rake upload # Upload the appcast and dmg to host
rake version:bump:major # Bump the major version.
rake version:bump:minor # Bump the minor version.
rake version:bump:patch # Bump the patch version.
rake version:current # Display the current version
67. ChocTop
Offers Custom DMG with Positioning
Doing this with Apple Script (requiers original apple ruby as it uses ruby cocoa)
70. Resources
ChocTop and Logo Dr. Nic William http://drnic.github.com/choctop/
Macruby and Logo http://macruby.org
Framework Foto: http://www.flickr.com/photos/29225114@N08/3112939993/
Sparke Instructions: http://foolsworkshop.com/rubycocoa/2008/06/adding-a-check-
updates-feature-for-rubycocoa-and-macruby/
Sparkle Video, Tweetscreen DMG Design, web site screen shoot from Patrick Hüsler:
http://huesler-informatik.ch/
Sparkle Framework: http://github.com/andymatuschak/Sparkle