*** PortableApps.com Platform and Suite 1.6 have been released! ***
PortableApps.com Format™ 1.0 (2009-11-24)PortableApps.com Format is a simple specification that governs the file and directory layout as well as operating behavior of portable apps. File are distributed as easy-to-use .paf.exe™ installer files. The specification is broken into sections for easy reading.
1. Directory and File LayoutThe basic directory layout of each portable app consists of a main directory, AppNamePortable which contains three directories: App, Data and Other. AppNamePortable
+ App
+ AppInfo
+ AppName
+ DefaultData
+ Data
+ Other
+ Help
+ Images
+ Source
AppNamePortable: contains the main application launcher, typically named App: contains all the binary and other files that make up the application itself, usually within a directory called Data: contains all the user data for the application including settings, configuration and other data that would usually be stored within APPDATA for a locally installed application. The applications released by PortableApps.com typically contain the settings in a Other: contains files that don't fit into the other categories. The additional images and other files used by Any source code or source code licensing as well as the source files for the PortableApps.com Installer (if desired) are included within the 2. AppInfo.ini (App Configuration)The portable app makes available its configuration information to the PortableApps.com Platform by way of the [Format] Type=PortableApps.comFormat Version=1.0 [Details] Name=AppName Portable AppId=AppNamePortable Publisher=App Developer & PortableApps.com Homepage=PortableApps.com/AppNamePortable Category=Utilities Description=AppName Portable is a tool that does something. Language=Multilingual Trademarks= InstallType= [License] Shareable=true OpenSource=true Freeware=true CommercialUse=true EULAVersion=1 [Version] PackageVersion=1.2.0.1 DisplayVersion=1.2 Release 1 [SpecialPaths] Plugins=NONE [Dependencies] UsesJava=false UsesDotNetVersion= [Control] Icons=1 Start=AppNamePortable.exe ExtractIcon=App\AppName\AppName.exe Within the Within the Type is the type of configuration file this is (only PortableApps.comFormat is valid at this time). Version is the version of this format the file is in (currently 1.0). Within the Name is the name of your app as it appears in the PortableApps.com Menu AppID is the globally unique id for the application. Apps released by PortableApps.com or directly by the publisher of the regular version of the software will generally just be the name without spaces. Apps released by other entities must be AppNamePortable-example.com where example.com is their company domain. Apps released by individuals on PortableApps.com that aren't working towards making it an official PortableApps.com release must be AppNamePortable-username where username is the PortableApps.com username. AppIDs may contain letters, numbers, periods ( . ), dashes ( - ), plus signs ( + ) and underscores ( _ ). Publisher is the name of the app publisher as it appears in a hover tip in the next PortableApps.com Platform release and within the app details screen. If you are repackaging an app written by someone else, they should also be listed. Homepage is the homepage of the portable app (not the base app) Category is the category that the application falls into within the PortableApps.com Platform. Valid entries are: Accessibility, Development, Education, Games, Graphics & Pictures, Internet, Music & Video, Office, Operating Systems or Utilities. Only these *exact* entries are supported and should be used regardless of the default language of the base app (even if this is a German application, it should still use the English translation of the category). Description is a brief description of what the application is. Maximum of 512 characters. Language is the language the app is available in. If the app is multilingual, it should be specified as Multilingual. The language string must be in a specific format. The following strings are available: Afrikaans, Albanian, Arabic, Basque, Belarusian, Bosnian, Breton, Bulgarian, Catalan, Croatian, Czech, Danish, Dutch, English, Estonian, Farsi, Finnish, French, Galician, German, Greek, Hebrew, Hungarian, Icelandic, Indonesian, Irish, Italian, Japanese, Korean, Kurdish, Latvian, Lithuanian, Luxembourgish, Macedonian, Malay, Mongolian, Norwegian, NorwegianNynorsk, Polish, Portuguese, PortugueseBR, Romanian, Russian, Serbian, SerbianLatin, SimpChinese, Slovak, Slovenian, Spanish, SpanishInternational, Swedish, Thai, TradChinese, Turkish, Ukranian, Uzbek, Welsh. Trademarks (optional) is any trademark notifications that should appear. For example, HappyApp is a trademark of Acme, Inc. InstallType (optional) is if you would like the app listed as a specific install type within the menu. For some apps that are packaged by language (like Mozilla Firefox), the language may be specified on this line. In installers with optional components, this line is automatically updated by the installer based on the details within installer.ini (see below). The InstallType will be shown within the PortableApps.com Platform in the app's details. Within the Shareable is whether the app is allowed to be copied from one drive to another (without the OpenSource is whether the app is fully open source under an OSI approved license Freeware is whether the app is free (no cost) CommercialUse is whether the app is allowed to be used in a commercial environment EULAVersion (optional) is used to indicate the version of the End User License Agreement used if you include EULA.txt or EULA.rtf and require the user to agree to a license to install. If you are using an EULA and omit this entry, the default, 1, will be used. Within the PackageVersion is the version of the package itself. This must be in 1.2.3.4 format with no other characters and must be incremented with each public release. DisplayVersion is the user-friendly version that is generally used to describe the version. So, a released app may have a DisplayVersion of Within the optional Plugins (optional) is the path to an app's user-added plugins directory if it is within the App directory (as it is with applications like Firefox). This path is excluded when the installer calculates how much free space is needed for an upgrade. If there is no plugins directory, this value should be omitted from appinfo.ini. Within the optional UsesJava (optional) specifies whether the portable app makes use of Java Portable. If needed, this value should be set to true. If not needed, it should be omitted or set to false. UsesDotNetVersion (optional) specifies which minimum version of the .NET framework the application requires. If needed, this value should be set to the minimum version the application requires (example: 1.1, 2.0, 3.0, 3.5). If not needed, this value should be omitted. Please note that PortableApps.com does not currently accept .NET-based apps for inclusion in our application listings. Most PCs "in the wild" do not have .NET available, so portable apps that require .NET will not function on them. Within the Icons is the number of icons that the app has in the PortableApps.com Menu Start is the command line to execute to start the app relative to the ExtractIcon (optional) is used if the app's main icon is not appicon.ico within the AppInfo directory. This should only be used when legally required for launchers in specific apps as it cause the application to be accessed more slowly. When not needed it should be left out of appinfo.ini. Sometimes, an application will have multiple icons, as is the case with OpenOffice.org Portable. In this case, the last section of the appinfo.ini file will look like: [Control] Icons=2 Start=AppNamePortable.exe Start1=AppNamePortable.exe Name1=AppName Portable Start2=AppNamePortable2.exe Name2=AppName Portable Other Part Icons is still the number of icons to be shown in the PortableApps.com Menu Start is the command line to execute for the main application Start1 is the command line for the first icon (often the same as Start) Name1 is the name to show in the menu for the first icon Start2 is the command line for the second icon Name2 is the name to show in the menu for the second icon Like the main icon, ExtractIcon1, ExtractIcon2, etc can be used where legally required. These should not normally be used or included. 3. IconsWithin the The PNG icons are 16x16 and 32x32 respectively and are in True Color format with alpha transparency. The ICO file is in Windows ICO format and contain the following 6 required formats as well as the optional Vista format if desired:
* The 256px alpha size is optional. It is used by Windows Vista to display large and extra large icon sizes. Some publishers may wish to use include it for completeness but end users won't normally see it. ExtractIcon Note - In packages that make use of the ExtractIcon feature within appinfo.ini, the appicon.ico and PNG versions of the icon will not be used and may be omitted. A generic appicon.ico will be included for backwards compatibility. 4. PortableApps.com Installer (and installer.ini)All apps in PortableApps.com Format must use the most recent PortableApps.com Installer available at PortableApps.com/development. The installer gets its configuration from the appinfo.ini file above as well as the optional installer.ini file which also resides in the AppInfo directory. The installer.ini file allows for more fine-grained control over the installation process as well as additional options like optional sections. The installer.ini consists of: Please note that this example is only included to illustrate the possible options. It should not be included as-is in a project. For projects, an installer.ini should be created from scratch using only the features needed. [CheckRunning] CloseEXE=Custom.exe CloseName=AppName [Source] IncludeInstallerSource=false [MainDirectories] RemoveAppDirectory=true RemoveDataDirectory=false RemoveOtherDirectory=true [OptionalComponents] OptionalComponents=true MainSectionTitle=AppName Portable (English) [Required] MainSectionDescription=Install the portable app OptionalSectionTitle=Additional Languages OptionalSectionDescription=Add multilingual support for this app OptionalSectionSelectedInstallType=Multilingual OptionalSectionNotSelectedInstallType=English OptionalSectionPreSelectedIfNonEnglishInstall=true OptionalDirectory1= OptionalFile1= [CopyLocalFiles] CopyLocalFiles=true CopyFromRegPath=HKLM\Software\AppName CopyFromRegKey=AppPath CopyFromRegRemoveDirectories=2 CopyFromDirectory=%PROGRAMFILES%\AppName CopyToDirectory=App\AppName [DownloadFiles] DownloadURL= DownloadName= DownloadFilename= DownloadMD5= DownloadTo= AdditionalInstallSize= Extract1To= Extract1File= AdvancedExtract1To= AdvancedExtract1Filter= DoubleExtractFilename= DoubleExtract1To= DoubleExtract1Filter= [Languages] ENGLISH=true AFRIKAANS=true ALBANIAN=true ARABIC=true BASQUE=true BELARUSIAN=true BOSNIAN=true BRETON=true BULGARIAN=true CATALAN=true CROATIAN=true CZECH=true DANISH=true DUTCH=true ESPERANTO=true ESTONIAN=true FARSI=true FINNISH=true FRENCH=true GALICIAN=true GERMAN=true GREEK=true HEBREW=true HUNGARIAN=true ICELANDIC=true INDONESIAN=true IRISH=true ITALIAN=true JAPANESE=true KOREAN=true KURDISH=true LATVIAN=true LITHUANIAN=true LUXEMBOURGISH=true MACEDONIAN=true MALAY=true MONGOLIAN=true NORWEGIAN=true NORWEGIANNYNORSK=true POLISH=true PORTUGUESE=true PORTUGUESEBR=true ROMANIAN=true RUSSIAN=true SERBIAN=true SERBIANLATIN=true SIMPCHINESE=true SLOVAK=true SLOVENIAN=true SPANISH=true SPANISHINTERNATIONAL=true SWEDISH=true THAI=true TRADCHINESE=true TURKISH=true UKRAINIAN=true UZBEK=true WELSH=true [DirectoriesToPreserve] PreserveDirectory1= [DirectoriesToRemove] RemoveDirectory1= [FilesToPreserve] PreserveFile1= [FilesToRemove] RemoveFile1= The entire installer.ini is optional. If it is omitted, the App and Other directories will be replaced and the installer will either be a single language (as specified in appinfo.ini) or multilingual and include all supported languages. The source for the installer will not be included. Within the optional CloseEXE (optional) allows you to assign a custom EXE to check for when upgrading. If the EXE is the same as that specified in the Control - Start option in appinfo.ini, this entry should be omitted from the installer.ini. If you don't want to check if anything is running you can set CloseName (optional) allows you to assign a different name to what will be closed when upgrading. If the name is the same as the name of the portable app as specified in appinfo.ini then this entry should be omitted from the installer.ini. Within the optional IncludeInstallerSource (optional) allows you to include the source to the PortableApps.com Installer to be installed with your portable app by setting it to true. Within the optional RemoveAppDirectory, RemoveDataDirectory and RemoveOtherDirectory (optional) allows you to specify whether these directories will be removed or preserved when upgrading by installing a new version of your app over an existing one. By default, the App and Other directories are removed and the Data directory is preserved. If you wish to use these defaults, this section of installer.ini should be omitted. (Note that you can preserve specific directories and files below) Within the optional OptionalComponents - when set to true, this enables the installer to have an optional section. This is typically used to install additional languages within an app. MainSectionTitle (optional) specifies the name that will appear for the first section of the installer. By default it will read "AppName Portable (English) [Required]" with AppName Portable being read from the appinfo.ini. This entry should be omitted if you are happy with the default. MainSectionDescription (optional) specifies the description that will appear for the first section of the installer. By default it will read "Install the portable app". This entry should be omitted if you are happy with the default. OptionalSectionTitle (optional) specifies the name that will appear for the second/optional section of the installer. By default it will read "Additional Languages". This entry should be omitted if you are happy with the default. OptionalSectionDescription (optional) specifies the description that will appear for the second/optional section of the installer. By default it will read "Add multilingual support for this app". This entry should be omitted if you are happy with the default. OptionalSectionSelectedInstallType (optional) specifies the InstallType that will be written to appinfo.ini and displayed in the PortableApps.com Platform if the user installs the app with the optional section. By default it will read "Multilingual". This entry should be omitted if you are happy with the default. OptionalSectionNotSelectedInstallType (optional) specifies the InstallType that will be written to appinfo.ini and displayed in the PortableApps.com Platform if the user installs the app without the optional section. By default it will read "English". This entry should be omitted if you are happy with the default. OptionalSectionPreSelectedIfNonEnglishInstall (optional) specifies whether the optional section is selected by default if the user selected to run the installer in a language other than English. The default is true. This entry should be omitted if you are happy with the default. OptionalDirectory1 allows you to specify which directories are a part of the optional section of the installer. OptionalDirectory1 and higher are available for use. The path should be relative. So if you want the directory App\AppName\locales part of the optional section of the installer, you'd set OptionalFile1 allows you to specify which specific files are a part of the optional section of the installer. OptionalFile1 and higher are available for use. The path should be relative. So if you want the files App\AppName\*.lang part of the optional section of the installer, you'd set Optional Section Note: You must use either OptionalDirectory1 or OptionalFile1 to specify files for inclusion in the optional section of the installer if you have one. Within the optional This section is used to copy files in from a local installation of an application. CopyLocalFiles is used to indicate that this section is enabled. It should be set to true. CopyFromRegPath is used when the path to the local files is indicated within a key in the registry. Generally, this will be in the form of HKLM\Software\AppName. CopyFromRegKey is used in conjunction with CopyFromRegRemoveDirectories is used to indicate the number of directories to strip from the Key read in to arrive at the directory that should be copied. If the Key indicates a path to a file rather than a directory, it should be increased by one. For example, if the Key generally points to C:\Program Files\AppName\bin\AppName.exe and you wish to copy all the files in C:\Program Files\AppName, it would be set to 2: one to remove the file name AppName.exe and one to remove the 'bin' directory from the path. CopyFromDirectory is used to indicate the local directory to copy into the portable app. If used in conjunction with the registry entries above, it will be used as a fallback if the registry entry is missing or doesn't point to a valid path. This entry is normally in the form CopyToDirectory indicates the relative path within the portable app that the files will be copied to. This is usually in the form Within the optional This section is used to download and optionally extract files from the internet. DownloadURL specifies the URL to the file that will be downloaded. It is normally in the form http://example.com/path/filename DownloadName is the name that will be displayed while the file is downloaded. This must be a valid DOS name and should not include special characters like :, ", \, etc. DownloadFilename is the name of the file that will be used while it is worked with locally. This should normally be the same as the filename from the DownloadURL. It is normally in the form filename.exe or filename.zip. DownloadMD5 is used to specify the MD5 hash of the file downloaded. This allows the installer to verify that the file has not changed since the installer was created. Use of this entry is *highly* recommended. DownloadTo is optionally used if the downloaded file should just be copied into the portable app as-is. The entry is normally in the form AdditionalInstallSize is used to specify the size of the files that will be added to the files contained within the installer. The entry should be a number only and be in KB Extract1To and Extract1File are used for simple extraction of files from ZIP files only. The Extract#To entries should specify the relative path to where the files will go within the installed portable app (typically App\AppName). The Extract#File is used to specify the name of the file to extract. No wildcards are permitted. Up to 10 entries in the form Extract1To/Extract1File, Extract2To/Extract2File may be made. Extract#To supports the use of AdvancedExtract1To and AdvancedExtract1Filter are used for more advanced extraction from ZIP files as well as many installer EXEs. The AdvancedExtract#To entries should specify the relative path to where the files will go within the installed portable app (typically App\AppName). The AdvancedExtract#Filter entries are used to specify a filter for the files to be extracted and are in the same format used by 7-zip. Some examples include *.txt for all text files, * for all files, *a* for files that contain the letter a, Src\*.cpp for all cpp files within the src directory, etc. ** can be used to indicate all files in the archive recursively (including sub-directories). Up to 10 entries can be made. AdvancedExtract#To supports the use of DoubleExtractFilename is used when a downloaded file contains an archive within an archive. The DoubleExtractFilename should be set to the name of the archive inside the archive. For example, if you are downloading a file called setup.exe which contains a file data.zip that has the files needed within it, DoubleExtractFilename would be set to data.zip. The DoubleExtract#To and DoubleExtract#Filter are performed on the extracted archive and are in the same format as AdvancedExtract1To and AdvancedExtract1Filter above. Up to 10 entries may be used. DoubleExtract#To supports the use of Within the optional Each entry is used to specify whether that language is available as a user is installing the portable app and appinfo.ini is set to Multilingual. If this section is omitted, all languages are included. If this section is included, ENGLISH= is required. All other languages are optional and default to false. Within the optional This section specifies directories that will be preserved even if a given directory (App, Data, Other) is set to be removed on an upgrade. Up to 10 entries in the form of PreserveDirectory1, PreserveDirectory2, etc are available. Each should be in the relative paths within the app. If you wish to preserve the directory App\AppName\plugins, it would be entered as Within the optional This section specifies directories that will be removed even if a given directory (App, Data, Other) is set not to be removed on an upgrade. Up to 10 entries in the form of RemoveDirectory1, RemoveDirectory2, etc are available. Each should be in the relative paths within the app. If you wish to remove the directory App\AppName\locales, it would be entered as Within the optional This section specifies files that will be preserved even if a given directory (App, Data, Other) is set to be removed on an upgrade. Up to 10 entries in the form of PreserveFile1, PreserveFile2, etc are available. Each should be in the relative paths within the app. If you wish to preserve the files App\AppName\*.hlp, it would be entered as Within the optional This section specifies files that will be removed even if a given directory (App, Data, Other) is set not to be removed on an upgrade. Up to 10 entries in the form of RemoveFile1, RemoveFile2, etc are available. Each should be in the relative paths within the app. If you wish to remove the files App\AppName\*.lang, it would be entered as An End User License Agreement (EULA) or other licensing file can be displayed in the PortableApps.com Installer by including an EULA.txt or EULA.rtf file in the Other\Source directory. The PortableApps.com Installer will automatically locate it and configure it for use. Custom Code may be included with your installer by including a file called PortableApps.comInstallerCustom.nsh within the Other\Source directory. This file is coded in NSIS and can include 3 macros: CustomCodePreInstall (which is run before installation), CustomCodePostInstall (which is run after installation) and CustomCodeOptionalCleanup (which is run at the beginning of installation if the optional section of an installer is not selected, intended for use in app upgrades when the existing app may have had the optional section included). In addition to the standard NSIS functions, the following NSIS features are available: ConfigRead, ConfigReadS, ConfigWrite, ConfigWriteS, GetParent, GetRoot, VersionCompare and the LogicLib features of NSIS. The PortableApps.com Installer code itself should not be altered directly within the confines of it being a PortableApps.com Installer. As always, the source code is available under the GPL and may be freely modified and used in other GPL-licensed works. Every release of an app in PortableApps.com Format must use the current PortableApps.com Installer. If a larger application is being compiled that has a longer development and testing time, and a new version of the PortableApps.com Installer is released during testing of a release the version of the installer the app is currently using may be kept provided that the new Installer version is less than 30 days old on the day the application using the older version is released. 5. Host PC Modifications & PortabilityDuring use, a portable app is permitted to modify registry entries and files on the local drive, however the registry and local files must be returned to their pre-run state on exit. This may involve backing up and then restoring the settings for a local copy (in either the registry or APPDATA) of an application on start and exit. The portable app must continue to work (settings and preferences maintained, language selection maintained) as the drive letter changes as the device is moved between computers. The applications Most Recently Used (MRU) file list should continue working as well. 6. Plugin InstallersIn addition to standard installers, the PortableApps.com Installer can be used for plugin installers to add files to a portable app. This is accomplished via a file called plugininstaller.ini within the Other\Source directory. This file can contain all of the entries within the appinfo.ini and installer.ini files described above combined into a single file. One addition to the file is within the [Details] section where an entry called PluginName= is made. This should be the name of the plugin, for example: Adobe Flash for Firefox Portable. The [MainDirectories] removal options all default to false for plugin installers. If an EULA is needed for the plugin, instead of EULA.txt or EULA.rtf, the files PluginEULA.txt or PluginEULA.rtf should be used. To create a plugin installer, create a directory layout similar to the portable app that the plugin is used with including the App, App\AppName, Data, Other, etc directories. Then place only the files to be included in the plugin installer in their appropriate location. The App\AppInfo directory should be empty as it is used only by the main app. Any custom code should be in a file called PortableApps.comInstallerPluginCustom.nsh. Finally, create a file plugininstaller.ini with the entries that would normally be in appinfo.ini and installer.ini above and compile as normal. Additionally, a CommonFiles installer, which will install to X:\PortableApps\CommonFiles is possible by adding an entry 7. PortableApps.com Format Version History and DiscussionAn ongoing discussion about PortableApps.com Format and the PortableApps.com Installer is taking place in the Development Forum. 2009-11-19: 1.0: Added Dependencies, general cleanup. 2009-06-21: 0.91: Added CommonFiles installers, ability to extract full directory structures recursively. 2009-06-21: 0.91: Added Esperanto. 2009-06-11: 0.91: Added plugin installer details. 2009-05-28: 0.91: Added CopyLocalFiles and DownloadFiles to installer.ini. Added PNG icons 2009-05-15: 0.90: Updated to new automated PortableApps.com Installer. New appinfo.ini and installer.ini configs 2009-02-12: DRAFT 4: Added Education category and clarified installer modification notes 2008-08-05: DRAFT 3: Added Vista 256px icon (optional) and updated PortableApps.com Installer notes 2008-05-01: DRAFT 2: Added DefaultData description as we use it in many apps and the installer will be supporting it as well (handy for language setups) and the fact that the Data directory must be recreated by the app if missing, which is new but done by all released apps but one. |

