Prerequisites
Install your OpenCL GPU drivers if you have a GPU.
On Windows 11, it seems that the system OpenCL drivers for Intel embedded GPU cause issues (black images), especially with newer generation CPU. You may want to remove Windows drivers and install Intel ones .
See the caveats section below for more details.
EXE package (recommended)
The Ansel project provides an official .exe
package, built for the stable, pre-release and experimental channels. This is the recommended way of installing Ansel, since it is fresh from the repository, always up-to-date and ships updated lens databases for Lensfun.
Downloads
Building from source code manually
Install MSYS2 (instructions and prerequisites can be found on the official website: https://www.msys2.org )
Start the MSYS terminal and update the base system until no further updates are available by repeating:
From the MSYS terminal, install x64 developer tools, x86_64 toolchain and git:
Install required libraries and dependencies for darktable:
Install optional libraries and dependencies:
- for cLUT
- for NG input with midi devices
- if you plan and developing, install the unit-tests library
Open the MINGW64 terminal (from the application menu) and update your lensfun database:
Note
MSYS will initialize a personal Unix-like/home
folder, by default located in C:\\msys64\home\USERNAME
where USERNAME
is your current Windows username. If your username contains non-latin characters, like accentuated letters, the clashes between Windows encoding and Linux encoding will make the compilation fail on directory pathes issues. In that case, create a new directory in C:\\msys64\home\USERNAME_WITHOUT_ACCENTS
, and in the MSYS terminal, do cd /home/USERNAME_WITHOUT_ACCENT
.- Modify the
.bash_profile
file in your$HOME
directory and add the following lines: - By default CMake will only use one core during the build process. To speed things up you might wish to add a line like:to your
~/.bash_profile
file. This would use 8 cores. - Execute the following command to activate profile changes:
- From the MINGW64 terminal, clone the darktable git repository (in this example into
~/ansel
): - Finally build and install Ansel:
- Variant 1: with all contextual optimizations enabled for your hardware:After this, Ansel will be installed in
/opt/ansel
directory and can be started by typing/opt/ansel/bin/ansel.exe
in MSYS2 MINGW64 terminal. - Variant 2: with only generic optimizations and producing an installable EXE package:After this, you will need to double-click and install the
ansel.exe
found in thebuild/bin
folder. This package will be portable and be installable on other platforms.
- Variant 1: with all contextual optimizations enabled for your hardware:After this, Ansel will be installed in
Caveats
Starting in command line (with arguments)
In some situations, you will need to start Ansel in command line, with arguments modifying its default behaviour, to test or debug issues:
- if you built yourself, start the MSYS2 MINGW64 terminal (from the applications menu), and execute
/opt/ansel/bin/ansel.exe
, - if you installed from the EXE package, open the Windows terminal (
cmd.exe
) and execute"C:\Programs Files\ansel\bin\ansel"
(assuming you installed Ansel in the default directory, suggested by the installer).
For example, if you note issues with OpenCL, you could start Ansel with OpenCL entirely disabled using "C:\Programs Files\ansel\bin\ansel" --disable-opencl
.
The caveat though is the debugging commands (-d OPTION
) don’t output messages to the terminal, as they do on Unix, because of issues with Windows. Instead, the output will be written in an ansel-log.txt
text file, in your cache directory. Start the help of the software ( runing "C:\Programs Files\ansel\bin\ansel" -h
), and the last line should tell you where the file will be located after the line note: debug log and output will be written to this file: PATH
. Typically, it should be C:\Users\USERNAME\AppData\Local\Microsoft\Windows\INetCache\ansel
on Windows 10.
OpenCL
Darktable blacklists all Intel OpenCL drivers to prevent issues, because of an history of bad drivers. In practice, since Intel Neo, things are better and reasonably-old Intel platforms are well supported, so the blacklist is removed on Ansel. OpenCL issues (typically: black images) are still regularly reported with brand-new hardware.
If you find yourself in this situation, you have several mitigation options:
- Try to install a newer or an older version of your GPU driver.
- If you have a discrete GPU (Nvidia or AMD), you can disable the Intel embedded GPU:
- by entirely removing the Intel OpenCL driver (use your software manager to locate it), so Ansel uses only your discrete driver,
- by entirely disabling the Intel GPU in Ansel config:
- locate the
anselrc
text file on your system (typically inC:\Users\USERNAME\AppData\Local\ansel
), - open it and locate the line
cldevice_v4_YOUR_DEVICE=0 250 0 16 16 128 0 0 0.053989
whereYOUR_DEVICE
is the name of your GPU (possibly associated with a driver version), - on that line, change the 8th (penultimate) digit from
0
to1
, so you getcldevice_v4_YOUR_DEVICE=0 250 0 16 16 128 0 1 0.053989
,
- locate the
- Try to change the build options for OpenCL kernels:
- locate the
anselrc
text file on your system (typically inC:\Users\USERNAME\AppData\Local\ansel
), - open it and locate the line
cldevice_v4_YOUR_DEVICE_building=-cl-fast-relaxed-math
whereYOUR_DEVICE
is the name of your GPU (possibly associated with a driver version), and the options after=
may be different from this example, - clear the building options, so you get
cldevice_v4_YOUR_DEVICE_building=
(nothing after=
)
- locate the
- If you don’t have a discrete GPU and the Intel one is your only one:
- start the application with OpenCL disabled at all with
COMMAND --disable-opencl
(see the previous section for the actual system command to run, depending on your installation) - disable the Intel GPU in Ansel config (see point 1.2. above)
- start the application with OpenCL disabled at all with