Hi,

I've been digging and delving and have found out why this is flakey!

When I Drag in the folder in PM, it sets the privileges to the same as the local copy. I then override then in the content pane, so then become owner: root, group: admin. This seems to work ok when you press "Apply Recommendations", however, if you drill down into the hierarchy of file, you see see that inside the .app bundle, the contents are still set to the local settings. If you "Select All" and do it, it correctly changes them to root/admin.

If you then build and run an installer, it creates:

/Application/AppFolder/AppFolder/myApp.app!!!!!

If you then remove the Destination field from the Folder (not the container) e.g. set it blank, then all works as expected!

So it looks like it does do the sensible thing. e.g. If the Destination Field is blank on an item in the Container, then it defaults to the Destination of the Container.

All the Best
Dave

On 17 Dec 2008, at 17:00, Jeremy Pereira wrote:


On 17 Dec 2008, at 15:27, Dave wrote:


On 17 Dec 2008, at 12:03, Jeremy Pereira wrote:


On 17 Dec 2008, at 11:28, Dave wrote:

Hi Mark,

Thanks a lot, it certainly is a lot easier to use and a lot less flakey, but it still doesn't work. It does not create a folder in "/Applications" it just installs the raw files there instead. I'm giving up on PackageMaker, it just doesn't work and there doesn't seem to be any support for it.

Seems crazy that you can't do this one simple thing with it, in every other installer I've ever used this would have been a 5 min job, 2 days later using PackageMaker and still nothing. Oh well, such is life.

It would be crazy if it were true, but it's not.

I've just created a simple package maker project that installs to a sub directory of /Applications and it works absolutely fine.

Here's how I did it.

I created a directory in my home folder that mirrored the way I want the final installation to look i.e.

/Users/jeremyp/
->   /Applications
        ->   /ASubDir

I put the distribution application in ASubDir, so I have this directory structure:

/Users/jeremyp/
->   Applications/
        ->   ASubDir/
                ->   MyApp.app

In package maker, I added /Users/jeremyp/Applications as content. On the right hand pane

Install     was /Users/jeremyp/Applications
Destination was /Applications (I had to change this from "/")

After running the installer with the built package, I had a subdirectory within /Applications called ASubDir containing my application exactly as expected.


Please see my last post. Did you set the Destination on the Contained and the Folder within it?

I'm not quite sure what you mean. It seems to me that what actually happens is that PM takes everything *in* the folder you specify in the Install field and copies it *into* the location in the destination field.

I think the reason it's like this and the destination field defaults to / is that a common use-case of PM is you want to install lots of components in different places e.g. an application in /Applications and a driver in /System/Library/Extensions.

It doesn't seem to work unless you do this. To me this seems odd, if left empty surely better behavior would be to use the Containing Item's Destination rather than "/" ? If you wanted it to go into "/", you could just override by entering "/" in the folder Destination.

Also did you try it with files other than just the .app file? e.g. the .app file and (say) a .txt file.

Yes. In fact, I just tried it with an empty directory in my package and the empty directory was created successfully. I had this structure:

$HOME/testpm/Applications/
                subdir/
                        hosts (copied frome /etc/hosts)
                        emptydir/

I added $HOME/Applications as the content. The install field was $HOME/Applications, the destination was /Applications

The subdir structure was created faithfully in /Applications including the emptydir.

Incidentally, this method preserved the folder icon I set for the subdir directory.



All the Best
Dave










_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to