Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Core): migrate engine extensions to rust core #411

Merged
merged 45 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
90eacfc
feat(Core): migrate engine extensions to rust core
ShadowApex Aug 26, 2024
d984a55
fix(Udisks2): Fully restore Udisks2 and SteamRemovableMedia functiona…
pastaq Sep 12, 2024
36e28e0
fix(SubReaper): Re-implement subreaper
pastaq Sep 18, 2024
620e78a
fix(SubReaper): pass correct arguments and fix launcher
ShadowApex Sep 20, 2024
c948f32
fix(SubReaper): add standalone reaper command
ShadowApex Sep 20, 2024
95d5540
fix(Extensions): add cargo workspace to build all Rust extensions
ShadowApex Sep 28, 2024
e15901b
fix(LaunchManager): properly detect app launch
ShadowApex Sep 29, 2024
2c694ea
fix(OverlayMode): update overlay to use new Rust core
ShadowApex Sep 29, 2024
539abf9
fix(Overlay Mode): Overlay Mode Fixes
pastaq Sep 30, 2024
5a96942
fix(RunningApp): focus apps by app id instead of window id
ShadowApex Sep 30, 2024
864954a
fix(InteractiveProcess): update to use new Pty node
ShadowApex Sep 30, 2024
3e066d2
fix(Logging): add Rust logger
ShadowApex Oct 24, 2024
2e0443e
fix(Overlay Mode): Overlay Mode Fixes
pastaq Nov 23, 2024
c708809
fix(PTY): Fix Steam Plugin
pastaq Nov 27, 2024
6bec7ac
fix(Full Session): Fix opening Quick Bar while in game.
pastaq Nov 27, 2024
5f5cedb
fix(Core): update to latest godot rust
ShadowApex Nov 30, 2024
a86b2ab
fix(Full Session): loading menu fixes, launch fixes
ShadowApex Nov 30, 2024
2040d5e
fix(Full Session): Fix performance and gamepad issues.
pastaq Dec 1, 2024
1ce0440
fix(Hardware Manager): Fix Hardware Manager sometimes failing to dico…
pastaq Dec 2, 2024
26b93a4
feat(VDF): add native vdf config parser
ShadowApex Dec 4, 2024
844d7a9
chore(CI): update docker image and related ci
ShadowApex Dec 4, 2024
a1f06b7
fix(Tests): update tests to use new instances
ShadowApex Dec 4, 2024
f745450
fix(PluginLoader): update plugin api version and only consider plugin…
ShadowApex Dec 4, 2024
cf65092
fix(Reaper): only kill children of the reaper
ShadowApex Dec 4, 2024
9087f8f
feat(Library): add app lifecycle hooks
ShadowApex Dec 4, 2024
68adb0b
fix(RPM): include reaper binary in RPM
ShadowApex Dec 4, 2024
7144925
feat(NetworkManager): add support for network manager over dbus
ShadowApex Dec 6, 2024
67cd93f
fix(Extensions): update log levels
ShadowApex Dec 6, 2024
ef3a780
fix(Editor): add editor icons
ShadowApex Dec 6, 2024
54771a9
fix(Cards): better touch support
ShadowApex Dec 6, 2024
48e4848
feat(NetworkManager): implement dbus-based network manager and fix OOTBE
ShadowApex Dec 7, 2024
6f25d49
fix(InputPlumber): update test to use new default profile name
ShadowApex Dec 7, 2024
85ff606
feat(Command): add class to asyncronously execute commands
ShadowApex Dec 8, 2024
a40a5dd
feat(Card): add effect shaders on focus
ShadowApex Dec 8, 2024
21adfd3
feat(Library): add library refresh button
ShadowApex Dec 9, 2024
f169780
fix(LaunchManager): better window detection
ShadowApex Dec 10, 2024
708e9ee
fix(Core): use inputplumber for sending OSK keys and add open OSK button
ShadowApex Dec 11, 2024
d1a6a98
fix(Card): enable name visibility when no art exists
ShadowApex Dec 15, 2024
bd78605
fix(OSK): Fix OSK in overlay and full session
pastaq Dec 17, 2024
8bd44d3
fix(Power Menu): use tint instead of blur
ShadowApex Dec 17, 2024
35bc895
fix(Power Menu): add blur + tint
ShadowApex Dec 17, 2024
f468c0d
fix(PowerStation): Get power profiles from PowerStation
pastaq Dec 18, 2024
9d825ab
fix(Performance Menu): ensure default profile is set on app close
ShadowApex Dec 21, 2024
9fd0fc9
fix(Overlay Mode): Focus and Profile Fixes
pastaq Dec 21, 2024
32b7a40
fix(Overlay Mode): remove unnecessary Godot event blocking
ShadowApex Dec 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: |
make in-docker IMAGE_TAG=4.2.1 TARGET='import test GAMESCOPE_CMD='
make in-docker IMAGE_TAG=4.3 TARGET='import test GAMESCOPE_CMD='
2 changes: 1 addition & 1 deletion .releaserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ plugins:
# Execute commands to build the project
- - "@semantic-release/exec"
- shell: true
prepareCmd: "make in-docker IMAGE_TAG=4.2.2 TARGET='force-import dist'"
prepareCmd: "make in-docker IMAGE_TAG=4.3 TARGET='force-import dist'"

# Publish artifacts as a GitHub release
- - "@semantic-release/github"
Expand Down
72 changes: 24 additions & 48 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,16 @@ EXPORT_TEMPLATE ?= $(HOME)/.local/share/godot/export_templates/$(GODOT_REVISION)
#EXPORT_TEMPLATE_URL ?= https://downloads.tuxfamily.org/godotengine/$(GODOT_VERSION)/Godot_v$(GODOT_VERSION)-$(GODOT_RELEASE)_export_templates.tpz
EXPORT_TEMPLATE_URL ?= https://github.com/godotengine/godot/releases/download/$(GODOT_VERSION)-$(GODOT_RELEASE)/Godot_v$(GODOT_VERSION)-$(GODOT_RELEASE)_export_templates.tpz

ALL_ADDONS := ./addons/dbus/bin/libdbus.linux.template_$(BUILD_TYPE).x86_64.so ./addons/linuxthread/bin/liblinuxthread.linux.template_$(BUILD_TYPE).x86_64.so ./addons/pty/bin/libpty.linux.template_$(BUILD_TYPE).x86_64.so ./addons/unixsock/bin/libunixsock.linux.template_$(BUILD_TYPE).x86_64.so ./addons/xlib/bin/libxlib.linux.template_$(BUILD_TYPE).x86_64.so
ALL_ADDON_FILES := $(shell find ./addons -regex '.*\(\.cpp\|\.h\|\.hpp\)$$')
ALL_EXTENSIONS := ./addons/core/bin/libopengamepadui-core.linux.template_$(BUILD_TYPE).x86_64.so
ALL_EXTENSION_FILES := $(shell find ./extensions/ -regex '.*\(\.rs|\.toml\|\.lock\)$$')
ALL_GDSCRIPT := $(shell find ./ -name '*.gd')
ALL_SCENES := $(shell find ./ -name '*.tscn')
ALL_RESOURCES := $(shell find ./ -regex '.*\(\.tres\|\.svg\|\.png\)$$')
PROJECT_FILES := $(ALL_ADDONS) $(ALL_GDSCRIPT) $(ALL_SCENES) $(ALL_RESOURCES)
PROJECT_FILES := $(ALL_EXTENSIONS) $(ALL_GDSCRIPT) $(ALL_SCENES) $(ALL_RESOURCES)

# Docker image variables
IMAGE_NAME ?= ghcr.io/shadowblip/opengamepadui-builder
IMAGE_TAG ?= latest
ADDONS_IMAGE_NAME ?= ghcr.io/shadowblip/opengamepadui-addons-builder
ADDONS_IMAGE_TAG ?= latest

# Remote debugging variables
SSH_USER ?= deck
Expand All @@ -37,6 +35,8 @@ SSH_DATA_PATH ?= /home/$(SSH_USER)/Projects
# systemd-sysext variables
SYSEXT_ID ?= steamos
SYSEXT_VERSION_ID ?= 3.6.3
SYSEXT_LIBIIO_VERSION ?= 0.26-1
SYSEXT_LIBSERIALPORT_VERSION ?= 0.1.2-1

# Include any user defined settings
-include settings.mk
Expand Down Expand Up @@ -144,37 +144,40 @@ build/metadata.json: build/opengamepad-ui.x86_64 assets/crypto/keys/opengamepadu

.PHONY: import
import: $(IMPORT_DIR) ## Import project assets
$(IMPORT_DIR): $(ALL_ADDONS)
$(IMPORT_DIR): $(ALL_EXTENSIONS)
@echo "Importing project assets. This will take some time..."
command -v $(GODOT) > /dev/null 2>&1
timeout --foreground 40 $(GODOT) --headless --editor . > /dev/null 2>&1 || echo "Finished"
touch $(IMPORT_DIR)

