Compare commits

...

5 Commits

Author SHA1 Message Date
Tom Wopat 82a0c540fa
Merge 1f7083a023 into 317218a682 2025-10-04 06:05:16 -04:00
Marc Brooks 317218a682
docs: debugging UI builds because of ui symlink (#873)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-04 12:05:14 +02:00
Tom Wopat 1f7083a023 Revert "feat: add fullscreen button"
This reverts commit dc7791c245.
2025-09-25 09:09:17 -04:00
Tom Wopat dc7791c245 feat: add fullscreen button 2025-09-23 23:50:06 -04:00
Tom Wopat 9affd248f3 feat: allow pointer lock when no video 2025-09-23 23:50:05 -04:00
2 changed files with 74 additions and 16 deletions

View File

@ -97,21 +97,38 @@ tail -f /var/log/jetkvm.log
``` ```
/kvm/ /kvm/
├── main.go # App entry point ├── main.go # App entry point
├── config.go # Settings & configuration ├── config.go # Settings & configuration
├── web.go # API endpoints ├── display.go # Device UI control
├── ui/ # React frontend ├── web.go # API endpoints
│ ├── src/routes/ # Pages (login, settings, etc.) ├── cmd/ # Command line main
│ └── src/components/ # UI components ├── internal/ # Internal Go packages
├── internal/ # Internal Go packages │ ├── confparser/ # Configuration file implementation
│ ├── native/ # CGO / Native code glue layer │ ├── hidrpc/ # HIDRPC implementation for HID devices (keyboard, mouse, etc.)
│ ├── native/cgo/ # C files for the native library (HDMI, Touchscreen, etc.) │ ├── logging/ # Logging implementation
│ ├── native/eez/ # EEZ Studio Project files (for Touchscreen) │ ├── mdns/ # mDNS implementation
│ ├── hidrpc/ # HIDRPC implementation for HID devices (keyboard, mouse, etc.) │ ├── native/ # CGO / Native code glue layer (on-device hardware)
│ ├── logging/ # Logging implementation │ │ ├── cgo/ # C files for the native library (HDMI, Touchscreen, etc.)
│ ├── usbgadget/ # USB gadget │ │ └── eez/ # EEZ Studio Project files (for Touchscreen)
│ └── websecurity/ # TLS certificate management │ ├── network/ # Network implementation
└── resource # netboot iso and other resources │ ├── timesync/ # Time sync/NTP implementation
│ ├── tzdata/ # Timezone data and generation
│ ├── udhcpc/ # DHCP implementation
│ ├── usbgadget/ # USB gadget
│ ├── utils/ # SSH handling
│ └── websecure/ # TLS certificate management
├── resource/ # netboot iso and other resources
├── scripts/ # Bash shell scripts for building and deploying
└── static/ # (react client build output)
└── ui/ # React frontend
├── public/ # UI website static images and fonts
└── src/ # Client React UI
├── assets/ # UI in-page images
├── components/ # UI components
├── hooks/ # Hooks (stores, RPC handling, virtual devices)
├── keyboardLayouts/ # Keyboard layout definitions
├── providers/ # Feature flags
└── routes/ # Pages (login, settings, etc.)
``` ```
**Key files for beginners:** **Key files for beginners:**
@ -252,6 +269,47 @@ rm -rf node_modules
npm install npm install
``` ```
### "Device UI Fails to Build"
If while trying to build you run into an error message similar to :
```plaintext
In file included from /workspaces/kvm/internal/native/cgo/ctrl.c:15:
/workspaces/kvm/internal/native/cgo/ui_index.h:4:10: fatal error: ui/ui.h: No such file or directory
#include "ui/ui.h"
^~~~~~~~~
compilation terminated.
```
This means that your system didn't create the directory-link to from _./internal/native/cgo/ui_ to ./internal/native/eez/src/ui when the repository was checked out. You can verify this is the case if _./internal/native/cgo/ui_ appears as a plain text file with only the textual contents:
```plaintext
../eez/src/ui
```
If this happens to you need to [enable git creation of symbolic links](https://stackoverflow.com/a/59761201/2076) either globally or for the KVM repository:
```bash
# Globally enable git to create symlinks
git config --global core.symlinks true
git restore internal/native/cgo/ui
```
```bash
# Enable git to create symlinks only in this project
git config core.symlinks true
git restore internal/native/cgo/ui
```
Or if you want to manually create the symlink use:
```bash
# linux
cd internal/native/cgo
rm ui
ln -s ../eez/src/ui ui
```
```dos
rem Windows
cd internal/native/cgo
del ui
mklink /d ui ..\eez\src\ui
```
--- ---
## Next Steps ## Next Steps

View File

@ -542,7 +542,7 @@ export default function WebRTCVideo() {
style={{ animationDuration: "500ms" }} style={{ animationDuration: "500ms" }}
className="animate-slideUpFade pointer-events-none absolute inset-0 flex items-center justify-center" className="animate-slideUpFade pointer-events-none absolute inset-0 flex items-center justify-center"
> >
<div className="relative h-full w-full rounded-md"> <div className="relative h-full w-full rounded-md" onClick={requestPointerLock}>
<LoadingVideoOverlay show={isVideoLoading} /> <LoadingVideoOverlay show={isVideoLoading} />
<HDMIErrorOverlay show={hdmiError} hdmiState={hdmiState} /> <HDMIErrorOverlay show={hdmiError} hdmiState={hdmiState} />
<NoAutoplayPermissionsOverlay <NoAutoplayPermissionsOverlay