From 59f4e1d375fb605bddccca0027bf0c142e771a26 Mon Sep 17 00:00:00 2001 From: Putta Khunchalee Date: Sun, 24 Nov 2024 00:27:43 +0700 Subject: [PATCH] Adds build instructions (#1136) --- docs/building.md | 21 +++++++++++++++++++++ docs/index.md | 6 ++++++ mkdocs.yml | 1 + 3 files changed, 28 insertions(+) create mode 100644 docs/building.md diff --git a/docs/building.md b/docs/building.md new file mode 100644 index 000000000..7f875d1e6 --- /dev/null +++ b/docs/building.md @@ -0,0 +1,21 @@ +# Building + +The first step is getting Obliteration source code from our [repository](https://github.com/obhq/obliteration). If you plan to make some contributions you need to fork our repository by clicking on Fork on the top right before proceed and all instructions after this need to be done on your forked repository instead of our repository. + +Once ready click on Code button on the top right then copy the HTTPS URL from the popup (or SSH if you know how to use it). Then open a terminal (or Command Prompt) on the directory where you want to download the source code into. You can use `cd` command to change to the directory you want. Then run the following command: + +```sh +git clone URL +``` + +Replace `URL` with the URL you have copied. + +## Build + +Change into the directory you just downloaded with `cd` and run the following command: + +```sh +python3 build.py -r +``` + +Remove `-r` to disable optimization if you plan to make some contributions so the debugger will work properly. Build outputs will be placed in `dist` directory. diff --git a/docs/index.md b/docs/index.md index 41230d5a4..83928a07b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,6 +4,10 @@ In order to build Obliteration from source make sure you have the following prer ## All platforms +- [Git](https://git-scm.com) + - On Windows make sure you have `Run Git from the Windows Command Prompt` selected when installing + - On Linux it is likely your distro already provided a package for this + - On macOS you can install from Homebrew - [Rust on the latest stable channel](https://www.rust-lang.org/tools/install) - Make sure you install using `rustup` - On Linux your distro may provide a package for this @@ -19,3 +23,5 @@ In order to build Obliteration from source make sure you have the following prer - Rust installer should already install this for you so you should not need to install this manually - Community edition are free for open-source project - `Desktop development with C++` workload is required +- [Windows Terminal](https://aka.ms/terminal) + - You can use a classic `Command Prompt` but make sure you enable [ANSI escape sequences](https://stackoverflow.com/q/16755142/1829232) diff --git a/mkdocs.yml b/mkdocs.yml index 8e6a1cf44..9a9fb7bfc 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,7 @@ site_name: Obliteration Developer nav: - 'index.md' + - 'building.md' - 'Reference': - 'Kernel': 'https://dev.obliteration.net/crates/obkrnl' repo_url: https://github.com/obhq/obliteration