Skip to content

Wolf UI #179

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

Draft
wants to merge 20 commits into
base: stable
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- uses: DoozyX/[email protected]
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/linux-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: |
git clone https://github.com/games-on-whales/gst-wayland-display
cd gst-wayland-display
git checkout a31f5a0
git checkout 6be99db
cargo install cargo-c
cargo cinstall -p c-bindings --prefix=/usr/local

Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
run: |
git clone https://github.com/games-on-whales/gst-wayland-display
cd gst-wayland-display
git checkout a31f5a0
git checkout 6be99db
cargo install cargo-c
cargo cinstall -p c-bindings --prefix=/usr/local --destdir=${{runner.workspace}}

Expand All @@ -138,15 +138,15 @@ jobs:
matrix:
cxx:
- g++-12
- clang++-16
- clang++
build_type: [ Release ]
shared: [ true, false ]
std: [ 20 ]
include:
- cxx: g++-12
other_pkgs: [ g++-12 ]
- cxx: clang++-16
other_pkgs: [ clang-16 ]
- cxx: clang++
other_pkgs: [ clang-18 ]


steps:
Expand Down
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
add_compile_options("-fno-inline")
endif ()

if(POLICY CMP0167)
cmake_policy(SET CMP0167 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0167 NEW)
endif()

if(POLICY CMP0169)
cmake_policy(SET CMP0169 OLD)
endif()

if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
endif()

# set(Boost_USE_STATIC_LIBS ON)

# Testing only available if this is the main app
Expand Down
9 changes: 8 additions & 1 deletion docker/wolf.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN <<_GST_WAYLAND_DISPLAY

git clone https://github.com/games-on-whales/gst-wayland-display
cd gst-wayland-display
git checkout a31f5a0
git checkout 6be99db
cargo install cargo-c
cargo cinstall -p c-bindings --prefix=/usr/local --libdir=/usr/local/lib/
_GST_WAYLAND_DISPLAY
Expand Down Expand Up @@ -88,6 +88,12 @@ RUN apt-get update -y && \
libglvnd0 libgl1 libglx0 libegl1 libgles2 xwayland \
&& rm -rf /var/lib/apt/lists/*

# Wolf UI runtime dependencies (.NET)
RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
dotnet-sdk-8.0 \
&& rm -rf /var/lib/apt/lists/*

ENV GST_PLUGIN_PATH=/usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/
# Copying out our custom compositor from the build stage
COPY --from=wolf-builder /usr/local/lib/x86_64-linux-gnu/gstreamer-1.0/* $GST_PLUGIN_PATH
Expand All @@ -101,6 +107,7 @@ RUN mkdir -p $WOLF_CFG_FOLDER

COPY --from=wolf-builder /wolf/wolf /wolf/wolf
COPY --from=wolf-builder /wolf/fake-udev /wolf/fake-udev
COPY --from=ghcr.io/games-on-whales/wolf-ui:alpha /usr/local/bin/wolf-ui /usr/local/bin/wolf-ui

ENV XDG_RUNTIME_DIR=/tmp/sockets \
WOLF_LOG_LEVEL=INFO \
Expand Down
169 changes: 165 additions & 4 deletions docs/modules/dev/partials/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"paths": {
"/api/v1/apps": {
"get": {
"summary": "Get all apps",
"description": "This endpoint returns a list of all apps.",
"summary": "Get all Moonlight apps",
"description": "This endpoint returns a list of all apps that will be shown in the Moonlight client.",
"responses": {
"200": {
"content": {
Expand All @@ -26,6 +26,16 @@
}
},
"description": ""
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/wolf__api__GenericErrorResponse"
}
}
},
"description": ""
}
}
}
Expand Down Expand Up @@ -80,6 +90,24 @@
}
}
},
"/api/v1/profiles": {
"get": {
"summary": "Get all profiles",
"description": "This endpoint returns a list of all profiles.",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/wolf__api__ProfileListResponse"
}
}
},
"description": ""
}
}
}
},
"/api/v1/sessions": {
"get": {
"summary": "Get all stream sessions",
Expand All @@ -100,7 +128,7 @@
},
"/api/v1/apps/add": {
"post": {
"summary": "Add an app",
"summary": "Add a Moonlight app",
"description": "",
"requestBody": {
"content": {
Expand Down Expand Up @@ -139,7 +167,7 @@
},
"/api/v1/apps/delete": {
"post": {
"summary": "Remove an app",
"summary": "Remove a Moonlight app",
"description": "",
"requestBody": {
"content": {
Expand Down Expand Up @@ -274,6 +302,84 @@
}
}
},
"/api/v1/profiles/add": {
"post": {
"summary": "Create a new profile",
"description": "",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/rfl__Reflector_wolf__core__events__Profile___ReflType"
}
}
},
"description": "",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/wolf__api__GenericSuccessResponse"
}
}
},
"description": ""
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/wolf__api__GenericErrorResponse"
}
}
},
"description": ""
}
}
}
},
"/api/v1/profiles/remove": {
"post": {
"summary": "Remove a profile",
"description": "",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/wolf__api__ProfileRemoveRequest"
}
}
},
"description": "",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/wolf__api__GenericSuccessResponse"
}
}
},
"description": ""
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/wolf__api__GenericErrorResponse"
}
}
},
"description": ""
}
}
}
},
"/api/v1/runners/start": {
"post": {
"summary": "Start a runner in a given session",
Expand Down Expand Up @@ -621,6 +727,32 @@
"title"
]
},
"rfl__Reflector_wolf__core__events__Profile___ReflType": {
"type": "object",
"properties": {
"apps": {
"type": "array",
"items": {
"$ref": "#/components/schemas/rfl__Reflector_wolf__core__events__App___ReflType"
}
},
"icon_png_path": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"apps",
"icon_png_path",
"id",
"name"
]
},
"rfl__Reflector_wolf__core__events__StreamSession___ReflType": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -877,6 +1009,35 @@
"success"
]
},
"wolf__api__ProfileListResponse": {
"type": "object",
"properties": {
"profiles": {
"type": "array",
"items": {
"$ref": "#/components/schemas/rfl__Reflector_wolf__core__events__Profile___ReflType"
}
},
"success": {
"type": "boolean"
}
},
"required": [
"profiles",
"success"
]
},
"wolf__api__ProfileRemoveRequest": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
"wolf__api__RunnerStartRequest": {
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if (UNIX AND NOT APPLE)
FetchContent_Declare(
inputtino
GIT_REPOSITORY https://github.com/games-on-whales/inputtino.git
GIT_TAG 311fd2d)
GIT_TAG 9c19995)
FetchContent_MakeAvailable(inputtino)
endif ()

Expand Down
2 changes: 1 addition & 1 deletion src/core/src/platforms/all/helpers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ target_link_libraries_system(wolf_helpers INTERFACE range-v3::range-v3)
FetchContent_Declare(
fmtlib
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 11.0.1)
GIT_TAG 11.1.4)
FetchContent_MakeAvailable(fmtlib)
target_link_libraries_system(wolf_helpers INTERFACE fmt::fmt-header-only)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ struct WaylandState {
wl_state_ptr create_wayland_display(const immer::array<std::string> &input_devices, const std::string &render_node) {
logs::log(logs::debug, "[WAYLAND] Creating wayland display");
auto w_display = display_init(render_node.c_str());
if (!w_display) {
return nullptr;
}
immer::vector_transient<std::string> final_devices;
immer::vector_transient<std::string> final_env;

Expand Down
Loading
Loading