From 0abfb3ff782d69d77b8abc6a82208b46ff337206 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Thu, 8 Jan 2026 20:13:04 -0500 Subject: [PATCH] voice: Include a simple string enumeration in voicestrings.zip This maps the numerical IDs contained within the binary .vstrings files to their logical LANG_* and VOICE_* names. While not strictly needed to produce voice files, it adds the final piece to be able to use vstrings files to produce the same voice files as the existing 'make voice' flow that directly parses the language files. The 'make voice' flow intentionally divert a few of the generated clips into standalone files: * "invalid voice file" * * For this to be possible, we need to know which specific entries in vstrings map to the ones we care about, and without this enumeration (which can change on a per-target or even per-build basis) this is effectively impossible. The produced lang-enum.txt is simple, with one entry per line of the format: number:name Note that nothing uses this new file yet; that will come in subsequent commits. Change-Id: Iec3fccbb6d503dd7e2d529aad318009a489b1d77 --- apps/lang/lang.make | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/lang/lang.make b/apps/lang/lang.make index 305b7b9f92..bae19aad85 100644 --- a/apps/lang/lang.make +++ b/apps/lang/lang.make @@ -57,7 +57,11 @@ $(BUILDDIR)/apps/lang/voice-corrections.txt: $(ROOTDIR)/tools/voice-corrections. $(SILENT)mkdir -p $(dir $@) $(call PRINTS,CP $(subst $(ROOTDIR)/,,$<))cp $< $@ -$(BUILDDIR)/apps/lang/voicestrings.zip: $(VOICEOBJ) $(wildcard $(BUILDDIR)/apps/lang/*.talk) $(BUILDDIR)/apps/lang/voice-corrections.txt +$(BUILDDIR)/apps/lang/lang-enum.txt: $(BUILDDIR)/lang_enum.h + $(SILENT)mkdir -p $(dir $@) + $(call PRINTS,GEN $(subst $(BUILDDIR)/,,$@))perl -ne 'print if s|\s+(.*), /\* (\w+).*|$$2:$$1|' < $< |grep -v 'this:' > $@ + +$(BUILDDIR)/apps/lang/voicestrings.zip: $(VOICEOBJ) $(wildcard $(BUILDDIR)/apps/lang/*.talk) $(BUILDDIR)/apps/lang/voice-corrections.txt $(BUILDDIR)/apps/lang/lang-enum.txt $(call PRINTS,ZIP $(subst $(BUILDDIR)/,,$@)) $(SILENT)zip -9 -q $@ $(subst $(BUILDDIR)/,,$^)