Skip to content

Instantly share code, notes, and snippets.

@ezefranca
Created November 1, 2025 17:11
Show Gist options
  • Save ezefranca/6c11078b77b99fabda8a64cd5d457cc0 to your computer and use it in GitHub Desktop.
Save ezefranca/6c11078b77b99fabda8a64cd5d457cc0 to your computer and use it in GitHub Desktop.
Install Aseprite.app on Macs ARM (M Family)
#!/usr/bin/env bash
set -euo pipefail
# === CONFIGURE THESE ===
ASE_DIR="$HOME/src/aseprite" # base directory for the work
SKIA_TAG="m112" # adjust based on Aseprite’s required Skia version
SKIA_URL="https://github.com/aseprite/skia/releases/download/${SKIA_TAG}/Skia-macOS-Release-arm64.zip"
# You may need to update SKIA_TAG/URL based on the version listed in the INSTALL.md of Aseprite.
APP_NAME="Aseprite.app"
# =======================
echo "=== 1) Install Homebrew packages if missing ==="
if ! command -v brew >/dev/null 2>&1; then
echo "Homebrew not found. Please install Homebrew first."
exit 1
fi
brew install cmake ninja
echo "=== 2) Create directory structure ==="
mkdir -p "${ASE_DIR}"
cd "${ASE_DIR}"
echo "=== 3) Clone Aseprite repository ==="
if [ ! -d aseprite ]; then
git clone --recursive https://github.com/aseprite/aseprite.git
else
echo "Repository already exists; pulling updates"
cd aseprite
git pull
git submodule update --init --recursive
cd ..
fi
echo "=== 4) Download & extract Skia ==="
SKIA_DEST="${ASE_DIR}/skia-${SKIA_TAG}"
if [ ! -d "${SKIA_DEST}" ]; then
curl -L -o skia-${SKIA_TAG}.zip "${SKIA_URL}"
unzip skia-${SKIA_TAG}.zip -d "${SKIA_DEST}"
else
echo "Skia directory exists: ${SKIA_DEST}"
fi
echo "=== 5) Configure CMake build ==="
cd "${ASE_DIR}/aseprite"
BUILD_DIR="build"
rm -rf "${BUILD_DIR}"
mkdir "${BUILD_DIR}"
cd "${BUILD_DIR}"
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" \
-DLAF_BACKEND=skia \
-DSKIA_DIR="${SKIA_DEST}" \
-DSKIA_LIBRARY_DIR="${SKIA_DEST}/out/Release-arm64" \
-DSKIA_LIBRARY="${SKIA_DEST}/out/Release-arm64/libskia.a" \
-G Ninja \
..
echo "=== 6) Build Aseprite ==="
ninja aseprite
echo "=== 7) Copy built app to /Applications ==="
BIN_DIR="${ASE_DIR}/aseprite/${BUILD_DIR}/bin"
if [ -d "${BIN_DIR}/${APP_NAME}" ]; then
echo "Copying ${APP_NAME} to /Applications/"
sudo cp -R "${BIN_DIR}/${APP_NAME}" /Applications/
echo "Done. You may now run it from /Applications/${APP_NAME}"
else
echo "Error: built app not found at ${BIN_DIR}/${APP_NAME}"
exit 1
fi
echo "=== 8) Post-build: bundle icu data (optional) ==="
ICU_DATA="${SKIA_DEST}/third_party/externals/icu/flutter/icudtl.dat"
if [ -f "${ICU_DATA}" ]; then
echo "Copying icudtl.dat to application resources..."
sudo cp "${ICU_DATA}" "/Applications/${APP_NAME}/Contents/MacOS/"
fi
echo "=== Build & installation complete ==="
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment