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

@Mitra-88
Copy link
Author

Mitra-88 commented Oct 8, 2024

For those who are not seeing the executable in C:/aseprite/build/bin How I fixed it was enter in ninja aseprite It'll take some time, but after it finished the exe file was in bin.

there is no way ppl didnt compile it with ninja 😭 ITS THERE

@wilsonstreet
Copy link

For those who are not seeing the executable in C:/aseprite/build/bin How I fixed it was enter in ninja aseprite It'll take some time, but after it finished the exe file was in bin.

there is no way ppl didnt compile it with ninja 😭 ITS THERE

even when paired with the ending commands it didnt appear until separated

@Mitra-88
Copy link
Author

Mitra-88 commented Oct 9, 2024

For those who are not seeing the executable in C:/aseprite/build/bin How I fixed it was enter in ninja aseprite It'll take some time, but after it finished the exe file was in bin.

there is no way ppl didnt compile it with ninja 😭 ITS THERE

even when paired with the ending commands it didnt appear until separated

okay in that case ill add a new section for it thank you vro :)

@Mitra-88
Copy link
Author

Hello! I've been trying to compile Aseprite for the past few days, but nothing is working. So basically, I installed everything and put the files in their respective folders, but when I tried compiling it, it started good, but then...:

-- The C compiler identification is MSVC 19.41.34123.0
-- The CXX compiler identification is MSVC 19.41.34123.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64/cl.exe
-- Check for working C compiler: /c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64/cl.exe - broken
CMake Error at /opt/devkitpro/msys2/usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler

"/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64/cl.exe"

is not able to compile a simple test program.
It fails with the following output:

Change Dir: '/c/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-a9HHZB'

Run Build Command(s): "/c/Program Files/CMake/bin/ninja.exe" -v cmTC_a0313
ninja: error: '/c/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-a9HHZB/testCCompiler.c', needed by 'CMakeFiles/cmTC_a0313.dir/testCCompiler.c.o', missing and no known rule to make it

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)
-- Configuring incomplete, errors occurred!

Then I tried again but using the command that is used in case CMake is unable to detect the C/C++ compiler, and this happened:

CMake Error at build/CMakeFiles/3.30.1/CMakeCCompiler.cmake:2 (set):
Syntax error in cmake code at

/c/aseprite/build/CMakeFiles/3.30.1/CMakeCCompiler.cmake:2

when parsing string

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64\cl.exe

Invalid character escape '\P'.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)

And now for some reason, even when using the normal command, it also does this second error, any idea on why this is happening?

i just tested it the other day, everything is fine so im not really sure whats the problem here

@themonkeys42
Copy link

thank you, worked like a charm.

@Mitra-88
Copy link
Author

thank you, worked like a charm.

1009875045105029160

@Mitra-88
Copy link
Author

Hello! I've been trying to compile Aseprite for the past few days, but nothing is working. So basically, I installed everything and put the files in their respective folders, but when I tried compiling it, it started good, but then...:

-- The C compiler identification is MSVC 19.41.34123.0
-- The CXX compiler identification is MSVC 19.41.34123.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64/cl.exe
-- Check for working C compiler: /c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64/cl.exe - broken
CMake Error at /opt/devkitpro/msys2/usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler

"/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64/cl.exe"

is not able to compile a simple test program.
It fails with the following output:

Change Dir: '/c/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-a9HHZB'

Run Build Command(s): "/c/Program Files/CMake/bin/ninja.exe" -v cmTC_a0313
ninja: error: '/c/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-a9HHZB/testCCompiler.c', needed by 'CMakeFiles/cmTC_a0313.dir/testCCompiler.c.o', missing and no known rule to make it

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)
-- Configuring incomplete, errors occurred!

Then I tried again but using the command that is used in case CMake is unable to detect the C/C++ compiler, and this happened:

CMake Error at build/CMakeFiles/3.30.1/CMakeCCompiler.cmake:2 (set):
Syntax error in cmake code at

/c/aseprite/build/CMakeFiles/3.30.1/CMakeCCompiler.cmake:2

when parsing string

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64\cl.exe

Invalid character escape '\P'.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)

And now for some reason, even when using the normal command, it also does this second error, any idea on why this is happening?

i just tested it the other day, everything is fine so im not really sure whats the problem here

Just tried using AsepriteTool but still the same error appeared. :/

well ig i cant do much about it, and uhh AsepriteTool didnt get updated since 2022

@YodelingYoda
Copy link

Followed all instructions and it worked perfectly with v. 1.3.9.1

@Mitra-88
Copy link
Author

Followed all instructions and it worked perfectly with v. 1.3.9.1

yayyy

@Baderzzz
Copy link

Baderzzz commented Dec 5, 2024

Hello! I've been trying to compile Aseprite for the past few days, but nothing is working. So basically, I installed everything and put the files in their respective folders, but when I tried compiling it, it started good, but then...:

-- The C compiler identification is MSVC 19.41.34123.0
-- The CXX compiler identification is MSVC 19.41.34123.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64/cl.exe
-- Check for working C compiler: /c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64/cl.exe - broken
CMake Error at /opt/devkitpro/msys2/usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler

"/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/HostX64/x64/cl.exe"

is not able to compile a simple test program.
It fails with the following output:

Change Dir: '/c/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-a9HHZB'

Run Build Command(s): "/c/Program Files/CMake/bin/ninja.exe" -v cmTC_a0313
ninja: error: '/c/aseprite/build/CMakeFiles/CMakeScratch/TryCompile-a9HHZB/testCCompiler.c', needed by 'CMakeFiles/cmTC_a0313.dir/testCCompiler.c.o', missing and no known rule to make it

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)
-- Configuring incomplete, errors occurred!

Then I tried again but using the command that is used in case CMake is unable to detect the C/C++ compiler, and this happened:

CMake Error at build/CMakeFiles/3.30.1/CMakeCCompiler.cmake:2 (set):
Syntax error in cmake code at

/c/aseprite/build/CMakeFiles/3.30.1/CMakeCCompiler.cmake:2

when parsing string

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64\cl.exe

Invalid character escape '\P'.
Call Stack (most recent call first):
CMakeLists.txt:23 (project)

And now for some reason, even when using the normal command, it also does this second error, any idea on why this is happening?

Heyyy its probably too late but just for anyones future reference, peep this line:
" CMake Error at /opt/devkitpro/msys2/usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):"
It seems you have devkitpro installed, and it seems to conflict with aseprite with some reason. The solution I found was to exclude it from the windows PATH variable, you can also try uninstalling it.

Cheers!

@Baderzzz
Copy link

Baderzzz commented Dec 6, 2024

Just found the problem, as I'm using an Aseprite beta branch, I simply needed to use Skia-m124 lol. But anyways, thanks a lot for the devkitpro thing, that fixed the problem from before. =D

No worries! Glad I could help

@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

@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

@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