Get the tools
Currently Prelude only compiles on Windows. It uses a subset of Chromium source, which requires the same tools to build:
- depot_tools
- Visual Studio 2017
- Windows 10 SDK
This post outlines the steps to setup these tools. It is assumed that the system is running Windows 7 or above, preferably with latest update.
1. Download depot_tools and unzip it
For simplicity, assume it’s unzipped to c:\depot_tools
2. Add the depot_tools directory to the PATH environment variable
- Open Control Panel -> System and Security -> System
- In System Properties dialog, click Environment Variables…
- Add the full path of depot_tools to PATH environment variable:
3. Setup other environment variables
On Environment Variables dialog window, click New… to create a new environment variable - DEPOT_TOOLS_WIN_TOOLCHAIN, and set its value to 0
4. Setup gclient
Open a console, go to depot_tools directory and run gclient:
depot_tools provides essential tools such as python (v2.7.6) and git (v2.15.1.windows.2). Running gclient without any arguments downloads these tools. Once you add depot_tools directory to PATH, these tools are ready to use. You may open a console and run: where python to confirm that Windows knows where to find Python executable.
Ideally, when python or git is invoked, the corresponding batch file (shown above) forward the call to the actual executables under depot_tools\win_toos-2_7_6_bin. However, it’s common that other versions of python or git had already been installed before depot_tools is setup. Chromium requires that the batch files in depot_tools take precedence over local executables.
As seen in figure below, Python v2.7.14 has been installed and where command returns the batch file before v2.7.14 executable. This can be done by moving c:\depot_tools before c:\Python27 in PATH environment variable. Prelude does not have this restriction, i.e., using previously installed python and git instead of the bundled one in depot_tools should still work.
5. Install Visual Studio 2017 (15.7.2 or higher)
Community version works fine. Make sure following components are installed:
- VC++ 2017 v141 toolset
- Windows 10 SDK (10.0.17134 or higher)
- Visual C++ ATL support
- MFC and ATL support
As of Dec 2018, latest Visual Studio 2017 available is v15.9. Have multiple versions of Visual Studio and Windows SDK can cause issues. So it’s recommended to install only one version (15.7.2 or higher) on your develop machine.
6. Add Debugging Tools for Windows SDK
Open Control Panel and go to Programs and Festures, selet Windows Software Development Kit then click Change. It will run the SDK setup again that allow you to add debugging tools.
Now we have setup all the tools, next we will build Prelude from scratch.
Home