<?xml version="1.0" encoding="UTF-8"?>
<sect1 id="Installing">
  <title>WinMerge のダウンロードとインストール</title>

  <para>WinMerge can be installed using installer or by unzipping files from
  archive. Using the installer is the recommended method.</para>

  <note>
    <para>Currently WinMerge installer works natively only for 32-bit Windows.
    There is no separate version of WinMerge for 64-bit Windows
    (WinXP/2003/Vista). 64-bit Windows versions can run the installer and
    WinMerge as 32-bit application. For the Shell Integration there is the
    64-bit version of extension included in the installer.</para>
  </note>

  <sect2>
    <title>ファイルのダウンロード</title>

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

  <sect2>
    <title>インストーラを使用する (推奨)</title>

    <note>
      <para>Installer requires Admin-user privileges in Windows NT4/2000/XP.
      If you don't have Admin-user privileges you can install WinMerge by
      unzipping from an archive file (see <link
      linkend="InstallFromArchive">Installing from an Archive</link>).</para>
    </note>

    <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>
        <simpara>Start installer executable (usually named
        <filename>WinMerge-<replaceable>version</replaceable>-setup.exe</filename>)</simpara>
      </listitem>

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

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

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

      <listitem>
        <simpara>Select components installed or one of pre-configured
        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:</simpara>

        <itemizedlist>
          <listitem>
            <simpara><guilabel>WinMerge core files</guilabel> - cannot be
            unselected - WinMerge executable, user's guide and other needed
            files</simpara>
          </listitem>

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

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

          <listitem>
            <simpara><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>.</simpara>
          </listitem>
        </itemizedlist>
      </listitem>

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

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

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

            <listitem>
              <simpara><guilabel>Integrate with TortoiseSVN</guilabel> - sets
              WinMerge to TortoiseSVN diff application.</simpara>
            </listitem>

            <listitem>
              <simpara><guilabel>Integrate with ClearCase</guilabel> - sets
              WinMerge to ClearCase diff and merge application.</simpara>
            </listitem>

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

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

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

      <listitem>
        <simpara>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.</simpara>
      </listitem>
    </orderedlist>
  </sect2>

  <sect2>
    <title id="InstallFromArchive">圧縮ファイルからのインストール</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>MFC71[U].dll</filename> , <filename>MSVCR71.dll and
    MSVCP71.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. Mentioned
    DLL files are available also as Runtimes-package to download.</para>

    <note>
      <para>WinMerge 2.6.0 and later versions require a new version of runtime
      libraries. When updating from older WinMerge versions using archive
      files, new runtime files form Runtime-package are needed.</para>
    </note>

    <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.6.0</filename>. This
    folder can be renamed or files copied to other folder (preserving the
    folder structure!).</para>

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

  <sect2>
    <title>シェル統合</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*.dll</filename>) must be registered separately.
    This is done by running <filename>register.bat</filename> from WinMerge
    directory. Restarting the computer is recommended after installing Shell
    Integration so that Windows updates all its references.</para>

    <note>
      <para>Installing shell Integration requires administrative user
      privileges.</para>
    </note>

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

    <sect3>
      <title>64-Bit シェル統合</title>

      <para>WinMerge version 2.6 includes a partial support for 64-bit Windows
      versions by including 64-bit Shell Integration. WinMerge installer
      recognizes 64-bit versions of Windows and can install correct version of
      Shell Integration.</para>

      <para>When installing Shell Integration by hand from an archive file,
      Shell Integration DLL is named as
      <filename>ShellExtensionX64.dll</filename>. Registering/unregistering
      can be done with <filename>register.bat</filename> and
      <filename>unregister.bat</filename> like with 32-bit versions.</para>
    </sect3>
  </sect2>

  <sect2>
    <title><indexterm>
        <primary>アーカイブサポートのインストール</primary>
      </indexterm>7-Zip とアーカイブサポート</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>

    <important>
      <para>There are 7-Zip MSI installers that do not install all the files
      WinMerge needs (namely <filename>7zip_pad.xml</filename> in 7-Zip
      program folder). If there are problems with archive support enabling,
      try running the EXE version of the 7-Zip installer.</para>
    </important>

    <para>To install archive support, download and install 7-Zip plugin
    (Merge7zInstaller, see below) from <ulink
    url="http://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.42 needs
    <filename>Merge7z442.dll</filename>. And if
    <filename>WinMergeU.exe</filename> (Unicode version) is used, then
    "<filename>U</filename>" is also added to filename:
    <filename>Merge7z442U.dll</filename>. If needed DLL file is for some
    reason missing it can be copied to WinMerge directory, for example from
    7z-Plugin 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://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>
            <simpara>Start installer executable</simpara>
          </listitem>

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

            <itemizedlist>
              <listitem>
                <simpara><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.</simpara>
              </listitem>

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

                <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>
                <simpara><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.</simpara>

                <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>
