build-emacs-for-macos icon indicating copy to clipboard operation
build-emacs-for-macos copied to clipboard

Pure GTK branch

Open ccakes opened this issue 3 years ago • 4 comments

I managed to get feature/pgtk built on my MBP and it works, but it's not great yet. The build didn't work out of the box with this tool though.

https://github.com/jimeh/build-emacs-for-macos/blob/3d6caac9624b01866fb11d7445eb683fad6bf3a8/build-emacs-for-macos#L307-L313

I manually tweaked the configure flags but got errors when the Makefile started trying to write to /usr/local/libexec. make install on this branch writes to some glib paths and doesn't seem to honour whatever sandboxing this script does to capture the build in Emacs.app

I didn't dig in too far since the resulting build wasn't really usable yet but thought it was worth an issue in case someone who knows Ruby better than I do wants to try fix the build process.

ccakes avatar May 26 '21 16:05 ccakes

Please correct me if I'm wrong, but I'm not quite sure the Pure GTK branch is that useful on macOS. From what I've understood you need to build Emacs without macOS GUI support (--without-ns instead of --with-ns), and then run Emacs via X11/XQuartz.

That's what I've gathered from these discussion on Reddit at least:

  • https://www.reddit.com/r/emacs/comments/lktqkx/is_it_possiable_to_use_pgtk_emacs_on_macos/
  • https://www.reddit.com/r/emacs/comments/n7qj7h/what_does_the_pure_gtk_port_do/

I'm more than happy to both discuss further and try to get it working. Though my main focus this week is to try and get #44 finished, so I probably won't have a change to spend any serious time on for a week or so.

jimeh avatar May 26 '21 19:05 jimeh

Pretty much correct except the X11 requirement. Flags needed are --without-ns --with-pgtk but GTK3 does support macOS natively without XQuartz, I just needed to brew install gtk+3

Personally I think this is super low priority since it's not usable as a daily driver yet at all. I just wanted to flag this to make it easier to install so more people get their hands on it and can provide macOS-specific feedback to the devs.

ccakes avatar May 27 '21 06:05 ccakes

Oh, that actually sounds pretty interesting. I'll definitely be playing with it when I get a chance :)

jimeh avatar May 27 '21 11:05 jimeh

I've had a bit of a play around with this, the issues aren't really related to my build script. The --without-ns configure flag causes all the .app bundle stuff to not happen, so I had to specify a --prefix as well. However the main make call still died with an error. It did seem to leave at least a partially working emacs install in the prefix path I had specified, but I couldn't figure out a way to make run as a GUI rather than just in a terminal.

Basically, I believe the pgtk branch needs a decent bit of macOS specific love before it'll be usable on macOS.

jimeh avatar Jul 09 '21 09:07 jimeh