homebysix / recipe-robot

A kick ass tool for creating AutoPkg recipes.
Apache License 2.0
300 stars 28 forks source link

Should we handle apps not on the root level of the dmg/zip? #26

Closed homebysix closed 8 years ago

homebysix commented 9 years ago

If the app we want to use as the basis for recipe-building isn't on the root level of the dmg or zip, do we want to dig much farther, or should we error-out?

Two easy examples, both of which require the user to drag a folder to their /Applications folder, rather than an app:

screen shot 2015-10-04 at 3 13 28 pm

screen shot 2015-10-04 at 3 13 39 pm

Thinking about this might be out of scope for Recipe Robot, but just wanted to put it out there.

eahrold commented 9 years ago

This is does bring up an interesting dilemma. Especially since even if you went one level down looking for an .app bundle, who's to say the destination folder is always"Applications". RR at best would have to assume that's the intended destination (insert danger alert here!).

sheagcraig commented 9 years ago

Well, personally I think these kinds of apps are both annoying and dated. But they are annoyingly still present. We have several at DA which I can come up with right off the top of my head.

Including one called Casper Suite that you might be familiar with...

In almost all of these cases, though, isn't their an alias to the Applications folder that the user is supposed to use to drag their folder into when the disk image mounts?

So would it be possible, as part of scanning the disk image, to os.walk and see if there's an Applications item that is_dir and is_link?

While I don't agree with bundling all of your crap into a folder to leave on the side of the trail like a forgotten dog-poop bag, that doesn't mean we can just ignore them!

sheagcraig commented 9 years ago

I guess the major deviation from /Applications that I forgot to mention is /Library/Internet Plug-Ins.

That being said, how many internet plugins are there that don't already have recipes for them?

homebysix commented 9 years ago

Another exception is prefPanes. I can think of MenuMeters off the top of my head. Should be pretty easy to check for the presence of a bundle ending with .prefPane or .plugin. (#47)

I like that idea: Check to see whether there are two items in the disk image, and one of them is an alias to /Applications. If so, we know what to do.

If the dmg is more complicated than that, then we'll throw an error and exit. (Sorry, JAMF.) screen shot 2015-10-07 at 12 08 45 pm

macmule commented 8 years ago

Audacity is another. The Autdacity folder contains both the app as well as some supporting files (help documents etc).

homebysix commented 8 years ago

The stated goal of Recipe Robot is "to create new AutoPkg recipes for simple Mac apps." The more examples of the above I see, the more I think that Mac apps that are delivered with nested subfolders do not meet at least one definition of "simple." I'm going to close this one.