Skip to content

Commit b7822e5

Browse files
committed
Release v0.1.5-exp.4
1 parent 090348d commit b7822e5

File tree

10 files changed

+272
-80
lines changed

10 files changed

+272
-80
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
|:-:|:-:|
3737
| ![Settings](docs/screenshots/setting.png) | ![macOS](docs/screenshots/macos.png) |
3838

39-
## Experimental v0.1.5-exp.3
39+
## Experimental v0.1.5-exp.4
4040

41-
The `v0.1.5-exp.3` prerelease adds an experimental `Direct Serial (COM)` provider for TCode-compatible multi-axis devices. It sends OSR / FUNSR-style `L0/L1/L2/R0/R1/R2` commands as a single-line TCode payload and keeps the existing `Intiface / Buttplug` path as an alternative.
41+
The `v0.1.5-exp.4` prerelease focuses on TCode-compatible multi-axis devices with `Direct Serial (COM)` support, one-line `L0/L1/L2/R0/R1/R2` output, smoother timeline and heatmap playback updates, and improved Handy re-sync after timeline seeks.
4242

4343
| Experimental v0.1.5 Preview |
4444
|:-:|
4545
| ![Experimental v0.1.5 Preview](docs/screenshots/preview_v015_exp1.png) |
4646

47-
- Download the prerelease: [ScriptPlayer+ v0.1.5-exp.3](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.3)
47+
- Download the prerelease: [ScriptPlayer+ v0.1.5-exp.4](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.4)
4848

4949
## What's New In v0.1.4
5050

@@ -83,7 +83,7 @@ The `v0.1.5-exp.3` prerelease adds an experimental `Direct Serial (COM)` provide
8383

