开发者

Why Do Applications Need Installing? [closed]

开发者 https://www.devze.com 2023-02-22 15:15 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or exte开发者_JAVA技巧nded discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

I'm confused. Right now I write some small apps using C++ and Java, but none of them need to be installed. Why do "big apps" like browsers, media players, games etc. need to be installed?


There are several reasons:

  1. They hook into the system. When you install a browser, it will be started if you open a file which starts with "http://" or ends with ".html"

  2. People using apps are used to install them. If your app doesn't come with an installer, users are confused how to get it up and running. They don't understand what happens during installation, they just know that they always have to do it. So some applications (which don't need installers) come with a simple installer just to avoid confusion.

  3. A lot of complex applications can do things in various ways. You can change presets during the installation. A common example is which parts of the application to install. For a CAD system, you can install the whole thing or just a viewer for a PC in a meeting room.

  4. Many apps ask for a license key and/or online authentication to avoid piracy.

  5. Many apps come with DLLs. To make sure they work, they overwrite all DLLs in the Window's system directory (and possibly break all other apps but who cares ;-)


Typically, because they want to store state and information with the computer. For example, your application will not appear in the Add / Remove programs window. Many programs (which I personally dislike) like to store important information in the registry for lookups, which means you usually want an uninstaller (instead of just deleting the program) to do cleanup, or they might introduce extensions into explorer or other items. Simply deleting the program won't clear those additions, so you'd want an uninstaller.


There can be many reasons for this, for example.

  • make sure dependencies are installed (like .NET framework)
  • add shortcuts to desktop / start menu
  • a service need to registered using
  • many users prefer this rather than having to manage where program files live themselves
  • add registry keys
  • add hooks into windows explorer


Installing just means copying files and setting registry settings. The bigger the application, the easier it is if it follows the standard procedures.

When an application is "installed":

  • Creates an uninstaller for user convenience
  • Sets up default settings in the registry (on Windows)
  • Sets up default settings in the user's profile
  • Copies executable binaries to a standard location

There isn't any magic that goes on behind the scenes, just glorified copying.


Mostly because they write to system-wide data or directories. For example, Windows apps write to the registry and possibly C:\windows\system32. UNIX apps tend to write to hidden config files in the home directory (e.g. for adding itself as an option to open a particular filetype), /usr/share, and /etc. This is in addition to actual binaries and libraries (Which may go in /usr/bin and /usr/lib).

Your app is probably self-contained in a single directory, which is why it doesn't need installation.


Well one major reason is shared libraries (e.g. DLLs in Windows) - rather than each application having its own copy of a DLL, the idea is to put it in a system directory where all the applications can access it. Avoiding the duplicate copies saves disk space.

To make sure everything ends up in the right place, you therefore need an installer - it's no longer as simple as just copy/pasting the directory containing your app.


Because they do things like:

  • Write registry values for various dependencies
  • Copy data
  • Create directories

Etc

0

精彩评论

暂无评论...
验证码 换一张
取 消