Neden programları yüklemem gerekmiyor?


13

Yirmi yıllık Windows kullanımından gelen iOS geliştirme için bir Mac kullanmaya başladım ve Mac programları için hiçbir kurulum işlemi olmadığını bulmak için şaşırdım ve şaşırdım .... sadece indirin, DMG'yi açın, dosyayı üzerine kopyalayın ve presto yapın.

Bu beni hiç şaşırtmıyor .

Birisi teknik düzeyde farkın ne olduğunu açıklayabilir mi? Bir kurulum işlemini gerçekleştirmek akla yatkın bir şekilde gerekli olmayabilir mi?

Ve eğer böyle bir şey mümkünse, neden tüm işletim sistemleri bu şekilde çalışmaz?


It's worth noting that just dragging the *.app folder into your local disk can trigger file actions. Also, that nnn.app is a folder, not a file. How mac apps work is fairly involved.
Fake Name

I'd just like to point out that Windows installers do some things besides just copying files and setting shortcuts. One is create a restore point so that the system can be restored to its original state if something goes wrong. Another to update the registry with an uninstall process. Since Windows apps aren't bundled like OS X apps are, the latter process is definitely necessary.
Kris Harper

Yanıtlar:


15

Us Mac users ask the same question the other way: Why do you need an (un)installer for everything in Windows?

The majority of Mac programs are complete bundles - all their resources are in the Application's folder (right click on App icon -> Show Package Contents). So they will run from anywhere, there's a system variable that tells the code where it is. Often, an application can be run directly from the downloaded DMG and even from a remote server. Bit of a performance hit but it will work. User settings are in the user's library, there are also system routines to handle the mechanics.

Macs have no central registry that requires setup (or maintenance) so nothing needs to go there either.

If you are developing Mac applications you should try very hard to not need an installer - only if you are installing shared libraries or shell-level services. In general, it's possible to do without.

Since you are heading towards iOS programming I would suggest just not worrying about it. iOS rules will tell you where to save what, and it is NOT negotiable. Preferences go here, user data goes there. You will use the supplied APIs. Comply. Obey.


No app can think different?
Machinarius

The flip side is that if an app that is bundled (.app) does add files to the system (such as in /Library, others places), register services, preference panes, etc., a simple "delete the .app" doesn't clean it up, and truly, nothing cleans it up, though there are other apps that do (or at least claim so) clean artifacts from non-present apps.
Hugo

Can you explain how this makes any sense? A lot of applications need to be recognized as handlers for certain files. That's impossible to do with just a file extraction process; the app needs to register itself somewhere, perhaps the equivalent of a Windows registry. How can an app not need an installer.
user541686

5

Actually, there are a lot of things on OS X that need to be "installed".

Normally, the apps that are "installed" are packages that include certain instructions. To put it simple, the package runs a script and tells the system to create/move files in different parts of the OS. This is necessary for software like the Adobe CS suite or Microsoft Office.

The other kind of apps, are kinda "standalone apps", in which you only need just one executable file. This file, when opened, then creates its dependencies, preferences files and such.


3

In many cases, a Windows installer don't really do anything other then extracting the compressed files, and writing them to the destination.

And then it creates a few shortcuts, and it might register itself to open files with specific extensions.

There is nothing magic about installing software in windows, and for much Windows software, you can in fact take the installed software directory and copy it directly to an other computer and run it there without doing a (re)install.

So it is mostly a difference between userinterfaces(Who is responsible for copying the files) not a difference between what really happens.

Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.