diff --git a/content/docs/benchmarks.mdx b/content/docs/benchmarks.mdx index 104937f..2239e3e 100644 --- a/content/docs/benchmarks.mdx +++ b/content/docs/benchmarks.mdx @@ -1,6 +1,6 @@ --- title: Benchmarks -icon: BarChartIcon +icon: ChartNoAxesCombined --- import { Callout } from 'fumadocs-ui/components/callout'; diff --git a/content/docs/faq.mdx b/content/docs/faq.mdx index 658286d..1d57bd9 100644 --- a/content/docs/faq.mdx +++ b/content/docs/faq.mdx @@ -1,6 +1,6 @@ --- title: FAQ -icon: Home +icon: CircleHelp --- import { Callout } from 'fumadocs-ui/components/callout'; diff --git a/content/docs/guides/building.mdx b/content/docs/guides/building.mdx index 72ace73..adcb31a 100644 --- a/content/docs/guides/building.mdx +++ b/content/docs/guides/building.mdx @@ -1,10 +1,27 @@ --- title: Building Zen Browser --- +import { Accordion, Accordions } from 'fumadocs-ui/components/accordion'; We've taken the time to make building Zen Browser as easy as possible, independent of your operating system or technical knowledge. - +#### Basic Requirements + +The following resources are essential for a successful build. Without them, you will encounter unnecessary build failures: + +- Disk Space: Keep _30GB_ of free space on the disk (the build process is resource-intensive). +- Git ([Download here](https://git-scm.com/downloads)) – Required for version control and managing source code. +- Python 3 ([Download here](https://www.python.org/downloads/)) – Needed for running build scripts and automation tools. +- Node.js 21+ ([Download here](https://nodejs.org/)) – Required for managing dependencies and running JavaScript-based tools. +- MozillaBuild ([Download here](https://wiki.mozilla.org/MozillaBuild)) – Required for `mach` and Gecko compilation. +- 7-Zip ([Download here](https://www.7-zip.org/download.html)) – Used to extract Firefox source archives. +- sccache ([Download here](https://github.com/mozilla/sccache/releases)) – A caching tool that speeds up rebuilds by storing compiled objects. + + +If you're using Windows, ensure that all the basic software requirements are added to the `PATH` variable. + + + We cannot provide support if a build fails. Please understand this before proceeding with the following steps. @@ -13,11 +30,12 @@ We cannot provide support if a build fails. Please understand this before procee 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. ```bash -git clone https://github.com/zen-browser/desktop.git --recurse-submodules +git clone https://github.com/zen-browser/desktop.git --recurse-submodules --depth 10 cd desktop ``` - **`--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. +- **`--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. ## Step 2: Install Dependencies @@ -59,6 +77,16 @@ npm run build This command compiles the source code and creates the necessary files for running Zen Browser. +- If your changes are only in JavaScript, you can run the following command after completing the first build for faster rebuilds: + + ```bash + npm run build:ui + ``` + + This skips unnecessary compilation steps and only rebuilds the UI components. + +For changes in other languages or core functionality, you should always run the full build using `npm run build` after every code change. + ## Step 6: Run the Browser After building the browser, you can start it using: @@ -68,3 +96,40 @@ npm start ``` This command launches the browser, allowing you to see your changes in action. + +--- + +### Common Build Errors & Fixes + +#### Q: "mach not found" error? +> Install [MozillaBuild](https://wiki.mozilla.org/MozillaBuild), add it to your `PATH`, then restart your terminal. + +#### Q: "7z" or "7-Zip" missing during build? +> Download [7-Zip](https://www.7-zip.org/), add it to your `PATH`, then restart your terminal. + +#### Q: "Unsupported Microsoft Visual Studio version" or build failing for similar reasons on Windows? +> Ensure Visual Studio is installed with the "Desktop development with C++" workload and Windows 10/11 SDK. + +#### Q: Build stuck or freezing? +> Try running with fewer threads: +> ```sh +> npm run build -- --jobs 2 +> ``` + +#### Q: "Git submodule" errors after cloning? +> Run: +> ```sh +> git submodule update --init --recursive +> ``` + +#### Q: "npm run init" fails? +> Manually bootstrap the project: +> ```sh +> npm run bootstrap +> ``` + +#### Q: "zen.exe" not found after build? +> Perform a clean rebuild: +> ```sh +> npm run reset-ff && npm run init && npm run build +> ``` diff --git a/content/docs/guides/meta.json b/content/docs/guides/meta.json new file mode 100644 index 0000000..8dec28e --- /dev/null +++ b/content/docs/guides/meta.json @@ -0,0 +1,4 @@ +{ + "name": "Guides", + "icon": "Bookmark" +} \ No newline at end of file diff --git a/content/docs/themes-store/meta.json b/content/docs/themes-store/meta.json index a0b9dd2..d920551 100644 --- a/content/docs/themes-store/meta.json +++ b/content/docs/themes-store/meta.json @@ -1,4 +1,4 @@ { "title": "Mods Registry", - "icon": "SwatchBookIcon" + "icon": "SwatchBook" } \ No newline at end of file diff --git a/content/docs/user-manual/.meta.json b/content/docs/user-manual/meta.json similarity index 76% rename from content/docs/user-manual/.meta.json rename to content/docs/user-manual/meta.json index 9129151..5a28e1b 100644 --- a/content/docs/user-manual/.meta.json +++ b/content/docs/user-manual/meta.json @@ -1,5 +1,6 @@ { "title": "User Manual", + "icon": "BookText", "pages": [ "...", "webpanel"