Jim Myhrberg e507b7b031 Use sRGB patch by default.
This also applies some kind of convention for the available options.
`--srgb` is still defined for backwards compatibility, but it technically
does nothing.
2012-03-19 23:03:04 +00:00
2011-11-13 10:29:34 +00:00
2012-03-19 23:03:04 +00:00
2012-03-19 23:03:04 +00:00

build-emacs-for-osx

Use this script at your own risk. It currently works for me on my own machine, which as of writing runs:

  • Mac OS X Lion 10.7.2 (11C74)
  • Xcode 4.2 (4D199)

Your luck might vary. Do note that it does not build a universal application. The CPU architecture of the built application will be that of the machine it was built on.

Why?

I've been using Homebrew the past few months to build from HEAD. Homebrew comes with the ns-toogle-fullscreen and sRGB patches which I use.

Homebrew does not build a self-contained application though, which caused issues for me when I needed to rollback to a specific build. I found the easiest way to build a completely self-contained Emacs.app nightly from a specific date with custom patches was to do it manually.

So I decided to quickly hack together a script to automate that manual process. The code is a horrible hack, but it (seemingly) works as I'm writing this in Emacs built with it.

Usage

Myself I run the following command which will download a tarball of the master branch, apply the fullscreen and sRGB patches, and build Emacs.app:

./build-emacs-for-osx

Or for example if you want to build the EMACS_PRETEST_24_0_91 tag, run:

./build-emacs-for-osx EMACS_PRETEST_24_0_91

Resulting applications are saved to the builds directory in a bzip2 compressed tarball.

Internals

I decided to pull Emacs' source from the GitHub mirror rather than the official Bzr repo cause I'm not familiar with Bzr, and GitHub lets you easily download tarballs of any commit.

The only option passed in ./configure is --with-ns, meaning the resulting application only supports the CPU architecture of the system is was built on. There might be more side-effects to.

Description
Somewhat hacky script to automate building of Emac.app on macOS.
Readme 2.5 MiB
Languages
Go 63.1%
Ruby 33.4%
Makefile 1.8%
Nix 1.4%
Shell 0.2%
Other 0.1%