mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-22 01:30:25 +01:00
Refactor file structure
This commit is contained in:
parent
f9474fe533
commit
3eecf504cf
33 changed files with 89 additions and 50 deletions
8
.gitmodules
vendored
8
.gitmodules
vendored
|
@ -1,6 +1,8 @@
|
|||
[submodule "addons/godot_xterm/godot-cpp"]
|
||||
path = addons/godot_xterm/godot-cpp
|
||||
url = https://github.com/lihop/godot-cpp
|
||||
path = addons/godot_xterm/native/modules/godot-cpp
|
||||
url = https://github.com/godotengine/godot-cpp
|
||||
[submodule "addons/godot_xterm/libtsm"]
|
||||
path = addons/godot_xterm/libtsm
|
||||
path = addons/godot_xterm/native/modules/libtsm
|
||||
url = https://github.com/Aetf/libtsm
|
||||
[submodule "godot-cpp/"]
|
||||
url = https://github.com/godotengine/godot-cpp
|
||||
|
|
|
@ -5,11 +5,11 @@ services:
|
|||
|
||||
jobs:
|
||||
include:
|
||||
- name: "Build on Arch Linux"
|
||||
- name: "Build native libs on Arch Linux"
|
||||
env: SERVICE=build-archlinux
|
||||
- name: "Build on NixOS"
|
||||
- name: "Build native libs on NixOS"
|
||||
env: SERVICE=build-nixos
|
||||
- name: "Build on Ubuntu"
|
||||
- name: "Build native libs on Ubuntu"
|
||||
env: SERVICE=build-ubuntu
|
||||
|
||||
script: docker-compose run $SERVICE
|
||||
|
|
|
@ -26,4 +26,4 @@ You are also implicitly verifying that all code is your original work, or unorig
|
|||
Copyright (c) 2020 Leroy Hopson (MIT License)
|
||||
|
||||
The fonts used in this project are published under a seperate license.
|
||||
See: [addons/godot_xterm/fonts/LICENSE.txt](addons/godot_xterm/fonts/LICENSE.txt).
|
||||
See the various license files in the [subdirectories](addons/godot_xterm/themes/fonts/) for each font.
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
LICENSE
|
21
addons/godot_xterm/LICENSE
Normal file
21
addons/godot_xterm/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 The GodotXterm authors (https://github.com/lihop/godot-xterm/contributors)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,16 +0,0 @@
|
|||
[general]
|
||||
|
||||
singleton=false
|
||||
load_once=true
|
||||
symbol_prefix="godot_"
|
||||
reloadable=true
|
||||
|
||||
[entry]
|
||||
|
||||
X11.64="res://addons/godot_xterm/bin/x11/libgodotxtermnative.so"
|
||||
Server.64="res://addons/godot_xterm/bin/x11/libgodotxtermnative.so"
|
||||
|
||||
[dependencies]
|
||||
|
||||
X11.64=[ ]
|
||||
Server.64=[ ]
|
16
addons/godot_xterm/import_plugins/cast_import_plugin.gd
Normal file
16
addons/godot_xterm/import_plugins/cast_import_plugin.gd
Normal file
|
@ -0,0 +1,16 @@
|
|||
extends Node
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
|
@ -18,10 +18,10 @@ opts.Add(PathVariable('target_path', 'The path where the lib is installed.', 'bi
|
|||
opts.Add(PathVariable('target_name', 'The library name.', 'libgodotxtermnative', PathVariable.PathAccept))
|
||||
|
||||
# Local dependency paths, adapt them to your setup
|
||||
godot_headers_path = "godot-cpp/godot_headers/"
|
||||
cpp_bindings_path = "godot-cpp/"
|
||||
godot_headers_path = "modules/godot-cpp/godot_headers/"
|
||||
cpp_bindings_path = "modules/godot-cpp/"
|
||||
cpp_library = "libgodot-cpp"
|
||||
libtsm_path = "libtsm/"
|
||||
libtsm_path = "modules/libtsm/"
|
||||
|
||||
# only support 64 at this time..
|
||||
bits = 64
|
|
@ -1,26 +1,27 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash --pure -p binutils.bintools cmake scons
|
||||
set -e
|
||||
|
||||
# Make sure we are in the addons/godot_xterm directory
|
||||
cd ${BASH_SOURCE%/*}
|
||||
|
||||
# Initialize godot-cpp
|
||||
if [ ! -d "godot-cpp/bin" ]
|
||||
if [ ! -d "modules/godot-cpp/bin" ]
|
||||
then
|
||||
cd godot-cpp
|
||||
cd modules/godot-cpp
|
||||
scons platform=linux generate_bindings=yes -j12
|
||||
cd ..
|
||||
cd ../..
|
||||
fi
|
||||
|
||||
# Build libtsm
|
||||
if [ ! -f "libtsm/build/src/tsm/libtsm.a" ]
|
||||
if [ ! -f "modules/libtsm/build/src/tsm/libtsm.a" ]
|
||||
then
|
||||
cd libtsm
|
||||
cd modules/libtsm
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -DBUILD_SHARED_LIBS=n ..
|
||||
make
|
||||
cd ../..
|
||||
cd ../../..
|
||||
fi
|
||||
|
||||
# Build godotxtermnative
|
16
addons/godot_xterm/native/godotxtermnative.gdnlib
Normal file
16
addons/godot_xterm/native/godotxtermnative.gdnlib
Normal file
|
@ -0,0 +1,16 @@
|
|||
[general]
|
||||
|
||||
singleton=false
|
||||
load_once=true
|
||||
symbol_prefix="godot_"
|
||||
reloadable=true
|
||||
|
||||
[entry]
|
||||
|
||||
X11.64="res://addons/godot_xterm/native/bin/x11/libgodotxtermnative.so"
|
||||
Server.64="res://addons/godot_xterm/native/bin/x11/libgodotxtermnative.so"
|
||||
|
||||
[dependencies]
|
||||
|
||||
X11.64=[ ]
|
||||
Server.64=[ ]
|
|
@ -1,6 +1,6 @@
|
|||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot_xterm/godotxtermnative.gdnlib" type="GDNativeLibrary" id=1]
|
||||
[ext_resource path="res://addons/godot_xterm/native/godotxtermnative.gdnlib" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "Terminal"
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -2,15 +2,15 @@
|
|||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/pseudoterminal_icon.svg-50ba2514dae785a6b48b0da604cf3a09.stex"
|
||||
path="res://.import/pseudoterminal_icon.svg-0b26aed87c28626d61aa92bd9e34d5a9.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/godot_xterm/pseudoterminal_icon.svg"
|
||||
dest_files=[ "res://.import/pseudoterminal_icon.svg-50ba2514dae785a6b48b0da604cf3a09.stex" ]
|
||||
source_file="res://addons/godot_xterm/nodes/pseudoterminal/pseudoterminal_icon.svg"
|
||||
dest_files=[ "res://.import/pseudoterminal_icon.svg-0b26aed87c28626d61aa92bd9e34d5a9.stex" ]
|
||||
|
||||
[params]
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot_xterm/godotxtermnative.gdnlib" type="GDNativeLibrary" id=1]
|
||||
[ext_resource path="res://addons/godot_xterm/native/godotxtermnative.gdnlib" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "Terminal"
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -2,15 +2,15 @@
|
|||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/terminal_icon.svg-33ee6ad8b86db2f37e5d8d61a6b1b8db.stex"
|
||||
path="res://.import/terminal_icon.svg-a0706fd47bb880823b1242c224120d4f.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/godot_xterm/terminal_icon.svg"
|
||||
dest_files=[ "res://.import/terminal_icon.svg-33ee6ad8b86db2f37e5d8d61a6b1b8db.stex" ]
|
||||
source_file="res://addons/godot_xterm/nodes/terminal/terminal_icon.svg"
|
||||
dest_files=[ "res://.import/terminal_icon.svg-a0706fd47bb880823b1242c224120d4f.stex" ]
|
||||
|
||||
[params]
|
||||
|
|
@ -3,12 +3,12 @@ extends EditorPlugin
|
|||
|
||||
|
||||
func _enter_tree():
|
||||
var terminal_script = preload("res://addons/godot_xterm/terminal.gdns")
|
||||
var terminal_icon = preload("res://addons/godot_xterm/terminal_icon.svg")
|
||||
var terminal_script = preload("res://addons/godot_xterm/nodes/terminal/terminal.gdns")
|
||||
var terminal_icon = preload("res://addons/godot_xterm/nodes/terminal/terminal_icon.svg")
|
||||
add_custom_type("Terminal", "Control", terminal_script, terminal_icon)
|
||||
|
||||
var pseudoterminal_script = preload("res://addons/godot_xterm/pseudoterminal.gdns")
|
||||
var pseudoterminal_icon = preload("res://addons/godot_xterm/pseudoterminal_icon.svg")
|
||||
var pseudoterminal_script = preload("res://addons/godot_xterm/nodes/pseudoterminal/pseudoterminal.gdns")
|
||||
var pseudoterminal_icon = preload("res://addons/godot_xterm/nodes/pseudoterminal/pseudoterminal_icon.svg")
|
||||
add_custom_type("Pseudoterminal", "Node", pseudoterminal_script, pseudoterminal_icon)
|
||||
|
||||
|
||||
|
|
Binary file not shown.
|
@ -4,14 +4,14 @@ services:
|
|||
build:
|
||||
context: .
|
||||
dockerfile: ./dockerfiles/archlinux
|
||||
command: bash /src/addons/godot_xterm/build.sh
|
||||
command: bash /src/addons/godot_xterm/native/build.sh
|
||||
build-nixos:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./dockerfiles/nixos
|
||||
command: /src/addons/godot_xterm/build.sh
|
||||
command: /src/addons/godot_xterm/native/build.sh
|
||||
build-ubuntu:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./dockerfiles/ubuntu
|
||||
command: bash /src/addons/godot_xterm/build.sh
|
||||
command: bash /src/addons/godot_xterm/native/build.sh
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot_xterm/terminal.gdns" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gdns" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot_xterm/themes/default.theme" type="Theme" id=2]
|
||||
[ext_resource path="res://addons/godot_xterm/pseudoterminal.gdns" type="Script" id=3]
|
||||
[ext_resource path="res://addons/godot_xterm/nodes/pseudoterminal/pseudoterminal.gdns" type="Script" id=3]
|
||||
[ext_resource path="res://examples/terminal/container.gd" type="Script" id=4]
|
||||
|
||||
[node name="Container" type="Container"]
|
||||
|
|
Loading…
Reference in a new issue