• 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: How do I get the Finder window layout correct?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I get the Finder window layout correct?


  • Subject: Re: How do I get the Finder window layout correct?
  • From: Mike Fischer <email@hidden>
  • Date: Wed, 14 Jun 2006 18:23:46 +0200

Hi Wayne!

Am 14.06.2006 um 17:04 schrieb Wayne Linder:

The way I do it is to create a disk image first, copy all the components to
that image and then lay out all of the stuff - installer package,
documentation folders, background image, icon size, position, etc. and then
eject the disk image. When remounted, you should be all set, including the
.DS_Store which makes the magic happen.

Thanks for this hint. I tried it and it works somewhat better than what I had before.


Now some of the layout options are honored whan mounting the disk image. The window size and the fact that I want icon view are ignored though. I get a window without sidebar or toolbar in list view (my default) at the size of another open Finder window (much too large for the installer). I want a small(er) window without any tool- ar sidebar in icon view.

So this is a good first step it seems.

BTW: I'm creating all of this from a shell script which calls an AppleScript to set the Finder options.

It basically does this:

PKGNAME="MYPACKAGE"
cd ... # my base directory
hdiutil create -ov -format UDRW -srcfolder "." -volname "$PKGNAME" - attach "../${PKGNAME}_rw.dmg"
osascript "../../../srcroot/Tools/SetFinderWindow_${PKGNAME}_DI.scpt"
hdiutil detach "/Volumes/$PKGNAME"
hdiutil convert "../${PKGNAME}_rw.dmg" -ov -format UDCO -o "../ $PKGNAME.dmg"


The AppleScript creates a new Finder window, sets its target to the mounted disk image volume then tells it to set a number of attributes of the window:
tell application "Finder"
set f to disk "MYPACKAGE"
set w to make new Finder window
tell w
set target to f
set current view to icon view
set statusbar visible to false
set sidebar width to 0
set toolbar visible to false
set position to {100, 100}
set bounds to {100, 100, 100 + 290, 100 + 105}
end tell
-- Now position the items on the volume at specific positions.
-- - Code ommitted because it's probably irrelevant to my question.


	-- But these don't seem to have any effect at all:
	update every item of f
	update f
end tell


Mike -- Mike Fischer Softwareentwicklung, EDV-Beratung Schulung, Vertrieb Address: Bundesstrasse 9, D-20146 Hamburg, Germany Phone: +49 (0)40/45038886, Fax: +49 (0)40/45038887

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How do I get the Finder window layout correct?
      • From: Wayne Linder <email@hidden>
References: 
 >Re: How do I get the Finder window layout correct? (From: Wayne Linder <email@hidden>)

  • Prev by Date: Re: How do I get the Finder window layout correct?
  • Next by Date: Re: How do I get the Finder window layout correct?
  • Previous by thread: Re: How do I get the Finder window layout correct?
  • Next by thread: Re: How do I get the Finder window layout correct?
  • Index(es):
    • Date
    • Thread