-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
BUILD_hb.txt
46 lines (35 loc) · 3.07 KB
/
BUILD_hb.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
How to make disk image with darktable application bundle from source (using Homebrew):
0). Install Homebrew (instructions and prerequisites can be found on official website https://brew.sh/), ideally use default installation path (/opt/homebrew for arm64, /usr/local for x86_64).
1). Install required homebrew packages:
$ 1_install_hb_dependencies.sh
2). Build and install darktable using either option A or B:
- Option A: Build using the default build.sh, which should work for most use cases
$ 2_build_hb_darktable_default.sh
- Option B: Build using custom cmake options, edit according to your specific needs/environment
$ 2_build_hb_darktable_custom.sh
3). Create application bundle from build files. To properly sign the app bundle you can optionally provide your developer certificate email/id by defining CODECERT:
$ export CODECERT="your.developer@apple.id" # optional, not required
$ 3_make_hb_darktable_package.sh
4). Generate DMG image from application bundle:
$ 4_make_hb_darktable_dmg.sh
The final result is a DMG file: darktable-<current version>+<latest commit>-{arm64|x86_64}.dmg
All binaries, the MacOS app bundle and the DMG file are created in build/macosx.
LIMITATIONS:
- Created DMG will only be compatible to the macOS version it was created upon.
- Naturally the libraries that darktable is built upon will be as good as its currently provided homebrew packages. You might want to use "$ brew pin <package>" to lock your working/verified setup.
- As of today homebrew ships lensfun 0.3.3 that is the successor of the last stable release 0.3.2. It is expected to be compatible and should not break existing edits based on 0.3.2 or before.
- For now additional darktable tools like darktable-curve-tool or darktable-noiseprofile are not part of the default application bundle.
MACOS SECURITY:
- The DMG is not notarized with/at Apple by using this approach. If it is still required see the official BUILD.txt for further instructions.
- As the DMG is not notarized and the app bundle may not even be properly signed, it is still possible to install/run darktable at your own risk. To do so make sure to run "$ xattr -d com.apple.quarantine <darktable-app>.dmg" on the DMG before installing.
NOTES:
- It will be automatically build for the architecture you are currently on, either Apple Silicon (arm64) or Intel (x86_64).
- If you want to build for x86_64 on arm64 see https://stackoverflow.com/questions/64951024/how-can-i-run-two-isolated-installations-of-homebrew/68443301#68443301 about how to handle both environments in parallel.
- After creating the darktable application bundle (step 3) you can directly run the result by executing:
$ build/macosx/package/darktable.app/Contents/MacOS/darktable --configdir .config/darktable/ --cachedir .cache/darktable/
REFERENCES:
This approach is heavily based on and inspired by:
- The official BUILD.txt instructions (MacPorts-based) by the darktable community
- http://clarkkromenaker.com/post/library-dynamic-loading-mac/
- https://gitlab.gnome.org/GNOME/gtk-mac-bundler
- https://github.com/auriamg/macdylibbundler/