17-Zip 24.05 Sources 2------------------- 3 47-Zip is a file archiver for Windows. 5 67-Zip Copyright (C) 1999-2024 Igor Pavlov. 7 8 9License Info 10------------ 11 127-Zip is free software distributed under the GNU LGPL 13(except for unRar code). Also some code 14is licensed under the "BSD 3-clause License". 15Read "License.txt" for more infomation about license. 16 17Notes about unRAR license: 18 19Please check main restriction from unRar license: 20 21 2. The unRAR sources may be used in any software to handle RAR 22 archives without limitations free of charge, but cannot be used 23 to re-create the RAR compression algorithm, which is proprietary. 24 Distribution of modified unRAR sources in separate form or as a 25 part of other software is permitted, provided that it is clearly 26 stated in the documentation and source comments that the code may 27 not be used to develop a RAR (WinRAR) compatible archiver. 28 29In brief it means: 301) You can compile and use compiled files under GNU LGPL rules, since 31 unRAR license almost has no restrictions for compiled files. 32 You can link these compiled files to LGPL programs. 332) You can fix bugs in source code and use compiled fixed version. 343) You can not use unRAR sources to re-create the RAR compression algorithm. 35 36 37LZMA SDK 38-------- 39 40This package also contains some files from LZMA SDK 41You can download LZMA SDK from: 42 http://www.7-zip.org/sdk.html 43LZMA SDK is written and placed in the public domain by Igor Pavlov. 44 45 46How to compile in Windows 47------------------------- 48 49To compile the sources to Windows binaries you need Visual Studio compiler and/or Windows SDK. 50You can use latest Windows Studio 2017/2019/2022 to compile binaries for x86, x64, arm64 and arm platforms. 51Also you can use old compilers for some platforms: 52 x86 : Visual C++ 6.0 with Platform SDK 53 x64 : Windows Server 2003 R2 Platform SDK 54 ia64 (itanium) : Windows Server 2003 R2 Platform SDK 55 arm for Windows CE : Standard SDK for Windows CE 5.0 56 57If you use MSVC6, specify also Platform SDK directories at top of directories lists: 58Tools / Options / Directories 59 - Include files 60 - Library files 61 62Also you need Microsoft Macro Assembler: 63 - ml.exe for x86 64 - ml64.exe for x64 65You can use ml.exe from Windows SDK for Windows Vista or some later versions. 66 67There are two ways to compile 7-Zip binaries: 681) via makefile in command line. 692) via dsp file in Visual Studio. 70 71The dsp file compiling can be used for development and debug purposes. 72All final 7-Zip binaries are compiled via makefiles, that provide best 73optimization options. 74 75 76How to compile with makefile 77---------------------------- 78 79Some macronames can be defined for compiling with makefile: 80 81PLATFORM 82 with possible values: x64, x86, arm64, arm, ia64 83 84OLD_COMPILER 85 for old VC compiler, like MSCV 6.0. 86 87MY_DYNAMIC_LINK 88 for dynamic linking to the run-time library (msvcrt.dll). 89 The default makefile option is static linking to the run-time library. 90 91 92 93Compiling 7-Zip for Unix/Linux 94------------------------------ 95 96There are several options to compile 7-Zip with different compilers: gcc and clang. 97Also 7-Zip code contains two versions for some parts of code: in C and in Assembeler. 98So if you compile the version with Assembeler code, you will get faster 7-Zip binary. 99 1007-Zip's assembler code uses the following syntax for different platforms: 101 1021) x86 and x86-64 (AMD64): MASM syntax. 103 There are 2 programs that supports MASM syntax in Linux. 104' 'Asmc Macro Assembler and JWasm. But JWasm now doesn't support some 105 cpu instructions used in 7-Zip. 106 So you must install Asmc Macro Assembler in Linux, if you want to compile fastest version 107 of 7-Zip x86 and x86-64: 108 https://github.com/nidud/asmc 109 1102) arm64: GNU assembler for ARM64 with preprocessor. 111 That systax is supported by GCC and CLANG for ARM64. 112 113There are different binaries that can be compiled from 7-Zip source. 114There are 2 main files in folder for compiling: 115 makefile - that can be used for compiling Windows version of 7-Zip with nmake command 116 makefile.gcc - that can be used for compiling Linux/macOS versions of 7-Zip or Windows version 117 with MINGW (GCC) 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 readme.txt - Readme file 211 src-history.txt - Sources history 212 7zC.txt - 7z ANSI-C Decoder description 213 7zFormat.txt - 7z format description 214 Methods.txt - Compression method IDs 215 lzma.txt - LZMA compression description 216 License.txt - license information 217 copying.txt - GNU LGPL license 218 unRarLicense.txt - License for unRAR part of source code 219 7zip.wxs - installer script for WIX 220 7zip.hhp - html help project file 221 222Asm - Source code in Assembler : optimized code for CRC, SHA, AES, LZMA decoding. 223 224C - Source code in C 225 226CPP - Source code in C++ 227 228Common common files for C++ projects 229 230Windows common files for Windows related code 231 2327zip 233 234 Common Common modules for 7-zip 235 236 Archive files related to archiving 237 238 Bundle Modules that are bundles of other modules (files) 239 240 Alone 7za.exe: Standalone version of 7-Zip console that supports only 7z/xz/cab/zip/gzip/bzip2/tar. 241 Alone2 7zz.exe: Standalone version of 7-Zip console that supports all formats. 242 Alone7z 7zr.exe: Standalone version of 7-Zip console that supports only 7z (reduced version) 243 Fm Standalone version of 7-Zip File Manager 244 Format7z 7za.dll: .7z support 245 Format7zExtract 7zxa.dll: .7z support, extracting only 246 Format7zR 7zr.dll: .7z support, reduced version 247 Format7zExtractR 7zxr.dll: .7z support, reduced version, extracting only 248 Format7zF 7z.dll: all formats 249 LzmaCon lzma.exe: LZMA compression/decompression 250 SFXCon 7zCon.sfx: Console 7z SFX module 251 SFXWin 7z.sfx: Windows 7z SFX module 252 SFXSetup 7zS.sfx: Windows 7z SFX module for Installers 253 254 Compress files for compression / decompression 255 256 Crypto files for encryption / decryption 257 258 UI 259 260 Agent Intermediary modules for FAR plugin and Explorer plugin 261 Client7z Test application for 7za.dll 262 Common Common UI files 263 Console 7z.exe : Console version 264 Explorer 7-zip.dll: 7-Zip Shell extension 265 Far plugin for Far Manager 266 FileManager 7zFM.exe: 7-Zip File Manager 267 GUI 7zG.exe: 7-Zip GUI version 268 269 270 271--- 272Igor Pavlov 273http://www.7-zip.org 274