]> icculus.org git repositories - icculus/xz.git/blob - windows/README-Windows.txt
536d08f51f93cf286539a04b125d8f7908277ccc
[icculus/xz.git] / windows / README-Windows.txt
1
2 XZ Utils for Windows
3 ====================
4
5 Introduction
6 ------------
7
8     This package includes command line tools (xz.exe and a few others)
9     and the liblzma compression library from XZ Utils. You can find the
10     latest version and full source code from <http://tukaani.org/xz/>.
11
12     The parts of the XZ Utils source code, that are relevant to this
13     binary package, are in the public domain. XZ Utils have been built
14     for this package with MinGW and linked statically against the MinGW
15     runtime and w32api packages.
16
17     FIXME: Add license info about MinGW runtime and w32api.
18
19
20 Package contents
21 ----------------
22
23     All executables and libraries in this package require msvcrt.dll.
24     It's included in all recent Windows versions. On Windows 95 it
25     might be missing, but once you get it somewhere, XZ Utils should
26     run even on Windows 95.
27
28     There are two different versions of the executable and library files.
29     There is one directory for each type of binaries:
30
31         bin_i486        32-bit x86 (i486 and up), Windows 95 and later
32         bin_x86-64      64-bit x86-64, Windows XP and later
33
34     Each of the above directories have the following files:
35
36         *.exe       Command line tools. (It's useless to double-click
37                     these; use the command prompt instead.) These have
38                     been linked statically against liblzma, so they
39                     don't require liblzma.dll. Thus, you can copy e.g.
40                     xz.exe to a directory that is in PATH without copying
41                     any other files from this package.
42
43         liblzma.dll Shared version of the liblzma compression library.
44                     This file is mostly useful to developers, although
45                     some non-developers might use it to upgrade their
46                     copy of liblzma.
47
48         liblzma.a   Static version of the liblzma compression library.
49                     This file is useful only for developers.
50
51     The rest of the directories contain architecture-independent files:
52
53         doc         Documentation in the plain text (TXT) format. The
54                     manuals of the command line tools are provided also
55                     in the PDF format. liblzma.def is in this directory
56                     too.
57
58         include     C header files for liblzma. These should be
59                     compatible with most C and C++ compilers. If you
60                     have problems, try to fix it and send your fixes
61                     upstream, or at least report a bug, thanks.
62
63
64 Linking against liblzma
65 -----------------------
66
67 MinGW
68
69     If you use MinGW, linking against liblzma.dll or liblzma.a should
70     be straightforward. You don't need an import library to link
71     against liblzma.dll, and for static linking, you don't need to
72     worry about the LZMA_API_STATIC macro.
73
74     Note that the MinGW distribution includes liblzma. If you are
75     building packages that will be part of the MinGW distribution, you
76     probably should use the version of liblzma shipped in MinGW instead
77     of this package.
78
79
80 Microsoft Visual C++
81
82     To link against liblzma.dll, you need to create an import library
83     first. You need the "lib" command from MSVC and liblzma.def from
84     the "doc" directory of this package. Here is the command that works
85     on 32-bit x86:
86
87         lib /def:liblzma.def /out:liblzma.lib /machine:ix86
88
89     On x86-64, the /machine argument has to naturally be changed:
90
91         lib /def:liblzma.def /out:liblzma.lib /machine:x64
92
93     Linking against static liblzma should work too. Rename liblzma.a
94     to e.g. liblzma_static.lib and tell MSVC to link against it. You
95     also need to tell lzma.h to not use __declspec(dllimport) by defining
96     the macro LZMA_API_STATIC. You can do it either in the C/C++ code
97
98         #define LZMA_API_STATIC
99         #include <lzma.h>
100
101     or by adding it to compiler options.
102
103
104 Other compilers
105
106     If you are using some other compiler, see its documentation how to
107     create an import library (if it is needed). If it is simple, I
108     might consider including the instructions here.
109
110
111 Reporting bugs
112 --------------
113
114     Report bugs to <lasse.collin@tukaani.org> (in English or Finnish).
115