From 7a9cc5325b35854f3548ee677dd8e60734fc9fdd Mon Sep 17 00:00:00 2001 From: Nicolas Merget Date: Fri, 5 Dec 2025 21:34:43 +0100 Subject: [PATCH] chore: update build from source files --- .../building-from-source/index.md | 31 +++++++++++++++++++ docs/documentation/building-from-source/v8.md | 9 +----- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/docs/documentation/building-from-source/index.md b/docs/documentation/building-from-source/index.md index ea85d6e..e9d430c 100644 --- a/docs/documentation/building-from-source/index.md +++ b/docs/documentation/building-from-source/index.md @@ -8,6 +8,37 @@ The following runtimes are available: - [`JavaScriptCore`](javascript-core.md) is the built-in JavaScript engine for WebKit and bundled with macOS/iOS. - [`Web`](web.md) is only suitable when building for Web. All scripts run on the host browser JS VM rather than an additional interpreter. +## Setup GodotJS in Godot Engine + +### 1. Clone the source code of godot: +````shell +git clone git@github.com:godotengine/godot.git +```` + +or + +````shell +git clone https://github.com/godotengine/godot.git +```` + +### 2. Checkout the correct version branch + +Look at this [list](https://github.com/godotjs/GodotJS/blob/main/.github/workflows/runner.yml#L36) to see supported Godot versions. + +### 3. Clone GodotJS module + +Clone this module and put it into ``godot/modules/GodotJS``: + +````shell +git clone git@github.com:godotjs/GodotJS.git godot/modules/GodotJS +```` + +or + +````shell +git clone https://github.com/godotjs/GodotJS.git godot/modules/GodotJS +```` + ## Supported Platforms | | v8 | quickjs | quickjs-ng | Web Builtin JS | JavaScriptCore | diff --git a/docs/documentation/building-from-source/v8.md b/docs/documentation/building-from-source/v8.md index 6104978..5e538b0 100644 --- a/docs/documentation/building-from-source/v8.md +++ b/docs/documentation/building-from-source/v8.md @@ -123,12 +123,7 @@ use_rtti = true ## Setup V8 in GodotJS Follow the instructions below to set it up: -**STEP 1:** Download or clone the repo into the `modules` directory of your Godot engine source: - -```sh -cd YourGodotEngineSource/modules -git clone https://github.com/ialex32x/GodotJS.git -``` +**STEP 1:** Follow the instructions in [Build from Source](index.md#setup-godotjs-in-godot-engine) to setup `GodotJS` module in the source code of `Godot Engine`. **STEP 2:** Put `v8` headers and libraries into `GodotJS`, or directly download the prebuilt `v8` from [GodotJS-Dependencies](https://github.com/ialex32x/GodotJS-Dependencies/releases): @@ -164,8 +159,6 @@ The module directroy structure looks like this: ┣━ ... ``` -The currently used version of `v8` is `12.4.254.21`. - **STEP 3:** Compile and launch `Godot Editor`. Then, you can create a Godot project in TypeScript/JavaScript: * [Create-a-TypeScript-Project-from-Scratch](Create-a-TypeScript-Project-from-Scratch) * [Create-a-JavaScript-Project-from-Scratch](Create-a-JavaScript-Project-from-Scratch)