• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: creating 'omni like' disk images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating 'omni like' disk images


  • Subject: Re: creating 'omni like' disk images
  • From: Bill Bumgarner <email@hidden>
  • Date: Thu, 16 May 2002 20:47:38 -0700

Mike Trent wrote a handy little script that makes building disk images automatically from the command line easy. I augmented it to add a handful of features

First, set up the project as follows:

- add a Packaging BuildStyle to the project, it simply sets INSTALL_PATH=/

- add a Packaging Target to the project as an aggregate target that includes all of the other targets that need to be built/installed on the disk. In the case of Xoptimize, I have Legacy targets that copy the ReadMe, the Credits file, and the Change Log.

To build a package, do the following from the command line (add -nosource to not include source):

Tools/build -archive dmg -name 'Xoptimize v1.0' -nocompress Xoptimize

This will create an uncompressed disk image in /tmp/Xoptimize.build/archives/. Mount it and make it look however you want-- move the icons around, set the background, do whatever you want.

Unmount it.

To compress the disk image (which makes it read only):

hdiutil convert -format UDZO -o 'Xoptimize v1.0-compressed' Xoptimize\ v1.
0.dmg
ls -alF
-rw-r--r-- 1 bbum wheel 118196 May 16 23:38 Xoptimize v1.0-compressed.dmg
-rw-r--r-- 1 bbum wheel 5242880 May 16 23:32 Xoptimize v1.0.dmg
mv Xoptimize\ v1.0-compressed.dmg Xoptimize\ v1.0.dmg

The 'build' perl script and Xoptimize source are all available from the mosxland.sourceforge.net CVS repository. Xoptimize was written as a source example, not as a serious app... it's fully documented source. The source is included with the disk image as downloaded from www.versiontracker.com, but Tools/build isn't.

'build' can also:

Tools/build
usage: build <project directory> [-archive <archive type> -name <product name> -nocopy -noclean -nosource]
-archive Produce an archive of the build results. archive type
must be one of:
dmg - a Disk Copy disk image
gnutar - a compressed gnutar ball
If -archive is omitted an archive will not be made.
-name The product name to use in the final root & archive.
For example, 'Xmanview1.0'.
-buildstyle The build style to use. Defaults to 'Packaging'.
-nocopy Do not copy the source to separate location.
-nosource Do not copy the source into the final image / archive
-noclean Do not clean the source before building.
-nocompress Do not compress the disk image.
-nobuild Just create an archive of the <project directory> folder.

It takes a couple of steps off the process as previously described which I find to be particularly tedious and, as a result, prone to stupid mistakes.
If someone were particularly motivated, I suppose the perl could be modified to add a license and/or cause it to auto open...

b.bum
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: creating 'omni like' disk images
      • From: Tomas Zahradnicky <email@hidden>
  • Prev by Date: Re: Hanging heartbeat thread on launch
  • Next by Date: Re: Changing the Text Color of an NSMenuItem in an NSPopUpButton?
  • Previous by thread: Re: creating 'omni like' disk images
  • Next by thread: Re: creating 'omni like' disk images
  • Index(es):
    • Date
    • Thread