Building MacOS Binaries
August 8, 2026 ยท View on GitHub
Install [XCode](https://developer.apple.com/xcode/) and its command line tools.
If homebrew or macports are installed, either remove them completely or at least move them out of the way.
Having these package managers installed will interfere with the jhbuild build process. (example here)
Setup gtk-osx
Download the latest version of the gtk-osx setup script and run it:
git clone https://github.com/Xpra-org/gtk-osx-build
cd gtk-osx-build
sh gtk-osx-setup.sh
This will have installed jhbuild in ~/.new_local/bin, so let's add this to our $PATH:
export PATH=$PATH:~/.new_local/bin/
Configure `jhbuild` to use our modules
From the gtk-osx-build directory, run:
ln -sf "$(realpath .)/jhbuildrc-gtk-osx" ~/.config/jhbuildrc
ln -sf "$(realpath .)/jhbuildrc-custom" ~/.config/jhbuildrc-custom
Bootstrap:
jhbuild bootstrap-gtk-osx
Optional: install pandoc
First, make sure that all the modulesets will be using the same system libffi
as the one used by Python, so run this command from a jhbuild shell:
cat > ${JHBUILD_PREFIX}/lib/pkgconfig/libffi.pc << EOF
prefix=$(xcrun --show-sdk-path)
libdir=\${prefix}/usr/lib
includedir=\${prefix}/usr/include/ffi
Name: libffi
Description: Library supporting Foreign Function Interfaces
Version: 3.4.6
Libs: -L\${libdir} -lffi
Cflags: -I\${includedir}
EOF
jhbuild update
jhbuild build
```shell
git clone https://github.com/Xpra-org/xpra
cd xpra/packaging/MacOS/
sh ./make-all.sh
```