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 :)

@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