Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ShellScripts/Linux/install_deps_root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ run_script() {
if ! install_package espeak-ng-dev; then
return 1
fi
# Some distributions put the data in arch-specific paths
HOSTARCH="$(usr/bin/arch 2>/dev/null || echo x86_64)"
Copy link
Contributor

@mcarans mcarans Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest using uname -m for this too

if [ ! -d /usr/share/espeak-ng-data ]; then
if [ ! -d /usr/local/share/espeak-ng-data ]; then
if [ ! -d /usr/lib/x86_64-linux-gnu/espeak-ng-data ]; then
echo "❌ espeak-ng-data not in /usr/share, /usr/local/share or /usr/lib/x86_64-linux-gnu!"
if [ ! -d /usr/lib/"$HOSTARCH"-linux-gnu/espeak-ng-data ]; then
echo "❌ espeak-ng-data not in /usr/share, /usr/local/share or /usr/lib/$HOST_ARCH-linux-gnu!"
return 1
fi
fi
Expand Down
3 changes: 2 additions & 1 deletion ShellScripts/common/post_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ run_script() {
cp -rfu "$MINGW_PREFIX/share/espeak-ng-data" "$PROGDIR/Resources"
else
# Linux modern search paths for espeak-ng-data
# Some distributions put the data in arch-specific paths, so check for them
SEARCH_PATHS=(
"/usr/local/share/espeak-ng-data"
"/usr/lib/x86_64-linux-gnu/espeak-ng-data"
"/usr/lib/$(/usr/bin/arch 2>/dev/null || echo x86_64)-linux-gnu/espeak-ng-data"
Copy link
Contributor

@mcarans mcarans Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsalt I suggest this as uname is universal:

/usr/lib/$(uname -m 2>/dev/null || echo x86_64)-linux-gnu/espeak-ng-data

"/usr/share/espeak-ng-data"
"/app/share/espeak-ng-data"
)
Expand Down