Skip to content

Commit 7a9cc53

Browse files
committed
chore: update build from source files
1 parent e341989 commit 7a9cc53

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

docs/documentation/building-from-source/index.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,37 @@ The following runtimes are available:
88
- [`JavaScriptCore`](javascript-core.md) is the built-in JavaScript engine for WebKit and bundled with macOS/iOS.
99
- [`Web`](web.md) is only suitable when building for Web. All scripts run on the host browser JS VM rather than an additional interpreter.
1010

11+
## Setup GodotJS in Godot Engine
12+
13+
### 1. Clone the source code of godot:
14+
````shell
15+
git clone git@github.com:godotengine/godot.git
16+
````
17+
18+
or
19+
20+
````shell
21+
git clone https://github.com/godotengine/godot.git
22+
````
23+
24+
### 2. Checkout the correct version branch
25+
26+
Look at this [list](https://github.com/godotjs/GodotJS/blob/main/.github/workflows/runner.yml#L36) to see supported Godot versions.
27+
28+
### 3. Clone GodotJS module
29+
30+
Clone this module and put it into ``godot/modules/GodotJS``:
31+
32+
````shell
33+
git clone git@github.com:godotjs/GodotJS.git godot/modules/GodotJS
34+
````
35+
36+
or
37+
38+
````shell
39+
git clone https://github.com/godotjs/GodotJS.git godot/modules/GodotJS
40+
````
41+
1142
## Supported Platforms
1243

1344
| | v8 | quickjs | quickjs-ng | Web Builtin JS | JavaScriptCore |

docs/documentation/building-from-source/v8.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,7 @@ use_rtti = true
123123
## Setup V8 in GodotJS
124124
Follow the instructions below to set it up:
125125

126-
**STEP 1:** Download or clone the repo into the `modules` directory of your Godot engine source:
127-
128-
```sh
129-
cd YourGodotEngineSource/modules
130-
git clone https://github.com/ialex32x/GodotJS.git
131-
```
126+
**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`.
132127

133128
**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):
134129

@@ -164,8 +159,6 @@ The module directroy structure looks like this:
164159
┣━ ...
165160
```
166161

167-
The currently used version of `v8` is `12.4.254.21`.
168-
169162
**STEP 3:** Compile and launch `Godot Editor`. Then, you can create a Godot project in TypeScript/JavaScript:
170163
* [Create-a-TypeScript-Project-from-Scratch](Create-a-TypeScript-Project-from-Scratch)
171164
* [Create-a-JavaScript-Project-from-Scratch](Create-a-JavaScript-Project-from-Scratch)

0 commit comments

Comments
 (0)