Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions docs/documentation/building-from-source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
9 changes: 1 addition & 8 deletions docs/documentation/building-from-source/v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down Expand Up @@ -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)
Expand Down