OLD | NEW |
(Empty) | |
| 1 |
| 2 XZ Utils on DOS |
| 3 =============== |
| 4 |
| 5 Introduction |
| 6 |
| 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 |
| 10 of XZ Utils. |
| 11 |
| 12 This is currently experimental and has got very little testing. |
| 13 |
| 14 |
| 15 Getting and Installing DJGPP |
| 16 |
| 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). |
| 23 |
| 24 For more manual method, first select a mirror from |
| 25 <http://www.delorie.com/djgpp/getting.html>. You need |
| 26 the following files: |
| 27 |
| 28 unzip32.exe |
| 29 beta/v2/djdev204.zip |
| 30 v2gnu/bnu219b.zip |
| 31 v2gnu/gcc432b.zip |
| 32 v2gnu/mak3791b.zip |
| 33 v2gnu/sed415b.zip |
| 34 v2misc/csdpmi5b.zip |
| 35 |
| 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. |
| 41 |
| 42 See the instructions in readme.1st found from djdev204.zip. Here's |
| 43 a short summary, but you should still read readme.1st. |
| 44 |
| 45 C:\> mkdir DJGPP |
| 46 C:\> cd DJGPP |
| 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 |
| 53 |
| 54 C:\DJGPP> set PATH=C:\DJGPP\BIN;%PATH% |
| 55 C:\DJGPP> set DJGPP=C:\DJGPP\DJGPP.ENV |
| 56 |
| 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. |
| 59 |
| 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 |
| 63 is uppercase. |
| 64 |
| 65 |
| 66 Building |
| 67 |
| 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. |
| 71 |
| 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. |
| 75 |
| 76 |
| 77 Additional Make Flags and Targets |
| 78 |
| 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): |
| 82 |
| 83 make CFLAGS="-O3 -fomit-frame-pointer -funroll-loops" |
| 84 |
| 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! |
| 88 |
| 89 make DEBUG=1 CFLAGS="-g -O0" |
| 90 |
| 91 |
| 92 Bugs |
| 93 |
| 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 |
| 98 long filename. |
| 99 |
| 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. |
| 103 |
| 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 |
| 106 Windows. |
| 107 |
| 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. |
| 111 |
| 112 Report bugs to <lasse.collin@tukaani.org> (in English or Finnish). |
| 113 |
OLD | NEW |