Timers 1.7.0: the LTC capture tool ships prebuilt, for Apple silicon and Intel

The tool used to be compiled by the macOS app build, or by the module
itself on the booth with swiftc — and a catalog install got source only,
which the unbundled 1.10.0 shell made every fresh install. Under the module
guide's rule it now ships built: bin/ltc-capture-macos-arm64 and
bin/ltc-capture-macos-x86_64, signed with the Developer ID (hardened
runtime, audio-input entitlement), from native/ltc-capture.swift via
native/build.sh. Nothing is built or looked for on the machine any more:
captureTool() picks the binary for this platform, and where there is none
— Windows, until a Windows implementation exists — timecode reports itself
off in the tile and the health line while the rest of the module runs.
The runtime build, its "building…" states and the device picker's build
kick are gone with it. The old top-level binary is no longer gitignored
(it is no longer written).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Waters Church
2026-09-30 10:11:08 -04:00
co-authored by Claude Fable 5.1
parent c11389473f
commit 2817a444c3
9 changed files with 109 additions and 138 deletions
+11 -16
View File
@@ -81,7 +81,7 @@
const http = require('http');
const path = require('path');
const { spawn } = require('child_process');
const { createLtcListener, ensureCaptureBinary } = require('./ltc-listener');
const { createLtcListener, captureTool } = require('./ltc-listener');
const { createTimerPhase } = require('./phase');
const manifest = require('./module.json');
@@ -660,11 +660,8 @@ function createLtcSource({ config, log, moduleDir }) {
kind: 'ltc',
start(e) {
emit = e;
// Kick the capture-tool build right away: a catalog install ships
// source only and a catalog update wipes any previously built binary,
// so coming up after an install/update must rebuild it without
// waiting for a device to be picked or a listener to need it.
ensureCaptureBinary({ moduleDir, log });
// The capture tool ships prebuilt in the module; the listener picks
// it for this platform when it starts and says so when there is none.
if (!device) {
word = {
error: 'Not configured — see Admin',
@@ -1359,23 +1356,21 @@ module.exports = {
},
// The admin device picker asks this machine what it can hear. The
// options shape matches the admin select's optionsRoute contract.
// Opening the picker also kicks the capture-tool build when a catalog
// install/update left only the source — without this, no tool meant
// no device list, and no device meant nothing would ever build it.
// options shape matches the admin select's optionsRoute contract. The
// capture tool ships prebuilt in the module (bin/); with none for this
// platform the list is empty and the error says so.
'GET /ltc/devices': (req, res) => {
const tool = ensureCaptureBinary({ moduleDir: __dirname, log });
const tool = captureTool(__dirname);
if (!tool.ready) {
sendJson(res, 200, { options: [], error: tool.detail || tool.error });
sendJson(res, 200, { options: [], error: tool.detail });
return;
}
const bin = path.join(__dirname, 'ltc-capture');
const child = spawn(bin, ['--list'], { stdio: ['ignore', 'ignore', 'pipe'], timeout: 4000 });
const child = spawn(tool.bin, ['--list'], { stdio: ['ignore', 'ignore', 'pipe'], timeout: 4000 });
let err = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', (t) => { err += t; });
child.on('error', () => {
sendJson(res, 200, { options: [], error: 'LTC capture tool missing — see modules/propresenter-timers/ltc-capture.swift' });
child.on('error', (e) => {
sendJson(res, 200, { options: [], error: `LTC capture tool could not be run: ${e.message}` });
});
child.on('exit', () => {
if (res.writableEnded) return;