Portable application

Last updated
A USB drive can carry portable applications USB flash drive.jpg
A USB drive can carry portable applications

A portable application (portable app), sometimes also called standalone, is a program designed to operate without changing other files or requiring other software to be installed. In this way, it can be easily added to, run, and removed from any compatible computer without setup or side-effects. [1]

Contents

In practical terms, a portable application often stores user-created data and configuration settings in the same directory it resides in. This makes it easier to transfer the program with the user's preferences and data between different computers. A program that doesn't have any configuration options can also be a portable application. [1]

Portable applications can be stored on any data storage device, including internal mass storage, a file share, cloud storage or external storage such as USB drives and floppy disks—storing its program files and any configuration information and data on the storage medium alone. If no configuration information is required a portable program can be run from read-only storage such as CD-ROMs and DVD-ROMs. Some applications are available in both installable and portable versions.

Some applications which are not portable by default do support optional portability through other mechanisms, the most common being command-line arguments. Examples might include /portable to simply instruct the program to behave as a portable program, or --cfg=/path/inifile to specify the configuration file location.

Like any application, portable applications must be compatible with the computer system hardware and operating system.

Depending on the operating system, portability is more or less complex to implement; to operating systems such as AmigaOS, all applications are by definition portable.

Portable Windows applications

Most portable applications do not leave files or settings on the host computer or modify the existing system and its configuration. The application may not write to the Windows registry [2] or store its configuration files (such as an INI file) in the user's profile, but today, many portables do; many, however, still store their configuration files in the portable directory. Another possibility, since file paths will often differ on changing computers due to variation in drive letter assignments, is that portable applications may store them in a relative format. 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 same approach is used for individual application components: run-time libraries, COM components or ActiveX, not only for the entire application. [3] 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.

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

Portability on Unix-like systems

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 or Windows 7)—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 to use the HOME environment variable to store settings (e.g. $HOME/.w3m for the w3m browser). The dynamic linker provides an environment variable LD_LIBRARY_PATH that programs can use to load libraries from non-standard directories. 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

A Linux application without need for a user-interaction (e.g. adapting a script or environment variable) on varying directory paths can be achieved with the GCC Linker option $ORIGIN which allows a relative library search path. [7]

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

There are also cross-distro package formats that do not require admin rights to run, like Autopackage, klik (now called AppImage), or CDE, but which gained only limited acceptance and support in the Linux community in the 2000s. [8] [9] [10] Around 2015 the idea of portable and distro independent packing for the Linux ecosystem got more traction when Linus Torvalds discussed this topic on the DebConf 2014 and endorsed later AppImage for his dive log application Subsurface. [11] [12] [13] For instance, MuseScore and Krita followed in 2016 and started to use AppImage builds for software deployment. [14] [15] RedHat released in 2016 the Flatpak system, which is a successor of Alexander Larsson's glick project which was inspired by klik (now AppImage). [16] Similarly, Canonical released in 2016 Snap packages for Ubuntu and many other Linux distros.

Many Mac applications that can be installed by drag-and-drop are inherently portable as Mac application bundles. [17] Examples include Mozilla Firefox, Skype and Google Chrome which do not require admin access and do not need to be placed into a central, restricted area. Applications placed into /Users/username/Applications (~/Applications) are registered with macOS LaunchServices in the same way as applications placed into the main /Applications folder. For example, right-clicking a file in Finder and then selecting "Open With..." will show applications available from both /Applications and ~/Applications. Developers can create Mac product installers which allow the user to perform a home directory install, labelled "Install for me only" in the Installer user interface. [18] Such an installation is performed as the user.

See also

Related Research Articles

<span class="mw-page-title-main">Package manager</span> Software tools for handling software packages

A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.

<span class="mw-page-title-main">APT (software)</span> Free software package management system

Advanced package tool, or APT, is a free-software user interface that works with core libraries to handle the installation and removal of software on Debian, and Debian-based Linux distributions. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.

<span class="mw-page-title-main">GNU Project</span> Free software project

The GNU Project is a free software, mass collaboration project announced by Richard Stallman on September 27, 1983. Its goal is to give computer users freedom and control in their use of their computers and computing devices by collaboratively developing and publishing software that gives everyone the rights to freely run the software, copy and distribute it, study it, and modify it. GNU software grants these rights in its license.

