Skip to content

Instantly share code, notes, and snippets.

@Omay238
Last active March 19, 2024 20:18
Show Gist options
  • Save Omay238/7ec307402d408e60b840f50aadf9812c to your computer and use it in GitHub Desktop.
Save Omay238/7ec307402d408e60b840f50aadf9812c to your computer and use it in GitHub Desktop.
You will need dependencies on the aseprite page at https://github.com/aseprite/aseprite/blob/main/INSTALL.md#dependencies. Skia is not required, as it is installed by the script.
#!/bin/bash
OS=$(uname | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
if [[ $OS == "darwin" ]]; then
if [[ $ARCH == "x86_64" ]]; then
URL="https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-macOS-Release-x64.zip"
elif [[ $ARCH == "arm64" ]]; then
URL="https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-macOS-Release-arm64.zip"
fi
elif [[ $OS == "linux" ]]; then
if [[ $ARCH == "x86_64" ]]; then
URL="https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-Linux-Release-x64-libc++.zip"
elif [[ $ARCH == "i686" ]]; then
URL="https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-Linux-Release-x86-libc++.zip"
fi
fi
if [[ $ARCH == "i686" ]]; then
LIB_ARCH="x86"
elif [[ $ARCH == "x86_64" ]]; then
LIB_ARCH="x64"
elif [[ $ARCH == "arm64" ]]; then
LIB_ARCH="arm64"
fi
release_info=$(curl -s "https://api.github.com/repos/aseprite/aseprite/releases/latest")
download_url=$(echo "$release_info" | grep '"browser_download_url":' | sed -E 's/.*"([^"]+)".*/\1/')
wget -O aseprite.zip "$download_url"
wget -O skia.zip $URL
mkdir aseprite
unzip aseprite.zip -d ./aseprite
mkdir skia
unzip skia.zip -d ./skia
cd aseprite
mkdir build
cd build
cmake -G Ninja -DLAF_BACKEND=skia -DSKIA_DIR=../../skia -DSKIA_LIBRARY_DIR=../../skia/out/Release-$LIB_ARCH ..
ninja
cd ../..
mv aseprite/build/bin .
rm -rf aseprite.zip skia.zip aseprite skia
@Omay238
Copy link
Author

Omay238 commented Mar 19, 2024

Linux is untested as of now. Linux arm64 is unlikely to be supported in the future due to lack of Skia support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment