I have seen that every executable file in Windows has extension of .exe

But Mac OS X doesn't have the same.

Windows executes .exe files.

Then what kind of files does Mac OS X execute?

What is the difference between both operating system's execution of applications?

Even I found that windows setups has the same extension .exe

But on a Mac setups have extension of .dmg

Would you please share your knowledge with me about .dmg & executables on Macs vs. Windows

link|improve this question

feedback

3 Answers

up vote 9 down vote accepted

Extensions don't actually change what type of file something is, although they often do hint to the system what do do with a particular item.

DMGs are not executables, they are disc images. They are files that act as discs, which often contain the executables and other files for applications. When you double-click on one, the system mounts it and you then have access to the files inside.

Both Windows and OS X execute binary executable files, although they are in different formats. The big difference in what a user sees if using the GUI is that on Windows, you usually see the .exe executable file, which resides in a folder that contains other files and information that the program uses. On OS X, all those other files, along with the primary executable, are contained in a "bundle" (really a folder) with the extension .app. Double clicking on a .app bundle will execute the internal executable and load your application.

Outside of the GUI, in the actual file structure, Mac and Windows systems are really quite similar; these differences are mostly a question of how the system presents things to the user for manipulation in the GUI.

link|improve this answer
Mac also executes .pkg (package) files – Joshkunz Oct 17 '09 at 21:45
1  
.pkg files are compressed bundles of files containing an executable and other installer data, kind of a like a fully-contained, compressed .app that is intended for intallation. – phoebus Oct 17 '09 at 21:47
1  
.pkg files are actually technically documents for Installer.app. If they actually run as a separate program they are not true .pkgs. – Chealion Oct 17 '09 at 23:35
True, I could have been clearer on that point. – phoebus Oct 18 '09 at 0:11
feedback

You will also be able to execute any file that has it's permissions set to executable, given that it actually contains a valid program of course.

link|improve this answer
The native executable format on mac os is mach-O BTW. en.wikipedia.org/wiki/Mach-O – Fred Oct 18 '09 at 1:29
feedback

DMG files are the disk image files normally used to install Mac apps. Once installed, Mac apps usually have the extrension of .APP, but that extension is normally hidden from the user. Mac apps are packages which appear to the user as a single file. This makes it very convenient to move apps to a new folder or a new computer.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.