: Etherpad users! We are developing an extension that will allow you to create pages from etherpads quickly and easily. Please visit our sandbox and help us test it.

Software Update:Manually Installing a MAR file

From MozillaWiki
Jump to: navigation, search

Overview

This document explains how to manually apply a MAR file to an existing installation to update it. This is useful in case you wish to patch a Mozilla based application without running the application itself. The process requires at least a general knowledge of using a command shell and file system paths. These instructions apply to the following applications though they can also be applied to other Mozilla based applications:

  • Firefox 3.0.x and above
  • SeaMonkey 2.0.x and above
  • Thunderbird 2.0.x and above

Where to get a mar file

Below are examples of where localized mar files for Linux, Mac OS X, and Windows can be downloaded from.

Installing from the command line

Important:

  • The user account used to perform the update MUST have the appropriate permissions (e.g. Full Control on Windows, write, read, and execute on Linux and Mac OS X, etc.) on the application's installation directory that is being updated and on the outside directory defined below.
  • If you are updating an application on Windows Vista or greater with UAC enabled then you may need to launch cmd.exe with "Run as administrator" (available in the context menu when right clicking cmd.exe) as well.
  • Paths containing spaces passed to the updater MUST be quoted (e.g. "C:\Program Files\temp"). If you quote a path to a directory and include the trailing \ you must escape the \ with a \ so the " isn't escaped (e.g. "C:\Program Files\temp\\").
  • To use a partial mar file you MUST be updating the build it was created from (e.g. for Firefox firefox-3.5.6-3.5.7.partial.mar can only update Firefox 3.5.6).
  • Windows does not always expand environment variables that represent paths so if you have problems using environment variables switch to using paths.

Steps for Windows

  1. Create a directory outside of the application's installation directory to be updated (e.g. C:\app-update\). This directory will be referred to as the outside directory throughout the instructions below so please make a note of its location. Grant the user account you are using Full Control permissions on this directory if it doesn't have these permission already.
  2. Copy updater.exe from the application's installation directory that is to be upgraded into the outside directory. If you would like to display the updater user interface while it is applying the update also copy the updater.ini into the outside directory.
  3. Download the appropriate .mar file and put it into the outside directory you created (see Where to get a mar file).
  4. Rename the mar file you downloaded to update.mar.
  5. Open a command prompt by running cmd.exe. On Windows Vista or greater you may need to launch cmd.exe with "Run as administrator" (available in the context menu when right clicking cmd.exe).
  6. Change the working directory to the application's installation directory by using the cd command (e.g. for Firefox cd "C:\Program Files\Mozilla Firefox"). Important: running the update from within another directory will fail to update the existing installation properly with Firefox 3.6.x and below, SeaMonkey 2.0.x and below, and Thunderbird 3.1.x and below.
  7. Close all instances of the application that are running on the system including those being used by other users before going any further. Important: not doing so will cause the update to fail.
  8. For Firefox 34.x and above, SeaMonkey 2.31.x and above, or Thunderbird 34.x and above run the following from the command prompt. The additional <path to installation directory> is used by applications for update staging and when manually applying a mar the value for this command line parameter must be the path to the installation directory.
    <path to outside directory>\updater.exe <path to outside directory> <path to installation directory> <path to installation directory>

    For Firefox 4.x through 33.x, SeaMonkey 2.1.x through 2.31.x, or Thunderbird 5.x through 33.x run the following from the command prompt
    <path to outside directory>\updater.exe <path to outside directory> <path to installation directory>

    For Firefox 3.5.x and 3.6.x, SeaMonkey 2.0.x, or Thunderbird 3.0.x and 3.1.x run the following from the command prompt
    <path to outside directory>\updater.exe <path to outside directory>\

    For Firefox 3.0.x or Thunderbird 2.0.x run the following from the command prompt
    <path to outside directory>\updater.exe <path to outside directory>\ 0
    Note: The "0" parameter passed on the command line specifies the PID of a process to wait on before applying the update. When applying updates manually this should be 0 to disable the wait step.
  9. After the update has completed a file named update.status will be created in the outside directory. Open the update.status status file in an editor (e.g. notepad.exe). If the update is successful then the file will contain the text "succeeded". If it does not contain the text "succeeded", then the update.log file may be consulted to diagnose at what step the update failed. A failed update should leave the original application's installation intact. DO NOT continue to the next section unless the update succeeded.
  10. Copy the update.log to the uninstall directory inside of the application's installation directory.
  11. Rename it to uninstall.update.
  12. Run the following from the command prompt
    <path to installation directory>\uninstall\helper.exe /PostUpdate

