LANG -> AUDIO
This commit is contained in:
parent
e9ddfd6c4a
commit
90cd88f1a8
14
Makefile
14
Makefile
|
@ -195,15 +195,15 @@ $(error Invalid target: T=$(T))
|
|||
endif
|
||||
export T
|
||||
|
||||
# Select sound language
|
||||
LANGUAGE_SOUND_FOLDER = config/_default_cfg_src_/res/$(LANG)
|
||||
ifeq ($(LANG),)
|
||||
$(error Please specify the sound language in the command line: LANG=<languageAbbrev>)
|
||||
# Select audio source
|
||||
AUDIO_FOLDER = config/_default_cfg_src_/res/$(AUDIO)
|
||||
ifeq ($(AUDIO),)
|
||||
$(error Please specify the sound language in the command line: AUDIO=<audioName>)
|
||||
endif
|
||||
ifeq ($(wildcard $(LANGUAGE_SOUND_FOLDER)),)
|
||||
$(error Invalid target: LANG=$(LANG))
|
||||
ifeq ($(wildcard $(AUDIO_FOLDER)),)
|
||||
$(error Invalid target: AUDIO=$(AUDIO))
|
||||
endif
|
||||
export LANG
|
||||
export AUDIO
|
||||
|
||||
KBUILD_OUTPUT := $(KBUILD_OUTPUT)/$(T)
|
||||
|
||||
|
|
|
@ -81,10 +81,10 @@ and recompile with `./build.sh`!
|
|||
|
||||
### Language support
|
||||
|
||||
The `LANG` environment variable can be set when running the `build.sh` script to load sound files
|
||||
for languages other than the default English. For example, running `LANG=cn ./build.sh` will load sounds files from
|
||||
The `AUDIO` environment variable can be set when running the `build.sh` script to load sound files
|
||||
for languages other than the default English. For example, running `AUDIO=cn ./build.sh` will load sounds files from
|
||||
`config/_default_cfg_src_/res/cn/` instead of the default `en/` folder.
|
||||
|
||||
The current languages supported with sound files are English (`en`) and Chinese (`cn`). Other languages
|
||||
(or other sets of custom sounds) may be added by adding all the correct sound files into a
|
||||
`config/_default_cfg_src_/res/<custom_language>/` directory and building with `LANG=<custom_language> ./build.sh`.
|
||||
`config/_default_cfg_src_/res/<custom_sounds>/` directory and building with `AUDIO=<custom_sounds> ./build.sh`.
|
4
build.sh
4
build.sh
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# use LANG environment variable, default to "en"
|
||||
LANG="${LANG:-en}"
|
||||
# use AUDIO environment variable, default to "en"
|
||||
AUDIO="${AUDIO:-en}"
|
||||
|
||||
make -j T=open_source DEBUG=1 >log.txt 2>&1
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ ifeq ($(VOICE_DATAPATH_TYPE),gsound)
|
|||
obj_cpp += $(patsubst $(cur_dir)%,%,$(wildcard $(cur_dir)/app_voice/app_$(VOICE_DATAPATH_TYPE)/*.cpp))
|
||||
endif
|
||||
|
||||
obj_mp3 := $(patsubst $(cur_dir)%,%,$(wildcard ../../config/_default_cfg_src_/res/$(LANG)/*.mp3))
|
||||
obj_mp3 := $(patsubst $(cur_dir)%,%,$(wildcard ../../config/_default_cfg_src_/res/$(AUDIO)/*.mp3))
|
||||
|
||||
obj-y := $(obj_mp3:.mp3=.snd.o) $(obj_mp3:.mp3=.snd.cpp) $(obj_c:.c=.o) $(obj_s:.S=.o) $(obj_cpp:.cpp=.o)
|
||||
|
||||
|
|
Loading…
Reference in New Issue