-
Notifications
You must be signed in to change notification settings - Fork 975
(setup) Windows build guide
When you edit this guide, please edit https://community.brave.com/t/how-to-build-brave-on-windows/10175 as well to keep it updated, thanks!
Git for Windows is a good choice because it includes MinGW (Minimalist GNU for Windows)
Besides supporting all of the git commands you know and love, you can import your dotfiles from Mac or Linux to help make dev easier.
NOTE: Please choose the LTS version and also make sure you pick the right architecture for your machine (32-bit vs 64-bit)
Once the install is complete, you'll want to open a new command window to run the following:
npm config set python python2.7
npm config set msvs_version 2015 --global
You can either use Visual Studio or the standalone C++ tools.
Download the Standalone compiler, libraries and scripts installer.
You can find VS 2015 available in MSDN and possibly elsewhere.
When the installer comes up, here are the items you need installed:
-
everything under
Programming Languages > Visual C++
- Windows 10 SDK via
Universal Windows App Development Tools > Windows 10 SDK
- Windows 8.1 SDK via
Windows 8.1 and Windows Phone 8.0/8.1 Tools > Tools and Windows SDKs
This install will take a while. Kick it off, take a break, and come back later to see how it's going.
This installs Visual C++ Build Tools and Python 2.7
npm install --global --production windows-build-tools
This is required for secp256k1-node
It's very important that you:
- Download (32-bit or 64-bit, depending on your system)
- don't change the install path. It must be left as the default.
- We have filed an issue with secp256k1-node which you can see here so we can use a newer version from here.
NOTE: If you don't install this properly, you'll see an error like this when running npm install:
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [C:\Users\brian\Documents\GitHub \browser-laptop\node_modules\secp256k1\build\secp256k1.vcxproj]
Make sure to add the install path to your PATH environment variable (default path is C:\Python27
). A system reboot is required if the path has been added manually.
Here's a link with more information if you're not familiar with environment variables.
Let's create the following system variables:
-
CHANNEL
=dev
-
GYP_MSVS_VERSION
=2015
Let's check the system PATH variable. Changes shouldn't be required if you followed the installer properly, but it can't hurt to check. If the values are NOT already there, you'll want to append:
- The PATH for your Python install (default is
C:\Python27
) - The PATH for your nodejs install (default is
C:\Program Files\nodejs\
)
Depending on your system, a reboot may be required for these variable changes to take effect.
Open a new command window (make sure it's the shell you picked for your Git client). Pick a parent directory on your machine and run a git clone
.
cd ~\Documents\GitHub\
# For beta testers:
git clone --depth 1 https://github.com/brave/browser-laptop
# For devs over HTTPS:
git clone https://github.com/brave/browser-laptop
# For devs over SSH:
git clone git@github.com:brave/browser-laptop.git
cd browser-laptop
NOTE: If you're following this guide, please don't build Brave using Cygwin. Cygwin includes C/C++ compilers which causes complications when tasks are run which compile code (ex: npm install
). Cygwin is fine to use for editing in vim, navigation, and git.
Before running this step, you may consider increasing the buffer size of your window, in case any errors show up. You can do this by right-clicking in the title and click properties (or for msys2 based shells like Git for Windows, right click > options, windows).
In your command window, at the root of the project (the browser-laptop folder), run:
npm install
This step will take a while. It's going to install modules needed, some which need to be compiled from source.
You need to open two command line windows.
- Window 1
npm run watch
- Window 2
npm start
insecurity test
Vertical Side Tabs Tab Suspender