{"id":1415,"date":"2010-02-10T11:35:35","date_gmt":"2010-02-10T14:35:35","guid":{"rendered":"http:\/\/brockerhoff.net\/bb\/viewtopic.php?p=2779"},"modified":"2010-05-08T10:11:00","modified_gmt":"2010-05-08T13:11:00","slug":"addlicense-tool","status":"publish","type":"post","link":"https:\/\/brockerhoff.net\/blog\/2010\/02\/10\/addlicense-tool\/","title":{"rendered":"AddLicense tool"},"content":{"rendered":"<p>So, to start things going again&#8230; I was looking at my RSS feeds for the first time in almost 5 months, and read Dan Wood of <a href=\"http:\/\/www.karelia.com\/\">Karelia<\/a> fame explaining about <a href=\"http:\/\/www.gigliwood.com\/weblog\/Cocoa\/Converting_Rich_Tex.html\">Converting Rich Text to TEXT\/styl resources for an SLA on a Disk Image<\/a>.<\/p>\n<p>My own workflow for building a release disk image uses a small tool I&#8217;ve written for that. You can <a href=\"\/src\/AddLicense.zip\">download it here<\/a>. Here&#8217;s the help text it prints out if you run it without arguments:<\/p>\n<pre><code>   Add one license at a time to a (unflattened) disk image.\r\n   Usage: AddLicense \/path\/to\/TheUnflattened.dmg Language \/path\/to\/TheLicense.rtf\r\n   Languages supported: da nl ko ja fr it fi pt sv en es de nb\r\n   You can also use long equivalents like English, French etc.\r\n   The first language added will be the default language (usually English).\r\n\r\nHere's an actual usage example from a build script:\r\n\r\n\u00a0 \u00a0hdiutil unflatten \"$SOURCE_ROOT\/My.dmg\"\r\n\u00a0 \u00a0\"$BUILT_PRODUCTS_DIR\/AddLicense\" \"$SOURCE_ROOT\/My.dmg\" English \"$SOURCE_ROOT\/EnglishLicense.rtf\"\r\n\u00a0 \u00a0\"$BUILT_PRODUCTS_DIR\/AddLicense\" \"$SOURCE_ROOT\/My.dmg\" French \"$SOURCE_ROOT\/FrenchLicense.rtf\"\r\n\u00a0 \u00a0hdiutil flatten \"$SOURCE_ROOT\/My.dmg\"\r\n<\/code><\/pre>\n<p>and I use the &#8220;flatten&#8221; and &#8220;unflatten&#8221; arguments to hdiutil to massage the disk image.<\/p>\n<p>The trick (as Dan points out in his post update) is that you can use &#8216;RTF &#8216; resources instead of TEXT\/styl. I received this interesting tidbit through oral tradition; I&#8217;m not a 100% certain, but I think it was through some code that <a href=\"http:\/\/www.karppinen.fi\/\">Marko Karppinen<\/a> showed me a few years ago. Pass it on.<\/p>\n<p>If there&#8217;s interest, I may clean up and publish the source sometime, though it uses all sort of gronky old APIs (Resource Manager etc.).<\/p>\n<p><strong>Update:<\/strong> the link above now downloads the complete Xcode project. I also included it on my <a href=\"\/src\/index.html\">source code page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, to start things going again&#8230; I was looking at my RSS feeds for the first time in almost 5 months, and read Dan Wood of Karelia fame explaining about Converting Rich Text to TEXT\/styl resources for an SLA on a Disk Image. My own workflow for building a release disk image uses a small [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4,19],"tags":[26,23,22],"class_list":["post-1415","post","type-post","status-publish","format-standard","hentry","category-dev","category-software","tag-cocoa","tag-mac","tag-xcode"],"featured_image_src":null,"author_info":{"display_name":"Rainer Brockerhoff","author_link":"https:\/\/brockerhoff.net\/blog\/author\/rbrockerhoff\/"},"jetpack_shortlink":"https:\/\/wp.me\/p1q3Zc-mP","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/posts\/1415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/comments?post=1415"}],"version-history":[{"count":0,"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/posts\/1415\/revisions"}],"wp:attachment":[{"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/media?parent=1415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/categories?post=1415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brockerhoff.net\/blog\/wp-json\/wp\/v2\/tags?post=1415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}