Commit Graph

46 Commits

Author SHA1 Message Date
cbac633efb docs(readme): update with current status and nix environment details 2024-12-01 03:50:56 +00:00
db723817bf fix(help): correct formatting of help text output 2024-12-01 03:50:55 +00:00
6e2b9aa44a feat(deps): add support for Nix package manager (#116)
This serves as an alternative to Homebrew. It should be much more stable
and cause less headaches over time for automated builds.

There should be no change to the end user experience of using the build
script, as it should still work with and use Homebrew by default.

Additionally, Nix provides older Apple SDKs, allowing us to run against
macOS 11.x SDKs. This allows the resulting Emacs.app builds to be
compatible with macOS 11.x and later versions.

In testing, this seems to be the case on macOS 11.x (x86_64) and macOS
12.x (arm64).
2024-11-25 02:31:47 +00:00
thynus
533dde85b1 docs(readme) fix typo (#110)
should be respectively not respectfully in Native-Comp section
2024-11-03 00:52:52 +00:00
ca8951ccd3 fix(compile-options): increase runtime max open files limit (#115)
Increases max open file limit to 10000 the same way as emacs-plus does.
This is necessary for some packages like lsp-mode to work properly in
some cases.

The limit is configurable via the `--fd-setsize` option. The default is
`10000`. To disable this feature, use the `--no-fd-setsize` option, or
provide `--fd-setsize` with a value that is less than `1024`.

Fixes #106
2024-11-03 00:52:01 +00:00
İsmail Efe
5e2aaceb84 docs(readme): mention make bootstrap (#105)
There are some dependencies that should be install by gem, but the README does not mention it.
2024-06-20 20:27:59 +01:00
8f2c9f9d42 docs(readme): minor status section and minor tweaks elsewhere 2023-11-22 08:54:13 +00:00
8129a2e93b docs(readme): update Status section, and minor tweaks 2021-11-27 04:58:54 +00:00
4ae288cae3 feat(build): re-link eln files by default again
This reverts commit d338c136db.

Thanks to using relinking with @rpath, paths are shorting leaving enough
room in all *.eln files to be signed.
2021-11-27 04:25:03 +00:00
4ac71ddf39 docs(readme): update usage section with latest help text 2021-11-10 22:19:06 +00:00
1c2745cd36 docs(readme): mention binary builds repo 2021-07-10 21:19:11 +01:00
3e1eb01e24 feat(build)!: add ability to output as directory and/or archive
This changes the filename pattern of the resulting archive, for example:

Old:

    Emacs.app-[master][2021-05-19][6ae3f7e][macOS-11.3][x86_64].tbz
New:

    Emacs.2021-05-19.6ae3f7e.master.macOS-11-3.x86_64.tbz

Emacs.app also resides within a folder in the archive now instead of the
in the root. For the above example, the path to Emacs.app within the
archive would be:

    Emacs.2021-05-19.6ae3f7e.master.macOS-11-3.x86_64/Emacs.app

Archive creation can also be skipped by passing in --no-archive, which
will instead leave a build folder with the same name as the archive.

If you want to keep the build directory, and also a create archive, pass
in --archive-keep-build-dir.

BREAKING CHANGE: New archive naming convention, and folder structure
within archive.
2021-06-20 18:38:36 +01:00
d7c59ba4b2 docs(readme): update CLI usage section 2021-06-20 18:38:10 +01:00
ca2d4c38f6 fix(compiling): improve portability of builds
This makes the -march=native CFLAG optional, and disabled by default,
but still available through a new --native-march flag.

It should make builds more portable between machines, as previously it
was very common to get a CPU architecture error on launch if you moved
the build to a different machine running a different generation of a
Intel CPU.

From what I've understood, when using the -march=native CFLAG clang will
make as many optimizations possible based on the exact set of CPU
instructions available on the specific CPU it's compiling on.

In theory this leads to a more optimized build, though I haven't
personally noticed any difference. But it also leads to less portable
builds, for example builds from a Intel-based 2020 MacBook Pro just
crash with a unsupported CPU architecture error when run on a
Intel-based 2016 MacBook Pro.
2021-06-07 23:25:42 +01:00
deda28e5ad feat(github): perform authenticated GitHub API requests when GITHUB_TOKEN env var is set
This should let people on shared connections use the script if they
have a GitHub Personal Access Token available in the GITHUB_TOKEN
environment variable.

When making unauthenticated API requests to GitHub, requests are rate
limited to 60 requests per hour based on source IP address. Hence on
shared connections the rate limit may easily be exceeded.

When making authenticated API requests to GitHub, up to 5000 requests
per hour is allowed, based on the authenticated user rather than source
IP address.
2021-05-31 23:14:54 +01:00
8237aa9272 feat(cli): add "emacs" CLI launcher script to Emacs.app/Conents/MacOS/bin
This makes setting up a "emacs" terminal command that works with the
self-contained Emacs.app bundle much simpler, as you just need to add
Emacs.app/Conents/MacOS/bin to your PATH.

For example, if you place Emacs.app in /Applications, add this to your
shell setup:

    if [ -d "/Applications/Emacs.app/Contents/MacOS/bin" ]; then
      export PATH="/Applications/Emacs.app/Contents/MacOS/bin:$PATH"
      alias emacs="emacs -nw" # Always launch "emacs" in terminal mode.
    fi

The launcher script works by figuring out it's own absolute path on
disk, even if you are using a symlink to the script, it will resolve to
correct real path. This allows it to execute the main
Emacs.app/Contents/MacOS/Emacs executable via the correct path, so it
can correctly pick up its dependencies from within the Emacs.app bundle.

Fixes #41
2021-05-22 20:55:42 +01:00
3ffe83c94e docs(native_comp): update readme to reflect recent changes to native-comp 2021-05-22 20:32:51 +01:00
72e40248e1 chore(cli): remove deprecated flags and update readme usage 2021-05-22 18:33:16 +01:00
ca09d1a95f docs(readme): update readme about native-comp being merged to master 2021-04-26 00:07:07 +01:00
e56c26d06f docs(readme): update status section 2021-01-15 02:01:13 +00:00
ab55f5421c fix(cli): remove defunct --[no-]native-comp-macos-fixes option
The underlying patching code was removed in v0.4.1 (commit
70bf6b05d5), as it was no longer needed,
but the related CLI flag and README info was mistakenly left in place.
2021-01-06 20:31:31 +00:00
8936f4762a docs(readme): add CLI usage instructions
Resolves #16
2020-10-04 16:33:25 +01:00
d8bbcb72b3 feat(native_comp)!: use new libgccjit Homebrew formula
The new libgccjit Homebrew formula negates the need to install a custom
patched gcc formula from source to get libgccjit.

As it's a separate formula, the file structure is a bit different
though, requiring some changes to the script. This means it is no longer
compatible libgccjit from the custom gcc formula. If you already have
the custom patched gcc formula installed, you can replace it with the
standard gcc formula by running:

    brew reinstall gcc

In theory though, it should work even with the patched gcc formula, as
long as libgccjit is installed too. But it will probably produce a
Emacs.app that's around 35MB larger than it needs to, thanks to
duplicating the libgccjit.so.0.0.1 file within the final application.

BREAKING CHANGE: Standard Homewbrew `gcc` and `libgccjit` formula are now required for native-comp, instead of the custom patched gcc formula.
2020-10-04 15:12:41 +01:00
d6f11b5459 docs(readme): update usage section 2020-09-23 00:49:14 +01:00
d21ccad3e4 docs(readme): update custom eln cache location instructions
Recent builds seem to pre-allocate empty `*.eln.tmp` files rather than
empty `*.eln` files. So the issue of empty `*.eln` files preventing
Emacs from starting should no longer be an issue.

I'm leaving #3 open for now, in case anyone is using older git SHAs from
the list of known good commits in #6.
2020-09-22 20:28:49 +01:00
0ab94da153 feat(native_comp)!: add support for NATIVE_FULL_AOT, replacing NATIVE_FAST_BOOT
The feature/native-comp branch no longer supports the use of the
NATIVE_FAST_BOOT environment variable. It has been replaced by
NATIVE_FULL_AOT (Ahead of Time compilation).

As the new environment variable's value is opposite of the old one, it
is disabled by default.

Under the hood, the --[no-]native-full-aot option still sets the
NATIVE_FAST_BOOT environment variable as needed to ensure it works as
expected when producing builds against older commits, and also newer
ones.

BREAKING CHANGE: Deprecate `--[no-]native-fast-boot` option in favor of `--[no-]native-full-aot`
2020-09-20 14:27:50 +01:00
d30b45fb2e fix(svg): disable rsvg by default
When SVG support is enabled via librsvg, launching builds of Emacs 27.1
or later from the Finder into GUI mode will crash Emacs if the fancy
startup screen is used. This crash has been observed with librsvg
2.46.4, 2.48.7 and 2.48.8.

Hence SVG image support is now disabled by default. Should you need it,
you will need to disable the startup screen to avoid Emacs crashing, by
putting this in your init.el:

    (setq inhibit-startup-screen t)

The cause of the issue seems to be the `image-size` function as called
from `use-fancy-splash-screens-p`.
2020-09-05 05:11:42 +01:00
583f22a360 feat(patches): add support for optional no-titlebar and no-refocus-frame patches 2020-09-05 04:48:32 +01:00
83289acd33 feat(native_comp): embedd gcc/libgccjit into Emacs.app
The solution to get libgccjit properly working, and embedded in
Emacs.app included:

- The contents of GCC's lib folder (`/usr/local/opt/gcc/lib`) is copied
  into the `Contents/MacOS/lib-<arch>-<os_version>` folder.
- Setting `LIBRARY_PATH` environment variable to correct GCC lib
  folders within Emacs.app. This is done through a bash launcher script
  which replaces the regular `Contents/MacOS/Emacs` executable. The main
  Emacs executable itself is named `Emacs-bin` now instead, so anything
  that depends on the exact process name will need updating.
- The launcher script also adds `Content/MacOS/bin` and
  `Content/MacOS/libexec` folders to the PATH environment variable, to
  so ensure binary tools packaged into Emacs itself are available. This
  is done even when not doing a native-comp build. The launcher script
  skips setting LIBRARY_PATH if it's not a native-comp build.

This should hopefully resolve both #5 and #7.
2020-09-05 04:48:32 +01:00
8e459ce00d fix(requirements): make script compatible with Ruby 2.3.0 and later 2020-09-05 04:48:32 +01:00
da2fcb0440 feat(native_comp): add fix based on feature/native-comp-macos-fixes branch
The `feature/native-comp-macos-fixes` has seemingly been updated about
once a week with latest changes from `feature/native-comp`.

As the fix in the branch is desired, a custom function that applies the
same kind of fix has been added. This should be more reliable than just
downloading the git diff as a patch.
2020-08-25 01:24:00 +01:00
f2ee7a12c3 docs(readme): Update usage help info 2020-08-20 21:44:19 +01:00
89ab39b0b8 docs(readme): add link to known good native-comp commits issue 2020-08-20 21:17:57 +01:00
9dab9199d1 docs(readme): track issues with native-comp as proper GitHub issues 2020-08-20 21:05:55 +01:00
a651715dd2 docs(readme): minor tweaks and additions 2020-08-20 00:58:44 +01:00
b46e5aa7cb fix(native_comp): ensure builds work after recent changes to eln cache locations
As detailed in Update 11 (https://akrl.sdf.org/gccemacs.html#org4b11ea1)
the `*.eln` cache location has been changed, which initially broke
builds.

This fixes those issues, and also simplifies usage of the build-script
by:

- Auto-detecting native-comp support if not explicitly enabled/disabled
  with CLI flags.
- Auto-detecting number of logical CPU cores on your machine, and
  defaulting the `-j` option to said number to ensure fast builds.
- Enable XWidgets by default, only skip if `configure` script doesn't
  support it (Emacs 26.x and earlier).
2020-08-19 00:58:31 +01:00
a8d4db284c fix(native_comp): Improve ./install-patched-gcc helper
Instead of just installing a pre-patched gcc formula, copy the local
formula from Homebrew and apply a patch to it, before then installing
it. This should be a lot more future-proof.
2020-08-18 02:20:18 +01:00
f7b0c16db8 docs(readme): Update readme with native-comp info and latest "status" 2020-08-18 01:50:55 +01:00
7986e89623 Enable building Emacs 27
Also embed various dylib libraries directly into the application, so
they're not required to be installed via Homebrew for the app to work.
2020-02-03 00:05:46 +00:00
44222a2970 Fix year in license 2013-10-20 19:47:41 +01:00
dc00ed8e83 Add license info to readme 2013-10-20 19:46:43 +01:00
a840bffefa Update and fix things for current Emacs trunk (24.4)
Notes:
- The sRGB patch is now a simple text-replacement, as diff/patch files
  seem to just fail. Even Homebrew's emacs formula does it this way.
- Removed fullscreen patch, as Emacs 24.4 includes fullscreen support on
  OS X, both native and pre-Lion style fullscreen. More details here:
  http://www.emacswiki.org/emacs/FullScreen#toc23
2013-10-20 18:55:07 +01:00
d525c5d801 Updated ReadMe slightly. 2012-03-19 23:03:41 +00:00
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
fd0e860488 added usage section to readme 2011-11-13 14:38:37 +00:00
86f3b0f08d added readme 2011-11-13 14:29:17 +00:00