mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-01-22 01:30:35 -05:00
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" * <spoken language name> * <short pause> 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
This commit is contained in:
parent
032a38df4e
commit
0abfb3ff78
1 changed files with 5 additions and 1 deletions
|
|
@ -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)/,,$^)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue