Version 2 (modified by Joel, 6 years ago) (diff)

Bold the file names

Compiling Eraser from Source

Get the necessary dependencies

Though Eraser (core) is written in C#, several sub-projects are written in C++ (the Shell Extension and Setup bootstrapper) and therefore dependencies do exist.

Proceed to install what must be installed (notably Visual Studio and WiX)

Build the Dependencies

The only thing which must be built as of now is the 7-zip SDK.

  1. Extract the 7-zip LZMA SDK to a folder (hereafter referred to as %7z%)
  2. Go to %7z%\C\Archive\7z and open 7z_C.dsw
    1. If you are using Visual Studio 7 and later you'll be asked to upgrade your project, do so.
    2. After upgrading, change the Output Directory and Intermediate Directories to ..\..\Lib\$(ConfigurationName)
    3. Then reset everything under C++\Output Files to their defaults (Inherit from Project Defaults)
    4. Go to C++\Code Generation and set Runtime Library to Multi-threaded (/MT)
  3. Build the Release version
    • Now, you should end up with a few object files and 7z_C.lib in %7z%\C\Lib\Release
  4. Add %7z% to the Compiler include path and %7z%\C\Lib\Release to the Linker library path

Build Eraser

  1. Download the Eraser sources (instructions here:; hereafter referred to as %Eraser%
  2. Open %Eraser%\Eraser.sln
    • Users of the Express Editions will be asked whether they want to open it as a C# project or a C++ project, open the C# project first.
  3. Build Eraser (Release)
    • Visual Studio will ask for a Key File. Either you create your own (for private builds) or disable signing altogether.
    • Binaries should exist in %Eraser%\bin\Release

Build the Installer

Todo: What about those without VS Standard+?

Build the MSI

  1. Open %Eraser%\Installer\Installer.wixproj
  2. Change the Target Platform to x86
  3. Build the Installer project
  4. Change the Target Platform to x64
  5. Build the Installer project
    1. At this point %Eraser%\bin\Installer\x86\Release and %Eraser%\bin\Installer\x64\Release should each contain an Eraser.msi
    2. Copy each to %Eraser%\bin\Installer\Eraser (architecture).msi, i.e. %Eraser%\bin\Installer\Eraser (x64).msi
    3. Extract the .NET framework file, copy dotnetfx35.exe to %Eraser%\bin\Installer
    4. Use 7-zip to create an archive, Installer.7z with the two Eraser.msi's and dotnetfx35.exe, maintaining their file names

Build the Bootstrapper

  1. Open %Eraser%\Installer\Bootstrapper\Bootstrapper.vcproj
  2. Build the bootstrapper
    • The bootstrapper should be created at %Eraser%\bin\Release\Bootstrapper.exe
  3. Integrate the bootstrapper and the package
    • Open a command prompt, cd to %Eraser%\bin\Installer, and run this command:
      ..\Release\Bootstrapper.exe --integrate Installer.7z --out Installer.exe

Congratulations, you have a ready-to-go installer!