Skip to content

Commit 70e0af0

Browse files
committed
[+] feat: windows screenshot and screen info
1 parent b11a298 commit 70e0af0

File tree

18 files changed

+1341
-9
lines changed

18 files changed

+1341
-9
lines changed

.mcp.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66
"args": []
77
},
88
"context7": {
9-
"type": "http",
10-
"url": "https://mcp.context7.com/mcp",
11-
"headers": {
12-
"CONTEXT7_API_KEY": "$CONTEXT7_API_KEY"
13-
}
9+
"type": "stdio",
10+
"command": "npx",
11+
"args": [
12+
"-y",
13+
"@upstash/context7-mcp",
14+
"--api-key",
15+
"ctx7sk-f81b63da-c228-4d91-9107-a64bc3762f38"
16+
],
17+
"env": {}
1418
}
1519
}
1620
}

Cargo.lock

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ console_log = "1.0"
8282
crypto-hash = "0.3"
8383
platform-dirs = "0.3"
8484

85+
86+
wio = "0.2"
8587
yuv = "0.8"
8688
mp4 = "0.14"
8789
nix = "0.30"
@@ -93,6 +95,7 @@ hound = "3.5"
9395
which = "8.0"
9496
ctrlc = "3.5"
9597
ashpd = "0.12"
98+
winapi = "0.3"
9699
rubato = "0.16"
97100
fdk-aac = "0.8"
98101
memmap2 = "0.9"
@@ -116,5 +119,6 @@ pmacro = { path = "lib/pmacro" }
116119
mp4-player = { path = "lib/mp4-player" }
117120
screen-capture = { path = "lib/screen-capture" }
118121
recorder = { path = "lib/recorder", default-features = false }
122+
screen-capture-windows = { path = "lib/screen-capture-windows" }
119123
screen-capture-wayland-wlr = { path = "lib/screen-capture-wayland-wlr" }
120124
screen-capture-wayland-portal = { path = "lib/screen-capture-wayland-portal" }

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ clippy:
107107
cargo clippy $(proj-features)
108108

109109
check:
110-
cargo check --no-default-features $(proj-features)
110+
cargo check --no-default-features $(proj-features) --bin ${app-name}
111111

112112
clean:
113113
cargo clean

lib/recorder/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,15 @@ pipewire.workspace = true
3333
screen-capture-wayland-wlr = { workspace = true, optional = true }
3434
screen-capture-wayland-portal = { workspace = true, optional = true }
3535

36+
[target.'cfg(target_os = "windows")'.dependencies]
37+
screen-capture-windows = { workspace = true, optional = true }
38+
3639
[dev-dependencies]
3740
ctrlc.workspace = true
3841
env_logger.workspace = true
3942

4043
[features]
4144
default = ["wayland-wlr"]
45+
windows = ["dep:screen-capture-windows"]
4246
wayland-wlr = ["dep:screen-capture-wayland-wlr"]
4347
wayland-portal = ["dep:screen-capture-wayland-portal"]

lib/scp-windows.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
scp -r ./screen-capture-windows 192.168.10.14:C:/Users/blue/Desktop/wayshot/lib
4+

lib/screen-capture-wayland-portal/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ crossbeam.workspace = true
2222
serde_json.workspace = true
2323
spin_sleep.workspace = true
2424
display-info.workspace = true
25-
screen-capture.workspace = true
2625
derive_setters.workspace = true
2726
tokio = { workspace = true, features = ["full"] }
2827
serde = { workspace = true, features = ["derive"] }
28+
screen-capture = { workspace = true, features = ["wayland"] }
2929

3030
[dev-dependencies]
3131
ctrlc.workspace = true
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[package]
2+
name = "screen-capture-windows"
3+
license.workspace = true
4+
edition.workspace = true
5+
version.workspace = true
6+
readme.workspace = true
7+
authors.workspace = true
8+
keywords.workspace = true
9+
homepage.workspace = true
10+
repository.workspace = true
11+
description.workspace = true
12+
13+
[dependencies]
14+
log.workspace = true
15+
wio.workspace = true
16+
image.workspace = true
17+
once_cell.workspace = true
18+
thiserror.workspace = true
19+
crossbeam.workspace = true
20+
spin_sleep.workspace = true
21+
display-info.workspace = true
22+
screen-capture.workspace = true
23+
winapi = { workspace = true, features = [
24+
"d3d11",
25+
"d3dcommon",
26+
"dxgi",
27+
"dxgi1_2",
28+
"dxgitype",
29+
"ntdef",
30+
"unknwnbase",
31+
"windef",
32+
"winerror",
33+
"winuser",
34+
] }
35+
36+
[dev-dependencies]
37+
ctrlc.workspace = true
38+
env_logger.workspace = true

0 commit comments

Comments
 (0)