17-Zip 24.09 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 Now there are 3 programs that supports MASM syntax in Linux. 104' 'Asmc Macro Assembler, JWasm, and UASM. Note that JWasm now doesn't support some 105 cpu instructions used in 7-Zip. 106 So you must install Asmc Macro Assembler in Linux or UASM, if you want to compile 107 fastest version of 7-Zip x86 and x86-64: 108 https://github.com/nidud/asmc 109 https://github.com/Terraspace/UASM 110 111 1122) arm64: GNU assembler for ARM64 with preprocessor. 113 That systax is supported by GCC and CLANG for ARM64. 114 115There are different binaries that can be compiled from 7-Zip source. 116There are 2 main files in folder for compiling: 117 makefile - that can be used for compiling Windows version of 7-Zip with nmake command 118 makefile.gcc - that can be used for compiling Linux/macOS versions of 7-Zip or Windows version 119 with MINGW (GCC) with make command. 120 121At first you must change the current folder to folder that contains `makefile.gcc`: 122 123 cd CPP/7zip/Bundles/Alone2 124 125Then you can compile `makefile.gcc` with the command: 126 127 make -j -f makefile.gcc 128 129Also there are additional "*.mak" files in folder "CPP/7zip/" that can be used to compile 1307-Zip binaries with optimized code and optimzing options. 131 132To compile with GCC without assembler: 133 cd CPP/7zip/Bundles/Alone2 134 make -j -f ../../cmpl_gcc.mak 135 136To compile with CLANG without assembler: 137 make -j -f ../../cmpl_clang.mak 138 139To compile 7-Zip for x86-64 with asmc assembler: 140 make -j -f ../../cmpl_gcc_x64.mak 141 142To compile 7-Zip for arm64 with assembler: 143 make -j -f ../../cmpl_gcc_arm64.mak 144 145To compile 7-Zip for arm64 for macOS: 146 make -j -f ../../cmpl_mac_arm64.mak 147 148Also you can change some compiler options in the "mak" files: 149 cmpl_gcc.mak 150 var_gcc.mak 151 warn_gcc.mak 152 153makefile.gcc supports some variables that can change compile options 154 155USE_JWASM=1 156 use JWasm assembler instead of Asmc. 157 Note that JWasm doesn't support AES instructions. So AES code from C version AesOpt.c 158 will be used instead of assembler code from AesOpt.asm. 159 160If you want to use UASM for x86-64 compiling, you can change 7zip_gcc.mak, 161or send IS_X64=1 USE_ASM=1 MY_ASM="$UASM" to make command calling: 162 UASM="$PWD/GccUnixR/uasm" 163 cd "7zip-src/CPP/7zip/Bundles/Alone2" 164 make -f makefile.gcc -j IS_X64=1 USE_ASM=1 MY_ASM="$UASM" 165 166 167DISABLE_RAR=1 168 removes whole RAR related code from compilation. 169 170DISABLE_RAR_COMPRESS=1 171 removes "not fully free" code of RAR decompression codecs from compilation. 172 173RAR decompression codecs in 7-Zip code has some additional license restrictions, 174that can be treated as not fully compatible with free-software licenses. 175DISABLE_RAR_COMPRESS=1 allows to exclude such "not-fully-free" RAR code from compilation. 176if DISABLE_RAR_COMPRESS=1 is specified, 7-zip will not be able to decompress files 177from rar archives, but 7-zip still will be able to open rar archives to get list of 178files or to extract files that are stored without compression. 179if DISABLE_RAR=1 is specified, 7-zip will not be able to work with RAR archives. 180 181 182 1837-Zip and p7zip 184=============== 185Now there are two different ports of 7-Zip for Linux/macOS: 186 1871) p7zip - another port of 7-Zip for Linux, made by an independent developer. 188 The latest version of p7zip now is 16.02, and that p7zip 16.02 is outdated now. 189 http://sourceforge.net/projects/p7zip/ 190 1912) 7-Zip for Linux/macOS - this package - it's new code with all changes from latest 7-Zip for Windows. 192 193These two ports are not identical. 194Note also that some Linux specific things can be implemented better in p7zip than in new 7-Zip for Linux. 195 196 197 198 199Notes: 200------ 2017-Zip consists of COM modules (DLL files). 202But 7-Zip doesn't use standard COM interfaces for creating objects. 203Look at 2047zip\UI\Client7z folder for example of using DLL files of 7-Zip. 205Some DLL files can use other DLL files from 7-Zip. 206If you don't like it, you must use standalone version of DLL. 207To compile standalone version of DLL you must include all used parts 208to project and define some defs. 209For example, 7zip\Bundles\Format7z is a standalone version of 7z.dll 210that works with 7z format. So you can use such DLL in your project 211without additional DLL files. 212 213 214Description of 7-Zip sources package 215~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 216 217DOC Documentation 218--- 219 readme.txt - Readme file 220 src-history.txt - Sources history 221 7zC.txt - 7z ANSI-C Decoder description 222 7zFormat.txt - 7z format description 223 Methods.txt - Compression method IDs 224 lzma.txt - LZMA compression description 225 License.txt - license information 226 copying.txt - GNU LGPL license 227 unRarLicense.txt - License for unRAR part of source code 228 7zip.wxs - installer script for WIX 229 7zip.hhp - html help project file 230 231Asm - Source code in Assembler : optimized code for CRC, SHA, AES, LZMA decoding. 232 233C - Source code in C 234 235CPP - Source code in C++ 236 237Common common files for C++ projects 238 239Windows common files for Windows related code 240 2417zip 242 243 Common Common modules for 7-zip 244 245 Archive files related to archiving 246 247 Bundle Modules that are bundles of other modules (files) 248 249 Alone 7za.exe: Standalone version of 7-Zip console that supports only 7z/xz/cab/zip/gzip/bzip2/tar. 250 Alone2 7zz.exe: Standalone version of 7-Zip console that supports all formats. 251 Alone7z 7zr.exe: Standalone version of 7-Zip console that supports only 7z (reduced version) 252 Fm Standalone version of 7-Zip File Manager 253 Format7z 7za.dll: .7z support 254 Format7zExtract 7zxa.dll: .7z support, extracting only 255 Format7zR 7zr.dll: .7z support, reduced version 256 Format7zExtractR 7zxr.dll: .7z support, reduced version, extracting only 257 Format7zF 7z.dll: all formats 258 LzmaCon lzma.exe: LZMA compression/decompression 259 SFXCon 7zCon.sfx: Console 7z SFX module 260 SFXWin 7z.sfx: Windows 7z SFX module 261 SFXSetup 7zS.sfx: Windows 7z SFX module for Installers 262 263 Compress files for compression / decompression 264 265 Crypto files for encryption / decryption 266 267 UI 268 269 Agent Intermediary modules for FAR plugin and Explorer plugin 270 Client7z Test application for 7za.dll 271 Common Common UI files 272 Console 7z.exe : Console version 273 Explorer 7-zip.dll: 7-Zip Shell extension 274 Far plugin for Far Manager 275 FileManager 7zFM.exe: 7-Zip File Manager 276 GUI 7zG.exe: 7-Zip GUI version 277 278 279 280--- 281Igor Pavlov 282http://www.7-zip.org 283