.PHONY: force-import
force-import: $(ALL_ADDONS)
force-import: $(ALL_EXTENSIONS)
@echo "Force importing project assets. This will take some time..."
command -v $(GODOT) > /dev/null 2>&1
timeout --foreground 40 $(GODOT) --headless --editor . > /dev/null 2>&1 || echo "Finished"
timeout --foreground 40 $(GODOT) --headless --editor . > /dev/null 2>&1 || echo "Finished"

.PHONY: addons
addons: $(ALL_ADDONS) ## Build GDExtension addons
$(ALL_ADDONS) &: $(ALL_ADDON_FILES)
@echo "Building native GDExtension addons..."
cd ./gdext && $(MAKE) build
.PHONY: extensions
extensions: $(ALL_EXTENSIONS) ## Build engine extensions
$(ALL_EXTENSIONS) &: $(ALL_EXTENSION_FILES)
@echo "Building engine extensions..."
cd ./extensions && $(MAKE) build

.PHONY: edit
edit: $(IMPORT_DIR) ## Open the project in the Godot editor
$(GODOT) --editor .

.PHONY: purge
purge: clean ## Remove all build artifacts including engine extensions
rm -rf $(ROOTFS)
cd ./extensions && $(MAKE) clean

.PHONY: clean
clean: ## Remove build artifacts
clean: ## Remove Godot build artifacts
rm -rf build
rm -rf $(ROOTFS)
rm -rf $(CACHE_DIR)
rm -rf dist
rm -rf $(IMPORT_DIR)
cd ./gdext && $(MAKE) clean

.PHONY: run run-force
run: build/opengamepad-ui.x86_64 run-force ## Run the project in gamescope
Expand All @@ -193,7 +196,7 @@ $(EXPORT_TEMPLATE):

.PHONY: debug
debug: $(IMPORT_DIR) ## Run the project in debug mode in gamescope
$(GAMESCOPE) -e --xwayland-count 2 -- \
$(GAMESCOPE) -e --xwayland-count 2 --expose-wayland -- \
$(GODOT) --path $(PWD) --remote-debug tcp://127.0.0.1:6007 \
--position 320,140 res://entrypoint.tscn

Expand Down Expand Up @@ -237,9 +240,8 @@ assets/crypto/keys/opengamepadui.pub: assets/crypto/keys/opengamepadui.key
##@ Remote Debugging

.PHONY: deploy
deploy: dist-archive $(SSH_MOUNT_PATH)/.mounted ## Build, deploy, and tunnel to a remote device
cp dist/opengamepadui.tar.gz $(SSH_MOUNT_PATH)
cd $(SSH_MOUNT_PATH) #&& tar xvfz opengamepadui.tar.gz
deploy: dist-archive ## Build and deploy to a remote device
scp dist/opengamepadui.tar.gz $(SSH_USER)@$(SSH_HOST):$(SSH_DATA_PATH)
ssh -t $(SSH_USER)@$(SSH_HOST) tar xvfz "$(SSH_DATA_PATH)/opengamepadui.tar.gz"


Expand Down Expand Up @@ -274,14 +276,6 @@ tunnel: ## Create an SSH tunnel to allow remote debugging
ssh $(SSH_USER)@$(SSH_HOST) -N -f -R 6007:localhost:6007


# Mounts the remote device and creates an SSH tunnel for remote debugging
$(SSH_MOUNT_PATH)/.mounted:
mkdir -p $(SSH_MOUNT_PATH)
sshfs -o default_permissions $(SSH_USER)@$(SSH_HOST):$(SSH_DATA_PATH) $(SSH_MOUNT_PATH)
$(MAKE) tunnel
touch $(SSH_MOUNT_PATH)/.mounted


##@ Distribution

