Build your own darktable for Windows

I would like to be able to use the latest development version of dt on Windows. I started with downloading msys2-x86_64-20200903.exe and running it. Then I went to
https://raw.githubusercontent.com/darktable-org/darktable/master/packaging/windows/BUILD.txt
I followed the steps down to and ran this command:

Install required libraries and dependencies:
$ pacman -S mingw-w64-x86_64-{exiv2,lcms2,lensfun,dbus-glib,openexr,sqlite3,libxslt,libsoup,libavif,libwebp,libsecret,lua,graphicsmagick,openjpeg2,gtk3,pugixml,libexif,osm-gps-map,libgphoto2,flickcurl,drmingw,gettext,python3,iso-codes,python3-jsonschema,python3-setuptools}

Everything seems to have run correctly except:

error: failed retrieving file ‘mingw-w64-x86_64-adwaita-icon-theme-3.38.0-3-any.pkg.tar.zst’ from downloads.sourceforge.net : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds

The end of all the processing is:

image

I don’t know what to do now, and looking ahead, there is much that is very unclear to me. One case is the use of Ninja.

Help, please.

Wait until it is faster

@Underexposed Don’t get my last post wrong. As I collaborated with @hannoschwalm to port RCD demosaic to darktable, I also ran into this issue. Next day sourceforge was available again.

@heckflosse That’s how I took it, but I don’t know what command to use to try again, the original?

pacman -Syuu

Thanks

Ran pacman -Syuu and result was nothing to do, all up to date.

So I proceeded with

Install optional libraries and dependencies:
$ pacman -S mingw-w64-x86_64-gmic

That appeared to finish correctly. There is this note:

Note: GMIC. Waiting for GMIC 9.3 you may need to rename libopencv_core4xx and 

libopencv_videoio4xx to libopencv_core440 and libopencv_videoio440 in the bin folder of darktable to get lut3d available.

Don’t know if that applies to me.

Further down:

Also use this program to install USB driver on Windows for your camera:
http://zadig.akeo.ie/
When you run it, replace current Windows camera driver with WinUSB driver

Modify your bash_profile file in your HOME directory

Don’t think I need my camera driver.

Modified my bash profile; added at end:

Added as per http://wiki.gimp.org/wiki/Hacking:Building/Windows
export PREFIX="/mingw64"
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
export PATH="$PREFIX/bin:$PATH"

This would use 6 cores.
export CMAKE_BUILD_PARALLEL_LEVEL=“6”

Execute the following command to activate profile changes
. .bash_profile

No message indicating success or failure.

Cloned darktable git repository into C:\msys64\home\Bill Martz\darktable\

Am at:

Finally build and install darktable:

mkdir build
cd build
cmake -G “MSYS Makefiles” -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable …/.
cmake --build .
cmake --build . --target install

Instructions say:

After this darktable will be installed in /opt/darktable directory

Do I specify somehow the /opt/darktable directory?

I would like to install it on a different drive than C, but I am concerned that it will point to the files in C:\Users\Bill Martz\AppData\Local\darktable, IOW, my current release files. I would like to prevent that. Is that possible?

Change target to package and you will get an installer…put it where you want…the file will be in the build directory when complete…I just use the build script… command is ./build.sh

What does that do?

Only applies if you plan on using LUT3D (at least, according to the instructions you referenced). dt expects version 400. Usually build changes within the repository are minor enough (or more likely unrelated to those files) that you could get away with renaming.

Does what you did but with just one command. (Just as Windows has its *.bat and *.ps1 batch files.) Of course, if anything goes wrong, you would have to diagnose the problem, as you have above.

It runs all the manual commands listed . Also much of the stuff in the last part of the build.txt is only needed if you want to build the manual otherwise you can skip it

When I went to build, this happened:

$ cmake -G “MSYS Makefiles” -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable …/.
CMake Error: The source directory “C:/msys64/home/Bill Martz” does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

I found this:

C:\msys64\home\Bill Martz\darktable\CMakeLists.txt

Do I move or copy CMakeLists.txt to:

C:\msys64\home\Bill Martz\

No, you run your command from C:\msys64\home\Bill Martz\darktable\build, not C:\msys64\home\Bill Martz\darktable

I was in

Bill Martz@DESKTOP-U6S1FBL MINGW64 ~/build

when I ran it.

You want to be in ~/darktable/build

This is my directory tree:

image

Yes, it’s not right… move build inside darktable

Thanks

I’ve been building DT on windows using the same recipe as in the first post (https://raw.githubusercontent.com/darktable-org/darktable/master/packaging/windows/BUILD.txt), but, even with renaming the two dll’s mentioned, the 3dlut module does not show up in DT.
I don’t use it, but a solution would be nice nonetheless…

I moved build and tried to move to that directory:

image