PDA

View Full Version : Why is ".app" in the filename?


chabig
Jul 5, 2004, 06:00 PM
Why do many shareware/freeware applications and even some commercial applications (are you listening Adobe?) have .app in their filenames? I thought the Finder was supposed to suppress the display of ".app" extension for applications.

Chris

philzilla
Jul 5, 2004, 07:12 PM
none of my Adobe apps display .app in Finder, so which particular section of Adobe should be listening?

OptimusG4
Jul 5, 2004, 07:28 PM
Originally posted by philzilla:
none of my Adobe apps display .app in Finder, so which particular section of Adobe should be listening?

Actually, even I noticed when I downloaded Adobe Reader for the whole 3 minutes it was on my system, it also showed '.app' in the Finder.

chabig
Jul 5, 2004, 07:41 PM
Yeah, that's it. Adobe Reader displays .app in the application's filename. My question is...why? I'm sure there must be something some developer's do when they create their packages that makes it so. I usually just delete the extension and everything works fine.

Chris

Spheric Harlot
Jul 5, 2004, 08:00 PM
"Get Info" ---> "Name & Suffix" ---> "Hide Suffix".

-s*

chabig
Jul 5, 2004, 08:12 PM
Yes. But it's not that. Hide suffix is already checked on these apps and the Finder still displays it.

Chris

CharlesS
Jul 5, 2004, 09:07 PM
I'd try trashing preference and cache files for LaunchServices and the Finder.

chabig
Jul 5, 2004, 09:41 PM
I just edit the name. The Finder won't let you edit off the .app, but you can do it in the Get Info window without a problem.

Still, my question is this: What are developers doing to cause this? It must be a build setting in xCode or Codewarrior, I suppose.

Chris

philzilla
Jul 6, 2004, 07:29 AM
Originally posted by OptimusG4:
Actually, even I noticed when I downloaded Adobe Reader for the whole 3 minutes it was on my system, it also showed '.app' in the Finder. ahh, i don't have that on here, i use Acrobat (not the Reader)

philzilla
Jul 6, 2004, 07:30 AM
Originally posted by chabig:
Still, my question is this: What are developers doing to cause this? It must be a build setting in xCode or Codewarrior, I suppose. that would be my guess, but i don't develop applications, so i dunno. maybe ask in the developers forum, if you don't get much response here?

Art Vandelay
Jul 6, 2004, 04:05 PM
Do you have a version number at the end of the file name? i.e. Adobe Reader 6.0.1

If you do, that is the problem. The Finder gets confused when there are periods near the end of the file name. It loses the ability to recognize the .app at the end and hide it. My guess is that it assumes .0.1.app is the extension, not just .app.

madmacgames
Jul 6, 2004, 04:15 PM
Originally posted by Art Vandelay:
Do you have a version number at the end of the file name? i.e. Adobe Reader 6.0.1

If you do, that is the problem. The Finder gets confused when there are periods near the end of the file name. It loses the ability to recognize the .app at the end and hide it. My guess is that it assumes .0.1.app is the extension, not just .app.

no it does not. Adobe Reader shows up for me in Finder as "Adobe Reader 6.0" with the .app hidden.

Angus_D
Jul 6, 2004, 04:41 PM
Never seen this.

CharlesS
Jul 6, 2004, 05:37 PM
Originally posted by chabig:
I just edit the name. The Finder won't let you edit off the .app, but you can do it in the Get Info window without a problem.

Still, my question is this: What are developers doing to cause this? It must be a build setting in xCode or Codewarrior, I suppose.

Chris
Since I've never encountered this with any app, including Adobe Reader, and since I don't know of any Xcode build setting to make the .app extension visible, I think it's probably just your setup. Did you try trashing the Finder's prefs and LaunchServices' caches and prefs?

eyadams
Jul 6, 2004, 05:55 PM
The ".app" extension is primarily a holdover from the NeXTSTEP days, where all applications had it, just as in Windows applications are .exe (or .bat, or .vbs, or .com, or whatever).

