Portable application

From Wikipedia, the free encyclopedia

Jump to: navigation, search
A USB drive can carry portable applications, and they can run directly from it

A portable application (portable app) is a computer software program that runs from a removable storage device such as a CD-ROM drive, USB flash drive, flash card, or floppy disk. Portable apps should not be confused with software portability where software allows its source code to be compiled for different computing platforms. Portable applications can be run on any computer system with which they are compatible but typically require a specific operating system such as Microsoft Windows XP or above, any Linux, etc.

Portable software is typically designed to be able to store its configuration information and data on the storage media containing its program files.

Contents

[edit] Portable Windows applications

A portable application does not leave its files or settings on the host computer. Typically this means that the application does not write to the Windows registry and instead stores its settings in one or more configuration files (e.g. an INI file) located in its directory. While some applications have options to support this behavior, many programs are not designed to do this. A common technique for such programs is the use of a launcher program to copy necessary settings and files to the host computer when the application starts and move them back to the application's directory when it closes.

An alternative strategy for achieving application portability within Windows, without requiring application source code changes, is application virtualization: An application is "sequenced" or "packaged" against a runtime layer that transparently intercepts its file system and registry calls, then redirects these to other persistent storage without the application's knowledge. This approach leaves the application itself unchanged, yet portable.

The run-time layer can be embedded into an application on-the-fly by injecting a dynamic library into a third party process to create individual per application wrapper [1]. The wrapper is activated at the application startup and hooks/redirects file- and registry-related system calls to operate with portable (ex: flash) storage space only.

The same approach [1] is used for individual application components: run-time libraries, COM components or ActiveX, not only for the entire application. As a result, when individual components are ported in such manner they are able to be: integrated into original portable applications, repeatedly instantiated (virtually installed) with different configurations/settings on the same operating system (OS) without mutual conflicts. As the ported components do not affect the OS-protected related entities (registry and files), the components will not require administrative privileges for installation and management.

A freeware, DIY alternative to citation [1] is available in the form of the JauntePE project [2].

Microsoft saw the need for an application-specific registry [3] for its Windows operating system as far back as 2005. It eventually incorporated some of this technology, using the techniques mentioned above, via its Application Compatibility Database [4] using its Detours [5] code library, into the XP version of Windows. It did not, however, make any of this technology available via one of its system APIs.

[edit] Portable Macintosh applications

Many programs for Mac OS X have an inherent degree of portability as they are packaged as "drag-install" application bundles, rather than as Installer packages. However, many applications are not truly portable as they store their preferences in files on the local disk where the OS is installed. Macintosh applications which are designed to be portable store their preferences on the drive from which they are being run.

[edit] Portability on Linux and UNIX-like systems

See also: Autopackage, klik (packaging method), RUNZ, Zero Install

Programs written with a Unix-like base in mind often do not make any assumptions. Whereas many Windows programs assume the user is an administrator—something very prevalent in the days of Windows 95/98/ME (and to some degree in Windows XP/2000, though not in Windows Vista)—such would quickly result in "Permission denied" errors in Unix-like environments since users will be in an unprivileged state much more often. Programs are therefore generally designed around using the HOME environment variable to store settings (e.g. $HOME/.w3m for the w3m browser). The dynamic linker also provides an environment variable LD_LIBRARY_PATH so that libraries can be looked up in non-standard directories. This makes it particularly easy (from a technical point of view) to run a program off another spot. Assuming /mnt contains the portable programs and configuration, a command line may look like:

HOME=/mnt/home/user LD_LIBRARY_PATH=/mnt/usr/lib /mnt/usr/bin/w3m www.example.com

Not all programs honor this however — some completely ignore $HOME and instead do a user lookup in /etc/passwd to find the home directory, therefore thwarting portability.

Some Linux distros already have support for portable apps, like Super OS (with RUNZ files).

Other methods exist that offer portable applications, they are, however, still limited.[6]

[edit] Portable DOS applications

Almost every DOS application is portable because there is no registry and are no preferred directories in this operating system.

[edit] Double portability

There is a very restricted category of software that can support a sort of double portability, being both stand alone and cross-platform compatible, able to run on different hardware with little or no modifications, perhaps with minor restrictions. One such software is SymbOS, whose main modules can in their present form be executed on both Amstrad CPC and MSX machines without modification. Only some of its bundled applications are hardware-dependent. To a much lesser extent, Macintosh fat binary applications could be considered as cross-platform, but not always truly portable.

[edit] See also

[edit] References

[edit] External links

Personal tools