Windows package smoke (export, hw decode toggle), fail-closed ELF checker, exact built-in icons, own-name highlight, ICO, PRODUCT/DESIGN, docs sync
ci / linux-arm64-cross (push) Successful in 3m37s
ci / linux-x64 (push) Successful in 4m19s

This commit is contained in:
omar committed 2026-10-24 03:47:19 +03:00
1 parent aaa389cc9b
commit 24266469bf
19 files changed
+387 -25

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
# Design
Documented from the shipped interface (`app/renderer/styles/app.css`, `index.html`) — this records what is
built, it is not an aspiration. Mode: **Operate**. Direction: the category standard of voice-chat clients,
chosen by the owner ("straightforward operative familiar chat UI"), executed with a restrained peach accent.
## Layout
- Two columns: sidebar `clamp(280px, 27vw, 390px)` (server header, host banner, channel tree, own-status
footer) and a workspace (connect form, or channel header + optional stream viewer + chat, or settings).
- Tree rows: channels with `#`/lock glyph, server channel icon at the right, server banner as a row
background fading from the sidebar colour; members indented under channels with avatar/status dot,
nickname (never truncated before group labels), server-configured group labels, mute/away/recording
flags, group icons and country code, and a pill "Смотреть" button for streamers.
- Settings is a full workspace view with sections Профиль, Звук, Видео трансляций, О программе.
- Stream viewer: black stage with the video contained, dark control bar (title, codec · resolution · fps,
mute, volume 0–100 %, fullscreen, stop). Overlay text explains every non-live state.
## Colour
Restrained strategy: warm neutrals plus one accent; state colours only where they mean something.
| Token | Light | Dark | Use |
|---|---|---|---|
| `--bg` | `#f6f3f0` | `#1a1817` | window ground |
| `--surface` | `#fffdfb` | `#211e1c` | workspace, inputs |
| `--sidebar` | `#eee9e4` | `#1e1b1a` | sidebar |
| `--sunken` | `#e6e0da` | `#151312` | footer, UID, group labels |
| `--text` / `--text-2` / `--text-3` | `#221c18` / `#5e544d` / `#776c64` | `#ede6e0` / `#b2a79f` / `#978c84` | text hierarchy |
| `--accent` | `#b24f26` | `#f09a6c` | primary buttons, selected tab, own name, focus |
| `--accent-soft` | `#fbe2d4` | `#3b2920` | current channel, selection |
| `--peach` | `#f3a37c` | `#f3a37c` | brand mark |
| `--talk` | `#1f8a5a` | `#4fcf8e` | talking indicator, PTT held |
| `--danger` | `#b3261e` | `#f08b82` | mute/deafen active, errors |
Theme follows `prefers-color-scheme`; selection, caret, scrollbars and focus rings use the palette.
## Type
System UI stack (`system-ui, -apple-system, "Segoe UI", "Noto Sans", Ubuntu, Cantarell, …`), 14 px base,
line-height 1.45; headings 600–650 weight at 17–24 px; monospace only for the UID and codec lists (data).
Tabular numerals for counts, times and statistics.
## Components
Buttons (primary, default, ghost), 34 px icon buttons with `aria-pressed` states, fields with labels above,
radio/checkbox choices with accent colour, range sliders, chat tabs with unread counters, toasts in a polite
live region (errors 10 s, others 5 s). Icons are an inline SVG sprite drawn in one 1.8 stroke style.
## Motion
Only colour transitions (120 ms) and the toast entrance (180 ms, exponential ease-out); everything is
disabled under `prefers-reduced-motion`.
+11 -9
View File
@@ -7,7 +7,8 @@ UI, evidence path given; **implemented** = code + unit/loopback tests, no live p
| Feature | Status | Evidence / reason | | Feature | Status | Evidence / reason |
|---|---|---| |---|---|---|
| First-run nickname, P-256 identity, public UID, restart persistence, rename keeps UID | proven | `docs/evidence/runtime/2026-10-24-identity/` | | First-run nickname, P-256 identity, public UID, restart persistence, rename keeps UID | proven | `docs/evidence/runtime/2026-10-24-identity/` |
| Connect / disconnect (address, server password) | proven | identity run `04-connected.png` | | Connect / disconnect by address | proven | identity run `04-connected.png` |
| Server password on connect | implemented, not exercised | the test server has no password |
| Channel tree, join channel, password channels (inline prompt) | proven (join), implemented (password) | probe joined `cs`; no password test performed | | Channel tree, join channel, password channels (inline prompt) | proven (join), implemented (password) | probe joined `cs`; no password test performed |
| Voice TX/RX (Opus via core), talking indicators, mute, deafen RX+TX block/restore, PTT, open mic | proven | `docs/evidence/runtime/2026-10-24-voice-chat/` (synthetic capture device, real path after it) | | Voice TX/RX (Opus via core), talking indicators, mute, deafen RX+TX block/restore, PTT, open mic | proven | `docs/evidence/runtime/2026-10-24-voice-chat/` (synthetic capture device, real path after it) |
| Private chat | proven | voice-chat run `15/16-*.png` | | Private chat | proven | voice-chat run `15/16-*.png` |
@@ -20,14 +21,15 @@ UI, evidence path given; **implemented** = code + unit/loopback tests, no live p
| SFU streams | blocked | P2P only; `notifysfuaccessinfo` → "не поддерживается" | | SFU streams | blocked | P2P only; `notifysfuaccessinfo` → "не поддерживается" |
| Sending own screenshare | blocked | not implemented | | Sending own screenshare | blocked | not implemented |
| Server/channel group labels (`name_mode`), custom group icons, country | proven | `2026-10-24-tree-metadata/`: labels «куколд», «бля ща», 6 custom icons, RU | | Server/channel group labels (`name_mode`), custom group icons, country | proven | `2026-10-24-tree-metadata/`: labels «куколд», «бля ща», 6 custom icons, RU |
| Built-in group icons (id < 1000) | partial | server has no file; neutral named badge | | Built-in group icons (ids 100, 200, 300, 500, 600) | partial | server has no file (core: `not_found`, `builtin:true`); neutral badge named after the group |
| Channel icons and banners | proven | tree-metadata run: 11/11 icons, 11/11 banners | | Host banner | proven | tree-metadata run: server GIF rendered above the tree |
| Host banner | implemented in core | not rendered in UI yet |
| Avatars (server file) | implemented | no client on this server has `client_flag_avatar` | | Avatars (server file) | implemented | no client on this server has `client_flag_avatar` |
| Avatars (myTeamSpeak URL) | blocked (pending core field) | core adding `myts_avatar_url(s)`; main allowlists only server-announced http(s) URLs | | Avatars (myTeamSpeak URL) | proven | tree-metadata run: 1 avatar (public https PNG, bytes sniffed; URL allowlisted from server data) |
| Nickname colours | blocked | source not found in official UI bundle | | Nickname colours | matches official semantics | official UI colours own client and myTS contacts locally (`docs/evidence/ts6-official-client.md`); TeamsPeach highlights own nickname, has no contacts |
| Poke | not implemented | core supports target `poke` | | Poke | not implemented | core supports target `poke` |
| Identity export/import | implemented | CLI path by core; UI export via native dialog not exercised in automation | | Identity export/import | implemented | CLI path by core; UI export via native dialog not exercised in automation |
| Hardware video decode policy / OpenH264 toggle | blocked | Chromium engine exposes no per-codec backend choice; decoder is reported live | | Hardware video decode on/off | implemented | persisted, applied at launch via Chromium `disable-accelerated-video-decode`; settings show launch state, `getGPUFeatureStatus().video_decode` and the live decoder |
| Linux x64 / arm64 packages | in CI | Gitea run #1 started; results pending; Asahi hardware not reachable | | Cisco OpenH264 toggle / per-codec backend choice | not possible in this engine | Chromium WebRTC decodes H.264 with FFmpeg (OpenH264 only encodes) and exposes no decoder selection; stated in settings |
| macOS, Windows ARM64 | blocked | no build hosts | | Linux x64 / arm64 packages | in CI | release workflow written; results only from finished runs; Asahi hardware not reachable |
| Windows x64 package | local build | built on the developer PC, not in CI |
| macOS, Windows ARM64 | blocked | no macOS host; Windows ARM64 needs the VS "MSVC ARM64 build tools" component (not installed) |
+75
View File
@@ -0,0 +1,75 @@
# Product
<!-- impeccable:product-schema 1 -->
Recorded from the owner's brief relayed by the parent agent (no direct interview was possible in this
session; items marked *inferred* come from the brief alone).
## Platform
web
(An Electron desktop application whose interface is HTML/CSS; target systems: Linux ARM64 on Apple M1 Pro
under Asahi Linux first, plus Linux x86-64 and Windows x86-64.)
## Stack
Delegated: Electron with plain JavaScript modules and HTML/CSS for the interface; a Rust native core
(ReSpeak tsclientlib) for the TeamSpeak protocol, spoken to over newline-JSON stdio. Chosen because the
screenshare viewer needs a real libwebrtc-compatible WebRTC stack (Chromium's) and the owner had no stack
preference.
## Users
A Russian-speaking owner and the people on their own TeamSpeak 6 server (10.10.10.160), who meet there for
voice chat and watch each other's screen shares, typically while gaming or working. The owner uses Asahi
Linux on an M1 Pro, where no official TeamSpeak 6 client exists.
## Product Purpose
Let a user join a TeamSpeak 6 server without any account, talk and listen with working two-way voice, chat,
and watch real TS6 screen shares — first on Linux ARM64. Success: the owner sits in the server from Asahi with
working voice and can watch a friend's stream.
## Positioning
An independent, account-free TeamSpeak 6 client that interoperates with the official client's voice and P2P
screenshare protocol, built for platforms the official client does not serve.
## Operating Context
Long voice sessions with the app in the background; push-to-talk or an open microphone; occasional stream
viewing in a channel; the server is the owner's own TS6 server, administered elsewhere (no administration
from this client).
## Capabilities and Constraints
- No myTeamSpeak account, registration or global services; identity is a local P-256 key with a public UID.
- Server-provided content (names, chat, descriptions, banners, icons) is untrusted input.
- Screenshare viewing uses the P2P path only; SFU-routed streams are reported as unsupported.
- The renderer may not choose files, paths or commands; native dialogs live in the main process.
- Later goal: broader parity with server features; out of scope: global myTeamSpeak features.
- Undecided: sending one's own screen share; global push-to-talk on Wayland; license of TeamsPeach's code.
## Brand Commitments
Name "TeamsPeach"; restrained peach accent (*inferred* from the name and brief); Russian interface language.
The owner explicitly asked for a straightforward, familiar chat UI rather than a branding exercise.
## Evidence on Hand
Live runs against the owner's server are recorded in `docs/evidence/runtime/`. No testimonials, user counts or
benchmarks exist and none may be invented.
## Product Principles
1. Interoperability first: behaviour is proven against the real server and the official client, not assumed.
2. Truthful state: every control does something real; unsupported features say so plainly.
3. Identity is permanent and private: the UID never changes on rename; the private key never leaves the core
except through an explicit, user-chosen backup file.
4. Server content is shown, never executed.
## Accessibility & Inclusion
Keyboard-operable controls with visible focus, screen-reader names for icon buttons and tree rows, light and
dark themes following the OS, readable system fonts (*inferred* from the brief).
+7 -5
View File
@@ -67,11 +67,13 @@ CI: `.gitea/workflows/ci.yml` (Gitea Actions, контейнеры на Linux x6
обозначает уведомлением — TeamsPeach пишет «не поддерживается». TURN нет: нужен прямой путь обозначает уведомлением — TeamsPeach пишет «не поддерживается». TURN нет: нужен прямой путь
до компьютера стримера (STUN `turn.teamspeak.com`, как у официального клиента). до компьютера стримера (STUN `turn.teamspeak.com`, как у официального клиента).
- Показ своего экрана (отправка трансляции) не реализован. - Показ своего экрана (отправка трансляции) не реализован.
- Клавиша PTT работает только когда окно активно (глобальные клавиши на Wayland недоступны). - Клавиша PTT в TeamsPeach работает только пока окно активно: глобальная клавиша с удержанием
- Голос только Opus; каналы Speex/CELT помечаются как непригодные для передачи. (например, через портал GlobalShortcuts на Wayland) не реализована.
- Ник-цвета и аватары myTeamSpeak пока не отображаются (источник цвета не найден; аватары - Цвет ника: официальный клиент подсвечивает собственный ник и ники контактов myTeamSpeak (локальные
ожидают поле ядра). Иконки встроенных групп TeamSpeak (id < 1000) показываются нейтральным значком связи, а не данные сервера). Без учётной записи контактов нет, поэтому TeamsPeach выделяет только свой ник.
с названием группы — у сервера нет этих файлов. - Аватары: показываются серверные и myTeamSpeak-аватары (публичные https-ссылки, байты проверяются по
сигнатуре). Встроенные иконки групп TeamSpeak (id 100, 200, 300, 500, 600) — нейтральный значок с
названием группы: у сервера нет этих файлов.
- Управление «Cisco OpenH264» и выбор аппаратных бэкендов из TS6 в движке Chromium недоступны; - Управление «Cisco OpenH264» и выбор аппаратных бэкендов из TS6 в движке Chromium недоступны;
декодирование выбирает Chromium (на Windows подтверждён аппаратный D3D11 для AV1). декодирование выбирает Chromium (на Windows подтверждён аппаратный D3D11 для AV1).
- Сборки macOS и Windows ARM64 не выпускаются: нет сборочных машин. Linux ARM64 собирается - Сборки macOS и Windows ARM64 не выпускаются: нет сборочных машин. Linux ARM64 собирается
+4 -2
View File
@@ -39,9 +39,11 @@ async function viaCore(cmd, args) {
} }
} }
/** Built-in TeamSpeak group icons (< 1000) have no file on the server. */ /** TeamSpeak's built-in group icon ids (bridge §4.16): the server has no file for them. */
const BUILTIN_ICONS = new Set([100, 200, 300, 500, 600]);
export function isBuiltinIcon(id) { export function isBuiltinIcon(id) {
return Number.isInteger(id) && id > 0 && id < 1000; return BUILTIN_ICONS.has(id);
} }
export function iconUrl(iconId) { export function iconUrl(iconId) {
+2
View File
@@ -636,3 +636,5 @@ input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width
background-image: linear-gradient(90deg, var(--accent-soft) 30%, color-mix(in srgb, var(--accent-soft) 55%, transparent) 100%), var(--banner); background-image: linear-gradient(90deg, var(--accent-soft) 30%, color-mix(in srgb, var(--accent-soft) 55%, transparent) 100%), var(--banner);
} }
.host-banner { display: block; width: calc(100% - 20px); max-height: 96px; margin: 10px 10px 0; object-fit: contain; border-radius: var(--radius-sm); } .host-banner { display: block; width: calc(100% - 20px); max-height: 96px; margin: 10px 10px 0; object-fit: contain; border-radius: var(--radius-sm); }
/* The official client highlights only relationships it knows: the own client (and myTS contacts, which need an account). */
.member-row[data-self="true"] .row-label { color: var(--accent); }
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

+28
View File
@@ -0,0 +1,28 @@
# teamspeach-core — build targets on the Windows x64 host (2026-10-24)
| Target | Status | Evidence |
|---|---|---|
| x86_64-pc-windows-msvc | built, tested (33 unit + 3 stdio smoke), live-verified | `core/target/release/teamspeach-core.exe`, see `core-runtime.md` |
| x86_64-unknown-linux-gnu | CI (Gitea, Debian bookworm) | run #1 compiled; 1 unit test failed because the commit captured a mid-edit tree; rerun pending |
| aarch64-unknown-linux-gnu | CI cross build compiled | per desktop CI log: all PT_LOAD `p_align` 65536, offset ≡ vaddr mod 16 KiB, needs GLIBC_2.34; not executed |
| aarch64-pc-windows-msvc | **not buildable here** | see below |
| macOS (x86_64/aarch64-apple-darwin) | **not buildable here** | no Apple SDK, `xcrun` or `clang` on this host |
## Windows ARM64: what is present and what is missing
- VS 18 Community, MSVC 14.51.36231:
- `bin/Hostx64/` has only `x64` and `x86`, so there is no x64→ARM64 cross `cl.exe`/`link.exe`.
- `bin/HostArm64/arm64/` holds only ASan DLL/PDB files (and ARM64-host tools could not run on x64 anyway).
- `lib/arm64/` has only `clang_rt.*-aarch64.lib` (ASan, fuzzer, profile, ubsan, builtins). No `msvcrt.lib`, `vcruntime.lib`, `libcmt.lib` or `oldnames.lib`.
- VS LLVM folder: `clang-format`/`clang-tidy` only; no `clang-cl`/`lld-link`.
- VS 2022 Community / BuildTools (MSVC 14.44): no arm64 directories.
- Windows SDK 10.0.26100: `um/arm64` and `ucrt/arm64` import libraries are present.
- Missing: the VS component "MSVC Build Tools for ARM64/ARM64EC"
(`Microsoft.VisualStudio.Component.VC.Tools.ARM64`). It provides the cross compiler (needed for
the bundled libopus CMake build) and the ARM64 CRT. Not installed: this needs user approval.
- After the component is installed: `rustup target add aarch64-pc-windows-msvc`, then
`cargo build --release --locked -j 2 --target aarch64-pc-windows-msvc --manifest-path core/Cargo.toml`
→ `core/target/aarch64-pc-windows-msvc/release/teamspeach-core.exe`. Check PE Machine `0xAA64`.
That is a compile-only result; the binary cannot be run on this x64 host.
## macOS
Needs a macOS runner with Xcode or the Command Line Tools. The SDK is not taken from unofficial sources.
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

@@ -0,0 +1,114 @@
{
"startedAt": "2026-10-24T00:47:01.643Z",
"profile": "C:\\Users\\Admin\\AppData\\Local\\Temp\\teamspeach-smoke-mxCXBw",
"steps": [
{
"name": "screenshot 01-first-launch-onboarding.png",
"at": "2026-10-24T00:47:04.353Z"
},
{
"name": "short nickname rejected",
"at": "2026-10-24T00:47:04.383Z",
"message": "Никнейм должен содержать от 3 до 30 символов."
},
{
"name": "profile created",
"at": "2026-10-24T00:47:05.048Z",
"uid": "T3o35Q511WPChe/MuTQ5XUEntv8=",
"nickname": "PeachSmoke"
},
{
"name": "screenshot 02-after-onboarding.png",
"at": "2026-10-24T00:47:05.398Z"
},
{
"name": "restart keeps identity",
"at": "2026-10-24T00:47:06.379Z",
"uid": "T3o35Q511WPChe/MuTQ5XUEntv8=",
"nickname": "PeachSmoke",
"same": true
},
{
"name": "renamed",
"at": "2026-10-24T00:47:06.452Z",
"uid": "T3o35Q511WPChe/MuTQ5XUEntv8=",
"nickname": "PeachRenamed",
"status": "Сохранено. UID не изменился.",
"same": true
},
{
"name": "screenshot 03-settings-renamed.png",
"at": "2026-10-24T00:47:06.796Z"
},
{
"name": "rename persisted",
"at": "2026-10-24T00:47:07.768Z",
"uid": "T3o35Q511WPChe/MuTQ5XUEntv8=",
"nickname": "PeachRenamed",
"ok": true
},
{
"name": "connected",
"at": "2026-10-24T00:47:10.322Z",
"server": "без негатива",
"ownClientId": 53,
"channel": "Welcome to the club buddy",
"clients": 5,
"videoCodecs": [
"VP8",
"VP9 profile-id=0",
"VP9 profile-id=2",
"VP9 profile-id=1",
"VP9 profile-id=3",
"H264 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f",
"H264 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f",
"H264 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f",
"H264 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f",
"H264 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f",
"H264 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001f",
"H264 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=f4001f",
"H264 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=f4001f",
"AV1 level-idx=5;profile=0;tier=0",
"AV1 level-idx=5;profile=1;tier=0",
"H264 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f",
"H264 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=64001f",
"H265 level-id=180;profile-id=1;tier-flag=0;tx-mode=SRST",
"H265 level-id=180;profile-id=2;tier-flag=0;tx-mode=SRST"
]
},
{
"name": "screenshot 04-connected.png",
"at": "2026-10-24T00:47:10.689Z"
},
{
"name": "disconnected",
"at": "2026-10-24T00:47:10.704Z"
},
{
"name": "identity exported",
"at": "2026-10-24T00:47:10.778Z",
"status": "Сохранено в «identity.ini». UID T3o35Q511WPChe/MuTQ5XUEntv8=.",
"statusHasUid": true,
"iniHeader": "[Identity]",
"containsIdentityKey": true
},
{
"name": "hardware decode disabled, restart required",
"at": "2026-10-24T00:47:10.800Z",
"status": "В этом запуске: разрешено. Состояние декодирования видео в Chromium: аппаратное, активно."
},
{
"name": "after restart",
"at": "2026-10-24T00:47:11.879Z",
"status": "В этом запуске: запрещено (флаг disable-accelerated-video-decode). Состояние декодирования видео в Chromium: отключено, используется программное.",
"restartHint": false
},
{
"name": "screenshot 05-video-decode-disabled.png",
"at": "2026-10-24T00:47:12.253Z"
}
],
"console": [],
"finishedAt": "2026-10-24T00:47:12.359Z",
"ok": true
}
+14
View File
@@ -47,3 +47,17 @@ no code copied): discover with `requeststreaminfo clid`, join with `joinstreamre
offer in `notifyrespondjoinstreamrequest decision=1 offer`, answer `{"cmd":"answer","args":{"answer":sdp}}`, offer in `notifyrespondjoinstreamrequest decision=1 offer`, answer `{"cmd":"answer","args":{"answer":sdp}}`,
trickle `{"cmd":"iceCandidate","args":{"mLine","mid","sdp"}}`, mandatory answer to the realign `offer`, trickle `{"cmd":"iceCandidate","args":{"mLine","mid","sdp"}}`, mandatory answer to the realign `offer`,
leave with `is_remove=1`. leave with `is_remove=1`.
## Nickname colours and avatars in the channel tree (follow-up)
- `html/client_ui/main.css`: `.is-contact[data-v-…] .tsv-item-text{color:var(--tsv-online-color)}` and
`.contact{color:var(--tsv-online-color)}` — names of **myTeamSpeak contacts** are drawn in the "online"
(green) colour; `.ts-mixer-track.is-own … .ts-mixer-row-name{color:var(--tsv-highlight-color)}` — the
**own client** uses the highlight colour. `main.js` computes `isContact` from the myTeamSpeak chat
connection (`tschat_manager.defaultConnection`, `haveMyTsIdContact(clientMyTsId)`).
Nickname colours are therefore **local relationship highlighting, not server data**; no colour field
exists in `notifycliententerview` (confirmed by the core). TeamsPeach has no myTeamSpeak account and
therefore no contacts: it highlights only the own nickname.
- Avatar precedence in `main.js`: `client_flag_avatar` (server file) first, otherwise
`client_myteamspeak_avatar` resolved by the native `requestAvatarWithTsServerClientProperty`
(DLL: `Avatar_Cache::request_avatar_from_urls(vector<pair<unsigned, string>>)`).
+1 -1
View File
@@ -70,7 +70,7 @@
"nsis", "nsis",
"zip" "zip"
], ],
"icon": "build/icon.png" "icon": "build/icon.ico"
}, },
"nsis": { "nsis": {
"oneClick": false, "oneClick": false,
+26 -6
View File
@@ -24,9 +24,14 @@ function isElf(file) {
} }
} }
const missing = [];
function walk(p, out) { function walk(p, out) {
const st = statSync(p, { throwIfNoEntry: false }); const st = statSync(p, { throwIfNoEntry: false });
if (!st) return; if (!st) {
missing.push(p);
return;
}
if (st.isDirectory()) for (const e of readdirSync(p)) walk(path.join(p, e), out); if (st.isDirectory()) for (const e of readdirSync(p)) walk(path.join(p, e), out);
else if (st.isFile() && st.size > 64 && isElf(p)) out.push(p); else if (st.isFile() && st.size > 64 && isElf(p)) out.push(p);
} }
@@ -83,24 +88,39 @@ function inspect(file) {
} }
const glibc = [...new Set(b.toString('latin1').match(/GLIBC_[0-9]+(\.[0-9]+)+/g) ?? [])] const glibc = [...new Set(b.toString('latin1').match(/GLIBC_[0-9]+(\.[0-9]+)+/g) ?? [])]
.sort((x, y) => x.slice(6).split('.').map(Number).reduce((acc, n, i) => acc || n - (y.slice(6).split('.').map(Number)[i] ?? 0), 0)); .sort((x, y) => x.slice(6).split('.').map(Number).reduce((acc, n, i) => acc || n - (y.slice(6).split('.').map(Number)[i] ?? 0), 0));
const type = b.readUInt16LE(16);
const loadable = type === 2 || type === 3; // ET_EXEC, ET_DYN
if (loadable && loads.length === 0) return { file, error: 'executable/shared object without PT_LOAD segments' };
return { return {
file, file,
type: type === 2 ? 'exec' : type === 3 ? 'dyn' : type === 1 ? 'rel' : `type-${type}`,
machine: machine === 0xb7 ? 'aarch64' : machine === 0x3e ? 'x86-64' : `0x${machine.toString(16)}`, machine: machine === 0xb7 ? 'aarch64' : machine === 0x3e ? 'x86-64' : `0x${machine.toString(16)}`,
minLoadAlign: loads.length ? Math.min(...loads.map((l) => l.align)) : null, minLoadAlign: loads.length ? Math.min(...loads.map((l) => l.align)) : null,
pageOk: loads.every((l) => l.ok), // Relocatable objects are never mapped by the loader; everything loadable must satisfy every PT_LOAD.
pageOk: !loadable || loads.every((l) => l.ok),
needed, needed,
maxGlibc: glibc.at(-1) ?? null, maxGlibc: glibc.at(-1) ?? null,
}; };
} }
if (!Number.isInteger(PAGE) || PAGE <= 0 || (PAGE & (PAGE - 1)) !== 0) {
console.error(`--page must be a positive power of two, got ${pi >= 0 ? argv[pi + 1] : PAGE}`);
process.exit(2);
}
if (inputs.length === 0) {
console.error('no input path given');
process.exit(2);
}
const files = []; const files = [];
for (const input of inputs) walk(path.resolve(input), files); for (const input of inputs) walk(path.resolve(input), files);
const results = files.map(inspect); const results = files.map(inspect);
let bad = 0; let bad = 0;
for (const r of results) { for (const r of results) {
if (r.error || !r.pageOk) bad += 1; if (r.error || !r.pageOk) bad += 1;
console.log(`${r.pageOk ? 'ok ' : 'FAIL'} ${r.machine ?? ''} align=${r.minLoadAlign} glibc=${r.maxGlibc ?? '-'} ${path.relative(process.cwd(), r.file)}${r.needed?.length ? ` needs ${r.needed.join(',')}` : ''}${r.error ? ` (${r.error})` : ''}`); console.log(`${r.error || !r.pageOk ? 'FAIL' : 'ok '} ${r.machine ?? ''} ${r.type ?? ''} align=${r.minLoadAlign ?? '-'} glibc=${r.maxGlibc ?? '-'} ${path.relative(process.cwd(), r.file)}${r.needed?.length ? ` needs ${r.needed.join(',')}` : ''}${r.error ? ` (${r.error})` : ''}`);
} }
console.log(`${results.length} ELF files, ${bad} incompatible with ${PAGE}-byte pages`); for (const m of missing) console.error(`FAIL missing input: ${m}`);
if (jsonOut) writeFileSync(jsonOut, JSON.stringify({ page: PAGE, results }, null, 2)); if (files.length === 0) console.error('FAIL no ELF files found in the given inputs');
process.exit(bad ? 1 : 0); console.log(`${results.length} ELF files, ${bad} incompatible with ${PAGE}-byte pages, ${missing.length} missing inputs`);
if (jsonOut) writeFileSync(jsonOut, JSON.stringify({ page: PAGE, missing, results }, null, 2));
process.exit(bad || missing.length || files.length === 0 ? 1 : 0);
+19
View File
@@ -26,6 +26,25 @@ app.whenReady().then(async () => {
fs.writeFileSync(path.join(root, 'build', 'icon.png'), png); fs.writeFileSync(path.join(root, 'build', 'icon.png'), png);
fs.mkdirSync(path.join(root, 'app', 'renderer', 'assets'), { recursive: true }); fs.mkdirSync(path.join(root, 'app', 'renderer', 'assets'), { recursive: true });
fs.writeFileSync(path.join(root, 'app', 'renderer', 'assets', 'icon.png'), image.resize({ width: 256, height: 256 }).toPNG()); fs.writeFileSync(path.join(root, 'app', 'renderer', 'assets', 'icon.png'), image.resize({ width: 256, height: 256 }).toPNG());
// Windows icon with PNG-compressed entries, so packaging needs no image conversion tool.
const sizes = [16, 24, 32, 48, 64, 128, 256];
const pngs = sizes.map((s) => image.resize({ width: s, height: s, quality: 'best' }).toPNG());
const header = Buffer.alloc(6 + 16 * sizes.length);
header.writeUInt16LE(0, 0);
header.writeUInt16LE(1, 2);
header.writeUInt16LE(sizes.length, 4);
let offset = header.length;
sizes.forEach((s, i) => {
const e = 6 + 16 * i;
header.writeUInt8(s === 256 ? 0 : s, e);
header.writeUInt8(s === 256 ? 0 : s, e + 1);
header.writeUInt16LE(1, e + 4);
header.writeUInt16LE(32, e + 6);
header.writeUInt32LE(pngs[i].length, e + 8);
header.writeUInt32LE(offset, e + 12);
offset += pngs[i].length;
});
fs.writeFileSync(path.join(root, 'build', 'icon.ico'), Buffer.concat([header, ...pngs]));
console.log('icon written'); console.log('icon written');
app.quit(); app.quit();
}); });
+33 -2
View File
@@ -30,10 +30,12 @@ const step = (name, data = {}) => {
}; };
async function launch(label) { async function launch(label) {
const extra = [...(process.env.TEAMSPEACH_SMOKE_EXTRA_ARGS ?? '').split(' ').filter(Boolean), ...(args.fakemic ? ['--use-fake-device-for-media-stream', '--use-fake-ui-for-media-stream'] : [])];
// --exe runs a packaged build instead of the development tree.
const app = await electron.launch({ const app = await electron.launch({
executablePath: electronPath, executablePath: args.exe ? path.resolve(args.exe) : electronPath,
env: { ...process.env, TEAMSPEACH_PROFILE_DIR: profile }, env: { ...process.env, TEAMSPEACH_PROFILE_DIR: profile },
args: [root, ...(process.env.TEAMSPEACH_SMOKE_EXTRA_ARGS ?? '').split(' ').filter(Boolean), ...(args.fakemic ? ['--use-fake-device-for-media-stream', '--use-fake-ui-for-media-stream'] : [])], args: args.exe ? extra : [root, ...extra],
}); });
const page = await app.firstWindow(); const page = await app.firstWindow();
page.on('console', (msg) => result.console.push(`${label} ${msg.type()}: ${msg.text()}`)); page.on('console', (msg) => result.console.push(`${label} ${msg.type()}: ${msg.text()}`));
@@ -108,6 +110,35 @@ try {
await page.waitForFunction(() => window.teamspeachDiagnostics.snapshot().conn === 'disconnected', null, { timeout: 15000 }); await page.waitForFunction(() => window.teamspeachDiagnostics.snapshot().conn === 'disconnected', null, { timeout: 15000 });
step('disconnected'); step('disconnected');
} }
// 6. Identity backup through the real export path; only the native save dialog is answered by the test.
const exportFile = path.join(mkdtempSync(path.join(tmpdir(), 'teamspeach-export-')), 'identity.ini');
await app.evaluate(({ dialog }, file) => {
dialog.showSaveDialog = async () => ({ canceled: false, filePath: file });
}, exportFile);
await page.click('#btn-settings');
await page.click('#identity-export');
await page.waitForFunction(() => /UID|не удался/.test(document.querySelector('#identity-status').textContent), null, { timeout: 20000 });
const exportStatus = await page.textContent('#identity-status');
const { readFileSync, rmSync } = await import('node:fs');
const exported = readFileSync(exportFile, 'utf8');
step('identity exported', { status: exportStatus, statusHasUid: exportStatus.includes(uid1), iniHeader: exported.split(/\r?\n/)[0], containsIdentityKey: /^identity=/m.test(exported) });
rmSync(path.dirname(exportFile), { recursive: true, force: true });
if (!exportStatus.includes(uid1)) throw new Error('export did not report the profile UID');
// 7. Hardware video decoding: off → restart → reported as disabled at launch.
await page.uncheck('#opt-hwdec');
await page.waitForSelector('#hwdec-restart', { state: 'visible', timeout: 5000 });
step('hardware decode disabled, restart required', { status: await page.textContent('#hwdec-status') });
await app.close();
({ app, page } = await launch('run4'));
await visible(page, '#view-app');
await page.click('#btn-settings');
await page.waitForFunction(() => /запрещено/.test(document.querySelector('#hwdec-status').textContent), null, { timeout: 10000 });
step('after restart', { status: await page.textContent('#hwdec-status'), restartHint: await page.isVisible('#hwdec-restart') });
await page.locator('#set-video').scrollIntoViewIfNeeded();
await shot(page, '05-video-decode-disabled.png');
await page.check('#opt-hwdec');
await app.close(); await app.close();
} catch (err) { } catch (err) {
failed = err; failed = err;