OSDN Git Service

Initial commit
[wordring-tm/wordring-tm.git] / third_party / tidy-html5-master / README.md
1 # HTML Tidy with HTML5 support
2
3 ## Prerequisites
4
5   1. git - http://git-scm.com/book/en/v2/Getting-Started-Installing-Git
6   
7   2. cmake - http://www.cmake.org/download/
8   
9   3. appropriate build tools for the platform
10   
11 CMake comes in two forms - command line and gui. Some installations only install one or the other, but sometimes both. The build commands below are only for the command line use.
12
13 Also the actual build tools vary for each platform. But that is one of the great features of cmake, it can generate variuous 'native' build files. Running cmake without any parameters will list the generators available on that platform. For sure one of the common ones is "Unix Makefiles", which needs autotools make installed, but many other generators are supported.
14
15 In windows cmake offers various versions of MSVC. Again below only the command line use of MSVC is shown, but the tidy solution (*.sln) file can be loaded into the MSVC IDE, and the building done in there.
16
17
18 ## Build the tidy library and command line tool
19
20   1. `cd build/cmake`
21
22   2. `cmake ../.. [-DCMAKE_INSTALL_PREFIX=/path/for/install]`
23
24   3. Windows:  `cmake --build . --config Release`  
25      Unix/OS X: `make`
26
27   4. Install, if desired:  
28      Windows: `cmake --build . --config Release --target INSTALL`  
29      Unix/OS X: `[sudo] make install`
30
31 By default cmake sets the install path to /usr/local in unix. If you wanted the binary in say /usr/bin instead, then in 2. above use -DCMAKE_INSTALL_PREFIX=/usr
32
33 In windows the default install is to C:\Program Files\tidy5, or C:/Program Files (x86)/tidy5, which is  not very useful. After the build the tidy[n].exe is in the Release directory, and can be copied to any directory in your PATH environment variable, for global use.
34
35 If you need the tidy library built as a 'shared' (DLL) library, then in 2. add the command -DBUILD_SHARED_LIB:BOOL=ON. This option is OFF by default, so the static library is built and linked with the command line tool for convenience.
36
37 ## Prebuilt Binaries
38
39 An attempt is being made to publish pre-built binaries to http://www.htacg.org/binaries - This is still a work in progress, but getting there..
40
41 ## History
42
43 This repository should be considered canonical for HTML Tidy as of 2015-January-15.
44
45  - This repository originally transferred from [w3c.github.com/tidy-html5][1].
46  
47  - First moved to Github from [tidy.sourceforge.net][2].
48
49
50    [1]: http://w3c.github.com/tidy-html5/
51
52    [2]: http://tidy.sourceforge.net
53
54 ; eof