A signed, notarised and stapled pgAdmin 4.app was rejected by Gatekeeper with "invalid destination for symbolic link in bundle". Gatekeeper walks every symlink in the bundle and rejects the whole app if any link does not resolve to a real file inside it; notarisation does not catch this, so a broken link slips through stapling and only surfaces as a Gatekeeper failure on the end user's machine. The embedded Python.framework ships such links: an arm64-only build still carries a bin/python3-intel64 launcher symlink (whose target _strip_architecture deletes when it removes the foreign-arch files), and the bundled Tcl/Tk frameworks carry PrivateHeaders links pointing at a Versions/Current that has none. Add a _prune_dangling_symlinks step that removes every dangling symlink in the bundle after architecture stripping and before signing, then fails the build if any remain, so this cannot slip past notarisation again.
pgAdmin macOS Builds
Required Packages
Either build the sources or get them from macports or similar:
-
Yarn & NodeJS
-
PostgreSQL 12 or above from http://www.postgresql.org/
-
Python 3.6+ (required for building). The build environment should run this version of python in response to the python command.
Building
-
To bundle a different version of Python from the default of 3.13.1, set the PGADMIN_PYTHON_VERSION environment variable, e.g:
export PGADMIN_PYTHON_VERSION=3.13.11 -
If a path different from the default of /usr/local/pgsql for the PostgreSQL installation has been used, set the PGADMIN_POSTGRES_DIR environment variable appropriately, e.g:
export PGADMIN_POSTGRES_DIR=/opt/local/pgsql -
If you want to codesign the appbundle, copy codesign.conf.in to codesign.conf and set the values accordingly.
-
If you want to notarize the appbundle, copy notarization.conf.in to notarization.conf and set the values accordingly. Note that notarization will fail if the code isn't signed.
-
To build only DMG file, go to pgAdmin4 source root directory and execute:
make appbundleTo build both DMG and ZIP files, go to pgAdmin4 source root directory and execute:
make appbundle BUILD_OPTS="--zip"This will create the python virtual environment and install all the required python modules mentioned in the requirements file using pip, build the runtime code and finally create the app bundle and the DMG and/or ZIP in ./dist directory.