mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-06 20:55:31 +02:00
docs(rtd): move documentation to read the docs
This commit is contained in:
parent
0bd0d39f41
commit
bc15d8950f
44 changed files with 580 additions and 752 deletions
|
@ -1,11 +1,3 @@
|
|||
---
|
||||
layout: default
|
||||
title: Building From Source
|
||||
parent: Setup
|
||||
nav_order: 2
|
||||
permalink: /setup/building-from-source
|
||||
---
|
||||
|
||||
# Building From Source
|
||||
|
||||
Building GodotXterm from source consists of four steps:
|
||||
|
@ -15,7 +7,9 @@ Building GodotXterm from source consists of four steps:
|
|||
3. Compile godot-cpp using scons.
|
||||
4. Compile libtsm and libgodotxterm using scons.
|
||||
|
||||
This plugin follows the same format as the [GDNative C++ Example](https://docs.godotengine.org/en/stable/tutorials/plugins/gdnative/gdnative-cpp-example.html). So if you can compile that example then you are 90% of the way there. The main difference is using CMake to compile libuv.
|
||||
:::{hint}
|
||||
This plugin follows the same format as the {{ '[GDNative C++ Example]({}/tutorials/plugins/gdnative/gdnative-cpp-example.html)'.format(godot_docs) }}. So if you can compile that example then you are 90% of the way there. The main difference is using CMake to compile libuv.
|
||||
:::
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
@ -28,31 +22,28 @@ This plugin follows the same format as the [GDNative C++ Example](https://docs.g
|
|||
|
||||
Run the build script in `addons/godot-xterm/native`:
|
||||
|
||||
```
|
||||
```sh
|
||||
cd addons/godot_xterm/native
|
||||
./build.sh
|
||||
```
|
||||
|
||||
On Windows you can use `git-bash` to run this script.
|
||||
:::{tip}
|
||||
On Windows, you can use `git-bash` to run this script.
|
||||
Provided the dependencies above are installed then it should "just work™".
|
||||
:::
|
||||
|
||||
Binaries for your platform will be installed in `addons/godot_xterm/native/bin`.
|
||||
|
||||
The [build.sh] script accepts args `--target` which can be set to `debug` (default) or `release` and `--disable-pty` to compile only the dependencies of [Terminal] node and not [PTY] node (even on platforms that support it).
|
||||
The {{ '[build.sh]({}/addons/godot_xterm/native/build.sh)'.format(repo) }} script accepts args `--target` which can be set to `debug` (default) or `release` and `--disable-pty` to compile only the dependencies of {{Terminal}} node and not {{PTY}} node (even on platforms that support it).
|
||||
|
||||
### The Hard Way
|
||||
## The Hard Way
|
||||
|
||||
If you are having trouble compiling, study the [build.sh] script and the GitHub actions workflow in [main.yml] to see what commands are being run and how dependencies are installed. You can also dig into the [SConstruct](https://github.com/lihop/godot-xterm/blob/stable/addons/godot_xterm/native/SConstruct) file, and don't forget to refer back to the [GDNative C++ Example](https://docs.godotengine.org/en/stable/tutorials/plugins/gdnative/gdnative-cpp-example.html).
|
||||
If you are having trouble compiling, study the {{ '[build.sh]({}/addons/godot_xterm/native/build.sh)'.format(repo) }} script and the GitHub actions workflow in {{ [main.yml]({}/.github/workflows/main.yml)'.format(repo) }} to see what commands are being run and how dependencies are installed. You can also dig into the {{ '[SConstruct]({}/addons/godot_xterm/native/SConstruct)'.format(repo) }} file, and don't forget to refer back to the {{ '[GDNative C++ Example]({}/tutorials/plugins/gdnative/gdnative-cpp-example.html)'.format(godot_docs) }}.
|
||||
|
||||
Also feel free to open a new discussion in the [discussions](https://github.com/lihop/godot-xterm/discussions) section of this project.
|
||||
Also feel free to open a new discussion in the [discussions](https://github.com/lihop/godot-xterm/discussions) section of the project repo.
|
||||
|
||||
## Cross Compiling
|
||||
|
||||
Although the SConstruct file contains some logic for cross-compiling, it has never been tested. If you want compile for other platforms consider forking this repo and then pushing your changes to GitHub. The workflow defined in [main.yml] will run and build the library for all supported platforms (Linux, macOS, Windows, and HTML5).
|
||||
Although the SConstruct file contains some logic for cross-compiling, it has never been tested. If you want compile for other platforms consider forking this repo and then pushing your changes to GitHub. The workflow defined in {{ '[main.yml]({}/.github/workflows/main.yml)'.format(repo) }} will run and build the library for all supported platforms (Linux, macOS, Windows, and HTML5).
|
||||
|
||||
Additionally, If you have `docker` and `docker-compose` installed, the [build.sh] script will also try to build the HTML5 binary inside a docker container and copy them to `addons/godot_xterm/native/bin`.
|
||||
|
||||
[PTY]: /api/pty
|
||||
[Terminal]: /api/terminal
|
||||
[build.sh]: https://github.com/lihop/godot-xterm/blob/stable/addons/godot_xterm/native/build.sh
|
||||
[main.yml]: https://github.com/lihop/godot-xterm/blob/stable/.github/workflows/main.yml
|
||||
Additionally, If you have `docker` and `docker-compose` installed, the {{ '[build.sh]({}/addons/godot_xterm/native/build.sh)'.format(repo) }} script will also try to build the HTML5 binary inside a docker container and copy them to `addons/godot_xterm/native/bin`.
|
||||
|
|
7
docs/setup/index.md
Normal file
7
docs/setup/index.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Setup
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 1
|
||||
precompiled_binaries
|
||||
building_from_source
|
||||
```
|
|
@ -1,50 +1,38 @@
|
|||
---
|
||||
layout: default
|
||||
title: Precompiled Binaries
|
||||
parent: Setup
|
||||
nav_order: 1
|
||||
permalink: /setup/precompiled-binaries
|
||||
---
|
||||
|
||||
# Precompiled Binaries
|
||||
|
||||
{: .no_toc }
|
||||
|
||||
Installing GodotXterm using precompiled binaries means that you wont be required
|
||||
Installing GodotXterm using precompiled binaries means that you won't be required
|
||||
to use a C/C++ compiler to build the project from source. It is simply a matter
|
||||
of copying files to the correct location in your project. These files can be
|
||||
installed from several sources:
|
||||
installed from several sources.
|
||||
|
||||
1. TOC
|
||||
{:toc}
|
||||
|
||||
**Note:** precompiled binaries will only work with certain versions of Godot
|
||||
:::{warning}
|
||||
Precompiled binaries will only work with certain versions of Godot
|
||||
(usually the current stable release). If you need binaries for a different or
|
||||
custom Godot version, or want to make modifications to the C/C++ code, please
|
||||
refer to the section on [Building From Source](/setup/building-from-source).
|
||||
:::
|
||||
|
||||
## Godot Asset Library
|
||||
|
||||
GodotXterm can be installed from the [Godot Asset Library](https://godotengine.org/asset-library/asset/1007).
|
||||
See the [Godot Asset Library documentation](https://docs.godotengine.org/en/stable/community/asset_library/using_assetlib.html) for more info on how to use it.
|
||||
See the {{ '[Godot Asset Library documentation]({}/community/asset_library/using_assetlib.html)'.format(godot_docs) }} for more info on how to use it.
|
||||
|
||||
## Gd-plug Plugin Manager
|
||||
|
||||
If you are using the gd-plug plugin manager you can add the following line to your `plug.gd` file:
|
||||
|
||||
```
|
||||
plug("lihop/godot-xterm-dist", {commit = "a1131a562e8e8f0c57b0ddf61de7fa015d463ba0", include = ["addons/godot_xterm"]})
|
||||
plug("lihop/godot-xterm-dist", {tag = "2.2.1", include = ["addons/godot_xterm"]})
|
||||
```
|
||||
|
||||
Replace the commit hash with the hash of the GodotXterm version you wish to install.
|
||||
See [tags](https://github.com/lihop/godot-xterm-dist/tags) for a list of versions and their corresponding commit hashes.
|
||||
Replace the tag with that of the GodotXterm version you wish to install (see [tags](https://github.com/lihop/godot-xterm-dist/tags)).
|
||||
See the [gd-plug documentation](https://github.com/imjp94/gd-plug/blob/master/README.md) for more info on how to use it.
|
||||
|
||||
## Manual Installation
|
||||
|
||||
Alternatively, GodotXterm can be installed manually in two steps:
|
||||
|
||||
1. Copy the [`addons/godot_xterm`](https://github.com/lihop/godot-xterm/tree/stable/addons/godot_xterm) directory to the `addons` directory of your Godot project.
|
||||
1. Copy the {{ '[`addons/godot_xterm`]({}/addons/godot_xterm)'.format(repo) }} directory to the `addons` directory of your Godot project.
|
||||
2. Copy the GDNative binaries into `addons/godot_xterm/native/bin` directory.
|
||||
|
||||
The easiest way to obtain the GDNative binaries is to download them from [the Releases page](https://github.com/lihop/godot-xterm/releases).
|
||||
|
@ -58,5 +46,7 @@ After this your `addons/godot_xterm/native/bin` directory should contain the fol
|
|||
- `libgodot-xterm.windows.32.dll`
|
||||
- `libgodot-xterm.windows.64.dll`
|
||||
|
||||
:::{note}
|
||||
Debug builds are also available on the Releases page if required.
|
||||
Download and unzip `libgodot-xterm-debug.zip` instead of `libgodot-xterm-release.zip` to the same location.
|
||||
:::
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
title: Setup
|
||||
nav_order: 2
|
||||
has_children: true
|
||||
permalink: /setup
|
||||
---
|
||||
|
||||
# Setup
|
Loading…
Add table
Add a link
Reference in a new issue