4

How do the .app execution files work? Can it be decompiled? In the Windows world, exe files were modified through hex editors and such and most of the executables relied on library files such as dlls and ini files.

But how do .app files work?

I've revealed the hardrives directory structure through terminal and when I get a new package to install after it has been mounted not only do I see the .app file and application folder but I also see other files such as a background folder (being if the package had a nice backround to it ) and some other files. But these app files, are it's library files embedded inside the app?? Or is it calling the library files in the OSX includes directory? I just wanna know all that I can about the Mac. Soon I'll be developing but not yet.

1 Answer 1

8

A .app file is an archive, containing the binary executable file itself, as well as any resources that go with it. In essence, it contains all the files that you would see inside a program's folder on Windows, but to the UI it shows up as a single monolithic item. This allows programs to be installed and uninstalled simply by placing the .app file in the /Applications folder (or wherever the user wishes), and deleting it when no longer wanted.

When you double click a .app file, the OS's open handler knows to execute the internal binaries.

You can right-click on a .app file and hit "show package contents" to see the internal folder structure of the package.

4
  • Cool I'll try that thanks. One two more questions. What are .plist files? And how can I view services that are running. Thnx
    – Iaddesign
    Dec 3, 2009 at 8:03
  • .plist files are property list files (en.wikipedia.org/wiki/Property_list); these are usually used to store users' settings. To view services that are running, use Activity Monitor, which is located in /Applications/Utilities. Dec 4, 2009 at 7:02
  • To add to that, plist files have two formats, one binary, but the most common being xml.
    – phoebus
    Dec 4, 2009 at 7:04
  • @phoebus does this mean the OS has to unarchive the package every time you run the app? Is it actually a single file on disk or a regular folder with some OS-magic to look like a package?
    – Mr. Boy
    Aug 15, 2018 at 14:31

You must log in to answer this question.