Results 1 to 9 of 9

Thread: how stand alone applications work

  1. #1
    Join Date
    Aug 2012
    Beans
    605

    how stand alone applications work

    Hello,
    I was just wondering how "stand alone applications" work. I mean, many a times, it happens that you get an executable and you don't have to install it, just double clicking it starts the application. But don't they have to "install", as in, copy required object files/libraries to specific system locations etc.

    An example of this situation was when I was using 1.putty and 2.eclipse on windows.
    I never installed these, nor did they ask me for some license agreement etc. Just double clicking them worked.

    Though I no longer use windows, I would like to understand how they worked.

    Thanks.

    PS : As an aside, is my understanding of "installation"(from above) correct ?

  2. #2
    Join Date
    Jun 2007
    Location
    Waikikamukau, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: how stand alone applications work

    A simple program which a relatively uncomplicated purpose, such as displaying "Hello world" on your screen, can usually be compiled as a stand alone program. It can be placed in just about any location you choose on your hard drive without being tied to a specific location. There's less of a need to break it up into parts that can potentially be scattered in various locations than might be the case with a larger, more complex programming tasks.
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.

  3. #3
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    2,039
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: how stand alone applications work

    The "installation" does several things:

    1) determine the right place to put the various files, and unpack them there
    2) create a startup icon
    3) make the program known to the rest of the system (for instance, associating it with some file types)
    4) do whatever is necessary to make de-installation easy

    Most of this can be done manually, but you'd have to read the doc...

  4. #4
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: how stand alone applications work

    The basic definition of a standalone application is a program that functions as is, when booted up or launched.
    Another meaning of standalone software refers to the location from which it runs. There is some software that can run from a storage device without actually being installed on the computer. Software that does not require installation, but can still be run is another meaning given to the term standalone software.
    Some programs cannot run without calling upon resources from the system, for example. A piece of software that runs without reference to the environment is another type of software that is referred to as a standalone program.

  5. #5
    Join Date
    Mar 2006
    Beans
    393

    Re: how stand alone applications work

    Stand-alone applications work because they have everything they need inside themselves. Applications often use external libraries full of useful software. Libraries can come in two versions, shared (*.dll on Windows, *.so on Linux) and not shared. Stand-alone apps are compiled with the not-shared libraries and need nothing but themselves to run.
    Just my 0.00000002 million dollars worth,
    Shawn

    Programming is as much about organization and communication as it is about coding.

  6. #6
    Join Date
    Dec 2007
    Location
    Gainesville, Florida
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: how stand alone applications work

    As shawnhcorey pointed out these types of applications or programs have all required libraries statically linked during the build. Otherwise the program would have dependencies that the OS would have to satisfy. On windows that may not be too hard, but there are many different flavors of GNU/Linux distros.

  7. #7
    Join Date
    Mar 2006
    Beans
    393

    Re: how stand alone applications work

    Quote Originally Posted by pbrane View Post
    As shawnhcorey pointed out these types of applications or programs have all required libraries statically linked during the build. Otherwise the program would have dependencies that the OS would have to satisfy. On windows that may not be too hard, but there are many different flavors of GNU/Linux distros.
    That was called Dependency Hell and has been solved. Actually, finding all the dependencies on Windows is harder especially if they're third party, not Microsoft, ones.
    Just my 0.00000002 million dollars worth,
    Shawn

    Programming is as much about organization and communication as it is about coding.

  8. #8
    Join Date
    Aug 2012
    Beans
    605

    Re: how stand alone applications work

    shawnhcorey, pbrane, slickymaster, ofnuts
    Thanks a lot for all the answers,it is now clear

  9. #9
    Join Date
    Apr 2007
    Location
    (X,Y,Z) = (0,0,0)
    Beans
    3,715

    Re: how stand alone applications work

    Just be aware of something. Only the OS is completely stand-alone (except that it requires a bootloader to boot up, but that's somehow in another league, I think). Even if you wrote a program with all its libraries statically linked in it, you still would require the kernel to be able to execute the executable format the binary is in, e.g. usually ELF in Linux. Try running any Windows executable in Linux (without using Wine); it will fail because the kernel doesn't know how to understand those binaries at all.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •