Solipsism Gradient

Rainer Brockerhoff’s blog

Browsing Posts tagged Mac

AddLicense tool

2 comments

So, to start things going again… 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 tool I’ve written for that. You can download it here. Here’s the help text it prints out if you run it without arguments:

   Add one license at a time to a (unflattened) disk image.
   Usage: AddLicense /path/to/TheUnflattened.dmg Language /path/to/TheLicense.rtf
   Languages supported: da nl ko ja fr it fi pt sv en es de nb
   You can also use long equivalents like English, French etc.
   The first language added will be the default language (usually English).

Here's an actual usage example from a build script:

   hdiutil unflatten "$SOURCE_ROOT/My.dmg"
   "$BUILT_PRODUCTS_DIR/AddLicense" "$SOURCE_ROOT/My.dmg" English "$SOURCE_ROOT/EnglishLicense.rtf"
   "$BUILT_PRODUCTS_DIR/AddLicense" "$SOURCE_ROOT/My.dmg" French "$SOURCE_ROOT/FrenchLicense.rtf"
   hdiutil flatten "$SOURCE_ROOT/My.dmg"

and I use the “flatten” and “unflatten” arguments to hdiutil to massage the disk image.

The trick (as Dan points out in his post update) is that you can use ‘RTF ‘ resources instead of TEXT/styl. I received this interesting tidbit through oral tradition; I’m not a 100% certain, but I think it was through some code that Marko Karppinen showed me a few years ago. Pass it on.

If there’s interest, I may clean up and publish the source sometime, though it uses all sort of gronky old APIs (Resource Manager etc.).

Update: the link above now downloads the complete Xcode project. I also included it on my source code page.

Re: Developments

No comments

The new iMac (27″, i5, 8GB) has arrived and is awesome. Most everything is now transferred to it and working; I had to merge my Home folder from the Time Machine backup I did of the old iMac I sold in September, before our Asia trip, with things I did in the 4 months on the MacBook Air that has been my only machine since then.

Small glitches:

- connecting an external monitor over MiniDP works, but (for me) it flickers distractingly every 5 minutes or so. The dreaded main display flicker is absent, though.

- the enclosed Magic Mouse is great; I loved the scroll-by-touch feature. Alas, after 1 day of click-intensive work, my hand started to hurt, so I’ve gone back to my el cheapo Pleomax mouse. Maybe I’ll try again later; my guess is holding the thing between thumb and little finger is straining some never-used muscle. It also has surprisingly sharp edges at those points.

I’ve also gotten my old Core Solo Mac Mini back and am setting it up. It still runs 10.5.8, so I’ll finally be able to debug running stuff on Leopard again.

Re: Developments

No comments

If any of you still read this after nearly 50 days without posting, I’ve been tempted to do this:

Click on the comic to see the original at http://www.makeuseof.com/tech-fun/internet-cant-ignoere-grammar/ (via http://www.halfapixelshort.com/).

In other news, my trusty but overloaded MacBook Air proved unable to cope with serious developing (or even the usual mixture of stuff I do when procrastinating working on other things). Less than half an hour (often much less) after I connect to the Internet over either USB/Ethernet or WiFi, connect an external USB drive, an external monitor, or whatnot – much less all of these at once – the fan turns to full blast and soon thereafter the dreaded “kerneltask” begins to use 99% of both CPU cores, slowing typing and even mousing to a crawl.

Closing the Air for 10 to 20 minutes usually but not always allows resuming work for another short time, but sometimes a reboot is necessary. Must be global warming icon_cry.gif

Anyway, my new iMac 27″ quad-core i5 with 8GB of RAM (squeee!!!) is due to arrive tonight and all should be back to normal Real Soon Now™.

Re: Developments

No comments

Whew, there were even more tons of stuff to do than I’d thought; sorry about that.

To make a long story short, we moved out of our old apartment before the trip and moved in to the new one when we came back. I’ve almost caught up with buying furniture, wiring, plumbing, installing lighting fixtures, bathroom accessories, kitchen shelves and so forth; the main thing still in the queue are wall-to-wall bookshelves in my home office, and they’re a priority as all my books are lying about in boxes.

Also, I sold my main working Mac (a 20″ iMac Intel) before the trip, confident that I’d be able to immediately buy a new one on my return; unfortunately, the new 27″ iMacs have been delayed in Brazil and I now expect my pre-ordered i5 model to be delivered a few days before Christmas. In the meantime, the MacBook Air is somewhat overloaded with stuff, and much juggling will be necessary before I can again use it for coding… still, I hope to get going again this weekend.

Developments

No comments

Non-development developments, that is.

We’ve been busy packing for our upcoming trip to China and other Asian countries. Also, moving from our current apartment to a new one – more packing! I also just sold my desktop iMac (more packing, erh, backing-up); by the time we get back in mid-November there should be a new generation of iMacs out. Meanwhile, essentials are being copied to my MacBook Air, and I’ll work based from that for the next two months.

You can tell that I decided to schedule all traumatic experiences at once! Better to get them done and over with…

Anyway, we go off the coming weekend. On the way to Beijing there’ll be a stopover of a few days in Frankfurt, Germany; enough to de-lag a little, and visit with family.

If all goes well, we’ll arrive in Beijing in the early afternoon of Sept. 25, and in the evening I’ll do a small presentation for the local CocoaHeads chapter. (At this time, that page shows Sept. 26 but we’re trying to move it to the 25th.) I gather that all members are rather young, and will be amazed at someone over 40 writing software! icon_wink.gif

At any rate, I plan to talk a little about my professional experience, then move to the main topic – tentatively named “Protect Your Application Against Evil Hackers (or, at least, against the lazy ones)” – and finally showing some pictures from exotic places like Brazil and California. If it comes off well, I’ll post the slides somewhere here for downloading.

After a little more than two weeks in China we’ll depart from Shanghai for a 4-week cruise, going to Japan, Hongkong, Philippines, Malaysia, Brunei, Singapore and Vietnam. On the way back to Brazil there’ll be another few days of stopover in Paris.

Posting updates here from China may not be easy, but I’ll try.

10.6 is early …and circumstances conspired to make me late in checking (or, at least, ensuring) compatibility with it.

I just posted on the Quay support forum about the situation with Quay. Briefly, an interim 1.1.2 version should be out soon.

Klicko installs and runs with no problem on 10.6. However, it being a 32-bit control panel, System Preferences will restart every time it is run. Once you’ve set the preferences, that shouldn’t be too onerous, but I still plan to do a 64-bit version as soon as possible.

XRay will mostly work if you have Rosetta installed, but with the same restrictions as on Leopard: the file browser may crash (though, oddly enough, less than on 10.5); and changing permissions on folder contents will probably fail without warning. XRay is, unfortunately, recommended for 10.4 (Tiger) users only, and most of its functionality will be reincarnated in some form or other in the delayed-but-upcoming Quay 1.2.

Zingg! and Nudge are Finder Contextual Menus, which are not supported by Snow Leopard. Their functionality will also be implemented through plug-ins for Quay 1.2.

My US International keyboard layout has finally been incorporated by Apple into their standard list of layouts, so you won’t need to get it from here anymore. Yay!

Stay tuned for further announcements regarding Snow Leopard…

Photos licensed by Creative Commons license. Unless otherwise noted, content © 2002-2012 by Rainer Brockerhoff. Iravan child theme by Rainer Brockerhoff, based on Arjuna-X, a WordPress Theme by SRS Solutions. jQuery UI based on Aristo.