Friday, May 15, 2009

Installing Composer-style .dmg Without Casper

On occassion I have needed to install software where we created a .dmg package using Composer when I did not have Casper installed.

Here is an example of doing it.  (Names, etc, will change when you do it yourself).  Note that this will not fill user templates or copy files to all users.

$ # Mount the file while retaining permissions
$ hdiutil attach ~/Desktop/iWork\ 08.dmg -owners on
expected   CRC32 $880FA4DB
/dev/disk1           Apple_partition_scheme          
/dev/disk1s1         Apple_partition_map             
/dev/disk1s2         Apple_HFS                       /Volumes/iWork 08
$ sudo cp -Rp /Volumes/iWork\ 08/ /
cp: /Volumes/iWork 08/: unable to copy extended attributes to /: Is a directory
cp: /Volumes/iWork 08/: unable to copy ACL to /: Is a directory
$ hdiutil detach /Volumes/iWork\ 08/
"disk1" unmounted.
"disk1" ejected.