[build] Use local .deps directory for users (fix #4998)

For an user setup we'd prefer to download Skia inside a .deps
directory (just to simplify the setup). For developers it's better if
we offer a common/shared/absolute directory so different local
Aseprite clones can share the same downloaded Skia version.

Co-authored-by: David Capello <david@igara.com>
This commit is contained in:
cybardev 2025-02-12 10:05:23 -04:00 committed by David Capello
parent 600882352e
commit 90be6aac30
2 changed files with 22 additions and 11 deletions

1
.gitignore vendored
View File

@ -16,4 +16,5 @@
tests/_test*
build
.build
.deps
CMakeSettings.json

View File

@ -369,6 +369,15 @@ if [ ! -f "$pwd/.build/$file_skia_dir" ] ; then
skia_dir="$HOME/deps/$possible_skia_dir_name"
fi
# Set default location if not found
if [ ! -d "$skia_dir" ] ; then
# Use .deps directory to download Skia for users (which is a
# simple setup). In case of developers we'd prefer the shared
# directory by default.
if [ "$userkind" == "user" ] ; then
skia_dir="$pwd/.deps/$possible_skia_dir_name"
fi
if [ ! -d "$skia_dir" ] ; then
echo ""
echo "Skia directory wasn't found."
@ -383,6 +392,7 @@ if [ ! -f "$pwd/.build/$file_skia_dir" ] ; then
fi
mkdir -p $skia_dir || exit 1
fi
fi
echo $skia_dir > "$pwd/.build/$file_skia_dir"
fi
skia_dir=$(echo -n $(cat $pwd/.build/$file_skia_dir))