These are instructions for building Pencil2D on a Windows PC. If you are using Mac go here, and Linux please go here.
This guide is primarily targeted towards developers. If you just want to use the latest version, download it from our nightly builds. This tutorial was made with Windows 11 in mind, however it will likely work with Windows 7 and up.
There are 3 steps in total:
If you are an experienced Qt developer, compiling Pencil2D will be extremely easy for you. Just open up pencil2d.pro in Qt Creator and compile, that's it.
Pencil2D is built upon Qt. In order to compile Pencil2D, you need to install Qt and a C++ toolchain.
On Windows, two C++ toolchains are available: Microsoft Visual C++ (MSVC) and Minimalist GNU for Windows (MinGW). MSVC is the toolchain maintained by Microsoft and arguably more well-tested because it is used by official Pencil2D builds, however MinGW doesn't require as much disk space and is more convenient to install. Generally, both can be used to build Pencil2D.
This step is only needed if you want to use MSVC and have not installed it yet. If you want to use MinGW or if you have built C++ applications using Visual Studio before, you can skip this step and jump ahead to the next section (Install Qt).
Individual components → Compilers, build tools, and runtimes → MSVC Build Tools for x64/x86 (Latest) and Individual components → SDKs, libraries, and frameworks → Windows 11 SDK (10.#.#####).Workloads → Desktop & Mobile → C++ build tools instead, but this is not strictly necessary to build Pencil2D.Qt → Qt #.##.# → MSVC 2022 64-bit.Qt → Qt #.##.# → MinGW ##.#.# 64-bit and a matching MinGW version from the Qt → Build Tools section.Qt Multimedia in the Additional Libraries subsection of your Qt version.Finish.Now it's time to build the application.
pencil2d.pro.kits for the project. Kits determine compilers, target environment, and various build settings, among other things. The Desktop option should be the only one selected. Click Configure Project to complete the kit selection.Ctrl+R keyboard shortcut). A small progress bar will show up on the bottom right and you will see some console output.If you see any errors, the issues tab at the bottom will display error messages. Please search the Pencil2D Issue tracker or create an issue if you can't find anything. Be sure to include as much detail as you can in your report!
Follow these steps if you prefer Visual Studio:
pencil2d.pro.Now that you can build Pencil2D, the next step is to learn about navigating the source code.