8484
1. Download the latest `ScriptPlayerPlus-0.1.4-Windows-x64.zip` from [Releases](https://github.com/sioaeko/scriptplayer-plus/releases)
8585
2. Extract and run `ScriptPlayerPlus.exe` — no installation required
86-
3. For the experimental Direct Serial / Intiface build, download `ScriptPlayerPlus-0.1.5-exp.3-Windows-x64.zip` from [the v0.1.5-exp.3 prerelease](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.3)
86+
3. For the experimental Direct Serial / Intiface build, download `ScriptPlayerPlus-0.1.5-exp.4-Windows-x64.zip` from [the v0.1.5-exp.4 prerelease](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.4)
8787

8888
### macOS
8989

docs/README_JA.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
|:-:|:-:|
3737
| ![設定](screenshots/setting.png) | ![macOS](screenshots/macos.png) |
3838

39-
## 実験版 v0.1.5-exp.3
39+
## 実験版 v0.1.5-exp.4
4040

41-
`v0.1.5-exp.3` のプレリリースでは、TCode 対応のマルチアクシス機器向けに実験的な `Direct Serial (COM)` provider を追加しています。OSR / FUNSR 系の `L0/L1/L2/R0/R1/R2` コマンドを 1 行の TCode として送信し、既存の `Intiface / Buttplug` 経路も代替手段として維持しています
41+
`v0.1.5-exp.4` のプレリリースでは、TCode 対応のマルチアクシス機器向け `Direct Serial (COM)``L0/L1/L2/R0/R1/R2` 1 TCode 出力、より滑らかなタイムライン / ヒートマップ追従、そしてタイムライン seek 後の Handy 再同期改善を含みます
4242

43-
| v0.1.5-exp.3 プレビュー |
43+
| v0.1.5-exp.4 プレビュー |
4444
|:-:|
45-
| ![v0.1.5-exp.3 プレビュー](screenshots/preview_v015_exp1.png) |
45+
| ![v0.1.5-exp.4 プレビュー](screenshots/preview_v015_exp1.png) |
4646

47-
- プレリリースのダウンロード: [ScriptPlayer+ v0.1.5-exp.3](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.3)
47+
- プレリリースのダウンロード: [ScriptPlayer+ v0.1.5-exp.4](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.4)
4848

4949
## v0.1.4 の追加内容
5050

@@ -83,7 +83,7 @@
8383

8484
1. [Releases](https://github.com/sioaeko/scriptplayer-plus/releases)から最新の `ScriptPlayerPlus-0.1.4-Windows-x64.zip` をダウンロード
8585
2. 解凍して`ScriptPlayerPlus.exe`を実行 — インストール不要
86-
3. Direct Serial / Intiface 実験ビルドは [v0.1.5-exp.3 プレリリース](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.3) から `ScriptPlayerPlus-0.1.5-exp.3-Windows-x64.zip` をダウンロード
86+
3. Direct Serial / Intiface 実験ビルドは [v0.1.5-exp.4 プレリリース](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.4) から `ScriptPlayerPlus-0.1.5-exp.4-Windows-x64.zip` をダウンロード
8787

8888
### macOS
8989

docs/README_KO.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
|:-:|:-:|
3737
| ![설정](screenshots/setting_kor.png) | ![macOS](screenshots/macos.png) |
3838

39-
## 실험판 v0.1.5-exp.3
39+
## 실험판 v0.1.5-exp.4
4040

41-
`v0.1.5-exp.3` 프리릴리스는 TCode 호환 다축 장치를 위한 실험적인 `Direct Serial (COM)` provider를 추가합니다. OSR / FUNSR 계열 `L0/L1/L2/R0/R1/R2` 명령을 한 줄 TCode로 전송하고, 기존 `Intiface / Buttplug` 경로도 대안으로 유지합니다.
41+
`v0.1.5-exp.4` 프리릴리스는 TCode 호환 다축 장치를 위한 `Direct Serial (COM)` 지원, `L0/L1/L2/R0/R1/R2` 한 줄 TCode 출력, 더 부드러운 타임라인/히트맵 추적, 그리고 타임라인 seek 후 Handy 재동기화 개선을 포함합니다.
4242

43-
| v0.1.5-exp.3 미리보기 |
43+
| v0.1.5-exp.4 미리보기 |
4444
|:-:|
45-
| ![v0.1.5-exp.3 미리보기](screenshots/preview_v015_exp1.png) |
45+
| ![v0.1.5-exp.4 미리보기](screenshots/preview_v015_exp1.png) |
4646

47-
- 프리릴리스 다운로드: [ScriptPlayer+ v0.1.5-exp.3](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.3)
47+
- 프리릴리스 다운로드: [ScriptPlayer+ v0.1.5-exp.4](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.4)
4848

4949
## v0.1.4에서 추가된 내용
5050

@@ -83,7 +83,7 @@
8383

8484
1. [Releases](https://github.com/sioaeko/scriptplayer-plus/releases)에서 최신 `ScriptPlayerPlus-0.1.4-Windows-x64.zip` 다운로드
8585
2. 압축 해제 후 `ScriptPlayerPlus.exe` 실행 — 설치 불필요
86-
3. Direct Serial / Intiface 실험 빌드는 [v0.1.5-exp.3 프리릴리스](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.3)에서 `ScriptPlayerPlus-0.1.5-exp.3-Windows-x64.zip` 다운로드
86+
3. Direct Serial / Intiface 실험 빌드는 [v0.1.5-exp.4 프리릴리스](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.4)에서 `ScriptPlayerPlus-0.1.5-exp.4-Windows-x64.zip` 다운로드
8787

8888
### macOS
8989

docs/README_ZH.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
|:-:|:-:|
3737
| ![设置](screenshots/setting.png) | ![macOS](screenshots/macos.png) |
3838

39-
## 实验版 v0.1.5-exp.3
39+
## Experimental v0.1.5-exp.4
4040

41-
`v0.1.5-exp.3` 预发布为 TCode 兼容多轴设备加入了实验性的 `Direct Serial (COM)` provider。它会把 OSR / FUNSR 风格的 `L0/L1/L2/R0/R1/R2` 命令合并成单行 TCode 发送,同时保留现有的 `Intiface / Buttplug` 作为替代路径
41+
`v0.1.5-exp.4` 预发布包含面向 TCode 多轴设备的 `Direct Serial (COM)` 支持、`L0/L1/L2/R0/R1/R2` 单行 TCode 输出、更顺滑的时间线 / 热力图跟随,以及时间线 seek 后 Handy 重新同步改进
4242

43-
| v0.1.5-exp.3 预览 |
43+
| v0.1.5-exp.4 预览 |
4444
|:-:|
45-
| ![v0.1.5-exp.3 预览](screenshots/preview_v015_exp1.png) |
45+
| ![v0.1.5-exp.4 预览](screenshots/preview_v015_exp1.png) |
4646

47-
- 下载预发布版本: [ScriptPlayer+ v0.1.5-exp.3](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.3)
47+
- 下载预发布版本: [ScriptPlayer+ v0.1.5-exp.4](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.4)
4848

4949
## v0.1.4 新增内容
5050

@@ -83,7 +83,7 @@
8383

8484
1.[Releases](https://github.com/sioaeko/scriptplayer-plus/releases) 下载最新的 `ScriptPlayerPlus-0.1.4-Windows-x64.zip`
8585
2. 解压后运行 `ScriptPlayerPlus.exe` — 无需安装
86-
3. Direct Serial / Intiface 实验构建可从 [v0.1.5-exp.3 预发布](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.3) 下载 `ScriptPlayerPlus-0.1.5-exp.3-Windows-x64.zip`
86+
3. Direct Serial / Intiface 实验构建可从 [v0.1.5-exp.4 预发布](https://github.com/sioaeko/scriptplayer-plus/releases/tag/v0.1.5-exp.4) 下载 `ScriptPlayerPlus-0.1.5-exp.4-Windows-x64.zip`
8787

8888
### macOS
8989

electron/osrSerial.ts

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import { app } from 'electron'
2+
import { execFile } from 'child_process'
23
import { SerialPortStream } from '@serialport/stream'
34
import type { AutoDetectTypes } from '@serialport/bindings-cpp'
45
import { createRequire } from 'module'
56
import path from 'path'
7+
import { promisify } from 'util'
68
import { OsrSerialPortInfo, OsrSerialState } from '../src/types'
79

810
const DEFAULT_BAUD_RATE = 115200
911
const runtimeRequire = createRequire(import.meta.url)
12+
const execFileAsync = promisify(execFile)
1013

1114
type SerialPortBinding = AutoDetectTypes
1215
type RuntimeSerialPort = SerialPortStream<SerialPortBinding>
@@ -49,7 +52,7 @@ export class OsrSerialManager {
4952
}
5053

5154
async listPorts(): Promise<OsrSerialPortInfo[]> {
52-
const ports = await getSerialPortBinding().list()
55+
const ports = await listAvailablePorts()
5356
return ports
5457
.map((port) => ({
5558
path: port.path,
@@ -243,6 +246,62 @@ function getSerialPortBinding(): SerialPortBinding {
243246
return cachedBinding
244247
}
245248

249+
async function listAvailablePorts(): Promise<RawSerialPortInfo[]> {
250+
const portMap = new Map<string, RawSerialPortInfo>()
251+
252+
try {
253+
const ports = await getSerialPortBinding().list()
254+
for (const port of ports) {
255+
portMap.set(port.path, {
256+
path: port.path,
257+
manufacturer: port.manufacturer,
258+
serialNumber: port.serialNumber,
259+
vendorId: port.vendorId,
260+
productId: port.productId,
261+
pnpId: port.pnpId,
262+
})
263+
}
264+
} catch {
265+
// Keep going and try platform-specific fallbacks below.
266+
}
267+
268+
if (process.platform === 'win32') {
269+
for (const port of await listWindowsRegistryPorts()) {
270+
const existing = portMap.get(port.path)
271+
portMap.set(port.path, {
272+
path: port.path,
273+
manufacturer: existing?.manufacturer ?? port.manufacturer,
274+
serialNumber: existing?.serialNumber ?? port.serialNumber,
275+
vendorId: existing?.vendorId ?? port.vendorId,
276+
productId: existing?.productId ?? port.productId,
277+
pnpId: existing?.pnpId ?? port.pnpId,
278+
})
279+
}
280+
}
281+
282+
return Array.from(portMap.values())
283+
}
284+
285+
async function listWindowsRegistryPorts(): Promise<RawSerialPortInfo[]> {
286+
try {
287+
const { stdout } = await execFileAsync('reg', ['query', 'HKLM\\HARDWARE\\DEVICEMAP\\SERIALCOMM'])
288+
return stdout
289+
.split(/\r?\n/)
290+
.map(parseWindowsRegistryPortLine)
291+
.filter((port): port is RawSerialPortInfo => port !== null)
292+
} catch {
293+
return []
294+
}
295+
}
296+
297+
function parseWindowsRegistryPortLine(line: string): RawSerialPortInfo | null {
298+
const match = line.match(/\bREG_SZ\b\s+(COM\d+)\s*$/i)
299+
if (!match) return null
300+
return {
301+
path: match[1].toUpperCase(),
302+
}
303+
}
304+
246305
function buildPortDisplayName(path: string, manufacturer: string | null, serialNumber: string | null): string {
247306
const detail = manufacturer || serialNumber
248307
return detail ? `${path} (${detail})` : path

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scriptplayer-plus",
3-
"version": "0.1.5-exp.3",
3+
"version": "0.1.5-exp.4",
44
"description": "ScriptPlayer+ - Funscript video player with Handy and Intiface support",
55
"license": "PolyForm-Noncommercial-1.0.0",
66
"main": "dist-electron/main.js",

0 commit comments

Comments
 (0)