Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save robksawyer/133f679edf2ae04dfdf9b2e1b62dde15 to your computer and use it in GitHub Desktop.
Save robksawyer/133f679edf2ae04dfdf9b2e1b62dde15 to your computer and use it in GitHub Desktop.
#!/bin/zsh
cd $HOME/Developer
# this is for tools required
brew update
brew install ninja
brew install cmake
# this is the dependency codes
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
git clone -b aseprite-m81 https://github.com/aseprite/skia.git
# compiling skia
export PATH="${PWD}/depot_tools:${PATH}"
cd skia
python tools/git-sync-deps
gn gen out/Release-x64 --args="is_debug=false is_official_build=true skia_use_system_expat=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=\"x64\" extra_cflags=[\"-stdlib=libc++\", \"-mmacosx-version-min=10.9\"] extra_cflags_cc=[\"-frtti\"]"
ninja -C out/Release-x64 skia modules
cd ..
# this is the project itselft
git clone --recursive https://github.com/aseprite/aseprite.git
# compiling aseprite
cd aseprite
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk \
-DLAF_BACKEND=skia \
-DSKIA_DIR=../../skia \
-DSKIA_LIBRARY_DIR=../../skia/out/Release-x64 \
-G Ninja \
..
ninja aseprite
cd ..
# bundle app from trial
mkdir bundle
cd bundle
curl -O -J "https://www.aseprite.org/downloads/trial/Aseprite-v1.2.21-trial-macOS.dmg"
mkdir mount
yes qy | hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint mount Aseprite-v1.2.21-trial-macOS.dmg
cp -rf mount/Aseprite.app .
hdiutil detach mount
rm -rf $HOME/Developer/aseprite/bundle/Aseprite.app/Contents/MacOS/aseprite
cp -rf $HOME/Developer/aseprite/build/bin/aseprite Aseprite.app/Contents/MacOS/aseprite
rm -rf $HOME/Developer/aseprite/bundle/Aseprite.app/Contents/Resources/data
cp -rf $HOME/Developer/aseprite/build/bin/data Aseprite.app/Contents/Resources/data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment