aboutsummaryrefslogtreecommitdiff
path: root/DOC/readme.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--DOC/readme.txt272
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 @@
17-Zip 21.07 Sources
2-------------------
3
47-Zip is a file archiver for Windows.
5
67-Zip Copyright (C) 1999-2021 Igor Pavlov.
7
8
9License Info
10------------
11
127-Zip is free software distributed under the GNU LGPL
13(except for unRar code).
14read License.txt for more infomation about license.
15
16Notes about unRAR license:
17
18Please 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
28In brief it means:
291) 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.
322) You can fix bugs in source code and use compiled fixed version.
333) You can not use unRAR sources to re-create the RAR compression algorithm.
34
35
36LZMA SDK
37--------
38
39This package also contains some files from LZMA SDK
40You can download LZMA SDK from:
41 http://www.7-zip.org/sdk.html
42LZMA SDK is written and placed in the public domain by Igor Pavlov.
43
44
45How to compile in Windows
46-------------------------
47
48To compile the sources to Windows binaries you need Visual Studio compiler and/or Windows SDK.
49You can use latest Windows Studio 2017/2019 to compile binaries for x86, x64 and arm64 platforms.
50Also 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
58If you use MSVC6, specify also Platform SDK directories at top of directories lists:
59Tools / Options / Directories
60 - Include files
61 - Library files
62
63Also you need Microsoft Macro Assembler:
64 - ml.exe for x86
65 - ml64.exe for x64
66You can use ml.exe from Windows SDK for Windows Vista or some later versions.
67
68There are two ways to compile 7-Zip binaries:
691) via makefile in command line.
702) via dsp file in Visual Studio.
71
72The dsp file compiling can be used for development and debug purposes.
73The final 7-Zip binaries are compiled via makefiles, that provide best
74optimization options.
75
76
77How to compile with makefile
78----------------------------
79
80Some macronames can be defined for compiling with makefile:
81
82PLATFORM
83 with possible values: x64, x86, arm64, arm, ia64
84
85OLD_COMPILER
86 for old VC compiler, like MSCV 6.0.
87
88MY_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
94Compiling 7-Zip for Unix/Linux
95------------------------------
96
97There are several otpions to compile 7-Zip with different compilers: gcc and clang.
98Also 7-Zip code contains two versions for some critical parts of code: in C and in Assembeler.
99So if you compile the version with Assembeler code, you will get faster 7-Zip binary.
100
1017-Zip's assembler code uses the following syntax for different platforms:
102
1031) 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
1112) 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
114There are different binaries that can be compiled from 7-Zip source.
115There 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
119At first you must change the current folder to folder that contains `makefile.gcc`:
120
121 cd CPP/7zip/Bundles/Alone2
122
123Then you can compile `makefile.gcc` with the command:
124
125 make -j -f makefile.gcc
126
127Also there are additional "*.mak" files in folder "CPP/7zip/" that can be used to compile
1287-Zip binaries with optimized code and optimzing options.
129
130To compile with GCC without assembler:
131 cd CPP/7zip/Bundles/Alone2
132 make -j -f ../../cmpl_gcc.mak
133
134To compile with CLANG without assembler:
135 make -j -f ../../cmpl_clang.mak
136
137To compile 7-Zip for x86-64 with asmc assembler:
138 make -j -f ../../cmpl_gcc_x64.mak
139
140To compile 7-Zip for arm64 with assembler:
141 make -j -f ../../cmpl_gcc_arm64.mak
142
143To compile 7-Zip for arm64 for macOS:
144 make -j -f ../../cmpl_mac_arm64.mak
145
146Also you can change some compiler options in the mak files:
147 cmpl_gcc.mak
148 var_gcc.mak
149 warn_gcc.mak
150
151makefile.gcc supports some variables that can change compile options
152
153USE_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
158DISABLE_RAR=1
159 removes whole RAR related code from compilation.
160
161DISABLE_RAR_COMPRESS=1
162 removes "not fully free" code of RAR decompression codecs from compilation.
163
164RAR decompression codecs in 7-Zip code has some additional license restrictions,
165that can be treated as not fully compatible with free-software licenses.
166DISABLE_RAR_COMPRESS=1 allows to exclude such "not-fully-free" RAR code from compilation.
167if DISABLE_RAR_COMPRESS=1 is specified, 7-zip will not be able to decompress files
168from rar archives, but 7-zip still will be able to open rar archives to get list of
169files or to extract files that are stored without compression.
170if DISABLE_RAR=1 is specified, 7-zip will not be able to work with RAR archives.
171
172
173
1747-Zip and p7zip
175===============
176Now there are two different ports of 7-Zip for Linux/macOS:
177
1781) 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
1822) 7-Zip for Linux/macOS - this package - it's new code with all changes from latest 7-Zip for Windows.
183
184These two ports are not identical.
185Note also that some Linux specific things can be implemented better in p7zip than in new 7-Zip for Linux.
186
187
188
189
190Notes:
191------
1927-Zip consists of COM modules (DLL files).
193But 7-Zip doesn't use standard COM interfaces for creating objects.
194Look at
1957zip\UI\Client7z folder for example of using DLL files of 7-Zip.
196Some DLL files can use other DLL files from 7-Zip.
197If you don't like it, you must use standalone version of DLL.
198To compile standalone version of DLL you must include all used parts
199to project and define some defs.
200For example, 7zip\Bundles\Format7z is a standalone version of 7z.dll
201that works with 7z format. So you can use such DLL in your project
202without additional DLL files.
203
204
205Description of 7-Zip sources package
206~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
207
208DOC 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
221Asm - Source code in Assembler : optimized code for CRC, SHA, AES, LZMA decoding.
222
223C - Source code in C
224
225CPP - Source code in C++
226
227Common common files for C++ projects
228
229Windows common files for Windows related code
230
2317zip
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---
271Igor Pavlov
272http://www.7-zip.org