diff options
| author | Přemysl Eric Janouch <p@janouch.name> | 2025-11-08 18:47:51 +0100 |
|---|---|---|
| committer | Přemysl Eric Janouch <p@janouch.name> | 2025-11-11 19:28:45 +0100 |
| commit | 690e60cd74c44ed1e2d21b27e3152856845ead28 (patch) | |
| tree | 4a11dff3cec93315170c0caf9a0540c80aef8b75 /macos-configure.sh | |
| parent | a7ff9f220db0785e88a6013d286b5f6b92f71693 (diff) | |
| download | fiv-690e60cd74c44ed1e2d21b27e3152856845ead28.tar.gz fiv-690e60cd74c44ed1e2d21b27e3152856845ead28.tar.xz fiv-690e60cd74c44ed1e2d21b27e3152856845ead28.zip | |
Build an application bundle on macOSorigin/masterorigin/HEAD
This is far from done, but nonetheless constitutes a big improvement.
macOS application bundles are more or less necessary for:
- showing a nice icon;
- having spawned off instances actually be brought to the foreground;
- file associations (yet files currently do not open properly);
- having a reasonable method of distribution.
Also resolving a bunch of minor issues:
- The context menu had duplicate items,
and might needlessly end up with (null) labels.
Diffstat (limited to 'macos-configure.sh')
| -rwxr-xr-x | macos-configure.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/macos-configure.sh b/macos-configure.sh new file mode 100755 index 0000000..b7a87db --- /dev/null +++ b/macos-configure.sh @@ -0,0 +1,25 @@ +#!/bin/sh -e +# macos-configure.sh: set up a Homebrew-based macOS build +# +# Meson has no special support for macOS application bundles whatsoever. +# +# gtk-mac-bundler doesn't do anything particularly miraculous, +# and it doesn't directly support Homebrew. +# +# It would be cleaner and more reproducible to set up a special HOMEBREW_PREFIX, +# though right now we're happy to build an app bundle at all. +# +# It would also allow us to make a custom Little CMS build that includes +# the fast float plugin, which is a bit of a big deal. + +# TODO: exiftool (Perl is part of macOS, at least for now) +HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_ASK=1 brew install + coreutils meson pkgconf shared-mime-info adwaita-icon-theme \ + gtk+3 jpeg-xl libavif libheif libraw librsvg little-cms2 webp + +sourcedir=$(grealpath "${2:-$(dirname "$0")}") +builddir=$(grealpath "${1:-builddir}") +appdir=$builddir/fiv.app +meson setup --buildtype=debugoptimized --prefix="$appdir" \ + --bindir=Contents/MacOS --libdir=Contents/Resources/lib \ + --datadir=Contents/Resources/share "$builddir" "$sourcedir" |