Installation of a computer program, is the act of making the program ready for execution. Installation refers to the particular configuration of software or hardware with a view to making it usable with the computer. A soft or digital copy of the piece of software (program) is needed to install it. There are different processes of installing a piece of software (program). Because the process varies for each program and each computer, programs often come with an installer, a specialised program responsible for doing whatever is needed for the installation. Installation may be part of a larger software deployment process.

Dependency hell is a colloquial term for the frustration of some software users who have installed software packages which have dependencies on specific versions of other software packages.

<span class="mw-page-title-main">Windows Registry</span> Database for Microsoft Windows

The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, and user interfaces can all use the registry. The registry also allows access to counters for profiling system performance.

udev is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the /dev directory. At the same time, udev also handles all user space events raised when hardware devices are added into the system or removed from it, including firmware loading as required by certain devices.

<span class="mw-page-title-main">Autopackage</span> Linux package management system

Autopackage is a free computer package management system aimed at making it simple to create a package that can be installed on all Linux distributions, created by Mike Hearn around 2002.

<span class="mw-page-title-main">U3 (software)</span>

U3 was a joint venture between SanDisk and M-Systems, producing a proprietary method of launching Windows software from special USB flash drives. Flash drives adhering to the U3 specification are termed "U3 smart drives". U3 smart drives come preinstalled with the U3 Launchpad. Applications that comply with U3 specifications are allowed to write files or registry information to the host computer, but they must remove this information when the flash drive is ejected. Customizations and settings are instead stored with the application on the flash drive.

AppImage is an open-source format for distributing portable software on Linux. It aims to allow the installation of binary software independently of specific Linux distributions, a concept often referred to as upstream packaging. As a result, one AppImage can be installed and run across Ubuntu, Arch Linux, and Red Hat Enterprise Linux without needing to use different files. It aims to be a format that's self-contained, rootless, and independent of the underlying Linux distribution.

<span class="mw-page-title-main">Firefox Portable</span>

Mozilla Firefox, Portable Edition is a repackaged version of Mozilla Firefox created by John T. Haller. The application allows Firefox to be run from a USB flash drive, CD-ROM, or other portable device on any Windows computer or Linux/Unix computer running Wine. The program does not require Firefox to be installed on the computer, nor does it leave personal information on the computer or interfere with any installed versions of Firefox, however, installation on the computer's data storage device is possible. The program is not totally portable, it can't run multiple instances of Firefox out of the box.

<span class="mw-page-title-main">Live USB</span> USB drive with a full bootable operating system

A live USB is a portable USB-attached external data storage device containing a full operating system that can be booted from. The term is reminiscent of USB flash drives but may encompass an external hard disk drive or solid-state drive, though they may be referred to as "live HDD" and "live SSD" respectively. They are the evolutionary next step after live CDs, but with the added benefit of writable storage, allowing customizations to the booted operating system. Live USBs can be used in embedded systems for system administration, data recovery, or test driving, and can persistently save settings and install software packages on the USB device.

<span class="mw-page-title-main">Linux</span> Family of Unix-like operating systems

Linux is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution (distro), which includes the kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses and recommends the name "GNU/Linux" to emphasize the use and importance of GNU software in many distributions, causing some controversy.

<span class="mw-page-title-main">Software portability</span> Ability of a program to run on different platforms with little alteration

Software portability is a design objective for source code to be easily made to run on different platforms. An aid to portability is the generalized abstraction between the application logic and system interfaces. When software with the same functionality is produced for several computing platforms, portability is the key issue for development cost reduction.

<span class="mw-page-title-main">Criticism of Linux</span> Issues concerning use of operating systems which use the Linux kernel

The criticism of Linux focuses on issues concerning use of operating systems which use the Linux kernel.

Turbo is a set of software products and services developed by the Code Systems Corporation for application virtualization, portable application creation, and digital distribution. Code Systems Corporation is an American corporation headquartered in Seattle, Washington, and is best known for its Turbo products that include Browser Sandbox, Turbo Studio, TurboServer, and Turbo.

<span class="mw-page-title-main">Criticism of desktop Linux</span> Criticism of certain Linux distributions

