mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-13 22:10:25 +01:00
Auto-format files using new pre-commit config
This commit is contained in:
parent
58f4f8f216
commit
002e7aacc7
22 changed files with 408 additions and 403 deletions
1
.github/actions/import-assets/action.yml
vendored
1
.github/actions/import-assets/action.yml
vendored
|
@ -14,4 +14,3 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
# HACK: See https://github.com/godotengine/godot-proposals/issues/1362.
|
# HACK: See https://github.com/godotengine/godot-proposals/issues/1362.
|
||||||
(for i in {1..4}; do godot --editor --headless & sleep 5 && .github/actions/import-assets/monitor_import.sh; done) || true
|
(for i in {1..4}; do godot --editor --headless & sleep 5 && .github/actions/import-assets/monitor_import.sh; done) || true
|
||||||
|
|
||||||
|
|
44
.github/workflows/main.yml
vendored
44
.github/workflows/main.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: 'Build and Test'
|
name: "Build and Test"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -7,12 +7,12 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
import_assets:
|
import_assets:
|
||||||
name: 'Import Assets'
|
name: "Import Assets"
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04 ]
|
os: [ubuntu-22.04]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Import assets
|
- name: Import assets
|
||||||
|
@ -26,13 +26,13 @@ jobs:
|
||||||
path: .godot/
|
path: .godot/
|
||||||
|
|
||||||
build_docker:
|
build_docker:
|
||||||
name: 'Build Docker'
|
name: "Build Docker"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
target: [ release, debug ]
|
target: [release, debug]
|
||||||
arch: [ x86_64, x86_32 ]
|
arch: [x86_64, x86_32]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
@ -68,14 +68,14 @@ jobs:
|
||||||
|
|
||||||
build_native:
|
build_native:
|
||||||
if: false # Temporarily disabled.
|
if: false # Temporarily disabled.
|
||||||
name: 'Build Native'
|
name: "Build Native"
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ javascript, osx, windows ]
|
platform: [javascript, osx, windows]
|
||||||
target: [ release, debug ]
|
target: [release, debug]
|
||||||
bits: [ 64, 32 ]
|
bits: [64, 32]
|
||||||
include:
|
include:
|
||||||
- platform: javascript
|
- platform: javascript
|
||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
|
@ -138,7 +138,7 @@ jobs:
|
||||||
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
||||||
uses: jwlawson/actions-setup-cmake@v1
|
uses: jwlawson/actions-setup-cmake@v1
|
||||||
with:
|
with:
|
||||||
cmake-version: '3.23.2'
|
cmake-version: "3.23.2"
|
||||||
use-32bit: ${{ matrix.bits == 32 && matrix.os == 'windows-2022' }}
|
use-32bit: ${{ matrix.bits == 32 && matrix.os == 'windows-2022' }}
|
||||||
- name: Build libuv
|
- name: Build libuv
|
||||||
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
||||||
|
@ -181,8 +181,8 @@ jobs:
|
||||||
|
|
||||||
html5_export:
|
html5_export:
|
||||||
if: false # Temporarily disabled.
|
if: false # Temporarily disabled.
|
||||||
name: 'HTML5 Export'
|
name: "HTML5 Export"
|
||||||
needs: [ build_docker, build_native ]
|
needs: [build_docker, build_native]
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -230,14 +230,14 @@ jobs:
|
||||||
path: docs/demo
|
path: docs/demo
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: 'Test'
|
name: "Test"
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-22.04 ] #, macos-12, windows-2022 ] Temporarily disabled.
|
os: [ubuntu-22.04] #, macos-12, windows-2022 ] Temporarily disabled.
|
||||||
bits: [ 64, 32 ]
|
bits: [64, 32]
|
||||||
godot_version: [ 'v4.2.1-stable' ]
|
godot_version: ["v4.2.1-stable"]
|
||||||
exclude:
|
exclude:
|
||||||
- os: macos-12
|
- os: macos-12
|
||||||
bits: 32
|
bits: 32
|
||||||
|
@ -277,8 +277,8 @@ jobs:
|
||||||
run: godot -s addons/gut/gut_cmdln.gd -gconfig=test/.gutconfig.unix.json
|
run: godot -s addons/gut/gut_cmdln.gd -gconfig=test/.gutconfig.unix.json
|
||||||
|
|
||||||
delete_imports:
|
delete_imports:
|
||||||
name: 'Delete Imports'
|
name: "Delete Imports"
|
||||||
needs: [ test ]
|
needs: [test]
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: geekyeggo/delete-artifact@v2
|
- uses: geekyeggo/delete-artifact@v2
|
||||||
|
@ -287,7 +287,7 @@ jobs:
|
||||||
|
|
||||||
# Git archive should only include addons/godot_xterm directory.
|
# Git archive should only include addons/godot_xterm directory.
|
||||||
check-archive:
|
check-archive:
|
||||||
name: 'Check Archive'
|
name: "Check Archive"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -321,14 +321,14 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
check-code-format:
|
check-code-format:
|
||||||
name: 'Check Code Format'
|
name: "Check Code Format"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
cache: 'pip'
|
cache: "pip"
|
||||||
- name: Install python dependencies
|
- name: Install python dependencies
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
- name: GDScript format check
|
- name: GDScript format check
|
||||||
|
|
|
@ -1,27 +1,32 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
|
||||||
## [Unreleased](https://github.com/lihop/godot-xterm/compare/v2.2.0...HEAD)
|
## [Unreleased](https://github.com/lihop/godot-xterm/compare/v2.2.0...HEAD)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Custom export templates are no longer required when exporting to HTML5 from Godot v3.5.x.
|
- Custom export templates are no longer required when exporting to HTML5 from Godot v3.5.x.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
- Removed support for deprecated theme item names.
|
- Removed support for deprecated theme item names.
|
||||||
- Removed deprecated get_master() method of PTY.
|
- Removed deprecated get_master() method of PTY.
|
||||||
- Removed deprecated cols/rows properties of Terminal.
|
- Removed deprecated cols/rows properties of Terminal.
|
||||||
|
|
||||||
|
|
||||||
## [v2.2.0](https://github.com/lihop/godot-xterm/compare/v2.1.1...v2.2.0) - 2022-08-26
|
## [v2.2.0](https://github.com/lihop/godot-xterm/compare/v2.1.1...v2.2.0) - 2022-08-26
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Changed theme item names to be compatible with Godot version 3.5 (no spaces),
|
- Changed theme item names to be compatible with Godot version 3.5 (no spaces),
|
||||||
consistent with other theme item names (snake_case), and to match the ANSI
|
consistent with other theme item names (snake_case), and to match the ANSI
|
||||||
color names listed on the [ANSI escape code Wikipedia page](https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit).
|
color names listed on the [ANSI escape code Wikipedia page](https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit).
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
- Deprecated the `cols` and `rows` properties of Terminal.
|
- Deprecated the `cols` and `rows` properties of Terminal.
|
||||||
These properties will be removed in a future version.
|
These properties will be removed in a future version.
|
||||||
Please use `get_cols()` and `get_rows()` instead.
|
Please use `get_cols()` and `get_rows()` instead.
|
||||||
|
@ -58,21 +63,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- `Bold Italic` -> `bold_italic`
|
- `Bold Italic` -> `bold_italic`
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- Removed support for Godot version 3.3.x. GodotXterm *might* still work with this
|
|
||||||
|
- Removed support for Godot version 3.3.x. GodotXterm _might_ still work with this
|
||||||
version of Godot if compiled with the correct version of godot-cpp, but compatibility
|
version of Godot if compiled with the correct version of godot-cpp, but compatibility
|
||||||
is no longer officially supported.
|
is no longer officially supported.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [#57][i57]: Screen is no longer erased on resize when using a custom theme.
|
- [#57][i57]: Screen is no longer erased on resize when using a custom theme.
|
||||||
- [#58][i58]: Screen is no longer erased when changing themes.
|
- [#58][i58]: Screen is no longer erased when changing themes.
|
||||||
|
|
||||||
[i57]: https://github.com/lihop/godot-xterm/issues/57
|
[i57]: https://github.com/lihop/godot-xterm/issues/57
|
||||||
[i58]: https://github.com/lihop/godot-xterm/issues/58
|
[i58]: https://github.com/lihop/godot-xterm/issues/58
|
||||||
|
|
||||||
|
|
||||||
## [v2.1.1](https://github.com/lihop/godot-xterm/compare/v2.1.0...v2.1.1) - 2022-08-15
|
## [v2.1.1](https://github.com/lihop/godot-xterm/compare/v2.1.0...v2.1.1) - 2022-08-15
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
Thanks to [@ConteZero](https://github.com/contezero) for reporting and providing feedback on these issues:
|
Thanks to [@ConteZero](https://github.com/contezero) for reporting and providing feedback on these issues:
|
||||||
|
|
||||||
- [#51][i51]: Fixed issue where terminal would lose focus on Tab/Arrow key presses
|
- [#51][i51]: Fixed issue where terminal would lose focus on Tab/Arrow key presses
|
||||||
when in a scene with other input nodes.
|
when in a scene with other input nodes.
|
||||||
- [#53][i53]: Fixed issue where terminal was not updating when there was no GUI
|
- [#53][i53]: Fixed issue where terminal was not updating when there was no GUI
|
||||||
|
@ -85,14 +94,16 @@ Thanks to [@ConteZero](https://github.com/contezero) for reporting and providing
|
||||||
[i55]: https://github.com/lihop/godot-xterm/issues/55
|
[i55]: https://github.com/lihop/godot-xterm/issues/55
|
||||||
[i56]: https://github.com/lihop/godot-xterm/issues/56
|
[i56]: https://github.com/lihop/godot-xterm/issues/56
|
||||||
|
|
||||||
|
|
||||||
## [v2.1.0](https://github.com/lihop/godot-xterm/compare/v2.0.0...v2.1.0) - 2022-07-11
|
## [v2.1.0](https://github.com/lihop/godot-xterm/compare/v2.0.0...v2.1.0) - 2022-07-11
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Support for macOS universal (x86_64/arm64) binaries. The macOS binary
|
- Support for macOS universal (x86_64/arm64) binaries. The macOS binary
|
||||||
`libgodot-xterm.osx.64.dylib` is now a universal binary that runs natively
|
`libgodot-xterm.osx.64.dylib` is now a universal binary that runs natively
|
||||||
on both x86_64 and arm64.
|
on both x86_64 and arm64.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Linux binaries now support systems with older GLIBC versions. By building the
|
- Linux binaries now support systems with older GLIBC versions. By building the
|
||||||
binaries inside a docker container with an older GLIBC version, the minimum
|
binaries inside a docker container with an older GLIBC version, the minimum
|
||||||
required GLIBC version is now 2.17 which was released in 2012.
|
required GLIBC version is now 2.17 which was released in 2012.
|
||||||
|
@ -105,11 +116,13 @@ Thanks to [@ConteZero](https://github.com/contezero) for reporting and providing
|
||||||
pressing modifier keys in isolation or when copying text using the shortcut Ctrl+Shift+C.
|
pressing modifier keys in isolation or when copying text using the shortcut Ctrl+Shift+C.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
- Removed custom TerminalSettings Resource type.
|
- Removed custom TerminalSettings Resource type.
|
||||||
This Resource was not being used but would still appear in every resource dropdown.
|
This Resource was not being used but would still appear in every resource dropdown.
|
||||||
(Related issue [godotengine/godot#24643](https://github.com/godotengine/godot/issues/24643)).
|
(Related issue [godotengine/godot#24643](https://github.com/godotengine/godot/issues/24643)).
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- The `kill()` method of unix PTY node can now be called without error as the underlying
|
- The `kill()` method of unix PTY node can now be called without error as the underlying
|
||||||
`pipe.close()` method of the gdnative library is now registered.
|
`pipe.close()` method of the gdnative library is now registered.
|
||||||
- Fixed 'Condition "!obj" is true.' error that would often print to console when
|
- Fixed 'Condition "!obj" is true.' error that would often print to console when
|
||||||
|
@ -120,9 +133,10 @@ Thanks to [@ConteZero](https://github.com/contezero) for reporting and providing
|
||||||
sometimes occur when closing a Terminal after calling `write()` but before VisualServer
|
sometimes occur when closing a Terminal after calling `write()` but before VisualServer
|
||||||
had finished drawing the current frame.
|
had finished drawing the current frame.
|
||||||
|
|
||||||
|
|
||||||
## [v2.0.0](https://github.com/lihop/godot-xterm/compare/v1.2.1...v2.0.0) - 2021-07-25
|
## [v2.0.0](https://github.com/lihop/godot-xterm/compare/v1.2.1...v2.0.0) - 2021-07-25
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Terminal editor plugin. Adds integrated terminal to Godot editor.
|
- Terminal editor plugin. Adds integrated terminal to Godot editor.
|
||||||
- Xresources import plugin.
|
- Xresources import plugin.
|
||||||
- [#39][i39]: Support for the bell "\u0007" character.
|
- [#39][i39]: Support for the bell "\u0007" character.
|
||||||
|
@ -130,6 +144,7 @@ Thanks to [@ConteZero](https://github.com/contezero) for reporting and providing
|
||||||
- [#24][i24]: Support for Windows 32-bit (Terminal node only).
|
- [#24][i24]: Support for Windows 32-bit (Terminal node only).
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- [#44][i44]: Default theme to match Godot's default theme.
|
- [#44][i44]: Default theme to match Godot's default theme.
|
||||||
- Supported Godot version -> 3.3.2.
|
- Supported Godot version -> 3.3.2.
|
||||||
- Set a default theme if no theme property has been set.
|
- Set a default theme if no theme property has been set.
|
||||||
|
@ -137,6 +152,7 @@ Thanks to [@ConteZero](https://github.com/contezero) for reporting and providing
|
||||||
- TPut no longer registered as a unique global class (i.e. removed `class_name TPut`).
|
- TPut no longer registered as a unique global class (i.e. removed `class_name TPut`).
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [#40][i40]: Vim related bugs, caused by incorrectly handled control sequences.
|
- [#40][i40]: Vim related bugs, caused by incorrectly handled control sequences.
|
||||||
- Don't swap red and blue channels of theme colors.
|
- Don't swap red and blue channels of theme colors.
|
||||||
- Use "Light Cyan" color from theme. Previously ignored.
|
- Use "Light Cyan" color from theme. Previously ignored.
|
||||||
|
@ -146,37 +162,44 @@ Thanks to [@ConteZero](https://github.com/contezero) for reporting and providing
|
||||||
[i40]: https://github.com/lihop/godot-xterm/issues/40
|
[i40]: https://github.com/lihop/godot-xterm/issues/40
|
||||||
[i44]: https://github.com/lihop/godot-xterm/issues/44
|
[i44]: https://github.com/lihop/godot-xterm/issues/44
|
||||||
|
|
||||||
|
|
||||||
## [v1.2.1](https://github.com/lihop/godot-xterm/compare/v1.2.0...v1.2.1) - 2020-11-23
|
## [v1.2.1](https://github.com/lihop/godot-xterm/compare/v1.2.0...v1.2.1) - 2020-11-23
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- GitHub Actions workflow now produces both a release and debug zip archive.
|
- GitHub Actions workflow now produces both a release and debug zip archive.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Release binary for Windows 64-bit export.
|
- Release binary for Windows 64-bit export.
|
||||||
|
|
||||||
|
|
||||||
## [v1.2.0](https://github.com/lihop/godot-xterm/compare/v1.0.0...v1.2.0) - 2020-11-21
|
## [v1.2.0](https://github.com/lihop/godot-xterm/compare/v1.0.0...v1.2.0) - 2020-11-21
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Support for macOS 64-bit including Pseudoterminal.
|
- Support for macOS 64-bit including Pseudoterminal.
|
||||||
- Partial support for Windows 64-bit and compiling on Windows using MSVC. Pseudoterminal not yet supported. 32-bit builds might be possible but not yet built/tested.
|
- Partial support for Windows 64-bit and compiling on Windows using MSVC. Pseudoterminal not yet supported. 32-bit builds might be possible but not yet built/tested.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Updated build script. On Linux `./build.sh` will create a debug build of the gdnative library for the current platform.
|
- Updated build script. On Linux `./build.sh` will create a debug build of the gdnative library for the current platform.
|
||||||
- Removed all pre-compiled binaries using BFG [Repo-Cleaner](https://rtyley.github.io/bfg-repo-cleaner/), thus re-writing git history.
|
- Removed all pre-compiled binaries using BFG [Repo-Cleaner](https://rtyley.github.io/bfg-repo-cleaner/), thus re-writing git history.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Fixed bug where incorrect data would sometimes be written to the terminal when passing a string to the Terminal's `write()` method.
|
- Fixed bug where incorrect data would sometimes be written to the terminal when passing a string to the Terminal's `write()` method.
|
||||||
- Positioned background rect at 0,0 so it is no longer offset if a margin is added when Terminal is a child of a Container node.
|
- Positioned background rect at 0,0 so it is no longer offset if a margin is added when Terminal is a child of a Container node.
|
||||||
- Passed correct argv to the execvp call of Pseudoterminal. Previously argv[0] was not set to the program's name which caused the Pseudoterminal node not to work on macOS with the zsh shell.
|
- Passed correct argv to the execvp call of Pseudoterminal. Previously argv[0] was not set to the program's name which caused the Pseudoterminal node not to work on macOS with the zsh shell.
|
||||||
|
|
||||||
|
|
||||||
## [v1.0.0](https://github.com/lihop/godot-xterm/releases/tag/v1.0.0) - 2020-10-05
|
## [v1.0.0](https://github.com/lihop/godot-xterm/releases/tag/v1.0.0) - 2020-10-05
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Changelog.
|
- Changelog.
|
||||||
- Asciicast importer plugin. Enables the import of .cast ([asciicast files v2](https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v2.md)) that can be made using the [asciinema](https://asciinema.org/) terminal session recorder. See the [asciicast scene](/examples/asciicast) for example usage.
|
- Asciicast importer plugin. Enables the import of .cast ([asciicast files v2](https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v2.md)) that can be made using the [asciinema](https://asciinema.org/) terminal session recorder. See the [asciicast scene](/examples/asciicast) for example usage.
|
||||||
- Pre-built binary for x11 platform.
|
- Pre-built binary for x11 platform.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Implementation of Terminal node from GDScript to GDNative using [Aetf's patched version of libtsm](https://github.com/Aetf/libtsm).
|
- Implementation of Terminal node from GDScript to GDNative using [Aetf's patched version of libtsm](https://github.com/Aetf/libtsm).
|
||||||
- Move input handling to the Terminal node itself, rather than handling it in a seperate Control node.
|
- Move input handling to the Terminal node itself, rather than handling it in a seperate Control node.
|
||||||
- The Terminal `write()` method now accepts both String and PoolByteArray.
|
- The Terminal `write()` method now accepts both String and PoolByteArray.
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<img align="left" width="64" height="64" src="./media/icon.png">
|
<img align="left" width="64" height="64" src="./media/icon.png">
|
||||||
|
|
||||||
# GodotXterm - Terminal Emulator
|
# GodotXterm - Terminal Emulator
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
[![Godot Version](https://img.shields.io/badge/Godot-3.4.x-blue.svg)](#supported-godot-versions)
|
[![Godot Version](https://img.shields.io/badge/Godot-3.4.x-blue.svg)](#supported-godot-versions)
|
||||||
|
@ -25,6 +26,7 @@ https://user-images.githubusercontent.com/3696783/126894061-a69eb6ad-9979-4723-a
|
||||||
[![View it on GitHub](./media/view_it_on_github_button.png)](https://github.com/lihop/godot-xterm)
|
[![View it on GitHub](./media/view_it_on_github_button.png)](https://github.com/lihop/godot-xterm)
|
||||||
|
|
||||||
#### Table of Contents
|
#### Table of Contents
|
||||||
|
|
||||||
1. [Features](#features)
|
1. [Features](#features)
|
||||||
2. [Screenshots](#screenshots)
|
2. [Screenshots](#screenshots)
|
||||||
3. [Demos and Examples](#demos-and-examples)
|
3. [Demos and Examples](#demos-and-examples)
|
||||||
|
@ -36,13 +38,15 @@ https://user-images.githubusercontent.com/3696783/126894061-a69eb6ad-9979-4723-a
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- ### [Terminal](https://lihop.github.io/godot-xterm/api/terminal)
|
- ### [Terminal](https://lihop.github.io/godot-xterm/api/terminal)
|
||||||
|
|
||||||
A Terminal emulator Control node.
|
A Terminal emulator Control node.
|
||||||
|
|
||||||
Supports ANSI and (some) XTerm Control Sequences which can be used to do things such as clear the screen, move the cursor, change printed text color, ring a bell, and so on.
|
Supports ANSI and (some) XTerm Control Sequences which can be used to do things such as clear the screen, move the cursor, change printed text color, ring a bell, and so on.
|
||||||
For an exhaustive list of terminal control sequences (not all of which are supported by GodotXterm) see ["XTerm Control Sequences"](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html).
|
For an exhaustive list of terminal control sequences (not all of which are supported by GodotXterm) see ["XTerm Control Sequences"](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html).
|
||||||
|
|
||||||
- ### [PTY](https://lihop.github.io/godot-xterm/api/pty)
|
- ### [PTY](https://lihop.github.io/godot-xterm/api/pty)
|
||||||
*Linux and macOS only.*
|
|
||||||
|
_Linux and macOS only._
|
||||||
|
|
||||||
Node for forking processes (e.g. bash, nodejs, python) with pseudoterminal file descriptors.
|
Node for forking processes (e.g. bash, nodejs, python) with pseudoterminal file descriptors.
|
||||||
Can be used with the Terminal node to get an actual shell.
|
Can be used with the Terminal node to get an actual shell.
|
||||||
|
@ -51,12 +55,14 @@ https://user-images.githubusercontent.com/3696783/126894061-a69eb6ad-9979-4723-a
|
||||||
See issue [\#25](https://github.com/lihop/godot-xterm/issues/25).
|
See issue [\#25](https://github.com/lihop/godot-xterm/issues/25).
|
||||||
|
|
||||||
- ### Terminal Editor Plugin
|
- ### Terminal Editor Plugin
|
||||||
*Linux and macOS only.*
|
|
||||||
|
_Linux and macOS only._
|
||||||
|
|
||||||
Adds a panel to the Editor's bottom panel that can be used to spawn terminals in the editor.
|
Adds a panel to the Editor's bottom panel that can be used to spawn terminals in the editor.
|
||||||
Similar to VSCode's integrated terminal and IntelliJ's embedded terminal.
|
Similar to VSCode's integrated terminal and IntelliJ's embedded terminal.
|
||||||
|
|
||||||
- ### Asciicast Import Plugin
|
- ### Asciicast Import Plugin
|
||||||
|
|
||||||
Adds support for importing asciinema v2 `.cast` files as animations that can be played by an AnimationPlayer that is a child of a Terminal node.
|
Adds support for importing asciinema v2 `.cast` files as animations that can be played by an AnimationPlayer that is a child of a Terminal node.
|
||||||
Example `.cast` files can be downloaded from the [asciinema website](https://asciinema.org).
|
Example `.cast` files can be downloaded from the [asciinema website](https://asciinema.org).
|
||||||
|
|
||||||
|
@ -68,9 +74,9 @@ https://user-images.githubusercontent.com/3696783/126894061-a69eb6ad-9979-4723-a
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|--------------------------------------|--------------------------------------|
|
| -------------------------------------- | -------------------------------------- |
|
||||||
|![](./media/screenshot_editor.png) |![](./media/screenshot_the_guest.png) |
|
| ![](./media/screenshot_editor.png) | ![](./media/screenshot_the_guest.png) |
|
||||||
|![](./media/screenshot_retro_term.jpg)|![](./media/screenshot_xterminate.png)|
|
| ![](./media/screenshot_retro_term.jpg) | ![](./media/screenshot_xterminate.png) |
|
||||||
|
|
||||||
## Demos and Examples
|
## Demos and Examples
|
||||||
|
|
||||||
|
@ -93,7 +99,7 @@ Are you using GodotXterm in your project and want it listed here? Please [open a
|
||||||
GodotXterm aims to support the current stable release of Godot, but may lag slightly.
|
GodotXterm aims to support the current stable release of Godot, but may lag slightly.
|
||||||
Currently, Godot versions 3.5.x and 3.4.x are supported, but custom export templates
|
Currently, Godot versions 3.5.x and 3.4.x are supported, but custom export templates
|
||||||
are required for HTML5 exports from versions < 3.5.
|
are required for HTML5 exports from versions < 3.5.
|
||||||
Versions 3.3.x are no longer officially supported but *may* work if the GDNative libraries are
|
Versions 3.3.x are no longer officially supported but _may_ work if the GDNative libraries are
|
||||||
compiled using an older version of godot-cpp.
|
compiled using an older version of godot-cpp.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
@ -122,10 +128,9 @@ The GDNative source code incorporates code snippets and source code from many th
|
||||||
|
|
||||||
- The Hack regular font is bundled with GodotXterm as the default Terminal font. This is also the default monospace font of the Godot editor. See the [full license](https://github.com/lihop/godot-xterm/blob/stable/addons/godot_xterm/themes/fonts/hack/LICENSE.md).
|
- The Hack regular font is bundled with GodotXterm as the default Terminal font. This is also the default monospace font of the Godot editor. See the [full license](https://github.com/lihop/godot-xterm/blob/stable/addons/godot_xterm/themes/fonts/hack/LICENSE.md).
|
||||||
|
|
||||||
|
|
||||||
### Nonbundled Resources
|
### Nonbundled Resources
|
||||||
The following resources are not bundled with GodotXterm (i.e. are not included in the `addons/godot_xterm` directory) but are included in this repository for demo and testing purposes. They are:
|
|
||||||
|
|
||||||
|
The following resources are not bundled with GodotXterm (i.e. are not included in the `addons/godot_xterm` directory) but are included in this repository for demo and testing purposes. They are:
|
||||||
|
|
||||||
#### Sounds
|
#### Sounds
|
||||||
|
|
||||||
|
@ -133,7 +138,7 @@ The following resources are not bundled with GodotXterm (i.e. are not included i
|
||||||
|
|
||||||
#### Fonts
|
#### Fonts
|
||||||
|
|
||||||
- The **bold**, *italic*, and ***bold italic*** styles of the Hack font which are covered by the same license as above.
|
- The **bold**, _italic_, and **_bold italic_** styles of the Hack font which are covered by the same license as above.
|
||||||
- Nerd Fonts. Combines symbols from a multitude of other fonts. See [license information](https://github.com/lihop/godot-xterm/blob/stable/themes/fonts/nerd_fonts/README.md).
|
- Nerd Fonts. Combines symbols from a multitude of other fonts. See [license information](https://github.com/lihop/godot-xterm/blob/stable/themes/fonts/nerd_fonts/README.md).
|
||||||
- Noto Color Emoji. Released under the [SIL Open Font License](https://github.com/lihop/godot-xterm/blob/stable/themes/fonts/noto_color_emoji/LICENSE_OFL.txt).
|
- Noto Color Emoji. Released under the [SIL Open Font License](https://github.com/lihop/godot-xterm/blob/stable/themes/fonts/noto_color_emoji/LICENSE_OFL.txt).
|
||||||
- Unifont. Dual-licensed (since version 13.0.04) under the GNU GPL 2+ with the GNU font embedding exception and the SIL Open Font License (OFL) version 1.1. This project uses it under the terms of the [SIL Open Font License](https://github.com/lihop/godot-xterm/blob/stable/themes/fonts/unifont/LICENSE_OFL-1.1.txt).
|
- Unifont. Dual-licensed (since version 13.0.04) under the GNU GPL 2+ with the GNU font embedding exception and the SIL Open Font License (OFL) version 1.1. This project uses it under the terms of the [SIL Open Font License](https://github.com/lihop/godot-xterm/blob/stable/themes/fonts/unifont/LICENSE_OFL-1.1.txt).
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
#video-preview { display: none; }
|
#video-preview {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ permalink: /api/pty
|
||||||
|
|
||||||
**Inherits:** [Node] < [Object]
|
**Inherits:** [Node] < [Object]
|
||||||
|
|
||||||
*Linux and macOS only.*
|
_Linux and macOS only._
|
||||||
|
|
||||||
Node for forking processes (e.g. bash, nodejs, python) with pseudoterminal file descriptors.
|
Node for forking processes (e.g. bash, nodejs, python) with pseudoterminal file descriptors.
|
||||||
Can be used with the [Terminal] node to get an actual shell.
|
Can be used with the [Terminal] node to get an actual shell.
|
||||||
|
@ -18,28 +18,25 @@ Can be used with the [Terminal] node to get an actual shell.
|
||||||
Not currently supported on Windows, but it could be in the future using [ConPTY](https://docs.microsoft.com/en-us/windows/console) or [WinPTY](https://github.com/rprichard/winpty).
|
Not currently supported on Windows, but it could be in the future using [ConPTY](https://docs.microsoft.com/en-us/windows/console) or [WinPTY](https://github.com/rprichard/winpty).
|
||||||
See issue [\#25](https://github.com/lihop/godot-xterm/issues/25).
|
See issue [\#25](https://github.com/lihop/godot-xterm/issues/25).
|
||||||
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
![PTY Diagram](../media/pty_diagram.png)
|
![PTY Diagram](../media/pty_diagram.png)
|
||||||
<sub>"PTY Diagram" is a derivative of [Termios-script-diagram.svg](https://commons.wikimedia.org/wiki/File:Termios-script-diagram.svg) by [Krishnavedala](https://en.wikipedia.org/wiki/User:Krishnavedala?rdfrom=commons:User:Krishnavedala), used under [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/).
|
<sub>"PTY Diagram" is a derivative of [Termios-script-diagram.svg](https://commons.wikimedia.org/wiki/File:Termios-script-diagram.svg) by [Krishnavedala](https://en.wikipedia.org/wiki/User:Krishnavedala?rdfrom=commons:User:Krishnavedala), used under [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/).
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Type | Name | Default |
|
| Type | Name | Default |
|
||||||
|--------------|--------------------------------------|--------------------------------------------------------|
|
| ------------ | ------------------------------------ | ------------------------------------------------------ |
|
||||||
| [NodePath] | [terminal_path](#prop-terminal_path) | None |
|
| [NodePath] | [terminal_path](#prop-terminal_path) | None |
|
||||||
| [int] | [cols](#prop-cols) | `80` |
|
| [int] | [cols](#prop-cols) | `80` |
|
||||||
| [int] | [rows](#prop-rows) | `24` |
|
| [int] | [rows](#prop-rows) | `24` |
|
||||||
| [Dictionary] | [env](#prop-env) | `{ COLORTERM = "truecolor", TERM = "xterm-256color" }` |
|
| [Dictionary] | [env](#prop-env) | `{ COLORTERM = "truecolor", TERM = "xterm-256color" }` |
|
||||||
| [bool] | [use_os_env](#prop-use_os_env) | `true` |
|
| [bool] | [use_os_env](#prop-use_os_env) | `true` |
|
||||||
|
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
| Returns | Signature |
|
| Returns | Signature |
|
||||||
|---------|-------------------------------------------------------------------------------------------------------------------------------------|
|
| ------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| [Error] | [fork](#mthd-fork) **(** [String] file=`$SHELL`, [PoolStringArray] args=[], [String] cwd=`$PWD`, [int] cols=80, [int] rows=24 **)** |
|
| [Error] | [fork](#mthd-fork) **(** [String] file=`$SHELL`, [PoolStringArray] args=[], [String] cwd=`$PWD`, [int] cols=80, [int] rows=24 **)** |
|
||||||
| void | [kill](#mthd-kill) **(** [int] signum **)** |
|
| void | [kill](#mthd-kill) **(** [int] signum **)** |
|
||||||
| [Error] | [open](#mthd-open) **(** [int] cols=80, [int] rows=24 **)** |
|
| [Error] | [open](#mthd-open) **(** [int] cols=80, [int] rows=24 **)** |
|
||||||
|
@ -47,7 +44,6 @@ See issue [\#25](https://github.com/lihop/godot-xterm/issues/25).
|
||||||
| void | [resizev](#mthd-resizev) **(** [Vector2] size **)** |
|
| void | [resizev](#mthd-resizev) **(** [Vector2] size **)** |
|
||||||
| void | [write](#mthd-write) **(** [String]\|[PoolByteArray] data **)** |
|
| void | [write](#mthd-write) **(** [String]\|[PoolByteArray] data **)** |
|
||||||
|
|
||||||
|
|
||||||
## Signals
|
## Signals
|
||||||
|
|
||||||
- <a name="sgnl-data_received" /> **data_received** **(** [PoolByteArray] data **)**
|
- <a name="sgnl-data_received" /> **data_received** **(** [PoolByteArray] data **)**
|
||||||
|
@ -77,28 +73,27 @@ See issue [\#25](https://github.com/lihop/godot-xterm/issues/25).
|
||||||
- **SIGALRM** = 14 --- Alarm clock.
|
- **SIGALRM** = 14 --- Alarm clock.
|
||||||
- **SIGTERM** = 15 --- Termination signal.
|
- **SIGTERM** = 15 --- Termination signal.
|
||||||
|
|
||||||
|
|
||||||
## Property Descriptions
|
## Property Descriptions
|
||||||
|
|
||||||
### <a name="prop-terminal_path" /> [NodePath] **terminal_path**
|
### <a name="prop-terminal_path" /> [NodePath] **terminal_path**
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|-----------|--------------------------|
|
| --------- | ------------------------ |
|
||||||
| *Default* | None |
|
| _Default_ | None |
|
||||||
| *Setter* | set_terminal_path(value) |
|
| _Setter_ | set_terminal_path(value) |
|
||||||
| *Getter* | None |
|
| _Getter_ | None |
|
||||||
|
|
||||||
[NodePath] to a [Terminal]. Setting this path will automatically connect the appropriate signals of both nodes for standard operation. It will also disconnected the signals of the previously set terminal, if any.
|
[NodePath] to a [Terminal]. Setting this path will automatically connect the appropriate signals of both nodes for standard operation. It will also disconnected the signals of the previously set terminal, if any.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- <a name="prop-cols" /> [int] **cols**
|
- <a name="prop-cols" /> [int] **cols**
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|-----------|--------------------------|
|
| --------- | --------------- |
|
||||||
| *Default* | `80` |
|
| _Default_ | `80` |
|
||||||
| *Setter* | set_cols(value) |
|
| _Setter_ | set_cols(value) |
|
||||||
| *Getter* | None |
|
| _Getter_ | None |
|
||||||
|
|
||||||
The column size in characters.
|
The column size in characters.
|
||||||
|
|
||||||
|
@ -107,10 +102,10 @@ See issue [\#25](https://github.com/lihop/godot-xterm/issues/25).
|
||||||
- <a name="prop-rows" /> [int] **rows**
|
- <a name="prop-rows" /> [int] **rows**
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|-----------|--------------------------|
|
| --------- | --------------- |
|
||||||
| *Default* | `24` |
|
| _Default_ | `24` |
|
||||||
| *Setter* | set_rows(value) |
|
| _Setter_ | set_rows(value) |
|
||||||
| *Getter* | None |
|
| _Getter_ | None |
|
||||||
|
|
||||||
The row size in characters.
|
The row size in characters.
|
||||||
|
|
||||||
|
@ -119,10 +114,10 @@ See issue [\#25](https://github.com/lihop/godot-xterm/issues/25).
|
||||||
- <a name="prop-env" /> [Dictionary] **env**
|
- <a name="prop-env" /> [Dictionary] **env**
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|-----------|--------------------------------------------------------|
|
| --------- | ------------------------------------------------------ |
|
||||||
| *Default* | `{ COLORTERM = "truecolor", TERM = "xterm-256color" }` |
|
| _Default_ | `{ COLORTERM = "truecolor", TERM = "xterm-256color" }` |
|
||||||
| *Setter* | None |
|
| _Setter_ | None |
|
||||||
| *Getter* | None |
|
| _Getter_ | None |
|
||||||
|
|
||||||
Environment variables to be set for the child program.
|
Environment variables to be set for the child program.
|
||||||
|
|
||||||
|
@ -131,14 +126,13 @@ See issue [\#25](https://github.com/lihop/godot-xterm/issues/25).
|
||||||
- <a name="prop-use_os_env" /> [bool] **use_os_env**
|
- <a name="prop-use_os_env" /> [bool] **use_os_env**
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|-----------|--------|
|
| --------- | ------ |
|
||||||
| *Default* | `true` |
|
| _Default_ | `true` |
|
||||||
| *Setter* | None |
|
| _Setter_ | None |
|
||||||
| *Getter* | None |
|
| _Getter_ | None |
|
||||||
|
|
||||||
If `true` the environment variables from `env` will be merged with the environment variables of the current program (i.e. Godot), with the variables from `env` taking precedence over the environment variables of the current program.
|
If `true` the environment variables from `env` will be merged with the environment variables of the current program (i.e. Godot), with the variables from `env` taking precedence over the environment variables of the current program.
|
||||||
|
|
||||||
|
|
||||||
## Method Descriptions
|
## Method Descriptions
|
||||||
|
|
||||||
- <a name="mthd-fork" /> [Error] **fork** **(** [String] file=`$SHELL`, [PoolStringArray] args=[], [String] cwd=`$PWD`, [int] cols=80, [int] rows=24 **)**
|
- <a name="mthd-fork" /> [Error] **fork** **(** [String] file=`$SHELL`, [PoolStringArray] args=[], [String] cwd=`$PWD`, [int] cols=80, [int] rows=24 **)**
|
||||||
|
@ -184,7 +178,6 @@ See issue [\#25](https://github.com/lihop/godot-xterm/issues/25).
|
||||||
|
|
||||||
Writes data to the pseudoterminal master device.
|
Writes data to the pseudoterminal master device.
|
||||||
|
|
||||||
|
|
||||||
[Dictionary]: https://docs.godotengine.org/en/stable/classes/class_dictionary.html
|
[Dictionary]: https://docs.godotengine.org/en/stable/classes/class_dictionary.html
|
||||||
[Error]: https://docs.godotengine.org/en/stable/classes/class_%40globalscope.html#enum-globalscope-error
|
[Error]: https://docs.godotengine.org/en/stable/classes/class_%40globalscope.html#enum-globalscope-error
|
||||||
[Node]: https://docs.godotengine.org/en/stable/classes/class_node.html
|
[Node]: https://docs.godotengine.org/en/stable/classes/class_node.html
|
||||||
|
|
|
@ -15,8 +15,8 @@ A Terminal emulator Control node.
|
||||||
Supports ANSI and (some) XTerm Control Sequences which can be used to do things such as clear the screen, move the cursor, change printed text color, ring a bell, and so on.
|
Supports ANSI and (some) XTerm Control Sequences which can be used to do things such as clear the screen, move the cursor, change printed text color, ring a bell, and so on.
|
||||||
For an exhaustive list of terminal control sequences (not all of which are supported by GodotXterm) see ["XTerm Control Sequences"](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html).
|
For an exhaustive list of terminal control sequences (not all of which are supported by GodotXterm) see ["XTerm Control Sequences"](https://invisible-island.net/xterm/ctlseqs/ctlseqs.html).
|
||||||
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
![Terminal Flow Diagram](../media/flow_diagram.svg)
|
![Terminal Flow Diagram](../media/flow_diagram.svg)
|
||||||
<sub>"Terminal Flow Diagram" is a derivative of ["computer keyboard 2"](https://openclipart.org/detail/2396/computer-keyboard-2) and ["monitor"](https://openclipart.org/detail/1637/monitor), from U.S. patent drawings, uploaded by [johnny_automatic](https://openclipart.org/artist/johnny_automatic), used under [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/).<sub/>
|
<sub>"Terminal Flow Diagram" is a derivative of ["computer keyboard 2"](https://openclipart.org/detail/2396/computer-keyboard-2) and ["monitor"](https://openclipart.org/detail/1637/monitor), from U.S. patent drawings, uploaded by [johnny_automatic](https://openclipart.org/artist/johnny_automatic), used under [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/).<sub/>
|
||||||
|
|
||||||
|
@ -40,20 +40,18 @@ In the other direction, data can be sent to the terminal. This corresponds to th
|
||||||
The input from (3) is then interpreted by the terminal state machine and drawn to the screen.
|
The input from (3) is then interpreted by the terminal state machine and drawn to the screen.
|
||||||
For example if the string `"\u001b[38;2;0;255;0;mA"` was written to the terminal, then it would draw a green colored capital letter 'A' on the screen.
|
For example if the string `"\u001b[38;2;0;255;0;mA"` was written to the terminal, then it would draw a green colored capital letter 'A' on the screen.
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Type | Name | Default |
|
| Type | Name | Default |
|
||||||
|--------------|--------------------------------------|---------|
|
| ------------ | ------------------------------------ | ------- |
|
||||||
| [bool] | [bell_muted](#prop-bell_muted) | `false` |
|
| [bool] | [bell_muted](#prop-bell_muted) | `false` |
|
||||||
| [float] | [bell_cooldown](#prop-bell_cooldown) | `0.1` |
|
| [float] | [bell_cooldown](#prop-bell_cooldown) | `0.1` |
|
||||||
| [UpdateMode] | [update_mode](#prop-update_mode) | `AUTO` |
|
| [UpdateMode] | [update_mode](#prop-update_mode) | `AUTO` |
|
||||||
|
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
| Returns | Signature |
|
| Returns | Signature |
|
||||||
|----------|-------------------------------------------------------------------|
|
| -------- | ----------------------------------------------------------------- |
|
||||||
| void | [clear](#mthd-clear) **()** |
|
| void | [clear](#mthd-clear) **()** |
|
||||||
| [String] | [copy_all](#mthd-copy_all) **()** |
|
| [String] | [copy_all](#mthd-copy_all) **()** |
|
||||||
| [String] | [copy_selection](#mthd-copy_selection) **()** |
|
| [String] | [copy_selection](#mthd-copy_selection) **()** |
|
||||||
|
@ -61,7 +59,6 @@ For example if the string `"\u001b[38;2;0;255;0;mA"` was written to the terminal
|
||||||
| [int] | [get_rows](#mthd-get_rows) **()** |
|
| [int] | [get_rows](#mthd-get_rows) **()** |
|
||||||
| void | [write](#mthd-write) **(** [String] \| [PoolByteArray] data **)** |
|
| void | [write](#mthd-write) **(** [String] \| [PoolByteArray] data **)** |
|
||||||
|
|
||||||
|
|
||||||
## Signals
|
## Signals
|
||||||
|
|
||||||
- <a name="sgnl-bell" /> **bell** **()**
|
- <a name="sgnl-bell" /> **bell** **()**
|
||||||
|
@ -92,7 +89,6 @@ For example if the string `"\u001b[38;2;0;255;0;mA"` was written to the terminal
|
||||||
`new_size.x` will be the number of columns and `new_size.y` will be the number of rows.
|
`new_size.x` will be the number of columns and `new_size.y` will be the number of rows.
|
||||||
This information should be forwarded to a pseudoterminal, if it is connected, so that it can update its size accordingly.
|
This information should be forwarded to a pseudoterminal, if it is connected, so that it can update its size accordingly.
|
||||||
|
|
||||||
|
|
||||||
## Enumerations
|
## Enumerations
|
||||||
|
|
||||||
<a name="enum-update_mode" /> enum **UpdateMode**:
|
<a name="enum-update_mode" /> enum **UpdateMode**:
|
||||||
|
@ -102,17 +98,15 @@ For example if the string `"\u001b[38;2;0;255;0;mA"` was written to the terminal
|
||||||
- **ALL** = **2** --- Every cell will be drawn on every `update()` call.
|
- **ALL** = **2** --- Every cell will be drawn on every `update()` call.
|
||||||
- **ALL_NEXT_FRAME** = **3** --- Draws every cell afetr the next `update()` call, then returns to **AUTO**.
|
- **ALL_NEXT_FRAME** = **3** --- Draws every cell afetr the next `update()` call, then returns to **AUTO**.
|
||||||
|
|
||||||
|
|
||||||
## Property Descriptions
|
## Property Descriptions
|
||||||
|
|
||||||
|
|
||||||
- <a name="prop-bell_muted" /> [bool] **bell_muted**
|
- <a name="prop-bell_muted" /> [bool] **bell_muted**
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|-----------|---------|
|
| --------- | ------- |
|
||||||
| *Default* | `false` |
|
| _Default_ | `false` |
|
||||||
| *Setter* | None |
|
| _Setter_ | None |
|
||||||
| *Getter* | None |
|
| _Getter_ | None |
|
||||||
|
|
||||||
If muted, no [`bell`](#sgnl-bell) signal will be emitted when the bell character (`"\u0007"`) is written to the terminal.
|
If muted, no [`bell`](#sgnl-bell) signal will be emitted when the bell character (`"\u0007"`) is written to the terminal.
|
||||||
|
|
||||||
|
@ -121,10 +115,10 @@ For example if the string `"\u001b[38;2;0;255;0;mA"` was written to the terminal
|
||||||
- <a name="prop-bell_cooldown" /> [float] **bell_cooldown**
|
- <a name="prop-bell_cooldown" /> [float] **bell_cooldown**
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|-----------|-------|
|
| --------- | ----- |
|
||||||
| *Default* | `0.1` |
|
| _Default_ | `0.1` |
|
||||||
| *Setter* | None |
|
| _Setter_ | None |
|
||||||
| *Getter* | None |
|
| _Getter_ | None |
|
||||||
|
|
||||||
The minimum amount of time to wait before emitting another [`bell`](#sgnl-bell) signal on subsequent writes of the bell character.
|
The minimum amount of time to wait before emitting another [`bell`](#sgnl-bell) signal on subsequent writes of the bell character.
|
||||||
Writing the bell character too frequently, for example by running the command `while true; do echo -e "\a"; done`,
|
Writing the bell character too frequently, for example by running the command `while true; do echo -e "\a"; done`,
|
||||||
|
@ -136,17 +130,16 @@ For example if the string `"\u001b[38;2;0;255;0;mA"` was written to the terminal
|
||||||
- <a name="prop-update_mode" /> [UpdateMode] **update_mode**
|
- <a name="prop-update_mode" /> [UpdateMode] **update_mode**
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|-----------|------------------------|
|
| --------- | ---------------------- |
|
||||||
| *Default* | `AUTO` |
|
| _Default_ | `AUTO` |
|
||||||
| *Setter* | set_update_mode(value) |
|
| _Setter_ | set_update_mode(value) |
|
||||||
| *Getter* | None |
|
| _Getter_ | None |
|
||||||
|
|
||||||
Determines which cells of the terminal will be updated when its state changes.
|
Determines which cells of the terminal will be updated when its state changes.
|
||||||
By default `AUTO` will only update cells that changed, but will update all cells (i.e. the entire screen) on major changes,
|
By default `AUTO` will only update cells that changed, but will update all cells (i.e. the entire screen) on major changes,
|
||||||
such as terminal resize.
|
such as terminal resize.
|
||||||
If you are having trouble with the terminal not updating correctly or exhibiting artifacts, you can try remedying this by setting `update_mode` to `ALL`, however, this will have a negative impact on performance.
|
If you are having trouble with the terminal not updating correctly or exhibiting artifacts, you can try remedying this by setting `update_mode` to `ALL`, however, this will have a negative impact on performance.
|
||||||
|
|
||||||
|
|
||||||
## Method Descriptions
|
## Method Descriptions
|
||||||
|
|
||||||
- <a name="mthd-clear" /> void **clear** **()**
|
- <a name="mthd-clear" /> void **clear** **()**
|
||||||
|
@ -190,6 +183,7 @@ For example if the string `"\u001b[38;2;0;255;0;mA"` was written to the terminal
|
||||||
Typically it would be connected to the output of a [PTY]'s [`data_received()`](/api/pty#sgnl-data_received) signal.
|
Typically it would be connected to the output of a [PTY]'s [`data_received()`](/api/pty#sgnl-data_received) signal.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```gdscript
|
```gdscript
|
||||||
$Terminal.write("Hello World")
|
$Terminal.write("Hello World")
|
||||||
$Terminal.write("Hello World".to_utf8())
|
$Terminal.write("Hello World".to_utf8())
|
||||||
|
|
|
@ -27,10 +27,12 @@ This plugin follows the same format as the [GDNative C++ Example](https://docs.g
|
||||||
## The Easy Way
|
## The Easy Way
|
||||||
|
|
||||||
Run the build script in `addons/godot-xterm/native`:
|
Run the build script in `addons/godot-xterm/native`:
|
||||||
|
|
||||||
```
|
```
|
||||||
cd addons/godot_xterm/native
|
cd addons/godot_xterm/native
|
||||||
./build.sh
|
./build.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
On Windows you can use `git-bash` to run this script.
|
On Windows you can use `git-bash` to run this script.
|
||||||
Provided the dependencies above are installed then it should "just work™".
|
Provided the dependencies above are installed then it should "just work™".
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ permalink: /setup/precompiled-binaries
|
||||||
---
|
---
|
||||||
|
|
||||||
# Precompiled Binaries
|
# Precompiled Binaries
|
||||||
|
|
||||||
{: .no_toc }
|
{: .no_toc }
|
||||||
|
|
||||||
Installing GodotXterm using precompiled binaries means that you wont be required
|
Installing GodotXterm using precompiled binaries means that you wont be required
|
||||||
|
@ -15,7 +16,7 @@ of copying files to the correct location in your project. These files can be
|
||||||
installed from several sources:
|
installed from several sources:
|
||||||
|
|
||||||
1. TOC
|
1. TOC
|
||||||
{:toc}
|
{:toc}
|
||||||
|
|
||||||
**Note:** precompiled binaries will only work with certain versions of Godot
|
**Note:** precompiled binaries will only work with certain versions of Godot
|
||||||
(usually the current stable release). If you need binaries for a different or
|
(usually the current stable release). If you need binaries for a different or
|
||||||
|
@ -23,26 +24,33 @@ 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).
|
refer to the section on [Building From Source](/setup/building-from-source).
|
||||||
|
|
||||||
## Godot Asset Library
|
## Godot Asset Library
|
||||||
|
|
||||||
GodotXterm can be installed from the [Godot Asset Library](https://godotengine.org/asset-library/asset/1007).
|
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](https://docs.godotengine.org/en/stable/community/asset_library/using_assetlib.html) for more info on how to use it.
|
||||||
|
|
||||||
## Gd-plug Plugin Manager
|
## Gd-plug Plugin Manager
|
||||||
|
|
||||||
If you are using the gd-plug plugin manager you can add the following line to your `plug.gd` file:
|
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", {commit = "a1131a562e8e8f0c57b0ddf61de7fa015d463ba0", include = ["addons/godot_xterm"]})
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace the commit hash with the hash of the GodotXterm version you wish to install.
|
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.
|
See [tags](https://github.com/lihop/godot-xterm-dist/tags) for a list of versions and their corresponding commit hashes.
|
||||||
See the [gd-plug documentation](https://github.com/imjp94/gd-plug/blob/master/README.md) for more info on how to use it.
|
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
|
## Manual Installation
|
||||||
|
|
||||||
Alternatively, GodotXterm can be installed manually in two steps:
|
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`](https://github.com/lihop/godot-xterm/tree/stable/addons/godot_xterm) directory to the `addons` directory of your Godot project.
|
||||||
2. Copy the GDNative binaries into `addons/godot_xterm/native/bin` directory.
|
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).
|
The easiest way to obtain the GDNative binaries is to download them from [the Releases page](https://github.com/lihop/godot-xterm/releases).
|
||||||
Download the zip archive named `libgodot-xterm-release.zip` and extract its contents into the `/addons/godot_xterm/native/bin` directory of your project.
|
Download the zip archive named `libgodot-xterm-release.zip` and extract its contents into the `/addons/godot_xterm/native/bin` directory of your project.
|
||||||
After this your `addons/godot_xterm/native/bin` directory should contain the following files:
|
After this your `addons/godot_xterm/native/bin` directory should contain the following files:
|
||||||
|
|
||||||
- `libgodot-xterm.javascript.32.wasm`
|
- `libgodot-xterm.javascript.32.wasm`
|
||||||
- `libgodot-xterm.linux.32.so`
|
- `libgodot-xterm.linux.32.so`
|
||||||
- `libgodot-xterm.linux.64.so`
|
- `libgodot-xterm.linux.64.so`
|
||||||
|
|
|
@ -9,9 +9,7 @@
|
||||||
"type": "cppdbg",
|
"type": "cppdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "/run/current-system/sw/bin/godot4",
|
"program": "/run/current-system/sw/bin/godot4",
|
||||||
"args": [
|
"args": ["${workspaceFolder}/examples/menu/menu.tscn"],
|
||||||
"${workspaceFolder}/examples/menu/menu.tscn",
|
|
||||||
],
|
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"environment": [],
|
"environment": [],
|
||||||
|
@ -21,23 +19,21 @@
|
||||||
{
|
{
|
||||||
"description": "Enable pretty-printing for gdb",
|
"description": "Enable pretty-printing for gdb",
|
||||||
"text": "-enable-pretty-printing",
|
"text": "-enable-pretty-printing",
|
||||||
"ignoreFailures": true,
|
"ignoreFailures": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Set Disassembly Flavor to Intel",
|
"description": "Set Disassembly Flavor to Intel",
|
||||||
"text": "-gdb-set disassembly-flavor intel",
|
"text": "-gdb-set disassembly-flavor intel",
|
||||||
"ignoreFailures": true,
|
"ignoreFailures": true
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Editor (gdb) Launch",
|
"name": "Editor (gdb) Launch",
|
||||||
"type": "cppdbg",
|
"type": "cppdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "/run/current-system/sw/bin/godot4",
|
"program": "/run/current-system/sw/bin/godot4",
|
||||||
"args": [
|
"args": ["--editor"],
|
||||||
"--editor",
|
|
||||||
],
|
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"environment": [],
|
"environment": [],
|
||||||
|
@ -47,29 +43,25 @@
|
||||||
{
|
{
|
||||||
"description": "Enable pretty-printing for gdb",
|
"description": "Enable pretty-printing for gdb",
|
||||||
"text": "-enable-pretty-printing",
|
"text": "-enable-pretty-printing",
|
||||||
"ignoreFailures": true,
|
"ignoreFailures": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Set Disassembly Flavor to Intel",
|
"description": "Set Disassembly Flavor to Intel",
|
||||||
"text": "-gdb-set disassembly-flavor intel",
|
"text": "-gdb-set disassembly-flavor intel",
|
||||||
"ignoreFailures": true,
|
"ignoreFailures": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Debug forked child process",
|
"description": "Debug forked child process",
|
||||||
"text": "-gdb-set follow-fork-mode child",
|
"text": "-gdb-set follow-fork-mode child"
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Test (gdb) Launch",
|
"name": "Test (gdb) Launch",
|
||||||
"type": "cppdbg",
|
"type": "cppdbg",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "/run/current-system/sw/bin/godot4",
|
"program": "/run/current-system/sw/bin/godot4",
|
||||||
"args": [
|
"args": ["--no-window", "-s", "addons/gut/gut_cmdln.gd"],
|
||||||
"--no-window",
|
|
||||||
"-s",
|
|
||||||
"addons/gut/gut_cmdln.gd"
|
|
||||||
],
|
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"environment": [],
|
"environment": [],
|
||||||
|
@ -79,9 +71,9 @@
|
||||||
{
|
{
|
||||||
"description": "Enable pretty-printing for gdb",
|
"description": "Enable pretty-printing for gdb",
|
||||||
"text": "-enable-pretty-printing",
|
"text": "-enable-pretty-printing",
|
||||||
"ignoreFailures": true,
|
"ignoreFailures": true
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
}
|
|
@ -7,17 +7,10 @@
|
||||||
"label": "build",
|
"label": "build",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"options": {
|
"options": {
|
||||||
"cwd": "${workspaceFolder}/addons/godot_xterm/native",
|
"cwd": "${workspaceFolder}/addons/godot_xterm/native"
|
||||||
},
|
},
|
||||||
"command": "nix-shell",
|
"command": "nix-shell",
|
||||||
"args": [
|
"args": ["-I", "nixpkgs=~/nixpkgs", "-p", "scons", "--run", "./build.sh"],
|
||||||
"-I",
|
|
||||||
"nixpkgs=~/nixpkgs",
|
|
||||||
"-p",
|
|
||||||
"scons",
|
|
||||||
"--run",
|
|
||||||
"./build.sh"
|
|
||||||
],
|
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
{
|
{
|
||||||
"dirs": [
|
"dirs": ["res://test/unit", "res://test/integration"],
|
||||||
"res://test/unit",
|
|
||||||
"res://test/integration"
|
|
||||||
],
|
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
"suffix": ".test.gd",
|
"suffix": ".test.gd",
|
||||||
"include_subdirs": true,
|
"include_subdirs": true,
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{
|
{
|
||||||
"dirs": [
|
"dirs": ["res://test/platform/unix"],
|
||||||
"res://test/platform/unix"
|
|
||||||
],
|
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
"suffix": ".test.gd",
|
"suffix": ".test.gd",
|
||||||
"include_subdirs": true,
|
"include_subdirs": true,
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
{
|
{
|
||||||
"dirs": [
|
"dirs": ["res://platform/windows"],
|
||||||
"res://platform/windows"
|
|
||||||
],
|
|
||||||
"prefix": "",
|
"prefix": "",
|
||||||
"suffix": ".test.gd",
|
"suffix": ".test.gd",
|
||||||
"include_subdirs": true,
|
"include_subdirs": true,
|
||||||
"log_level": 2,
|
"log_level": 2,
|
||||||
"should_exit": true
|
"should_exit": true
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const { defineConfig } = require("cypress");
|
const { defineConfig } = require("cypress");
|
||||||
const getCompareSnapshotsPlugin = require('cypress-image-diff-js/dist/plugin');
|
const getCompareSnapshotsPlugin = require("cypress-image-diff-js/dist/plugin");
|
||||||
|
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
Cypress.on('window:before:load', win => {
|
Cypress.on("window:before:load", (win) => {
|
||||||
cy.spy(win.console, 'error')
|
cy.spy(win.console, "error");
|
||||||
cy.spy(win.console, 'warn')
|
cy.spy(win.console, "warn");
|
||||||
cy.spy(win.console, 'log')
|
cy.spy(win.console, "log");
|
||||||
})
|
});
|
||||||
|
|
||||||
describe('GodotXterm HTML5 export', () => {
|
describe("GodotXterm HTML5 export", () => {
|
||||||
it('Loads and runs without error', () => {
|
it("Loads and runs without error", () => {
|
||||||
cy.visit('http://localhost:3000')
|
cy.visit("http://localhost:3000");
|
||||||
cy.compareSnapshot('menu', 0.9, {
|
cy.compareSnapshot("menu", 0.9, {
|
||||||
limit: 100, delay: 200, timeout: 20000,
|
limit: 100,
|
||||||
})
|
delay: 200,
|
||||||
cy.get('body').type('{downArrow}{enter}')
|
timeout: 20000,
|
||||||
cy.get('body').type('window.console.log("It works!"){enter}')
|
});
|
||||||
cy.window().then(win => {
|
cy.get("body").type("{downArrow}{enter}");
|
||||||
cy.expect(win.console.error).to.have.callCount(0)
|
cy.get("body").type('window.console.log("It works!"){enter}');
|
||||||
cy.expect(win.console.warn).to.have.callCount(0)
|
cy.window().then((win) => {
|
||||||
cy.expect(win.console.log).to.be.calledWith("It works!")
|
cy.expect(win.console.error).to.have.callCount(0);
|
||||||
})
|
cy.expect(win.console.warn).to.have.callCount(0);
|
||||||
})
|
cy.expect(win.console.log).to.be.calledWith("It works!");
|
||||||
})
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
import compareSnapshotCommand from 'cypress-image-diff-js/dist/command';
|
import compareSnapshotCommand from "cypress-image-diff-js/dist/command";
|
||||||
compareSnapshotCommand();
|
compareSnapshotCommand();
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
import './commands'
|
import "./commands";
|
||||||
|
|
Loading…
Reference in a new issue