Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

@allangarcia
Last activeNovember 21, 2025 03:48

    Select an option

    Save allangarcia/938b052a7d55d1652052e4259364260b to your computer and use it in GitHub Desktop.
    #!/bin/bash
    # README: A more updated version is on the comments by (ashmna)[https://gist.github.com/ashmna]
    # See at: https://gist.github.com/allangarcia/938b052a7d55d1652052e4259364260b?permalink_comment_id=4265898#gistcomment-4265898
    # this is for tools required
    brew update
    brew install ninja
    brew install cmake
    # crete the default root directory
    cd$HOME/Developer
    mkdir Aseprite
    cd Aseprite
    # download skia m81
    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-m81
    # 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/MacOSX.sdk \
    -DLAF_BACKEND=skia \
    -DSKIA_DIR=../../skia-m81 \
    -DSKIA_LIBRARY_DIR=../../skia-m81/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.27-trial-macOS.dmg"
    mkdir mount
    yes qy| hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint mount Aseprite-v1.2.27-trial-macOS.dmg
    cp -rf mount/Aseprite.app.
    hdiutil detach mount
    rm -rf Aseprite.app/Contents/MacOS/aseprite
    cp -rf ../aseprite/build/bin/aseprite Aseprite.app/Contents/MacOS/aseprite
    rm -rf Aseprite.app/Contents/Resources/data
    cp -rf ../aseprite/build/bin/data Aseprite.app/Contents/Resources/data
    cd ..
    # Install on /Applications
    sudo cp bundle/Aseprite.app /Applications/
    @ashmna
    Copy link

    Here is the new version

    #!/bin/bash# this is for tools required brew updatebrew install ninjabrew install cmake# crete the default root directorycd $HOME/Developermkdir Asepritecd Aseprite# download skia m102curl -O -L "https://github.com/aseprite/skia/releases/download/m102-861e4743af/Skia-macOS-Release-x64.zip"unzip Skia-macOS-Release-x64.zip -d skia-m102# this is the project itselftgit clone --recursive https://github.com/aseprite/aseprite.git# compiling asepritecd asepritemkdir buildcd buildcmake \  -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/MacOSX.sdk \  -DLAF_BACKEND=skia \  -DSKIA_DIR=../../skia-m102 \  -DSKIA_LIBRARY_DIR=../../skia-m102/out/Release-x64 \  -DSKIA_LIBRARY=../../skia-m102/out/Release-x64/libskia.a \  -G Ninja \  ..ninja asepritecd ../..# bundle app from trialmkdir bundlecd bundlecurl -O -J "https://www.aseprite.org/downloads/trial/Aseprite-v1.2.39-trial-macOS.dmg"mkdir mountyes qy | hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint mount Aseprite-v1.2.39-trial-macOS.dmgcp -r mount/Aseprite.app .hdiutil detach mountrm -rf Aseprite.app/Contents/MacOS/asepritecp -r ../aseprite/build/bin/aseprite Aseprite.app/Contents/MacOS/asepriterm -rf Aseprite.app/Contents/Resources/datacp -r ../aseprite/build/bin/data Aseprite.app/Contents/Resources/datacd .. # Install on /Applicationssudo cp bundle/Aseprite.app /Applications/

    @allangarcia
    Copy link
    Author

    What do you thing about making this a real project... now my Mac is arm64, so I have to change a few line also. I saw the diff and is basically the skia version and the Bundle trial version
    Screen Shot 2022-08-13 at 21 03 07
    ...
    What if we can build at first arm64 and x64, but after maybe a Windows also? Just my first thoughts.

    @allangarcia
    Copy link
    Author

    I believe we can talk with the Aseprite first... to get authorization to do this.

    @ashmna
    Copy link

    Honestly, I don't know how we can turn this script into a project}). Also, I believe that guys from Aseprite will not like that idea.

    @allangarcia
    Copy link
    Author

    allangarcia commentedAug 14, 2022
    edited
    Loading

    My idea is to make a BashScript asking questions...

    • Do you want to make a build for what version?
    • Do you want to make a build for what platform?
    • Then the script download the things and make a bundle. (Maybe even for Windows)

    In this matter:

    "I believe that guys from Aseprite will not like that idea."

    I think you are absolutely right... so I sent this tweet.

    https://twitter.com/AllanGarciaDev/status/1558606855047417856

    Maybe you can respond to that and we move towards a CE (Community Edition) curated by maintainers (like you and me), this is not uncommon. If you want the full support from him (forgot his company), you buy the app. If not, you build the CE.

    But I'll only do something about it if I have a green light from him, and also will give you also the status of co-founder of this future Community Edition.

    @ashmna
    Copy link

    Hey, since I'm not a bash script master, I'll say the idea is perfect and I'll do my best, but you'll have to start it.
    About the windows os, not sure that bash script will be run on window os.

    @allangarcia
    Copy link
    Author

    I was thinking more about a QT Python application, that run the command under the hoods... My twitter was never responded (By Aseprite). Now I'm a little busy trying to get a job, doing interviews and tests. But when I have the time I'll put together a "make your own aseprite bundler"patent pending LOL. Name to be defined. If they complain about it, I mention the twitter and they never say no.

    @allangarcia
    Copy link
    Author

    Also, in the meantime, I'll not update my gist. Two reasons... to give your credit to your comment. And because I didn't test agains M1 Macs. Also the time issue.

    @rkmax
    Copy link

    I just write a version that does work on my mac M1, idk if also works for macos with x86 processor but in theory should work because is arch awarehttps://gist.github.com/rkmax/ca5892c1d44bf3fdbe081784d67d5d5a

    @csmitherman0
    Copy link

    I tried using the updated version on my M1 MacBook. I ran the terminal using Rosetta and ran the script, and it seems to have failed at the very end. The cp commands at the end are failing, throwing a "no such file or directory" error.

    @kjblanchard
    Copy link

    kjblanchard commentedJan 30, 2024
    edited
    Loading

    Thanks for the bundle steps! First time making a macos bundle. However the curl command in the script didn't work (it created an empty file instead of downoading the dmg), and the cp command at the end didn't have a -R so it didn't work right.

    curlhttps://www.aseprite.org/downloads/trial/Aseprite-v1.3.2-trial-macOS.dmg --output ase.dmg
    yes qy | hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint mount ase.dmg
    .. (All other commands worked fine until the cp) ..
    cp -R Aseprite.app /Applications

    I am using a m1 macbook pro as well.

    @matenboi
    Copy link

    matenboi commentedFeb 24, 2024
    edited
    Loading

    This was also my first time making a macOS bundle, and I tried following both directions above but neither of them worked for me. This is what ended up working for me:

    mkdir bundlecd bundlecurl -O -J https://www.aseprite.org/downloads/trial/Aseprite-v1.3.4-trial-macOS.dmgmkdir mountyes qy | hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint mount Aseprite-v1.3.4-trial-macOS.dmgcp -r mount/Aseprite.app .rm -rf Aseprite.app/Contents/MacOS/asepritecp -R ~/Developer/aseprite/build/bin/aseprite Aseprite.app/Contents/MacOS/rm -rf Aseprite.app/Contents/Resources/datacp -R ~/Developer/aseprite/build/bin/data Aseprite.app/Contents/Resources/sudo cp -R Aseprite.app /Applications/

    It's basically the same as the main post, but I changed 1 or 2 things that ended up throwing errors at me. I am using a M2 MacBook Pro (on version 14.0 Sonoma).

    @kobi666
    Copy link

    for silicon users with new version:

    mkdir bundle
    cd bundle
    curl -O -J "https://www.aseprite.org/downloads/trial/Aseprite-v1.3.4-trial-macOS.dmg"
    mkdir mount
    yes qy | hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint mount Aseprite-v1.3.4-trial-macOS.dmg
    cp -rf mount/Aseprite.app .
    hdiutil detach mount
    rm -rf Aseprite.app/Contents/MacOS/aseprite
    cp -rf ../aseprite/build/bin/aseprite Aseprite.app/Contents/MacOS/aseprite
    rm -rf Aseprite.app/Contents/Resources/data
    cp -rf ../aseprite/build/bin/data Aseprite.app/Contents/Resources/data
    cd ..

    @allangarcia
    Copy link
    Author

    for silicon users with new version:

    mkdir bundle cd bundle curl -O -J "https://www.aseprite.org/downloads/trial/Aseprite-v1.3.4-trial-macOS.dmg" mkdir mount yes qy | hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint mount Aseprite-v1.3.4-trial-macOS.dmg cp -rf mount/Aseprite.app . hdiutil detach mount rm -rf Aseprite.app/Contents/MacOS/aseprite cp -rf ../aseprite/build/bin/aseprite Aseprite.app/Contents/MacOS/aseprite rm -rf Aseprite.app/Contents/Resources/data cp -rf ../aseprite/build/bin/data Aseprite.app/Contents/Resources/data cd ..

    Thank you for the update. I'll incorporate this into a new gist and share here, because we don't know everyone already adopted ARM and don't know if the ARM version will work on Intel's based compiling.

    @furashcka
    Copy link

    furashcka commentedApr 11, 2024
    edited
    Loading

    This .sh script has a problem: it doesn't catch errors, such as a 404 error for Aseprite-v1.3.4-trial-macOS.dmg among others. This might not seem like a big issue, but for beginners (like myself), it can be very time-consuming to understand WHY IT'S NOT WORKING!

    I couldn't build Aseprite without encountering errors until I divided the code into steps. Working with the code in separated steps is easier than debugging a .sh script.

    I discovered some alternative solutions and wrote a simple tutorial for my reference, which might be helpful for others -https://f-cka.notion.site/Build-Run-Aseprite-on-Apple-Silicon-f88527ab38c44bc3997ef1e7e5447851, and I achieved the desired result.

    Untitled

    @andreypeshko
    Copy link

    andreypeshko commentedJun 2, 2024
    edited
    Loading

    This .sh script has a problem: it doesn't catch errors, such as a 404 error for Aseprite-v1.3.4-trial-macOS.dmg among others. This might not seem like a big issue, but for beginners (like myself), it can be very time-consuming to understand WHY IT'S NOT WORKING!

    I couldn't build Aseprite without encountering errors until I divided the code into steps. Working with the code in separated steps is easier than debugging a .sh script.

    I discovered some alternative solutions and wrote a simple tutorial for my reference, which might be helpful for others -https://f-cka.notion.site/Build-Run-Aseprite-on-Apple-Silicon-f88527ab38c44bc3997ef1e7e5447851, and I achieved the desired result.

    Untitled

    Thanks@furashcka, I think you have a little mistake in your bash script

    cp -rf mount/Aseprite.app .hdiutil detach mountrm -rf Aseprite.app/Contents/MacOS/asepritecp -rf ../aseprite/build/bin/aseprite Aseprite.app/Contents/MacOS/asepriterm -rf Aseprite.app/Contents/Resources/datacp -rf ../aseprite/build/bin/data Aseprite.app/Contents/Resources/datacd ..

    should be

    cp -rf mount/Aseprite.app .hdiutil detach mountrm -rf Aseprite.app/Contents/MacOS/asepritecp -rf ../build/bin/aseprite Aseprite.app/Contents/MacOS/asepriterm -rf Aseprite.app/Contents/Resources/datacp -rf ../build/bin/data Aseprite.app/Contents/Resources/datacd ..

    @allangarcia
    Copy link
    Author

    Thank you so much for all contributions. I’ll be soon updating the script.

    @allangarcia
    Copy link
    Author

    Anyone have experience into making this a project to compile into a docker container? I would love this contribution.

    @willisplummer
    Copy link

    I had to runxattr -cr Aseprite.app at the end otherwise I was getting an error "the application is damaged and should be moved to the trash"https://community.aseprite.org/t/macos-ventura-13-0/16105

    @p10tr3k
    Copy link

    p10tr3k commentedNov 25, 2024
    edited
    Loading

    On macOS you may need to set this before running the script:
    git config --global core.autocrlf input
    It helped me with this error:
    FAILED: third_party/libpng/pnglibconf.c ...

    @hidde-vb
    Copy link

    I had to update the trial version to v1.3.9.1, the version listed in the Gist is removed from the downloads list.

    Had no other issues, thanks!

    @jwc20
    Copy link

    update for mac m1 with Aseprite v1.3.9.1 and skia m124

    #!/bin/bash# this is for tools requiredbrew updatebrew install ninjabrew install cmake# create the default root directorycd$HOME/Developermkdir -p Asepritecd Aseprite# download skia m124curl -O -L"https://github.com/aseprite/skia/releases/download/m124-08a5439a6b/Skia-macOS-Release-arm64.zip"unzip Skia-macOS-Release-arm64.zip -d skia-m124# this is the project itselfgit clone --recursive https://github.com/aseprite/aseprite.git# compiling asepritecd asepriterm -rf build# Clean any existing buildmkdir buildcd build# Get absolute path to skiaSKIA_DIR="$(cd ../../skia-m124&& pwd)"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_DIR}" \  -DSKIA_LIBRARY_DIR="${SKIA_DIR}/out/Release-arm64" \  -DSKIA_LIBRARY="${SKIA_DIR}/out/Release-arm64/libskia.a" \  -DCMAKE_POLICY_DEFAULT_CMP0076=OLD \  -G Ninja \  ..ninja asepritecd ../..# bundle app from trialmkdir -p bundlecd bundle# download trial versioncurl -O -J"https://www.aseprite.org/downloads/trial/Aseprite-v1.3.9.1-trial-macOS.dmg"mkdir -p mount# mount the dmghdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint mount Aseprite-v1.3.9.1-trial-macOS.dmgcp -rf mount/Aseprite.app.hdiutil detach mount# replace the trial binary with our compiled versionrm -rf Aseprite.app/Contents/MacOS/asepritecp -rf ../aseprite/build/bin/aseprite Aseprite.app/Contents/MacOS/asepriterm -rf Aseprite.app/Contents/Resources/datacp -rf ../aseprite/build/bin/data Aseprite.app/Contents/Resources/datacd ..# Install on /Applicationssudo cp -rf bundle/Aseprite.app /Applications/

    @Bertus-W
    Copy link

    It doesn't work anymore. 404 on the trial url. tried the newest trial version but that ends up in a broken app

    @allangarcia
    Copy link
    Author

    It doesn't work anymore. 404 on the trial url. tried the newest trial version but that ends up in a broken app

    I’m aware! I’m working on a repo to compile on differents platforms. The repo is aseprite-build. While I’m working on it maybe become deprecated due the build script incorporated into the official repository.

    Let’s see what can I do to differentiate my project from the build script officially available.

    @pippokairos
    Copy link

    It doesn't work anymore. 404 on the trial url. tried the newest trial version but that ends up in a broken app

    For me it worked withhttps://www.aseprite.org/downloads/trial/Aseprite-v1.3.14.1-trial-macOS.dmg. Pay attention to change the version also in thehdiutil attach command
    hdiutil attach -quiet -nobrowse -noverify -noautoopen -mountpoint mount Aseprite-v1.3.14.1-trial-macOS.dmg

    @PseudoPort
    Copy link

    PseudoPort commentedAug 3, 2025
    edited
    Loading

    There is EULA need to be accepted.
    This will bypass EULA:

    hdiutil convert foo.dmg -format UDTO -o bar.cdr
    hdiutil attach bar.cdr ---> it will mount to /Volumes so no need sudo/permissions, no need create mount folder

    @allangarcia
    Copy link
    Author

    Great contribution. I’m working on a project to substitute this gist. Today this gist is obsolete. My goal is to make a multi platform compilation script to make Aseprite in Windows, macOS and Linux.

    @ezefranca
    Copy link

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

    [8]ページ先頭

    ©2009-2025 Movatter.jp