Applications will have it or not depending on how they are built. If they are built as a "bundle", they will have the ".app" extension; if they are built as a dual-fork file (i.e. how mac files were done in the "Classic" days), they won't necessarily have the extension. All Cocoa apps will have the extension, some Carbon apps will, and others will not. Then there's Unix apps, which won't either. But let's ignore them.

There's all kinds of technical details that go into this, but I don't remember all of them. One thing I do remember, however, is that to the file system a bundle is a directory with very rigidly defined contents - if you open up a terminal window and "ls -l SomeApp.app" you'll see a little "d" on the left, indicating the application is a directory.

chabig
Jul 6, 2004, 06:41 PM
OK then. Let's do a test. A lot of you say you've never seen this. If you don't mind, please download this small app (http://www.macupdate.com/info.php/id/7585) and after unstuffing it, tell us whether it has the .app extension. Mine does.

Chris

philzilla
Jul 6, 2004, 07:20 PM
heh, you haven't got "show all file extensions" ticked in Finder's prefs, have you? :p

philzilla
Jul 6, 2004, 07:22 PM
Originally posted by chabig:
OK then. Let's do a test. A lot of you say you've never seen this. If you don't mind, please download this small app (http://www.macupdate.com/info.php/id/7585) and after unstuffing it, tell us whether it has the .app extension. Mine does.

Chris nope, just: Mini Calculator 3.11

Art Vandelay
Jul 6, 2004, 07:36 PM
Originally posted by philzilla:
heh, you haven't got "show all file extensions" ticked in Finder's prefs, have you? :p

That's it. I still think it's a bug. The Finder will only show .app for apps ending with .x. It won't show .app for anything else even when showing all extensions.

Chuckit
Jul 6, 2004, 07:53 PM
I may be off my rocker, but I seem to remember Apple mentioning this as a security feature around the time global extension-hiding was introduced. People were concerned that there would be a bunch of MyHorribleVirus.jpg.apps getting released, so Apple made it so that if there was any ambiguity about the actual extension of a file, Finder wouldn't hide the extension. I don't have any actual source within arm's reach, but I remember reading about it on here a couple of years back.

chabig
Jul 6, 2004, 08:03 PM
OK. I think I've figured it out. The Finder will display .app in if ALL of the following are true:

1) You must have the Finder preferences to always display extensions turned on.
2) The filename must have a period in it.

So in the above example, my Finder displays "Mini Calculator 3.11.app" because of the period in the version number. If I simply edit that out the Finder also hides the extension (i.e., Mini Calculator 311).

This is consistent with how I remember Adobe Reader. Adobe puts the version number into the filename..."Adobe Reader 6.0.app". Again, deleting the first period shortens the display to "Adobe Reader 60"

So this is really a quirk in the way the Finder displays filenames. it's not really the developers who are doing this directly, although they are the ones who put the version number into the filename.

Puzzle solved. Thanks everyone.

Chris

CharlesS
Jul 6, 2004, 08:43 PM
Originally posted by Chuckit:
I may be off my rocker, but I seem to remember Apple mentioning this as a security feature around the time global extension-hiding was introduced. People were concerned that there would be a bunch of MyHorribleVirus.jpg.apps getting released, so Apple made it so that if there was any ambiguity about the actual extension of a file, Finder wouldn't hide the extension. I don't have any actual source within arm's reach, but I remember reading about it on here a couple of years back.
Ah, I remember that now. I've been playing around with this, and the odd thing about it is that MyHorribleVirus.jpg.app will show the .app extension no matter whether "Always show extensions" is on or not. It does this if .app is preceded by any recognized extension like .jpg, .mov, etc. However, for non-recognized extensions, (like .0 caused by a version number) it doesn't show unless "Always Show Extensions" is on.

This could be a security flaw since you could name a file "MyHorribleVirus.jpg .app" (notice the space) and if Always Show was unchecked, it would look like the extension was .jpg. :hmm:

philzilla
Jul 6, 2004, 09:00 PM
damnit, i wanna see MyHorribleVirus.jpg now! :p

CharlesS
Jul 6, 2004, 09:24 PM
Originally posted by philzilla:
damnit, i wanna see MyHorribleVirus.jpg now! :p
I don't...