Geany for macOS is a project that contains all the necessary configuration files, themes, scripts and instructions to create the Geany app bundle and a dmg installer image for macOS.
The macOS binaries can be downloaded from the Geany Releases page:
https://www.geany.org/Download/Releases
In addition to standard Geany configuration, the macOS bundle creates
its own configuration file under ~/.config/geany/geany_mac.conf upon
first start. In this configuration file it is for instance possible
to override the used theme (light/dark) when autodetection based on
system macOS theme is not desired.
A brief description of the contents of the project directory:
- Launcher: A binary launcher which is used to set up environment variables to run Geany.
- Prof-Gnome: Prof-Gnome 3.6 GTK 3 Theme with minor modifications
- Papirus, Papirus-Dark: Papirus GTK 3 icon theme with lots of unneeded icons removed to save space.
- macos-icon-design: design file for macOS Geany icon.
- iconbuilder.iconset: source Geany icons for the bundle.
- modulesets-stable, patches: copy of the modulesets-stable and patches directory from the gtk-osx project containing dependency specifications. Since the upstram project is sometimes in an unstable state, this allows us to make a snapshot of a working configuration for our build.
- geany_patches: various patches fixing dependencies to enable bundling.
- utils: various utility scripts.
- Info.plist: macOS application configuration file containing some basic information such as application name, version, etc. but also additional configuration including file types the application can open.
- geany.bundle: configuration file describing the contents of the app bundle.
- geany.entitlements: runtime hardening entitlements file.
- geany.modules: JHBuild modules file with Geany dependencies.
- settings.ini: default theme configuration file for GTK 3.
- bundle.sh: script creating the app bundle.
- create_dmg.sh: script calling create-dmg to create the dmg installer image.
- notarize.sh: script for notarizing the dmg using Apple notary service.
- sign.sh: script signing the app bundle.
For more general instructions about building and bundling macOS applications please visit
The HOWTO below contains just the portions necessary/relevant for building and bundling Geany.
- macOS
- Xcode and command-line tools
To create the bundle, you need to first install JHBuild and GTK as described below.
-
Create a new account for jhbuild (not necessary but this makes sure jhbuild does not interfere with some other command-line tools installed on your system).
-
Optionally, when cross-compiling x86_64 binaries on an ARM64 Apple computer, run
env /usr/bin/arch -x86_64 /bin/zsh --loginto create a
x86_64shell. All the compilation steps below have to be executed in this shell. -
Depending on the used shell, add the following lines
export PATH=$PATH:"$HOME/.new_local/bin" export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8either to your
.zprofileor.bash_profileto make sure these variables are defined and restart your shell. -
Get
gtk-osx-setup.shbycurl -L -o gtk-osx-setup.sh https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/gtk-osx-setup.shand run it:
bash gtk-osx-setup.sh -
Add the following lines to
~/.config/jhbuildrc-custom:setup_sdk(target="11", architectures=["arm64"]) #setup_sdk(target="10.15", architectures=["x86_64"]) setup_release() # enables optimizationsWith this settings, the build creates an ARM64 binary that works on macOS 11 and later. Instead of
arm64you can also specifyx86_64to produce binaries for 64-bit Intel processors. Also, when cross-compiling x86_64 binaries, setdefault_toolchain = "stable-x86_64-apple-darwin"inside
.new_local/settings.tomlso rust downloads x86_64 library versions. -
Install GTK and all of its dependencies by running the following command inside the
geany-osxdirectory:jhbuild bootstrap-gtk-osx && jhbuild build meta-gtk-osx-bootstrap meta-gtk-osx-gtk3The upstream project is sometimes in an unstable state and fails to build; if this happens, you can use our snapshot of modulesets which was used to build the last release of Geany:
jhbuild bootstrap-gtk-osx && jhbuild -m "https://raw.githubusercontent.com/geany/geany-osx/master/modulesets-stable/gtk-osx.modules" build meta-gtk-osx-bootstrap meta-gtk-osx-gtk3 -
To build Geany, plugins and all of their dependencies, run one of the following commands inside the
geany-osxdirectory depending on whether to use Geany sources from the latest release tarball or current git master:- tarball
jhbuild -m `pwd`/geany.modules build geany-bundle-release - git master
jhbuild -m `pwd`/geany.modules build geany-bundle-git
- tarball
-
To build the launcher binary, run
xcodebuild ARCHS=`uname -m` -project Launcher/geany/geany.xcodeproj clean buildinside the
geany-osxdirectory. -
Inside the
geany-osxdirectory run the following command to create the app bundle:jhbuild run ./bundle.sh -
Optionally, if you have a development account at Apple and want to sign the resulting bundle, get the list of signing identities by
security find-identity -p codesigningand use the whole string within apostrophes which contains "Developer ID Application: ..." in the following command:
export SIGN_CERTIFICATE="Developer ID Application: ..."Then, run
./sign.sh
-
Get the
create-dmgscript fromhttps://github.com/andreyvit/create-dmg.git
and put it to your
$PATH. -
Create the dmg installation image by calling
./create_dmg.shfrom within the
geany-osxdirectory. If theSIGN_CERTIFICATEvariable is defined (see above), the image gets signed by the specified certificate. -
Optionally, to get the image notarized by Apple notary service, run
./notarize.sh <dmg_file> <apple_id>where
<dmg_file>is the dmg file generated above and<apple_id>is the Apple ID used for your developer account. The script then prompts for an app-specific password generated for your Apple ID.
This section describes some maintenance-related activities which do not have to be performed during normal bundle/installer creation:
-
To get the
Info.plistfile associations in sync withfiletype_extensions.conf, copy the filetype extension portion fromfiletype_extensions.confto the marked place inutils/plist_filetypes.pyand run the script. Copy the output of the script to the marked place inInfo.plist. -
Before the release, update the Geany version and copyright years inside
Info.plistandcreate_dmg.sh. Also update the-releasetargets ingeany.modulesfile to point to the new release. Dependencies insidegeany.modulescan also be updated to newer versions. -
Copy
modulesets-stablefrom gtk-osx into this project to get the latest dependencies (if it builds) and possibly modify it (if something isn't working). -
To make sure nothing is left from the previous build when making a new release, run
rm -rf .new_local .local Source gtk .cache/jhbuild
Jiri Techet, 2025