Steps for Mac OS X

  1. Create a directory outside of the application's installation directory to be updated (e.g. /app-update/). This directory will be referred to as the outside directory throughout the instructions below so please make a note of its location. Grant the user account you are using write, read, and execute permissions on this directory if it doesn't have these permission already.
  2. Copy updater.app from inside the application's package that is to be upgraded into the outside directory. For Firefox 3.5 and above, SeaMonkey 2.0 and above, or Thunderbird 3.0 and above if you would like to display the updater user interface while it is applying the update also copy the updater.ini into the outside directory. The updater.app package and updater.ini file are located in the app bundle's Contents/MacOS/ directory (e.g. for Firefox it is located in Firefox.app/Contents/MacOS/).
  3. Download the appropriate .mar file and put it into the outside directory you created (see Where to get a mar file).
  4. Rename the mar file you downloaded to update.mar.
  5. Open a Terminal and change the working directory to the application's package directory by using the cd command (e.g. for Firefox cd /Applications/Firefox.app/). Important: running the update from within another directory will fail to update the existing installation properly with Firefox 3.6.x and below, SeaMonkey 2.0.x and below, and Thunderbird 3.1.x and below.
  6. It is recommended that all instances of the application that are running on the system including those being used by other users are closed before going any further. Important: not doing so can cause the update to fail under some circumstances and it can definitely break a running instance of the application.
  7. For Firefox 34.x and above, SeaMonkey 2.31.x and above, or Thunderbird 34.x and above run the following from the command prompt. The additional <path to installation directory> is used by applications for update staging and when manually applying a mar the value for this command line parameter must be the path to the installation directory.
    <path to outside directory>/updater.app/Contents/MacOS/updater <path to outside directory> <path to installation directory> <path to installation directory>

    For Firefox 4.x through 33.x, SeaMonkey 2.1.x through 2.31.x, or Thunderbird 5.x through 33.x and above run the following from the command prompt
    <path to outside directory>/updater.app/Contents/MacOS/updater <path to outside directory> <path to installation directory>

    For Firefox 3.5.x and 3.6.x, SeaMonkey 2.0.x, or Thunderbird 3.0.x and 3.1.x run the following from the Terminal
    <path to outside directory>/updater.app/Contents/MacOS/updater <path to outside directory>/

    For Firefox 3.0.x or Thunderbird 2.0.x run the following from the Terminal
    <path to outside directory>/updater.app/Contents/MacOS/updater <path to outside directory>/ 0
    Note: The "0" parameter passed on the command line specifies the PID of a process to wait on before applying the update. When applying updates manually this should be 0 to disable the wait step.
  8. After the update has completed a file named update.status will be created in the outside directory. Open the update.status status file in an editor (e.g. TextEdit). If the update is successful then the file will contain the text "succeeded". If it does not contain the text "succeeded", then the update.log file may be consulted to diagnose at what step the update failed. A failed update should leave the original application's installation intact.

Steps for Linux

Important: this should work with all flavors of UNIX but the following steps have only been tested on Linux and Mozilla only distributes mar files for Linux.

  1. Create a directory outside of the application's installation directory to be updated (e.g. <path to outside directory>/). This directory will be referred to as the outside directory throughout the instructions below so please make a note of its location. Grant the user account you are using write, read, and execute permissions on this directory if it doesn't have these permission already.
  2. Copy updater from the application's installation directory that is to be upgraded into the outside directory. If you would like to display the updater user interface while it is applying the update also copy the updater.ini into the outside directory.
  3. Download the appropriate .mar file and put it into the outside directory you created (see Where to get a mar file).
  4. Rename the mar file you downloaded to update.mar.
  5. Open a shell and change the working directory to the application's installation directory by using the cd command. Important: running the update from within another directory will fail to update the existing installation properly with Firefox 3.6.x and below, SeaMonkey 2.0.x and below, and Thunderbird 3.1.x and below.
  6. It is recommended that all instances of the application that are running on the system including those being used by other users are closed before going any further. Important: though this should never cause the update to fail there might be cases where it will and it can definitely break a running instance of the application.
  7. For Firefox 34.x and above, SeaMonkey 2.31.x and above, or Thunderbird 34.x and above run the following from the command prompt. The additional <path to installation directory> is used by applications for update staging and when manually applying a mar the value for this command line parameter must be the path to the installation directory.
    <path to outside directory>/updater <path to outside directory> <path to installation directory> <path to installation directory>

    For Firefox 4.x through 33.x, SeaMonkey 2.1.x through 2.31.x, or Thunderbird 5.x through 33.x run the following from the command prompt
    <path to outside directory>/updater <path to outside directory> <path to installation directory>

    For Firefox 3.5.x and 3.6.x, SeaMonkey 2.0.x, or Thunderbird 3.0.x and 3.1.x run the following from the shell
    <path to outside directory>/updater <path to outside directory>/

    For Firefox 3.0.x or Thunderbird 2.0.x run the following from the shell
    <path to outside directory>/updater <path to outside directory>/ 0
    Note: The "0" parameter passed on the command line specifies the PID of a process to wait on before applying the update. When applying updates manually this should be 0 to disable the wait step.
  8. After the update has completed a file named update.status will be created in the outside directory. Open the update.status status file in an editor (e.g. vi). If the update is successful then the file will contain the text "succeeded". If it does not contain the text "succeeded", then the update.log file may be consulted to diagnose at what step the update failed. A failed update should leave the original application's installation intact.