Ok, here we go. I’ll try to make it as accurate and concise as I can.
First, since I git clone --recurse-submodules https://github.com/darktable-org/darktable.git
last week, I needed to make sure I had everything updated. so I
$ cd ~/src/darktable
$ git pull
and then resume the built.txt
instructions :
$ cd darktable
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_C_FLAGS=-I/opt/local/include/libomp -DCMAKE_CXX_FLAGS="-stdlib=libc++ -I/opt/local/include/libomp" -DCMAKE_LIBRARY_PATH=/opt/local/lib/libomp -DBINARY_PACKAGE_BUILD=ON -DRAWSPEED_ENABLE_LTO=ON
$ make
the cmake
command went through but complained that I haven’t had JDK installed and suggested a link. I went ahead and downloaded the dmg file here.
the make
failed also at 7% while building src ▸ darktable ▸ src ▸ external ▸ rawspeed ▸ src ▸ librawspeed ▸ common ▸ Rawimage.cpp
. I opened it and realised that I was not using the latest commit which included the GnuTLS update. In fact my first git pull
did update DT repo but not its submodules. So this is when I :
$ git submodule update --remote —recursive
although I think that
$ cd ~/src/darktable/src/external/rawspeed
$ git pull
would have done the trick as well. (Can someone confirm that ?) I guess I’m not familiar enough with working with git and submodules.
Checking the hash number and Rawimage.cpp
confirmed that I’ve now updated everything correctly. I then did :
$ cd ~/src/darktable
$ rm -r build
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_C_FLAGS=-I/opt/local/include/libomp -DCMAKE_CXX_FLAGS="-stdlib=libc++ -I/opt/local/include/libomp" -DCMAKE_LIBRARY_PATH=/opt/local/lib/libomp -DBINARY_PACKAGE_BUILD=ON -DRAWSPEED_ENABLE_LTO=ON
The output of cmake
looked better with JDK installed, and this time the make
command went all the way to 100%.
I then did :
2). Download, patch and install gtk-mac-bundler (assuming darktable was cloned into ~/src directory):
$ cd ~/src
$ curl -O https://ftp.gnome.org/pub/gnome/sources/gtk-mac-bundler/0.7/gtk-mac-bundler-0.7.4.tar.xz
$ tar -xf gtk-mac-bundler-0.7.4.tar.xz
$ cd gtk-mac-bundler-0.7.4
$ patch -p1 < ../darktable/packaging/macosx/gtk-mac-bundler-0.7.4.patch
$ make install
which ran ok, followed by
3). Now preparation is done, run image creating script, it should create darktable-<VERSION>.dmg in current (packaging/macosx) directory:
$ cd ~/src/darktable/packaging/macosx
$ ./make-app-bundle
which failed at $ ./make-app-bundle
because I’ve had skip (intentionally) the $ sudo make install
on purpose. I realised that I needed it installed so the DMG can be generated. At that point I ran :
$ cd ~/src/darktable/build
$ sudo make install
This went well. So I tried again to :
$ cd ~/src/darktable/packaging/macosx
$ ./make-app-bundle
At that point in time it asks me if Terminal could take over Finder. I was not sure and clicked “no” or something meaning no anyway. The DMG was created but size was ridiculously small and output showed some error like “Not authorized to send Apple events to System Events.”. I knew this has to do with the authorisation I had just denied so I googled a bit and then went to setings/Security and privacy/Privacy
and selected Automation
on the right hand side. I could there see Terminal and just below indented Finder unchecked. Checked it, restarted Terminal and that was it for the authorisation.
Restarting Terminal and
$ cd ~/src/darktable/packaging/macosx
$ ./make-app-bundle
did not do the trick. The DMG file has to be deleted first. Once I’ve done that and tried once more
$ ./make-app-bundle
It works just fine and the DMG file was finally created with an approx size of 70mb. Double clicked on it (renamed the former Darktable in app as Darktable_26, and then dragged over the new Darktable.
Firing up one or the other just start the correct version of the software, and all the settings and styles that I had set up in 2.6 were in the built version also, which is great.
So to summarise I’d say that the main takeaways of this are:
- delete the build directory if you’re unsure, and restart the process from there
- do not forget do update the dependencies
- Install JDK as it’s surely needed
- Allow Terminal to take over Finder when prompted (first time only)
Yet to try :
- update Darktable to the latest changes and redo the whole process
- finding out how to uninstall ONLY Darktable in
usr/local
as it is suggested to do so before attempting another building process.
Hope this clarifies things up and helps.
Cheers