Forked from allangarcia/aseprite-build-and-install-on-macos.sh
Last active
December 6, 2021 22:51
-
-
Save iamjoeysox/90b460c2ca5d8828dd962b6458bb9193 to your computer and use it in GitHub Desktop.
Pull down compile and build latest Aseprite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update all home folder paths to relfect your own setup. Uses ~/Downloads, ~/Projects | |
brew update | |
brew install ninja | |
brew install cmake | |
# Download and setup skia lib | |
cd ~/Downloads/ | |
curl -O -L "https://github.com/aseprite/skia/releases/download/m81-b607b32047/Skia-macOS-Release-x64.zip" | |
unzip Skia-macOS-Release-x64.zip -d skia | |
mv skia /usr/local/lib | |
chown -R sox:admin /usr/local/lib/skia/* | |
# Clone latest version of aseprite down | |
cd ~/Projects/ | |
git clone --recursive https://github.com/aseprite/aseprite.git | |
# Compile aseprite | |
cd aseprite | |
mkdir build | |
cd build | |
cmake \ | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk \ | |
-DCMAKE_OSX_ARCHITECTURES=x86_64 \ | |
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.6 \ | |
-DSKIA_LIBRARY=/usr/local/lib/skia/out/Release-x64/libskia.a \ | |
-DLAF_OS_BACKEND=skia \ | |
-DSKIA_DIR=/usr/local/lib/skia \ | |
-DSKIA_LIBRARY_DIR=/usr/local/lib/skia/out/Release-x64 \ | |
-G Ninja \ | |
.. | |
ninja aseprite | |
cd ../ | |
# Bundle app from trial version dmg | |
mkdir bundle | |
cd bundle | |
# Be sure to check the trial version is correct, this changes over time! | |
curl -O -J "https://www.aseprite.org/downloads/trial/Aseprite-v1.2.29-trial-macOS.dmg" | |
mkdir mount | |
yes qy | hdiutil attach -nobrowse -noverify -noautoopen -mountpoint mount Aseprite-v1.2.29-trial-macOS.dmg | |
cp -rf mount/Aseprite.app . | |
hdiutil detach mount | |
rm -rf Aseprite.app/Contents/MacOS/aseprite | |
cp -rf ../build/bin/aseprite Aseprite.app/Contents/MacOS/aseprite | |
rm -rf Aseprite.app/Contents/Resources/data | |
cp -rf ../build/bin/data Aseprite.app/Contents/Resources/data | |
cd .. | |
# Update application version plist string and replace trial binary | |
/usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString 1.3-beta6" bundle/Aseprite.app/Contents/Info.plist | |
/usr/libexec/PlistBuddy -c "Set CFBundleVersion 1.3-beta6" bundle/Aseprite.app/Contents/Info.plist | |
sudo cp -pR bundle/Aseprite.app /Applications/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment