Skip to content

Instantly share code, notes, and snippets.

@Mitra-88
Last active April 26, 2025 11:03
Show Gist options
  • Save Mitra-88/3fd0188afeb8d49f219efb008b612197 to your computer and use it in GitHub Desktop.
Save Mitra-88/3fd0188afeb8d49f219efb008b612197 to your computer and use it in GitHub Desktop.
Compile Aseprite from source code for Windows 11/10 x64

Prerequisites

Download and Set Up Visual Studio Community 2022

Get The Source Code

Download and Set Up CMake

  • Get CMake cmake-3.xx.x-windows-x86_64.msi

  • Choose the option Add CMake To The PATH For environment variable

Download and Set Up Ninja

  • Download Ninja Build System.

  • Extract ninja-win.zip and copy ninja.exe to C:\Program Files\CMake\bin.

Download Skia

  • Download Skia Skia-Windows-Release-x64.zip.

  • In the C:\ directory, create a folder named deps.

  • Inside the deps directory, create another folder named skia.

  • Extract the contents of Skia-Windows-Release-x64.zip into the skia folder.

Compiling

  • In the C:\ directory, create a folder named aseprite.

  • Extract the contents of Aseprite-v1.x-Source.zip into the aseprite folder.

  • Search Command Prompt

  • Execute the following commands:

call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" -arch=x64
cd C:\aseprite
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLAF_BACKEND=skia -DSKIA_DIR=C:\deps\skia -DSKIA_LIBRARY_DIR=C:\deps\skia\out\Release-x64 -DSKIA_LIBRARY=C:\deps\skia\out\Release-x64\skia.lib -G Ninja ..
  • Now compile with Ninja Build System:
ninja aseprite
  • If CMake is unable to detect the C/C++ compiler:

    • Execute the following command instead:
    cmake -DCMAKE_CXX_COMPILER="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\bin\Hostx64\x64\cl.exe" -DCMAKE_C_COMPILER="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\bin\Hostx64\x64\cl.exe" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLAF_BACKEND=skia -DSKIA_DIR=C:\deps\skia -DSKIA_LIBRARY_DIR=C:\deps\skia\out\Release-x64 -DSKIA_LIBRARY=C:\deps\skia\out\Release-x64\skia.lib -G Ninja ..
  • The executable will be located at C:\aseprite\build\bin\aseprite.exe.

Tested With Aseprite v1.3.9.1

Please remember to support the creators of Aseprite. Only use this method to try the program or if you don't have access to funds or a credit card :)

@LiterallyWize
Copy link

when i run ninja aseprite my cpu usage skyrockets, i'm pretty sure it's using my cpu to it's fullest for no reason, i wasn't aware the first time and my pc crashed even though it's a stable computer the second time i ran it with hwinfo open and i saw that my cpu temps go up to 110c which is insane, had to immediately ctrl+c
am i doing something wrong? is there any way to set a limit on how ninja uses my cpu? i couldn't find anything online that was helpful about this

well you are compiling a program thats really how it is, it uses 100% of your cpu

i dunno what kinda sorcery powered computer y'all are using for it to not fry your cpu when ninja uses like 32 cores by default when compiling
that aside i just put a flag in it by doing ninja -j4 aseprite to limit the core usage to 4 n it worked out

@Mitra-88
Copy link
Author

when i run ninja aseprite my cpu usage skyrockets, i'm pretty sure it's using my cpu to it's fullest for no reason, i wasn't aware the first time and my pc crashed even though it's a stable computer the second time i ran it with hwinfo open and i saw that my cpu temps go up to 110c which is insane, had to immediately ctrl+c
am i doing something wrong? is there any way to set a limit on how ninja uses my cpu? i couldn't find anything online that was helpful about this

well you are compiling a program thats really how it is, it uses 100% of your cpu

i dunno what kinda sorcery powered computer y'all are using for it to not fry your cpu when ninja uses like 32 cores by default when compiling that aside i just put a flag in it by doing ninja -j4 aseprite to limit the core usage to 4 n it worked out

nah bro my pc has 4 cores 😭. great

@ShandyDwi
Copy link

Uploading Screenshot 2024-12-31 095213.png…

@TTSKarlsson
Copy link

Accidentily did -G ninja instead of -G Ninja, took forever to try to understand what CMake Error: Could not create named generator ninja meant. The ninja executable is after all ninja.exe not Ninja.exe..

Maybe someone else is as stupid as me.

@Mitra-88
Copy link
Author

Mitra-88 commented Jan 8, 2025

Accidentily did -G ninja instead of -G Ninja, took forever to try to understand what CMake Error: Could not create named generator ninja meant. The ninja executable is after all ninja.exe not Ninja.exe..

Maybe someone else is as stupid as me.

😭 not sure how you didnt see it in the guide lol

@baole444
Copy link

For those who updating to newer version of Asprite (for my case is 1.3.12) and encounter Library Link issue (CMake complaint about C core library being x86 for target machine x64). Your existing Desktop Development with C++ installation might be outdated, make sure to recheck that box again to download the up-to-date workload.

@Mitra-88
Copy link
Author

For those who updating to newer version of Asprite (for my case is 1.3.12) and encounter Library Link issue (CMake complaint about C core library being x86 for target machine x64). Your existing Desktop Development with C++ installation might be outdated, make sure to recheck that box again to download the up-to-date workload.

dont got that much storage left thats why i didnt update it in a while, ill try to make a github action to build it, tried to do it last time it didnt go that well but i think i got it this time

@Gokhantino
Copy link

Ekran Görüntüsü (564)
I am getting this error. I just wanted to do some pixel arts 😭

@rar3rgaming
Copy link

Was anyone able to make this work with v1.3.13? I was scratching my head why it isn't working.
The only version that worked for me was v1.3.9.1.

@Mitra-88
Copy link
Author

Mitra-88 commented Feb 6, 2025

Was anyone able to make this work with v1.3.13? I was scratching my head why it isn't working. The only version that worked for me was v1.3.9.1.

i will test it and let u know if it works or not (edit: until i have enough storage 💀 )

@ImMounir
Copy link

Ekran Görüntüsü (564) I am getting this error. I just wanted to do some pixel arts 😭

Do you know how to resolve this ? bc I got the exact same problem....

@Core-G-Magika
Copy link

Core-G-Magika commented Feb 26, 2025

So... I got to cd build, but when I ran the next command, it gave me this error:
CMake Error: The source directory "C:/aseprite" does not appear to contain CMakeLists.txt.
I tried the alternate, but it did the same. What did I do wrong?

@bingeboy
Copy link

bingeboy commented Mar 9, 2025

Thanks. Worked for me with the pin dep ref'd above.

@JVictor-Silva93
Copy link

So... I got to cd build, but when I ran the next command, it gave me this error: CMake Error: The source directory "C:/aseprite" does not appear to contain CMakeLists.txt. I tried the alternate, but it did the same. What did I do wrong?

This means you didn't extract the files into C:/aseprite/<all the files in here, including CMakeLists.txt>, but you extracted it to C:/aseprite/Aseprite_v....we../<all the files in here, including CMakeLists.txt>

Ekran Görüntüsü (564) I am getting this error. I just wanted to do some pixel arts 😭

Running into this issue myself. Trying to figure it out. I'll let you know if I solve it.

@JVictor-Silva93
Copy link

@Gokhantino @ImMounir @rar3rgaming @VermeilChan

After running into the issue above, the same one @Gokhantino got, I did some digging. Turns out the issue is that I was using the latest release beta version. Had to go back to the Aseprite releases and used v1.3.13, then just repeat the steps in this guide. It worked for me! Also, v1.3.13 seems to be working just fine for me, haven't ran into any issues but its only been a day.

@Petra-Rall
Copy link

Petra-Rall commented Apr 26, 2025

Screenshot 2025-04-26 080007

Can you tell me why the error occurred? I tried to see if modifying third_party/libpng/CMakeLists.txt:33 by replacing version 3.1 with 3.5 will solve it but it didn't. Also tried using this command:

> `cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -G Ninja ^
>   -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
>   -DLAF_BACKEND=skia ^
>   -DSKIA_DIR=C:\deps\skia ^
>   -DSKIA_LIBRARY_DIR=C:\deps\skia\out\Release-x64 ^
>   -DSKIA_LIBRARY=C:\deps\skia\out\Release-x64\skia.lib ^
>   ..`

Still didn't work. I tried both Aseprite v1.3.13 and Aseprite v1.3.9.1.

@Mitra-88
Copy link
Author

Screenshot 2025-04-26 080007

Can you tell me why the error occurred? I tried to see if modifying third_party/libpng/CMakeLists.txt:33 by replacing version 3.1 with 3.5 will solve it but it didn't. Also tried using this command:

> `cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -G Ninja ^
>   -DCMAKE_BUILD_TYPE=RelWithDebInfo ^
>   -DLAF_BACKEND=skia ^
>   -DSKIA_DIR=C:\deps\skia ^
>   -DSKIA_LIBRARY_DIR=C:\deps\skia\out\Release-x64 ^
>   -DSKIA_LIBRARY=C:\deps\skia\out\Release-x64\skia.lib ^
>   ..`

Still didn't work. I tried both Aseprite v1.3.13 and Aseprite v1.3.9.1.

this is on the aseprite devs, cant compile it for some reason, 1.3.9.1 should work tho....

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