shots record: gameplay clips from a web build (Chromium screencast), iOS Simulator, Android emulator or a folder

This commit is contained in:
CRTkafa 2026-10-10 14:22:52 +00:00
parent 630e933427
commit 37a32033c1
4 changed files with 319 additions and 4 deletions

View file

@ -53,13 +53,13 @@ export function adbPath(): string {
}
/** Throws the install hint when a tool is neither a path that exists nor on PATH. */
function requireTool(cmd: string, name = cmd): void {
export function requireTool(cmd: string, name = cmd): void {
if (existsSync(cmd) || Bun.which(cmd)) return;
throw new Error(TOOL_HINTS[name] ?? `${name} not found on PATH`);
}
/** Language ids -> the locale each source should use (App Store locale for iOS, first Play code for Android). */
function localeOf(config: ShipConfig, lang: string, source: Source): string {
export function localeOf(config: ShipConfig, lang: string, source: Source): string {
const l = config.languages.find(x => x.id === lang);
if (source === 'ios-sim') return l?.apple ?? lang;
const p = l?.play;