Building darktable master+branch for Windows

all good but the extra darktable directory in home is likely old and can be deleted…

Kofa runs linux so his next command removes the installed version…

You can likely run the build script with no extra parameters and then at the end you will be prompted to run the install text…copy and paste that and change the target from install to package and this will make a windows .exe installer and save it in your build directory…

Text is something like…

cmake --build . --target package

You need to update your MSYS2 packages.

2 Likes
Bill Martz@DESKTOP-U6S1FBL MINGW64 /home/darktable
mkdir build
Bill Martz@DESKTOP-U6S1FBL MINGW64 /home/darktable
cd build
Bill Martz@DESKTOP-U6S1FBL MINGW64 /home/darktable/build
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable ../.
Bill Martz@DESKTOP-U6S1FBL MINGW64 /home/darktable/build
cmake --build .
Bill Martz@DESKTOP-U6S1FBL MINGW64 /home/darktable/build
cmake --build . --target package

Should work…

It worked. Now, what do I do to add the Jens-Hanno Schwalm branch?

And once I do that, I will start all over with updating my MSYS2 packages.

I did it this way and then it tracks that branch… so I did

And as I was not clear

There are other solutions back in the original thread…

but use the 2 lines above and then do all the normal steps… git pull etc etc…

I’m pretty lost with this, but I have to stop for the day.

1 Like

@priort, @kofa BTW, thanks for all the help today. You are very generous with your time and knowledge.

@kofa is the rock…I probably just confused you more but glad you got your builds back up and running…that’s the main thing…if you don’t want to futz with it I can just send you a link or you can use the one I posted the other day…not much has changed yet either in the HLR or DT since I posted it …the generic one should work fine for you…Just install it as a test version along side your main one…

Reinstalled MSYS2. All seemed to be going well, until it wasn’t.
Ran

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}

Received these messages:

warning: mingw-w64-x86_64-sqlite3-3.39.1-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-gettext-0.21-3 is up to date -- reinstalling
warning: mingw-w64-x86_64-python-3.10.5-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
warning: dependency cycle detected:
warning: mingw-w64-x86_64-libwebp will be installed before its mingw-w64-x86_64-libtiff dependency
warning: dependency cycle detected:
warning: mingw-w64-x86_64-harfbuzz will be installed before its mingw-w64-x86_64-freetype dependency

I continued installing because I hoped it would resolve itself, but when I was done at first neither MSYS2 nor MINGW64 would run. But now they do.

Got to run again.

1 Like

Normally use this to update MSYS2 and the packages:

  • Run pacman -Syuu. Follow the instructions. Repeat this step until it says there are no packages to update.

Per MSYS2-Installation - MSYS2

1 Like
git switch -c new_branch
git pull https://github.com/<user>/<forked-repo>.git <branch>
1/ = “jenshannoschwalm” 2/ = "darktable.git 3/ = i would find by clicking on the “Pull Request” tab, and then click on the PR I’m interested in, and then I can find him on the top of the next page, after the name. (as Jorismak explained yesterday).

Is that:

git pull https://github.com/jenshannoschwalm/darktable.git <branch>

I’m looking at https://github.com/darktable-org/darktable/pull/12210, and I don’t see what goes into branch?

I think its gl_recovery_v4 but you might also want to try @Kofa’s method…

gh pr checkout 12345

I think the HR PR is 12210

This:

git switch -c new_branch
git pull https://github.com/jenshannoschwalm/gl_recovery_v4.git 12210

And where does it go in the build sequence?

Bill Martz@DESKTOP-U6S1FBL MINGW64
$ cd ..
Bill Martz@DESKTOP-U6S1FBL MINGW64 /home
$ git switch -c new_branch
Bill Martz@DESKTOP-U6S1FBL MINGW64 /home
$ git pull https://github.com/jenshannoschwalm/gl_recovery_v4.git 12210
Bill Martz@DESKTOP-U6S1FBL MINGW64 /home
$ git clone https://github.com/darktable-org/darktable.git
Bill Martz@DESKTOP-U6S1FBL MINGW64 /home
$ cd darktable
and so on.

Please don’t take this the wrong way, but you should really take your time and try to understand git better and what all the commands do instead of throwing them together in random order and expect the source tree to be in a state you intended to. Likewise for MSYS2 package (see also step 5 of getting started) and environment management.

2 Likes

Your point is a good one. I will start with the tutorial. Thanks.

I did get MSYS2 installed, I believe correctly, by rerunning commands until all updates were successfully installed. I think I am ready to create darktable exe with MINGW64. but I don’t know how to add jenshannoschwalm’s branch.

git clone https://github.com/jenshannoschwalm/darktable.git         # creates a 'darktable' folder. Delete it first if it already exists
cd darktable                                                        # go into the newly created 'darktable' folder
git checkout gl_recovery_v4                                         # switch to the 'gl_recovery_v4' branch

You download (clone) the entire repository.
Then you select which branch you want to be active (or work on, or use, …).

So a branch sits inside a repository, of many branches / changes / etc…

How it works in the Github world (often, not always), is that if you work on something, you make your own copy of the repository (called a ‘fork’), on which you are free to change and do as you want.

Then, when you have a branch with changes that you think ‘should be in the main one’, you create a pull request, where you say ‘I think this branch on my repository, should be merged in your repository’.

That’s the stage we are currently in. So the code you are looking for, sits in a branch (gl_recovery_v4) on jenshannoschwalm’s Github copy. Not on the real Darktable one, but on jenshannoschwalm’s copy.

To get started, I don’t think you need git pull anywhere. That is used to get updates when you already cloned it before. To keep things simple, I would advise using ‘git clone’ to clone an entire repository, and if you want to start over again, just delete the darktable folder it created and start again.

So, to start building, start mingw64 environment.
Then directly start typing:

rm -rf darktable
git clone https://github.com/jenshannoschwalm/darktable.git
cd darktable
git checkout gl_recovery_v4
pwd

This deletes any darktable folder that is around, download’s jenshannoschwalm’s repository, switch to the branch containing this latest code.
Then, it displays the current directory you are in. Please take note of it and/or write it somewhere, so you know it for later!.

Now, you follow the build instructions that probably start with something like:

git submodule init
git submodule update
rm -rf build
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/darktable ../.
cmake --build .
cmake --install .
cmake --build . --target package

Notice that these steps delete and (re)create a ‘build’ directory, and do the building in that. So that’s also the final location where the installer will be if everything worked.

Note that this assumes you did all the ‘pacman’ commands in mingw64 environment before, and you created / modified the .bash_profile as stated in the build docs.

Msys2/mingw64 changes all the time, so you might also just run into unlucky timing where something breaks or is in an incompatible state. But I don’t think that’s your problem at the moment.

I am running Windows.

Right now there is no darktable folder. Don’t I want to cd to get to home first? And then proceed with

Bill Martz@DESKTOP-U6S1FBL MINGW64 /home
git clone https://github.com/jenshannoschwalm/darktable.git
cd darktable
git checkout gl_recovery_v4

and then

cd home
git clone https://github.com/darktable-org/darktable.git
cd darktable
git submodule init

and proceed with the rest?