-
-
Notifications
You must be signed in to change notification settings - Fork 355
1. Building & Development Environment
Ben Olden-Cooligan edited this page Jun 8, 2025
·
18 revisions
You can open the NAPS2 solution with:
Or, optionally, you can use a text editor with the dotnet CLI.
You will also need to install:
- (All platforms) The latest dotnet sdk. VS/Rider may install this for you.
- (All platforms) The macos workload:
dotnet workload install macos
- (Windows-only) The .NET Framework 4.6.2 developer pack.
- (Linux-only) Tests require packages
default-jre fonts-liberation2 fonts-noto-core fonts-noto-cjk
(may be pre-installed depending on distro)
With the above prerequisites, it should be possible to build and run NAPS2 with your IDE or the dotnet CLI.
You'll want to run the right project for your platform:
- (Windows) NAPS2.App.WinForms
- (Mac) NAPS2.App.Mac
- (Linux) NAPS2.App.Gtk
To build NAPS2 installer packages, you will need:
Windows
- Inno Setup (for the .exe installer)
- WiX Toolset (for the .msi installer)
Mac
Linux
- For .deb/.rpm:
sudo apt install debsigs rpm
-
flatpak-builder and the Freedesktop SDK
sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- x64:
flatpak install flathub org.flatpak.Builder org.freedesktop.Platform/x86_64/24.08 org.freedesktop.Sdk/x86_64/24.08 org.freedesktop.Sdk.Extension.dotnet9/x86_64/24.08
- arm64:
flatpak install flathub org.flatpak.Builder org.freedesktop.Platform/aarch64/24.08 org.freedesktop.Sdk/aarch64/24.08 org.freedesktop.Sdk.Extension.dotnet9/aarch64/24.08
- For building arm64 flatpaks on x64 with
--xcompile
:sudo apt install qemu-user-static
Once you have the necessary prerequisites, have a look at NAPS2.Tools, specifically the n2 pkg
command.
The NAPS2 solution has the following build configurations. You may get build errors if you don't use the platform-specific builds, though you can ignore those errors.
- Debug - Debug with most localized resources disabled for faster compiling.
- DebugLang - Debug with full localization.
- Debug-Windows - Debug with only projects needed for Windows.
- Debug-Linux - Debug with only projects needed for Linux.
- Debug-Mac - Debug with only projects needed for Mac.
- Release-Windows - For the Windows .exe production build.
- Release-Mac - For the Mac production build.
- Release-Linux - For the Linux production build.
- Release-Msi - For the Windows .msi production build.
- Release-Zip - For the Windows .zip production build.
- Sdk - For the SDK release build.
- Tools - Only the NAPS2.Tools project.