EvanZhu0721 / 公开仓库
SBMS
SBMS complete the calculation rules for the default logical desktop topology relationship and the physical dimensions of the displays in the Windows multi-screen collaboration system.
文件
.githubassetsdocsdriverexamplesinstallerLICENSESsrctestsui.gitignore79 Bbuild-driver.ps15.3 KBbuild-installer.ps15.3 KBbuild.rs229 BCargo.lock147.3 KBCargo.toml1.6 KBLICENSE34.3 KBNOTICE.md1.2 KBREADME.md5.9 KBREADME.zh-CN.md5.2 KBrust-toolchain.toml124 BREADME.md5.9 KB
1
2
3
# SBMS4
5
[简体中文](README.zh-CN.md)6
7
BrainController8
9
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄10
11
● ChatGPT&Codex 100%12
13
14
'SBMS' stands for "SBMS bridges multiple screens", Microsoft is a great company and Windows is a good system. (BTW I use Linux for laptop XD)15
16
The original intention of 'SBMS' was to complete the calculation rules for the default logical desktop topology relationship and the physical dimensions of the displays in the Windows multi-screen collaboration system.17
18
'SBMS' turns one Windows virtual desktop into a full-screen mirror on a physical19
display. It is useful when Windows' normal extend/duplicate modes cannot provide20
the resolution, scaling, or desktop arrangement you need.21
22
Start a mapping from the tray, choose the physical display, and SBMS will:23
24
- create a virtual display at the configured size and refresh rate;25
- move eligible windows from the chosen display to the virtual desktop;26
- mirror the virtual desktop back to the chosen display;27
- forward mouse input to the real Windows pointer on the virtual desktop; and28
- restore the windows and physical display layout when mapping stops.29
30
New windows are picked up while the mapping is running.31
32
The tray can keep up to sixteen independent mirror or stream-only groups. Their33
display, sizing, resolution, refresh-rate, aspect-ratio and rotation settings34
survive normal restarts and installer upgrades. Existing single-output35
configuration is imported automatically as **Output 1**.36
37
Quick Access can keep up to three named configuration profiles. Create a profile38
from the current setup, switch between profiles, rename or delete them, and open39
the JSON storage directory from the profile menu. Switching while mapping is40
running asks for confirmation, then restarts the mapping with the selected profile.41
42
## Streaming43
44
Set an output to **Stream only**, choose its resolution, refresh rate and45
orientation, then start the mapping. SBMS creates the virtual desktop without46
mirroring it to a physical display and starts a dedicated Sunshine instance for47
that output. The tray shows the LAN address and port; use them to connect from48
Moonlight. **Open Sunshine** opens that instance's web panel for pairing and49
other Sunshine settings. Stopping the mapping also stops the managed instance.50
51
## How it works52
53
The application and lifecycle code are written in Rust. A small C++ UMDF54
indirect-display driver publishes the virtual monitor through WDF/IddCx.55
Desktop Duplication and a D3D11 shader keep the mirror on the GPU, including56
area-based downscaling and lightweight subpixel-fringe reduction.57
58
The tray panel is built with Slint. Installation and upgrades use Inno Setup.59
60
More implementation detail is available in61
[Architecture](docs/architecture.md). Frontend developers can use the62
[Geometry API](docs/geometry.md) and [mapping-plan API](docs/mapping-plan.md).63
64
## Install65
66
1. Download `SBMS-Setup-1.5.1-x64.exe` from the latest GitHub release.67
2. Run it and approve the administrator prompt.68
3. Open SBMS from the tray, choose a target display, and select **Start mapping**.69
4. Select **Stop and restore** when you want to end the mapping and restore the70
original display layout. If the display topology changes unexpectedly, SBMS71
attempts to reconnect automatically.72
73
SBMS starts automatically when the installing user signs in. Remove it from74
Windows **Installed apps**; the uninstaller also removes the driver and startup75
task.76
77
The current package uses a local test-signing certificate. Windows must trust78
that certificate, or be configured for test-signed drivers, before the driver79
can load. A Microsoft production-signed driver is required for normal public80
installation without that setup.81
82
## Command line83
84
The tray is the normal interface. The same lifecycle is also available from an85
administrator terminal:86
87
```powershell88
sbms list89
sbms map --target '<monitor-device-path>'90
sbms plan validate examples\two-streams.json91
sbms plan run examples\two-streams.json92
sbms config list93
sbms config show94
sbms config import gaming .\gaming.json --activate95
sbms shutdown96
```97
98
`sbms list` prints the stable ID used by `--target`. Press Enter to stop a99
foreground session cleanly. A mapping plan can contain up to sixteen mirror and100
stream-only groups. Up to three persistent configuration profiles can coexist;101
see [Configuration profiles](docs/configuration.md) for import, export,102
activation and hot-reload interfaces.103
104
## Build105
106
Requirements: Rust, Visual Studio C++ Build Tools, a matching Windows Driver107
Kit, Inno Setup 6, and a code-signing certificate for release packages.108
109
```powershell110
.\build-installer.ps1 -SigningCertificateThumbprint <thumbprint>111
```112
113
This is the complete release entry point: it builds the locked Rust binaries,114
builds and signs the driver, creates the installer, verifies every signature,115
and writes the installer plus its SHA-256 file to `target\installer`.116
117
For component development, use `cargo build --release --locked --bins` or118
`.\build-driver.ps1` separately. The complete unsigned build and packaging chain119
can be checked explicitly with `.\build-installer.ps1 -Unsigned`; it still120
compiles and validates the driver, then produces an `-unsigned` smoke artifact121
which must not be distributed.122
123
## Acknowledgments124
125
this is my first github repo which release to public and hope that can help you126
127
thanks for all of my friends, especially Jerry & Tony, who shared their ideas and advices with me. thanks for Mr Berti who is my CSA teacher. thanks for my parents who support me. thanks for my brother Eason who lives in the US and help me recharge my openAI account. thanks for Tibo who reset my token for several times. thanks for all of the agents and subagents who change my ideas into the program. thanks for the Chinese GFW which really trained me to become an expert in communication engineering. 128
129
$${\color{black}of \space course \space I \space still \space love \space you}$$130