Skip to content

Commit 7bbd807

Browse files
Merge pull request #157 from Jatin-Shihora/main
Added missing requirements for Zen Desktop build and added a new section for common fixes
2 parents 2e2cf77 + de189e5 commit 7bbd807

File tree

1 file changed

+65
-1
lines changed

1 file changed

+65
-1
lines changed

content/building.md

+65-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
---
22
title: Building Zen Browser 📦
3-
lastmod: 2024-09-25
3+
lastmod: 2025-04-03
44
---
55

66
We've taken the time to make building Zen Browser as easy as possible, independent of your operating system or technical knowledge.
77

8+
#### Basic Requirements
9+
10+
The following resources are essential for a successful build. Without them, you will encounter unnecessary build failures:
11+
12+
- Disk Space: Keep _30GB_ of free space on the disk (the build process is resource-intensive).
13+
- Git ([Download here](https://git-scm.com/downloads)) – Required for version control and managing source code.
14+
- Python 3 ([Download here](https://www.python.org/downloads/)) – Needed for running build scripts and automation tools.
15+
- Node.js 21+ ([Download here](https://nodejs.org/)) – Required for managing dependencies and running JavaScript-based tools.
16+
- MozillaBuild ([Download here](https://wiki.mozilla.org/MozillaBuild)) – Required for `mach` and Gecko compilation.
17+
- 7-Zip ([Download here](https://www.7-zip.org/download.html)) – Used to extract Firefox source archives.
18+
- sccache ([Download here](https://github.com/mozilla/sccache/releases)) – A caching tool that speeds up rebuilds by storing compiled objects.
19+
20+
> **Note:** If you're using Windows, ensure that all the basic software requirements are added to the `PATH` variable.
21+
822
> [!failure]
923
> We cannot provide support if a build fails. Please understand this before proceeding with the following steps.
1024
@@ -59,6 +73,16 @@ npm run build
5973

6074
This command compiles the source code and creates the necessary files for running Zen Browser.
6175

76+
- If your changes are only in JavaScript, you can run the following command after completing the first build for faster rebuilds:
77+
78+
```bash
79+
npm run build:ui
80+
```
81+
82+
This skips unnecessary compilation steps and only rebuilds the UI components.
83+
84+
For changes in other languages or core functionality, you should always run the full build using `npm run build` after every code change.
85+
6286
## Step 6: Run the Browser
6387

6488
After building the browser, you can start it using:
@@ -68,3 +92,43 @@ npm start
6892
```
6993

7094
This command launches the browser, allowing you to see your changes in action.
95+
96+
---
97+
---
98+
99+
### Common Build Errors & Fixes
100+
101+
#### Q: "mach not found" error?
102+
> Install [MozillaBuild](https://wiki.mozilla.org/MozillaBuild), add it to your `PATH`, then restart your terminal.
103+
104+
#### Q: "7z" or "7-Zip" missing during build?
105+
> Download [7-Zip](https://www.7-zip.org/), add it to your `PATH`, then restart your terminal.
106+
107+
#### Q: "Unsupported Microsoft Visual Studio version" or build failing for similar reasons on Windows?
108+
> Ensure Visual Studio is installed with the "Desktop development with C++" workload and Windows 10/11 SDK.
109+
110+
#### Q: Build stuck or freezing?
111+
> Try running with fewer threads:
112+
> ```sh
113+
> npm run build -- --jobs 2
114+
> ```
115+
116+
#### Q: "Git submodule" errors after cloning?
117+
> Run:
118+
> ```sh
119+
> git submodule update --init --recursive
120+
> ```
121+
122+
#### Q: "npm run init" fails?
123+
> Manually bootstrap the project:
124+
> ```sh
125+
> npm run bootstrap
126+
> ```
127+
128+
#### Q: "zen.exe" not found after build?
129+
> Perform a clean rebuild:
130+
> ```sh
131+
> npm run reset-ff && npm run init && npm run build
132+
> ```
133+
134+
---

0 commit comments

Comments
 (0)