Skip to content

Commit c09de09

Browse files
committed
Updated building guide with detailed requirements and common errors
1 parent c60657b commit c09de09

File tree

6 files changed

+75
-5
lines changed

6 files changed

+75
-5
lines changed

content/docs/benchmarks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Benchmarks
3-
icon: BarChartIcon
3+
icon: ChartNoAxesCombined
44
---
55
import { Callout } from 'fumadocs-ui/components/callout';
66

content/docs/faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: FAQ
3-
icon: Home
3+
icon: CircleHelp
44
---
55

66
import { Callout } from 'fumadocs-ui/components/callout';

content/docs/guides/building.mdx

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
11
---
22
title: Building Zen Browser
33
---
4+
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
45

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

7-
<Callout type="info">
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+
<Callout>
21+
If you're using Windows, ensure that all the basic software requirements are added to the `PATH` variable.
22+
</Callout>
23+
24+
<Callout type="warn">
825
We cannot provide support if a build fails. Please understand this before proceeding with the following steps.
926
</Callout>
1027

@@ -13,11 +30,12 @@ We cannot provide support if a build fails. Please understand this before procee
1330
First, you need to clone the Zen Browser repository to your local machine. This will create a local copy of the project that you can work on.
1431

1532
```bash
16-
git clone https://github.com/zen-browser/desktop.git --recurse-submodules
33+
git clone https://github.com/zen-browser/desktop.git --recurse-submodules --depth 10
1734
cd desktop
1835
```
1936

2037
- **`--recurse-submodules`**: This flag ensures that all submodules are cloned along with the main project. Zen Browser relies on several submodules, so this step is essential.
38+
- **`--depth 10`**: This makes sure you dont download the entire git history, it would take a long time otherwise due to that we used to store compiled binaries on the repository.
2139

2240
## Step 2: Install Dependencies
2341

@@ -59,6 +77,16 @@ npm run build
5977

6078
This command compiles the source code and creates the necessary files for running Zen Browser.
6179

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

6492
After building the browser, you can start it using:
@@ -68,3 +96,40 @@ npm start
6896
```
6997

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

content/docs/guides/meta.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Guides",
3+
"icon": "Bookmark"
4+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"title": "Mods Registry",
3-
"icon": "SwatchBookIcon"
3+
"icon": "SwatchBook"
44
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"title": "User Manual",
3+
"icon": "BookText",
34
"pages": [
45
"...",
56
"webpanel"

0 commit comments

Comments
 (0)