7 This document explains how to build XZ Utils for DOS using DJGPP.
8 The resulting binaries should run at least on various DOS versions
9 and under Windows 95/98/98SE/ME, which cannot run the Windows version
12 This is currently experimental and has got very little testing.
15 Getting and Installing DJGPP
17 You may use <http://www.delorie.com/djgpp/zip-picker.html> to help
18 deciding what to download, but as of writing (2009-02-13) that may
19 not be the most convenient way taking into account what components
20 are actually required to build XZ Utils. However, using the
21 zip-picker can still be worth doing to get nice short summary of
22 installation instructions (they can be found from readme.1st too).
24 For more manual method, first select a mirror from
25 <http://www.delorie.com/djgpp/getting.html>. You need
36 If newer versions are available, probably you should try them first.
37 Note that djdev203.zip is too old to build XZ Utils; you need at
38 least djdev204.zip. Also note that you want csdpmi5b.zip even if you
39 run under Windows or DOSEMU, because the XZ Utils Makefile will embed
40 cwsdstub.exe to the resulting binaries.
42 See the instructions in readme.1st found from djdev204.zip. Here's
43 a short summary, but you should still read readme.1st.
47 C:\DJGPP> c:\download\unzip32 c:\download\djdev204.zip
48 C:\DJGPP> c:\download\unzip32 c:\download\bnu219b.zip
49 C:\DJGPP> c:\download\unzip32 c:\download\gcc432b.zip
50 C:\DJGPP> c:\download\unzip32 c:\download\mak3791b.zip
51 C:\DJGPP> c:\download\unzip32 c:\download\sed415b.zip
52 C:\DJGPP> c:\download\unzip32 c:\download\csdpmi5b.zip
54 C:\DJGPP> set PATH=C:\DJGPP\BIN;%PATH%
55 C:\DJGPP> set DJGPP=C:\DJGPP\DJGPP.ENV
57 You may want to add the last two lines into AUTOEXEC.BAT or have,
58 for example, DJGPP.BAT which you can run before using DJGPP.
60 Make sure you use completely upper case path in the DJGPP environment
61 variable. This is not required by DJGPP, but the XZ Utils Makefile is
62 a bit stupid and expects that everything in DJGPP environment variable
68 Just run "make" in this directory (the directory containing this
69 README). You should get liblzma.a, xz.exe, xzdec.exe, and
70 lzmadec.exe. Of these, probably xz.exe is the only interesting one.
72 Note: You need to have an environment that supports long filenames.
73 Once you have built XZ Utils, the resulting binaries can be run
74 without long filename support.
77 Additional Make Flags and Targets
79 You may want to try some additional optimizations, which may or
80 may not make the code faster (and may or may not hit possible
81 compiler bugs more easily):
83 make CFLAGS="-O3 -fomit-frame-pointer -funroll-loops"
85 If you want to enable assertions (the assert() macro), use DEBUG=1.
86 You may want to disable optimizations too if you plan to actually
87 debug the code. Never use DEBUG=1 for production builds!
89 make DEBUG=1 CFLAGS="-g -O0"
94 "make clean" may remove src/xz/hardware.c when it tries to remove
95 src/xz/hardware-fixed.c. This is probably a bug somewhere in the
96 DOS environment I use. Maybe it tries truncated 8.3 name first and
97 since that gives a name of an existing file, it doesn't look for
100 "xz -fc /dev/tty" hangs at least in DOSEMU and cannot be interrupted
101 by pressing C-c. Maybe xz should never accept non-regular files on
102 DOS even when --force is used.
104 Using different memory usage limit for encoding and decoding doesn't
105 make sense under pure DOS. Maybe it is still OK when running under
108 The progress indicator of "xz -v" doesn't get updated when running
109 under Dosbox, but it works in DOSEMU. I currently (2009-02-13) don't
110 know if it works in other environments.
112 Report bugs to <lasse.collin@tukaani.org> (in English or Finnish).