.PHONY: rootfs
Expand All @@ -293,6 +287,7 @@ rootfs: build/opengamepad-ui.x86_64
cp -r build/*.so $(ROOTFS)/usr/share/opengamepadui
cp -r build/opengamepad-ui.x86_64 $(ROOTFS)/usr/share/opengamepadui
cp -r build/opengamepad-ui.pck $(ROOTFS)/usr/share/opengamepadui
cp ./extensions/target/release/reaper $(ROOTFS)/usr/share/opengamepadui
touch $(ROOTFS)/.gdignore


Expand Down Expand Up @@ -393,7 +388,7 @@ $(CACHE_DIR)/inputplumber.tar.gz: $(CACHE_DIR)/libiio $(CACHE_DIR)/libserialport
wget -O $@ https://github.com/ShadowBlip/InputPlumber/releases/download/$${IP_VERSION}/inputplumber.tar.gz


LIBIIO_URL ?= https://mirror.rackspace.com/archlinux/extra/os/x86_64/libiio-0.25-3-x86_64.pkg.tar.zst
LIBIIO_URL ?= https://mirror.rackspace.com/archlinux/extra/os/x86_64/libiio-$(SYSEXT_LIBIIO_VERSION)-x86_64.pkg.tar.zst
$(CACHE_DIR)/libiio:
rm -rf $(CACHE_DIR)/libiio*
wget $(LIBIIO_URL) \
Expand All @@ -403,7 +398,7 @@ $(CACHE_DIR)/libiio:
tar xvf $(CACHE_DIR)/libiio.tar -C $(CACHE_DIR)/libiio


LIBSERIALPORT_URL ?= https://mirror.rackspace.com/archlinux/extra/os/x86_64/libserialport-0.1.1-5-x86_64.pkg.tar.zst
LIBSERIALPORT_URL ?= https://mirror.rackspace.com/archlinux/extra/os/x86_64/libserialport-$(SYSEXT_LIBSERIALPORT_VERSION)-x86_64.pkg.tar.zst
$(CACHE_DIR)/libserialport:
rm -rf $(CACHE_DIR)/libserialport*
wget $(LIBSERIALPORT_URL) \
Expand All @@ -421,14 +416,6 @@ release: ## Publish a release with semantic release
# E.g. make in-docker TARGET=build
.PHONY: in-docker
in-docker:
@# Build addons in a seperate container for glibc compatibility
docker run --rm \
-v $(PWD):/src \
--workdir /src \
-e PWD=/src \
--user $(shell id -u):$(shell id -g) \
$(ADDONS_IMAGE_NAME):$(ADDONS_IMAGE_TAG) \
make addons
@# Run the given make target inside Docker
docker run --rm \
-v $(PWD):/src \
Expand All @@ -449,14 +436,3 @@ docker-builder:
.PHONY: docker-builder-push
docker-builder-push: docker-builder
docker push $(IMAGE_NAME):$(IMAGE_TAG)

.PHONY: docker-builder-addons
docker-builder-addons:
@# Pull any existing image to cache it
docker pull $(ADDONS_IMAGE_NAME):$(ADDONS_IMAGE_TAG) || echo "No remote image to pull"
@# Build the Docker image that will build the project
docker build -t $(ADDONS_IMAGE_NAME):$(ADDONS_IMAGE_TAG) -f docker/Dockerfile.addons ./docker

.PHONY: docker-builder-addons-push
docker-builder-addons-push: docker-builder-addons
docker push $(ADDONS_IMAGE_NAME):$(ADDONS_IMAGE_TAG)
6 changes: 1 addition & 5 deletions addons/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
dbus/
linuxthread/
pty/
unixsock/
xlib/
*.so
1 change: 1 addition & 0 deletions addons/core/assets/icons/carbon--cloud-registry.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions addons/core/assets/icons/carbon--cloud-registry.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bghk66u2c0kq"
path="res://.godot/imported/carbon--cloud-registry.svg-1e050ab4a509bcd0338010b635012822.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/core/assets/icons/carbon--cloud-registry.svg"
dest_files=["res://.godot/imported/carbon--cloud-registry.svg-1e050ab4a509bcd0338010b635012822.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
1 change: 1 addition & 0 deletions addons/core/assets/icons/clarity--process-on-vm-line.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions addons/core/assets/icons/clarity--process-on-vm-line.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://b1e1er0exm6u4"
path="res://.godot/imported/clarity--process-on-vm-line.svg-283d9963c91ea54966f3276a32a96346.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/core/assets/icons/clarity--process-on-vm-line.svg"
dest_files=["res://.godot/imported/clarity--process-on-vm-line.svg-283d9963c91ea54966f3276a32a96346.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
76 changes: 76 additions & 0 deletions addons/core/assets/icons/inputplumber.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions addons/core/assets/icons/inputplumber.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://dbdyxgqmyeg1f"
path="res://.godot/imported/inputplumber.svg-930e8ab4c0d3c4d458c32ef96742bdaf.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://addons/core/assets/icons/inputplumber.svg"
dest_files=["res://.godot/imported/inputplumber.svg-930e8ab4c0d3c4d458c32ef96742bdaf.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
1 change: 1 addition & 0 deletions addons/core/assets/icons/library.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading