OSDN Git Service

Initial commit
[wordring-tm/wordring-tm.git] / third_party / tidy-html5-master / README.html
1 <!DOCTYPE html>
2 <html>
3  <head>
4   <meta charset="UTF-8">
5   <title>
6   HTML Tidy with HTML5 support
7   </title>
8   <style>
9   h1 {
10     background-color: #6495ed;
11   }
12   code {
13     background-color: #e0ffff;
14   }
15   div {
16     background-color: #b0c4de;
17   }
18   </style>
19  </head>
20  <body>
21   <h1>
22    HTML Tidy with HTML5 support
23   </h1>
24   <h2>
25    Prerequisites
26   </h2>
27   <ol>
28    <li>
29     <p>
30      git - http://git-scm.com/book/en/v2/Getting-Started-Installing-Git
31     </p>
32    </li>
33    <li>
34     <p>
35      cmake - http://www.cmake.org/download/
36     </p>
37    </li>
38    <li>
39     <p>
40      appropriate build tools for the platform
41     </p>
42    </li>
43   </ol>
44   <p>
45    CMake comes in two forms - command line and gui. Some installations only install one or the
46    other, but sometimes both. The build commands below are only for the command line use.
47   </p>
48   <p>
49    Also the actual build tools vary for each platform. But that is one of the great features of
50    cmake, it can generate variuous 'native' build files. Running cmake without any parameters will
51    list the generators available on that platform. For sure one of the common ones is "Unix
52    Makefiles", which needs autotools make installed, but many other generators are supported.
53   </p>
54   <p>
55    In windows cmake offers various versions of MSVC. Again below only the command line use of MSVC
56    is shown, but the tidy solution (*.sln) file can be loaded into the MSVC IDE, and the building
57    done in there.
58   </p>
59   <h2>
60    Build the tidy library and command line tool
61   </h2>
62   <ol>
63    <li>
64     <p>
65      <code>cd build/cmake</code>
66     </p>
67    </li>
68    <li>
69     <p>
70      <code>cmake ../.. [-DCMAKE_INSTALL_PREFIX=/path/for/install]</code>
71     </p>
72    </li>
73    <li>
74     <p>
75      Windows: <code>cmake --build . --config Release</code>
76      <br>
77      Unix/OS X: <code>make</code>
78     </p>
79    </li>
80    <li>
81     <p>
82      Install, if desired:
83      <br>
84      Windows: <code>cmake --build . --config Release --target INSTALL</code>
85      <br>
86      Unix/OS X: <code>[sudo] make install</code>
87     </p>
88    </li>
89   </ol>
90   <p>
91    By default cmake sets the install path to /usr/local in unix. If you wanted the binary in say
92    /usr/bin instead, then in 2. above use -DCMAKE<em>INSTALL</em>PREFIX=/usr
93   </p>
94   <p>
95    In windows the default install is to C:\Program Files\tidy5, or C:/Program Files (x86)/tidy5,
96    which is not very useful. After the build the tidy[n].exe is in the Release directory, and can
97    be copied to any directory in your PATH environment variable, for global use.
98   </p>
99   <p>
100    If you need the tidy library built as a 'shared' (DLL) library, then in 2. add the command
101    -DBUILD<em>SHARED</em>LIB:BOOL=ON. This option is OFF by default, so the static library is
102    built and linked with the command line tool for convenience.
103   </p>
104   <h2>
105    History
106   </h2>
107   <p>
108    This repository should be considered canonical for HTML Tidy as of 2015-January-15.
109   </p>
110   <ul>
111    <li>
112     <p>
113      This repository originally transferred from <a href=
114      "http://w3c.github.com/tidy-html5/">w3c.github.com/tidy-html5</a>.
115     </p>
116    </li>
117    <li>
118     <p>
119      First moved to Github from <a href="http://tidy.sourceforge.net">tidy.sourceforge.net</a>.
120     </p>
121    </li>
122   </ul>
123  </body>
124 </html>