Criticism of desktop Linux is a history of comment on the perceived shortcomings of the Linux operating system when installed on desktop computers. These criticisms have been aimed at the plethora of issues and lack of consistency between Linux distributions, their usefulness and ease of use as desktop systems for general end users, driver support and issues with multi-media playback and audio development.

Cameyo is an application virtualization product. It aims to virtualize Windows applications so that they can run on other machines or in HTML5 browsers. It is reported to be easy to use, light in weight, and compatible with a wide variety of applications. The company’s web site includes a library of ready-to-use virtualized free and open-source virtual applications which can be downloaded or run in the browser. Cameyo has a free edition for home and small businesses for up to 49 machines.

References

  1. 1 2 "What is a portable app?". PortableApps.com. Definition. Retrieved 2022-11-15.
  2. ""What is a Portable App?"". PortableApps.com. Guidelines. Retrieved 2022-11-15.
  3. "Portable Application Conversion Technology". Sphinx Software. Archived from the original on September 7, 2010. Retrieved January 19, 2012.
  4. "Portable Application Registry". ip.com. Retrieved January 19, 2012.
  5. Ionescu, Alex. "Secrets of the Application Compatilibity Database (SDB) – Part 1" . Retrieved January 19, 2012.
  6. "Detours". Microsoft Research. Retrieved January 19, 2012.
  7. Hustvedt, Eskild (2009-02-08). "Our new way to meet the LGPL". Archived from the original on 2009-02-20. Retrieved 2011-03-09. You can use a special keyword $ORIGIN to say 'relative to the actual location of the executable'. Suddenly we found we could use -rpath $ORIGIN/lib and it worked. The game was loading the correct libraries, and so was stable and portable, but was also now completely in the spirit of the LGPL as well as the letter!
  8. Vining, Nicholas (2010-10-13). "Dear Linux Community: We Need To Talk". Gaslamp Games. Retrieved 2011-01-30. The Linux community, in their infinite wisdom, proceeds to flame the hell out of CDE. [...] "We should all just be using package management." Here is what I want to say, and let my words be carried down from the mountaintops, written on tiny stone tablets: Package management is not a universal panacea.
  9. Byfield, Bruce (2007-02-12). "Autopackage struggling to gain acceptance". linux.com. Archived from the original on 2008-03-31. Retrieved 2012-01-21. If Hearn is correct, the real lesson of Autopackage is not how to improve software installation, but the difficulty -- perhaps the impossibility -- of large-scale changes in Linux architecture this late in its history. It's a sobering, disappointing conclusion to a project that once seemed so promising.
  10. "AppImages". Elementary Project. Archived from the original on December 13, 2010. Retrieved January 19, 2012.
  11. Linus Torvalds (2014-08-29). "Q&A with Linus Torvalds" (video). DebConf 2014 Portland. debian.net. 6:28. Retrieved 2016-05-14. I have seen this first hand with the other project I'm involved with, which is my dive log app. We make binaries for Windows and OSX, we basically don't make binaries for Linux. Why? Because making binaries for Linux desktop applications is a major fucking pain in the ass.
  12. Torvalds, Linus. "This is just very cool". Google+. I finally got around to play with the "AppImage" version of +Subsurface, and it really does seem to "just work".
  13. Hohndel, Dirk (2015-11-25). "This is just very cool". Google+. I, as the app maintainer, don't want my app bundled in a distribution anymore. Way to much pain for absolutely zero gain. Whenever I get a bug report my first question is "oh, which version of which distribution? which version of which library? What set of insane patches were applied to those libraries?". No, Windows and Mac get this right. I control the libraries my app runs against. [...] With an AppImage I can give them just that. Something that runs on their computer.
  14. Weiss, Isaac. "MuseScore 2.0.3 is released". MuseScore.org. MuseScore. Archived from the original on 2016-04-23. Retrieved 2016-04-05.
  15. "Krita 3.0 Released". Krita.org. Krita. 2016-05-31.
  16. Experiments with run-timeless app bundles by Alex Larsson (2007)
  17. "Distributing Your Application". developer.apple.com. Retrieved 2017-05-23.
  18. "Distribution XML Reference". developer.apple.com. Retrieved 2017-05-23.