summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-05-19 17:14:35 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-09 22:44:56 +0200
commitd6ef5a0d8057bd6a0f9925d1002cc1a3207ff3b7 (patch)
tree4a87f6b59b203d54d931e4351d851fa00b540ae2 /apps
parent1e2c6506fbf503bace8356f90cd54a5b01a32f88 (diff)
downloadrockbox-d6ef5a0d8057bd6a0f9925d1002cc1a3207ff3b7.tar.gz
rockbox-d6ef5a0d8057bd6a0f9925d1002cc1a3207ff3b7.zip
Create binary voice string archive on target.
Extend genlang to create files holding the voice strings in a binary format similar to lng. Create such files for all languages during a normal build, put them in a zip file and add them to rockbox.zip so they are installed with a main build. Creating a voice file requires access to the voice strings, which are currently not distributed with Rockbox. Therefore it is necessary to either have access to the source code of the installed build or to use a build the genlang service on rockbox.org can retrieve the strings for, making it impossible for normal users to generate a voice file for custom builds, test builds and older builds that aren't supported by the rockbox.org script. It also requires a network connection when creating voice files with Rockbox Utility even if creating a voice file by itself isn't network related. Furthermore, putting the voice strings on the target is also a prerequisite for eventually supporting a TTS on the player. Strip voice strings path. Change-Id: Ic2f86130909b3b257986a348e5cfcf618c4500c3
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/lang.make11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/lang/lang.make b/apps/lang/lang.make
index d0dac71e95..a1351cee67 100644
--- a/apps/lang/lang.make
+++ b/apps/lang/lang.make
@@ -9,6 +9,7 @@
9 9
10LANGS := $(call preprocess, $(APPSDIR)/lang/SOURCES) 10LANGS := $(call preprocess, $(APPSDIR)/lang/SOURCES)
11LANGOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng) 11LANGOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng)
12VOICEOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.vstrings)
12LANG_O = $(BUILDDIR)/lang/lang_core.o 13LANG_O = $(BUILDDIR)/lang/lang_core.o
13 14
14CLEANOBJS += $(BUILDDIR)/lang/max_language_size.h $(BUILDDIR)/lang/lang* 15CLEANOBJS += $(BUILDDIR)/lang/max_language_size.h $(BUILDDIR)/lang/lang*
@@ -23,7 +24,7 @@ CLEANOBJS += $(BUILDDIR)/lang/max_language_size.h $(BUILDDIR)/lang/lang*
23# SUBHEADER_SIZE. 24# SUBHEADER_SIZE.
24# TODO: In the future generate this file within genlang or another script 25# TODO: In the future generate this file within genlang or another script
25# in order to only calculate the maximum size based on the core strings. 26# in order to only calculate the maximum size based on the core strings.
26$(BUILDDIR)/lang/max_language_size.h: $(LANGOBJ) 27$(BUILDDIR)/lang/max_language_size.h: $(LANGOBJ) $(BUILDDIR)/apps/lang/voicestrings.zip
27 $(call PRINTS,GEN $(subst $(BUILDDIR)/,,$@)) 28 $(call PRINTS,GEN $(subst $(BUILDDIR)/,,$@))
28 $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5-10}' | sort -n | tail -1`" > $@ 29 $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5-10}' | sort -n | tail -1`" > $@
29 30
@@ -34,7 +35,11 @@ $(BUILDDIR)/lang/lang_core.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/
34 35
35$(BUILDDIR)/lang/lang.h: $(BUILDDIR)/lang/lang_core.o 36$(BUILDDIR)/lang/lang.h: $(BUILDDIR)/lang/lang_core.o
36 37
37$(BUILDDIR)/%.lng : $(ROOTDIR)/%.lang $(BUILDDIR)/apps/genlang-features 38$(BUILDDIR)/%.lng $(BUILDDIR)/%.vstrings: $(ROOTDIR)/%.lang $(BUILDDIR)/apps/genlang-features
38 $(call PRINTS,GENLANG $(subst $(ROOTDIR)/,,$<)) 39 $(call PRINTS,GENLANG $(subst $(ROOTDIR)/,,$<))
39 $(SILENT)mkdir -p $(dir $@) 40 $(SILENT)mkdir -p $(dir $@)
40 $(SILENT)$(TOOLSDIR)/genlang -e=$(APPSDIR)/lang/english.lang -t=$(MODELNAME):`cat $(BUILDDIR)/apps/genlang-features` -i=$(TARGET_ID) -b=$@ $< 41 $(SILENT)$(TOOLSDIR)/genlang -e=$(APPSDIR)/lang/english.lang -t=$(MODELNAME):`cat $(BUILDDIR)/apps/genlang-features` -i=$(TARGET_ID) -b=$*.lng -c=$*.vstrings $<
42
43$(BUILDDIR)/apps/lang/voicestrings.zip: $(VOICEOBJ)
44 $(call PRINTS,ZIP $(subst $(BUILDDIR)/,,$@))
45 $(SILENT)zip -9 -q $@ $(subst $(BUILDDIR)/,,$^)