<?xml version="1.0" encoding="UTF-8"?>
<sect1 id="QuickStart">
  <title>クイックスタート</title>

  <sect2>
    <title><indexterm>
        <primary>「開く」ダイアログ</primary>
      </indexterm>ファイルとフォルダを開く</title>

    <para>Start WinMerge and either select <guimenuitem>Open</guimenuitem>
    from the <guimenu>File</guimenu>-menu, or click the yellow folder icon on
    the toolbar, or press <keycombo>
        <keycap>Ctrl</keycap>

        <keycap>O</keycap>
      </keycombo>. The file/folder selection dialog opens:</para>

    <para><mediaobject>
        <imageobject>
          <imagedata fileref="screenshots/OpenDlg1.png" format="PNG" />
        </imageobject>
      </mediaobject></para>

    <para>Two topmost fields in Open dialog are for selecting files and
    folders to compare. Comparison objects can be specified in one of four
    ways:</para>

    <para><orderedlist>
        <listitem>
          <simpara>Enter the path names directly into the edit
          fields</simpara>
        </listitem>

        <listitem>
          <simpara>Click the <guibutton>Browse</guibutton> button and use the
          file chooser to navigate to the desired path</simpara>
        </listitem>

        <listitem>
          <simpara>Expand the combo box and select a previously used
          path</simpara>
        </listitem>

        <listitem>
          <simpara>Drag &amp; drop path into the dialog or left/right edit
          field</simpara>
        </listitem>
      </orderedlist></para>

    <para>If <guilabel>Open-dialog Auto-completion</guilabel> -option is
    enabled in options WinMerge shows a list of paths available when typing
    into the fields. Auto-completion can be restricted to earlier used paths
    only, which makes selecting frequently used paths fast.</para>

    <para>Folder can be selected from Windows Open dialog (opens when
    <guibutton>Browse</guibutton>-button is selected) by browsing into folder
    and selecting <guibutton>Open</guibutton>-button. It does not require
    selecting a file. When <guilabel>Filename</guilabel> field in Windows Open
    dialog contains text "<guilabel>Folder Selection</guilabel>" selecting
    <guibutton>Open</guibutton> button selects currently visible folder. Also
    if filename in Windows Open dialog does not match any real file parent
    folder is selected. The Open dialog always shows a backslash "\" at end of
    folder name.</para>

    <para><note>
        <para>There can be only file &amp; file or folder &amp; folder
        selected to open for compare. If there is file &amp; folder selected
        or other one of files/folders cannot be found WinMerge disables
        <guibutton>OK</guibutton>-button in dialog.</para>
      </note></para>

    <para><guilabel>Filter</guilabel> field can be used to select files by
    extension to compare. Default value is "*.*" which includes all files. But
    listing one or more extensions restricts compare to only files with those
    extensions. Multiple extensions are separated with space or semicolon. For
    example, entering the file filter <filename>*.cpp;*.hpp;*.c;*.h</filename>
    will cause WinMerge to ignore all files except C and C++ source files. You
    can only filter by file extension, not by filename.</para>

    <para>File filters are a much more powerful way (than extension filters)
    to select files and folders. Use the <guibutton>Select</guibutton> button
    next to the <guilabel>Filters</guilabel> field to see a list of available
    filters, and to choose a file filter to use.</para>

    <para>If the <guilabel>Include Subfolders</guilabel> checkbox is checked
    then WinMerge compares all subfolders and shows all files and folders it
    finds in one view. Otherwise only the current folder is compared, and
    subfolders are listed by name (without their contents), so the user can
    browse into them.</para>

    <para>Unpacker selection is for plugins.</para>

    <tip>
      <para>Status of currently selected files or folders is shown with text
      in bottom of the dialog. If one of the paths is invalid this text tells
      which one it is.</para>
    </tip>

    <para>Project files are the easiest and fastest way to open frequently
    used paths. Usually project files are opened using separate dialog
    accessible from <guimenu>File</guimenu>-menu. A project file can be also
    selected as left path in Open-dialog. Selecting project files to
    <guilabel>Left</guilabel>- and <guilabel>Right</guilabel>-paths WinMerge
    compares selected project files. See <link linkend="OpenPaths">Opening
    Files and Folders</link> for more information about project files.</para>

    <sect3>
      <title>ファイルとフォルダを開く他の方法</title>

      <para>Open-dialog is the main interface for opening files and folders.
      But WinMerge allows many other ways too:</para>

      <itemizedlist>
        <listitem>
          <simpara>Shell integration allows selecting files and folders to
          compare from Windows Explorer</simpara>
        </listitem>

        <listitem>
          <simpara>Command line allows starting WinMerge from other
          applications, command prompt or batch/script file</simpara>
        </listitem>

        <listitem>
          <simpara>Files and folders can be drag&amp;drop'ed directly to
          WinMerge window</simpara>
        </listitem>

        <listitem>
          <simpara>Project-file can be opened from command-line or from
          <menuchoice>
              <guimenu>File</guimenu>

              <guimenuitem>Open Project...</guimenuitem>
            </menuchoice> -menuitem</simpara>
        </listitem>
      </itemizedlist>
    </sect3>
  </sect2>

  <sect2>
    <title>フォルダの比較</title>

    <para><inlinemediaobject>
        <imageobject>
          <imagedata fileref="screenshots/foldercomp1.png" format="PNG" />
        </imageobject>
      </inlinemediaobject></para>

    <para>If two folders were selected in the Open dialog then the folder
    compare window is opened. Folder compare is basically a list of found
    items. Found file- and folder-names are shown in rightmost column and
    other columns show other related information.</para>

    <para>WinMerge does not have a concept of "original" and "changed" sides.
    WinMerge just shows what is different between two selected folders. This
    is especially the case for files and folders that are found only in other
    side. WinMerge does not show them as "added" or "removed" but unique
    items.</para>

    <para>Using <guimenu>Merge</guimenu> menu items, toolbar items, or context
    menu items, files and folders can be managed in many ways. Most important
    action is making files and folders identical in both sides. This is done
    by selecting one of several Copy -items. When file or folder is copied to
    other side it becomes identical.</para>

    <para>If the selected file exists in both sides (and it is not a binary
    file) it can be opened to file compare. File can be opened by:<orderedlist>
        <listitem>
          <simpara>selecting <guimenuitem>Compare</guimenuitem> from
          <guimenu>Merge</guimenu> menu</simpara>
        </listitem>

        <listitem>
          <simpara>selecting <guimenuitem>Compare</guimenuitem> from context
          menu</simpara>
        </listitem>

        <listitem>
          <simpara>double-clicking with mouse</simpara>
        </listitem>

        <listitem>
          <simpara>pressing <keycap>Enter</keycap> key</simpara>
        </listitem>
      </orderedlist></para>

    <para>After file compare is closed file's status is updated to folder
    compare.</para>
  </sect2>

  <sect2>
    <title>ファイルの比較</title>

    <para><inlinemediaobject>
        <imageobject>
          <imagedata fileref="screenshots/filecomp1.png" format="PNG" />
        </imageobject>
      </inlinemediaobject></para>

    <para>File compare shows two files side by side. Different lines are
    highlighted with background color. One or more consecutive different lines
    form one difference (or "diff"). WinMerge mostly works with these
    differences, not separate lines.</para>

    <para><important>
        <para>Notice how WinMerge fills missing lines in other side. Similar
        lines are always side by side. This is different from most other
        compare/merge programs and can take a while to learn.</para>
      </important>With merging commands (in <guimenu>Merge</guimenu> menu)
    lines in difference can be copied between sides. Missing lines can be
    copied also. When missing lines are copied from one side to another,
    matching existing lines are removed. In the above screenshot, copying
    lines in second difference from the left to the right would remove
    matching lines from the left side.</para>

    <para>WinMerge has an simple integrated editor. Typing, copying, cutting
    and pasting text works. If <guilabel>Automatic rescan</guilabel> is
    enabled then WinMerge updates file differences while files are edited. If
    <guilabel>Automatic rescan</guilabel> is disabled files can be updated
    selecting <guimenuitem>Refresh</guimenuitem> from
    <guimenu>Edit</guimenu>-menu, clicking toolbar button with two yellow
    arrows or pressing <keycap>F5</keycap> key.</para>
  </sect2>
</sect1>
