<?xml version="1.0" encoding="UTF-8"?>
<sect1 id="Installing">
  <title>Getting and installing WinMerge</title>

  <sect2>
    <title>Getting files</title>

    <para>Latest releases can be always downloaded from WinMerge homepage:
    <ulink url="http://www.winmerge.org/">WinMerge.org</ulink>. Note that
    there may be some delay updating homepages for releases, but project
    statuspage at <ulink
    url="https://sourceforge.net/projects/winmerge/">SourceForge.net</ulink>
    shows latest files. There is also mailing-list for release announcements.
    Stable releases are also available in several file download sites.</para>

    <para>WinMerge can be installed using installer or by unzipping files from
    archive.</para>

    <note>
      <para>Installer requires Admin-user rights in Windows NT4/2000/XP. If
      you don't have Admin-user rights you can install WinMerge by unzipping
      from archive file.</para>
    </note>
  </sect2>

  <sect2>
    <title>Using installer (recommended)</title>

    <para>This is recommended for most users. Installer asks location where
    WinMerge is installed, installs files, configures shell integration and
    adds WinMerge to <guimenu>Start</guimenu>-menu. To install
    WinMerge:</para>

    <orderedlist>
      <listitem>
        <para>Start installer executable (usually named
        <filename>WinMerge-<replaceable>version</replaceable>-setup.exe</filename>)</para>
      </listitem>

      <listitem>
        <para>Select <guibutton>Next</guibutton>-button in welcome
        screen</para>
      </listitem>

      <listitem>
        <para>Select <guibutton>Next</guibutton>-button in licence
        screen</para>
      </listitem>

      <listitem>
        <para>Select location for WinMerge and select
        <guibutton>Next</guibutton>-button. It is recommended to install
        WinMerge in own directory.</para>
      </listitem>

      <listitem>
        <para>Select components installed or one of preconfigured
        combinations. <guilabel>Typical</guilabel> configuration is
        recommended for most users. In addition to components already selected
        by <guilabel>Typical</guilabel>, language file(s) could be chosen.
        Components are:</para>

        <itemizedlist>
          <listitem>
            <para><guilabel>WinMerge core files</guilabel> - cannot be
            unselected - WinMerge executable files</para>
          </listitem>

          <listitem>
            <para><guilabel>Application Runtimes</guilabel> - cannot be
            unselected - needed DLL files</para>
          </listitem>

          <listitem>
            <para><guilabel>User's Guide</guilabel> - HTML user guide/manual -
            if it is not installed WinMerge opens manual from <ulink
            url="http://www.winmerge.org/">WinMerge.org</ulink></para>
          </listitem>

          <listitem>
            <para><guilabel>Filters</guilabel> - file filter files</para>
          </listitem>

          <listitem>
            <para><guilabel>Plugins</guilabel> - plugins and scripts</para>
          </listitem>

          <listitem>
            <para><guilabel>Languages</guilabel> - WinMerge translation files.
            After installing translation file user interface language can be
            selected from menu <menuchoice>
                <guimenu>View</guimenu>

                <guimenuitem>Language</guimenuitem>
              </menuchoice>.</para>
          </listitem>
        </itemizedlist>
      </listitem>

      <listitem>
        <para>Select <guimenu>Start</guimenu>-menu folder or disable creating
        it.</para>
      </listitem>

      <listitem>
        <para>Select additional tasks:<itemizedlist>
            <listitem>
              <para><guilabel>Enable Explorer context menu
              integration</guilabel> - Enables basic WinMerge shell
              integration (can be later enabled from options).</para>
            </listitem>

            <listitem>
              <para><guilabel>Integrate with TortoiseCVS</guilabel> - sets
              WinMerge to TortoiseCVS diff application.</para>
            </listitem>

            <listitem>
              <para><guilabel>Create a Desktop Icon</guilabel> - adds WinMerge
              icon to Desktop</para>
            </listitem>

            <listitem>
              <para><guilabel>Create a Quick Launch Icon</guilabel> - adds
              WinMerge icon to Quick Launch bar</para>
            </listitem>
          </itemizedlist></para>
      </listitem>

      <listitem>
        <para>Verify install selections and select
        <guibutton>Install</guibutton> button to continue.</para>
      </listitem>

      <listitem>
        <para>After installer has copied files final screen appears with two
        checkboxes asking if created WinMerge Start-menu folder should be
        opened and if WinMerge application should be started.</para>
      </listitem>
    </orderedlist>
  </sect2>

  <sect2>
    <title>Installing from archive</title>

    <para>WinMerge is pretty much independent from other system components. It
    doesn't integrate tightly to Windows or use lots of dlls.
    <filename>WinMerge[U].exe</filename> itself is dependent of
    <filename>MFC42[U].dll</filename> (and <filename>MSVCRT.dll</filename>) in
    addition to some system DLLs. So if mentioned DLLs already are installed
    to system, only <filename>WinMerge[U].exe</filename> is needed to run
    WinMerge.</para>

    <para>Archive files have correct folder structure. WinMerge should be
    unzipped preserving folder structure to destination folder, for example
    <filename class="directory">C:\Program Files\</filename>. Root folder
    created has name <filename
    class="directory">/WinMerge-<replaceable>version</replaceable></filename>,
    for example <filename class="directory">/WinMerge-2.4.0</filename>. This
    folder can be renamed or files copied to other folder (preserving folder
    structure!).</para>

    <para>After unzipping files WinMerge is ready to run! ShellExtension and
    Archive Integration may need additional steps (see below).</para>
  </sect2>

  <sect2>
    <title>Shell integration</title>

    <para>Choose "<guilabel>Enable Explorer context menu
    integration</guilabel>" from installer's additional features to install
    shell integration.</para>

    <para>If install program is not used, shell integration dll
    (<filename>ShellExtension[U].dll</filename>) must be registered
    separately. This is done by running <filename>register.bat</filename> from
    WinMerge directory. Reboot is recommended after installing so Windows
    updates all its references.</para>

    <note>
      <para>Installing shell integration requires administrative user
      priviledges.</para>
    </note>

    <para>Updating shell integration outside installer requires first
    uninstalling current version. Uninstalling can be done by running
    <filename>uninstall.bat</filename> from WinMerge directory. After that
    computer should be restarted so Windows completes uninstallation. Then new
    version can be installed like described above.</para>
  </sect2>

  <sect2>
    <title>7-Zip and archive support</title>

    <para>WinMerge uses <ulink url="http://www.7-zip.org/">7-Zip</ulink> for
    archive support, but WinMerge installer does not install 7-Zip or archive
    support. Installing 7-Zip application is recommended but not required for
    archive support. 7-Zip installer can be downloaded from <ulink
    url="http://www.7-zip.org/">7-Zip.org</ulink>.</para>

    <para>To install archive support, download and install 7-Zip plugin
    (Merge7zInstaller, see below) from <ulink
    url="http://www.winmerge.org/">WinMerge.org</ulink>.</para>

    <para>WinMerge automatically detects installed 7-zip in system, there is
    no need to any configuration.</para>

    <para>7-zip integration needs compatible <filename>Merge7z*.dll</filename>
    file in WinMerge program directory. <filename>*</filename> comes from
    7-Zip version installed. For example 7-Zip version 4.23 needs
    <filename>Merge7z423.dll</filename>. And if
    <filename>WinMergeU.exe</filename> (unicode version) is used, then
    "<filename>U</filename>" is also added to filename:
    <filename>Merge7z423U.dll</filename>. If needed dll file is for some
    reason missing it can be copied to WinMerge directory, for example from
    7z-archive downloadable in WinMerge download page.</para>

    <para>If <filename>Merge7z*.dll</filename> file is missing, WinMerge
    informs user with message showing filename of needed file and recommended
    version of 7-Zip. This message can also be opened from
    <guimenu>Help</guimenu>-menu item "<guimenuitem>Archive Support
    Disabled</guimenuitem>".</para>

    <sect3>
      <title>Merge7zInstaller</title>

      <para>This is a stand-alone installer for 7-Zip integration.</para>

      <para>Installer filenames may seem weird at first, but there is reason
      for them: they show supported versions. Filename is formatted
      <filename>Merge7zInstallerXXX-YYY-ZZZ.exe</filename>. XXX is build
      number, YYY earliest 7-Zip version supported and ZZZ latest 7-Zip
      version supported. For example
      <filename>Merge7zInstaller0014-311-426.exe</filename> means build
      version 14, and support for 7-Zip versions 3.11 - 4.26.</para>

      <para>This separate installer is much more flexible since we can update
      it whenever 7-Zip is updated. And we don't add files users don't need to
      base installer.</para>

      <para>The latest version is always available directly in our downloads
      at SourceForge.net: <ulink
      url="https://sourceforge.net/project/showfiles.php?group_id=13216&amp;package_id=143957"
      userlevel="">7-Zip plugin</ulink> and of course from our homepage at
      <ulink url="http://www.winmerge.org/">WinMerge.org</ulink>.</para>

      <tip>
        <para>If you want to know immediately when we release new versions,
        you can Monitor our releases. When monitoring release, you get sent
        e-mail notifications about new releases when they happen.</para>
      </tip>

      <para>Running installer is simple:</para>

      <para><orderedlist>
          <listitem>
            <para>Start installer executable</para>
          </listitem>

          <listitem>
            <para>Select installation type and dll files (supported 7-zip
            versions) to install</para>

            <itemizedlist>
              <listitem>
                <para><guilabel>Shared installation</guilabel> copies 7-Zip
                plugin files to system directory so they can be shared between
                multiple WinMerge installations and other programs using 7-zip
                plugin. This is recommended installation.</para>
              </listitem>

              <listitem>
                <para><guilabel>Application specific installation</guilabel>
                copies 7-zip plugin files to program directory. Files are then
                usable only by that program.</para>

                <para>This selection requires user to select executable in
                directory where plugin files are installed. Select WinMerge
                executable file when installing to WinMerge directory.</para>
              </listitem>

              <listitem>
                <para><guilabel>Enable standalone operation</guilabel>
                installs also required 7-Zip files to program's (application
                specific installation) directory. This allows minimal usable
                installation of 7-Zip for archive support. This can be used
                when 7-Zip application is not wanted or needed.</para>

                <para>This installation type does contain only needed files
                for WinMerge (or other application) to enable archive support.
                It does not install 7-Zip user interface or other related
                tools or files. After this install it is not possible to open
                or create 7-Zip archive files outside WinMerge.</para>
              </listitem>
            </itemizedlist>
          </listitem>
        </orderedlist></para>
    </sect3>
  </sect2>
</sect1>