diff options
Diffstat (limited to 'DOC/readme.txt')
-rw-r--r-- | DOC/readme.txt | 272 |
1 files changed, 272 insertions, 0 deletions
diff --git a/DOC/readme.txt b/DOC/readme.txt new file mode 100644 index 0000000..0f6c77b --- /dev/null +++ b/DOC/readme.txt | |||
@@ -0,0 +1,272 @@ | |||
1 | 7-Zip 21.07 Sources | ||
2 | ------------------- | ||
3 | |||
4 | 7-Zip is a file archiver for Windows. | ||
5 | |||
6 | 7-Zip Copyright (C) 1999-2021 Igor Pavlov. | ||
7 | |||
8 | |||
9 | License Info | ||
10 | ------------ | ||
11 | |||
12 | 7-Zip is free software distributed under the GNU LGPL | ||
13 | (except for unRar code). | ||
14 | read License.txt for more infomation about license. | ||
15 | |||
16 | Notes about unRAR license: | ||
17 | |||
18 | Please check main restriction from unRar license: | ||
19 | |||
20 | 2. The unRAR sources may be used in any software to handle RAR | ||
21 | archives without limitations free of charge, but cannot be used | ||
22 | to re-create the RAR compression algorithm, which is proprietary. | ||
23 | Distribution of modified unRAR sources in separate form or as a | ||
24 | part of other software is permitted, provided that it is clearly | ||
25 | stated in the documentation and source comments that the code may | ||
26 | not be used to develop a RAR (WinRAR) compatible archiver. | ||
27 | |||
28 | In brief it means: | ||
29 | 1) You can compile and use compiled files under GNU LGPL rules, since | ||
30 | unRAR license almost has no restrictions for compiled files. | ||
31 | You can link these compiled files to LGPL programs. | ||
32 | 2) You can fix bugs in source code and use compiled fixed version. | ||
33 | 3) You can not use unRAR sources to re-create the RAR compression algorithm. | ||
34 | |||
35 | |||
36 | LZMA SDK | ||
37 | -------- | ||
38 | |||
39 | This package also contains some files from LZMA SDK | ||
40 | You can download LZMA SDK from: | ||
41 | http://www.7-zip.org/sdk.html | ||
42 | LZMA SDK is written and placed in the public domain by Igor Pavlov. | ||
43 | |||
44 | |||
45 | How to compile in Windows | ||
46 | ------------------------- | ||
47 | |||
48 | To compile the sources to Windows binaries you need Visual Studio compiler and/or Windows SDK. | ||
49 | You can use latest Windows Studio 2017/2019 to compile binaries for x86, x64 and arm64 platforms. | ||
50 | Also you can use old compilers for some platforms: | ||
51 | x86 : Visual C++ 6.0 with Platform SDK | ||
52 | x64 : Windows Server 2003 R2 Platform SDK | ||
53 | arm64 : Windows Studio 2017 | ||
54 | arm : Windows Studio 2017 | ||
55 | ia64 (itanium) : Windows Server 2003 R2 Platform SDK | ||
56 | arm for Windows CE : Standard SDK for Windows CE 5.0 | ||
57 | |||
58 | If you use MSVC6, specify also Platform SDK directories at top of directories lists: | ||
59 | Tools / Options / Directories | ||
60 | - Include files | ||
61 | - Library files | ||
62 | |||
63 | Also you need Microsoft Macro Assembler: | ||
64 | - ml.exe for x86 | ||
65 | - ml64.exe for x64 | ||
66 | You can use ml.exe from Windows SDK for Windows Vista or some later versions. | ||
67 | |||
68 | There are two ways to compile 7-Zip binaries: | ||
69 | 1) via makefile in command line. | ||
70 | 2) via dsp file in Visual Studio. | ||
71 | |||
72 | The dsp file compiling can be used for development and debug purposes. | ||
73 | The final 7-Zip binaries are compiled via makefiles, that provide best | ||
74 | optimization options. | ||
75 | |||
76 | |||
77 | How to compile with makefile | ||
78 | ---------------------------- | ||
79 | |||
80 | Some macronames can be defined for compiling with makefile: | ||
81 | |||
82 | PLATFORM | ||
83 | with possible values: x64, x86, arm64, arm, ia64 | ||
84 | |||
85 | OLD_COMPILER | ||
86 | for old VC compiler, like MSCV 6.0. | ||
87 | |||
88 | MY_DYNAMIC_LINK | ||
89 | for dynamic linking to the run-time library (msvcrt.dll). | ||
90 | The default makefile option is static linking to the run-time library. | ||
91 | |||
92 | |||
93 | |||
94 | Compiling 7-Zip for Unix/Linux | ||
95 | ------------------------------ | ||
96 | |||
97 | There are several otpions to compile 7-Zip with different compilers: gcc and clang. | ||
98 | Also 7-Zip code contains two versions for some critical parts of code: in C and in Assembeler. | ||
99 | So if you compile the version with Assembeler code, you will get faster 7-Zip binary. | ||
100 | |||
101 | 7-Zip's assembler code uses the following syntax for different platforms: | ||
102 | |||
103 | 1) x86 and x86-64 (AMD64): MASM syntax. | ||
104 | There are 2 programs that supports MASM syntax in Linux. | ||
105 | ' 'Asmc Macro Assembler and JWasm. But JWasm now doesn't support some | ||
106 | cpu instructions used in 7-Zip. | ||
107 | So you must install Asmc Macro Assembler in Linux, if you want to compile fastest version | ||
108 | of 7-Zip x86 and x86-64: | ||
109 | https://github.com/nidud/asmc | ||
110 | |||
111 | 2) arm64: GNU assembler for ARM64 with preprocessor. | ||
112 | That systax of that arm64 assembler code in 7-Zip is supported by GCC and CLANG for ARM64. | ||
113 | |||
114 | There are different binaries that can be compiled from 7-Zip source. | ||
115 | There are 2 main files in folder for compiling: | ||
116 | makefile - that can be used for compiling Windows version of 7-Zip with nmake command | ||
117 | makefile.gcc - that can be used for compiling Linux/macOS versions of 7-Zip with make command | ||
118 | |||
119 | At first you must change the current folder to folder that contains `makefile.gcc`: | ||
120 | |||
121 | cd CPP/7zip/Bundles/Alone2 | ||
122 | |||
123 | Then you can compile `makefile.gcc` with the command: | ||
124 | |||
125 | make -j -f makefile.gcc | ||
126 | |||
127 | Also there are additional "*.mak" files in folder "CPP/7zip/" that can be used to compile | ||
128 | 7-Zip binaries with optimized code and optimzing options. | ||
129 | |||
130 | To compile with GCC without assembler: | ||
131 | cd CPP/7zip/Bundles/Alone2 | ||
132 | make -j -f ../../cmpl_gcc.mak | ||
133 | |||
134 | To compile with CLANG without assembler: | ||
135 | make -j -f ../../cmpl_clang.mak | ||
136 | |||
137 | To compile 7-Zip for x86-64 with asmc assembler: | ||
138 | make -j -f ../../cmpl_gcc_x64.mak | ||
139 | |||
140 | To compile 7-Zip for arm64 with assembler: | ||
141 | make -j -f ../../cmpl_gcc_arm64.mak | ||
142 | |||
143 | To compile 7-Zip for arm64 for macOS: | ||
144 | make -j -f ../../cmpl_mac_arm64.mak | ||
145 | |||
146 | Also you can change some compiler options in the mak files: | ||
147 | cmpl_gcc.mak | ||
148 | var_gcc.mak | ||
149 | warn_gcc.mak | ||
150 | |||
151 | makefile.gcc supports some variables that can change compile options | ||
152 | |||
153 | USE_JWASM=1 | ||
154 | use JWasm assembler instead of Asmc. | ||
155 | Note that JWasm doesn't support AES instructions. So AES code from C version AesOpt.c | ||
156 | will be used instead of assembler code from AesOpt.asm. | ||
157 | |||
158 | DISABLE_RAR=1 | ||
159 | removes whole RAR related code from compilation. | ||
160 | |||
161 | DISABLE_RAR_COMPRESS=1 | ||
162 | removes "not fully free" code of RAR decompression codecs from compilation. | ||
163 | |||
164 | RAR decompression codecs in 7-Zip code has some additional license restrictions, | ||
165 | that can be treated as not fully compatible with free-software licenses. | ||
166 | DISABLE_RAR_COMPRESS=1 allows to exclude such "not-fully-free" RAR code from compilation. | ||
167 | if DISABLE_RAR_COMPRESS=1 is specified, 7-zip will not be able to decompress files | ||
168 | from rar archives, but 7-zip still will be able to open rar archives to get list of | ||
169 | files or to extract files that are stored without compression. | ||
170 | if DISABLE_RAR=1 is specified, 7-zip will not be able to work with RAR archives. | ||
171 | |||
172 | |||
173 | |||
174 | 7-Zip and p7zip | ||
175 | =============== | ||
176 | Now there are two different ports of 7-Zip for Linux/macOS: | ||
177 | |||
178 | 1) p7zip - another port of 7-Zip for Linux, made by an independent developer. | ||
179 | The latest version of p7zip now is 16.02, and that p7zip 16.02 is outdated now. | ||
180 | http://sourceforge.net/projects/p7zip/ | ||
181 | |||
182 | 2) 7-Zip for Linux/macOS - this package - it's new code with all changes from latest 7-Zip for Windows. | ||
183 | |||
184 | These two ports are not identical. | ||
185 | Note also that some Linux specific things can be implemented better in p7zip than in new 7-Zip for Linux. | ||
186 | |||
187 | |||
188 | |||
189 | |||
190 | Notes: | ||
191 | ------ | ||
192 | 7-Zip consists of COM modules (DLL files). | ||
193 | But 7-Zip doesn't use standard COM interfaces for creating objects. | ||
194 | Look at | ||
195 | 7zip\UI\Client7z folder for example of using DLL files of 7-Zip. | ||
196 | Some DLL files can use other DLL files from 7-Zip. | ||
197 | If you don't like it, you must use standalone version of DLL. | ||
198 | To compile standalone version of DLL you must include all used parts | ||
199 | to project and define some defs. | ||
200 | For example, 7zip\Bundles\Format7z is a standalone version of 7z.dll | ||
201 | that works with 7z format. So you can use such DLL in your project | ||
202 | without additional DLL files. | ||
203 | |||
204 | |||
205 | Description of 7-Zip sources package | ||
206 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
207 | |||
208 | DOC Documentation | ||
209 | --- | ||
210 | 7zFormat.txt - 7z format description | ||
211 | copying.txt - GNU LGPL license | ||
212 | unRarLicense.txt - License for unRAR part of source code | ||
213 | src-history.txt - Sources history | ||
214 | Methods.txt - Compression method IDs | ||
215 | readme.txt - Readme file | ||
216 | lzma.txt - LZMA compression description | ||
217 | 7zip.nsi - installer script for NSIS | ||
218 | 7zip.wix - installer script for WIX | ||
219 | |||
220 | |||
221 | Asm - Source code in Assembler : optimized code for CRC, SHA, AES, LZMA decoding. | ||
222 | |||
223 | C - Source code in C | ||
224 | |||
225 | CPP - Source code in C++ | ||
226 | |||
227 | Common common files for C++ projects | ||
228 | |||
229 | Windows common files for Windows related code | ||
230 | |||
231 | 7zip | ||
232 | |||
233 | Common Common modules for 7-zip | ||
234 | |||
235 | Archive files related to archiving | ||
236 | |||
237 | Bundle Modules that are bundles of other modules (files) | ||
238 | |||
239 | Alone 7za.exe: Standalone version of 7-Zip console that supports only 7z/xz/cab/zip/gzip/bzip2/tar. | ||
240 | Alone2 7zz.exe: Standalone version of 7-Zip console that supports all formats. | ||
241 | Alone7z 7zr.exe: Standalone version of 7-Zip console that supports only 7z (reduced version) | ||
242 | Fm Standalone version of 7-Zip File Manager | ||
243 | Format7z 7za.dll: .7z support | ||
244 | Format7zExtract 7zxa.dll: .7z support, extracting only | ||
245 | Format7zR 7zr.dll: .7z support, reduced version | ||
246 | Format7zExtractR 7zxr.dll: .7z support, reduced version, extracting only | ||
247 | Format7zF 7z.dll: all formats | ||
248 | LzmaCon lzma.exe: LZMA compression/decompression | ||
249 | SFXCon 7zCon.sfx: Console 7z SFX module | ||
250 | SFXWin 7z.sfx: Windows 7z SFX module | ||
251 | SFXSetup 7zS.sfx: Windows 7z SFX module for Installers | ||
252 | |||
253 | Compress files for compression/decompression | ||
254 | |||
255 | Crypto files for encryption / decompression | ||
256 | |||
257 | UI | ||
258 | |||
259 | Agent Intermediary modules for FAR plugin and Explorer plugin | ||
260 | Client7z Test application for 7za.dll | ||
261 | Common Common UI files | ||
262 | Console 7z.exe : Console version | ||
263 | Explorer 7-zip.dll: 7-Zip Shell extension | ||
264 | Far plugin for Far Manager | ||
265 | FileManager 7zFM.exe: 7-Zip File Manager | ||
266 | GUI 7zG.exe: 7-Zip GUI version | ||
267 | |||
268 | |||
269 | |||
270 | --- | ||
271 | Igor Pavlov | ||
272 | http://www.7-zip.org | ||