This document is a step-by-step tutorial for building 7-Zip from source on Microsoft Windows.
Part A: Requirements
Microsoft Windows XP, Home Edition or Professional Edition
Microsoft Visual C++ 6.0 Professional Edition
Or Visual Studio 6 Professional Edition
Or Visual Studio 6 Enterprise Edition
Microsoft Visual Studio 6 Service Pack 5 (vs6sp5.exe)
Microsoft Visual C++ Processor Pack for Service Pack 5 (vcpp5.exe)
Microsoft Platform SDK February 2003 (PSDK-FULL.*.cab or the MSDN 2426.2 disc.)
The Visual C++ Processor Pack, which installs MASM 6.15 for Visual C++ 6.0, is incompatible with Standard Editions and Service Pack 6. Platform SDK releases after February 2003 are also incompatible.
Part B: Compiler Installation
Hint: Create an empty C:\WINDOWS\msjava.dll file to prevent Visual Studio 6 from installing the obsolete Microsoft JVM.
Install Visual C++ 6.0 with the Typical configuration.
Run Visual C++ 6.0 once to finalize the installation.
Install vs6sp5.exe
Install vcpp5.exe
Extract the Platform SDK to a new PDSDK-FULL folder. Don’t use the web installer.
Install PSDK-FULL\setup\CoreSDK-x86.msi
Install PSDK-FULL\setup\PSDK-x86.msi
Optionally install PSDK-FULL\setup\Dbg-x86.msi
Click Start\All Programs\Microsoft Platform SDK February 2003\Visual Studio Registration\Register PSDK Directories with Visual Studio
The search paths in Visual Studio will be incorrect if you skip step 2.
Part C: Build Instructions
1. Unpack the 7z922.tar.bz2 source tarball to the C:\7z922 folder.
2. Disable the AesOpt.asm code, which requires Visual Studio 2008 Service Pack 1 or later. Edit the C:\7z922\CPP\7zip\Aes.mak file and change it to this:
I recently needed to rebuild 7-Zip, but had some difficulty, and so wrote these instructions. The original document is at: https://docs.google.com/document/d/1jdVmxk5eUdNcSXPc3i-gI5gFITNSg_a5fdYEspKPuBE/edit?usp=sharing
For 32-bit 7-Zip Builds on Windows XP
This document is a step-by-step tutorial for building 7-Zip from source on Microsoft Windows.
Part A: Requirements
vs6sp5.exe
)vcpp5.exe
)PSDK-FULL.*.cab
or the MSDN 2426.2 disc.)The Visual C++ Processor Pack, which installs MASM 6.15 for Visual C++ 6.0, is incompatible with Standard Editions and Service Pack 6. Platform SDK releases after February 2003 are also incompatible.
Part B: Compiler Installation
Hint: Create an empty
C:\WINDOWS\msjava.dll
file to prevent Visual Studio 6 from installing the obsolete Microsoft JVM.vs6sp5.exe
vcpp5.exe
PDSDK-FULL
folder. Don’t use the web installer.PSDK-FULL\setup\CoreSDK-x86.msi
PSDK-FULL\setup\PSDK-x86.msi
PSDK-FULL\setup\Dbg-x86.msi
Start\All Programs\Microsoft Platform SDK February 2003\Visual Studio Registration\Register PSDK Directories with Visual Studio
The search paths in Visual Studio will be incorrect if you skip step 2.
Part C: Build Instructions
1. Unpack the
7z922.tar.bz2
source tarball to theC:\7z922
folder.2. Disable the
AesOpt.asm
code, which requires Visual Studio 2008 Service Pack 1 or later. Edit theC:\7z922\CPP\7zip\Aes.mak
file and change it to this:3. Click
Start\All Programs\Microsoft Platform SDK February 2003\Open Build Environment Window\Windows XP 32-bit Build Environment\Set Windows XP 32-bit Build Environment (Retail)
4. At the command prompt, change directory into the Bundles folder:
5. And compile the entire 7-Zip project like this:
Build products are put in the
\i386
folder of each bundle. (eg:C:\7z922\CPP\7zip\Bundles\Fm\i386\7zFM.exe
)Note that the top-level makefile does not have a clean rule.