Skip to content

Commit

Permalink
Remove all eSpeak emoji dictsource files before compiling eSpeak as t…
Browse files Browse the repository at this point in the history
…hese cause crashes at runtime for many languages. (#7810)
  • Loading branch information
michaelDCurran committed Dec 4, 2017
1 parent 338fb3e commit 7827279
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions nvdaHelper/espeak/sconscript
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,17 @@ env.Install(espeakRepo.Dir('dictsource'),env.Glob(os.path.join(espeakRepo.abspat

#Compile all dictionaries
missingDicts=['zhy', ] #'mt','tn','tt']
#Excluded Emoji files for some languages.
excludeEmojiFileFor=[
'ta', # #7740 the ள் symbol causes a problem in espeak if emoji for ta is used.
]
dictSourcePath=espeakRepo.Dir('dictsource').abspath
# Remove emoji files before compiling dictionaries as currently many of these simply crash eSpeak at runtime
emojiGlob = os.path.join(espeakRepo.abspath,'dictsource','*_emoji')
for f in glob(emojiGlob):
print("Removing emoji file: %s"%f)
os.remove(f)
for f in env.Glob(os.path.join(dictSourcePath,'*_rules')):
lang=f.name.split('_')[0]
if lang in missingDicts: continue
dictFileName = lang+'_dict'
dictFile=env.Command(espeakRepo.Dir('espeak-ng-data').File(dictFileName),f,espeak_compileDict_buildAction)
emojiFileName = os.path.join(espeakRepo.abspath,'dictsource',lang+'_emoji')
if lang in excludeEmojiFileFor and os.path.exists(emojiFileName):
os.remove(emojiFileName)
dictDeps=env.Glob(os.path.join(espeakRepo.abspath,'dictsource',lang+'_*'))
dictDeps.remove(f)
env.Depends(dictFile,dictDeps)
Expand Down

0 comments on commit 7827279

Please sign in to comment.