Commit Graph

145 Commits

Author SHA1 Message Date
8f5ae8a6c2 chore(release): 0.4.17 0.4.17 2021-06-20 18:26:37 +01:00
707bc9e0d1 fix(download): don't use GitHub API to get tarball URL
The API tarball endpoint is subject to API rate limits, while the
non-API tarball endpoint is not. This should reduce the risk of rate
limit errors for people who don't have a GITHUB_TOKEN environment
variable set.
2021-06-20 17:52:17 +01:00
c55bf68e61 chore(release): 0.4.16 0.4.16 2021-06-07 23:42:18 +01:00
26ce446226 Merge pull request #49 from jimeh/fix-portability
fix: improve portability of builds
2021-06-07 23:31:30 +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
bd81870659 fix(native_comp): crash on launch when gcc homebrew package was not installed
It turns out all *.eln files link against the libgcc dylib in homebrew:

    /usr/local/lib/gcc/11/libgcc_s.1.dylib

So here we find all *.eln files in all relevant paths they may be
depending on how old of a native-comp source tree we're building, and
copy in any shared libs that resides within the homebrew prefix. Just
like we do for all other binaries that we copy libs for.
2021-06-07 23:21:29 +01:00
5cd9d1c5fa chore(release): 0.4.15 0.4.15 2021-05-31 23:25:03 +01:00
6ae14b597c Merge pull request #48 from jimeh/github-auth
feat(github): perform authenticated GitHub API requests when GITHUB_TOKEN env var is set
2021-05-31 23:23:24 +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
3d6caac962 chore(release): 0.4.14 0.4.14 2021-05-22 21:09:33 +01:00
11de27358d Merge pull request #43 from jimeh/improve-cli-integration
feat(cli): add "emacs" CLI launcher script to Emacs.app/Conents/MacOS/bin
2021-05-22 20:56:41 +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
9f6ec5954f chore(release): 0.4.13 0.4.13 2021-05-22 18:52:45 +01:00
9ea79670d8 Merge pull request #42 from jimeh/prepare-for-codesign
feat(codesign): minor internal fix to output Emacs.app bundle for compatibility with codesign
2021-05-22 18:51:09 +01:00
72e40248e1 chore(cli): remove deprecated flags and update readme usage 2021-05-22 18:33:16 +01:00
7259111478 fix(codesign): prevent "bundle format unrecognized" error from codesign
Apple's codesign CLI toolthrows a "bundle format unrecognized" error if
there are any folders within the application that contain two dots in
their name.

Hence we need to get rid of the one instance of that we end up with from
GCC, and update the native-comp patch accordingly.

As of writing, this means renaming:
Emacs.app/Contents/MacOS/lib/gcc/11/gcc/x86_64-apple-darwin20/11.1.0

To:
Emacs.app/Contents/MacOS/lib/gcc/11/gcc/x86_64-apple-darwin20/11
2021-05-20 01:55:41 +01:00
bb45cda023 fix(embed): avoid potential error caused by trying to set duplicate rpath 2021-05-20 01:55:41 +01:00
ab872202df chore: minor improvement 2021-05-20 01:55:41 +01:00
2d1c5d47d9 chore(release): 0.4.12 0.4.12 2021-05-17 23:14:50 +01:00
30a71c423e Merge pull request #40 from jimeh/fix-svg
fix(svg): fix SVG rendering crash and enable SVG support by default
2021-05-17 23:12:44 +01:00
5c48445397 chore(cli): improve CLI help output 2021-05-17 23:12:12 +01:00
bf7c4d5deb fix(svg): enable SVG by default via librsvg 2021-05-17 23:12:12 +01:00
3ffeb4854c chore(shared-libraries): add @executable_path/lib to @rpath for good measure 2021-05-17 23:12:12 +01:00
0a22d8393c fix(shared-libraries): stop aggressive dylib re-linking
This seems to be the cause of SVG rendering crashing, as it re-links
libiconv.2.dylib from /usr/lib/libiconv.2.dylib to
@executable_path/lib/lib/libiconv.2.dylib within libintl.8.dylib. When
this re-linking does not happen, SVG rendering works without crashing
Emacs.

Some further testing is needed by installing brew dependencies by
building them from source, in an attempt to get various libraries all
linking to homebrew-built versions, to get as many shared libraries as
possible embedded into the application bundle.

Fixes #12
2021-05-17 23:11:51 +01:00
ac8348323d chore(release): 0.4.11 0.4.11 2021-05-08 19:56:42 +01:00
59f52b65ee Merge pull request #39 from jimeh/emacs-builds
feat(builds): prepare for automated builds in jimeh/emacs-builds repo
2021-05-08 19:51:26 +01:00
81a96f4d60 chore(builds): remove github-release tool
This now lives in the jimeh/emacs-builds repo, which focuses on building
and publishing binary releases, using the build-emacs-for-macos script.
2021-05-08 19:10:46 +01:00
1df39fafe6 feat(builds): update build script for new plan.yml format 2021-05-08 19:07:13 +01:00
14a8d1aaaf chore(release): enable full native-compilation AoT 2021-05-07 09:15:14 +01:00
272a3000a1 fix(release): attempt to fix issue with talking to GitHub API 2021-05-07 01:12:57 +01:00
d684cf560f ci(build): fix typo 2021-05-06 23:39:16 +01:00
ea189a6713 Merge pull request #38 from jimeh/automatic-builds
feat(release): automatic builds
2021-05-06 23:37:20 +01:00
63289216d7 feat(release): initial attempt at providing automatic builds 2021-05-06 23:36:12 +01:00
2054c8c0aa chore(release): 0.4.10 0.4.10 2021-04-26 00:07:30 +01:00
ca09d1a95f docs(readme): update readme about native-comp being merged to master 2021-04-26 00:07:07 +01:00
f1e60e31d9 chore(makefile): add next-version target to preview new-version 2021-04-25 23:09:18 +01:00
8d197aea73 chore: ensure file mode is restored in case of error 2021-04-25 23:07:54 +01:00
844df73c8f fix(cli): correctly default to master branch if no git ref is given
Previously it would build master, but not include "master" in the
final output archive's file name.
2021-04-25 23:04:03 +01:00
f1fc68c8f5 chore(release): 0.4.9 0.4.9 2021-04-08 12:03:41 +01:00
e19a6a7bc2 fix(cli): default to "master" if no git ref is given
Fixes #35
2021-04-08 12:02:45 +01:00
1000999eb2 fix(native_comp): skip symlink creation for recent builds which do not need symlinks
Recent builds places the native-lisp cache folder within
Contents/Resources on macOS, and correctly deals with finding them. This
means the Contents/lisp and Contents/native-lisp symlinks are no longer
needed.

Hence we skip their creation altogether if we find any
Contents/Resources/native-lisp/**/*.eln files.
2021-04-08 11:54:01 +01:00
a75047fb3a chore(release): 0.4.8 0.4.8 2021-02-27 23:09:58 +00:00
a1641946e4 chore(native_comp): don't set full AOT env vars if not using native-comp 2021-02-27 23:08:15 +00:00
581594da3c fix(native_comp): add support for new --with-native-compilation flag 2021-02-27 23:07:22 +00:00
bdad382e7f chore(release): 0.4.7 0.4.7 2021-02-21 15:24:31 +00:00
e25ceaa7e2 fix(native_comp): add libgccjit include dir during build stage
Also used existing `CFLAGS` and `LDFLAGS` environment variable values,
so a user can easily set these when running the build script to add more
paths. Previously they were set to explicit values ignoring any existing
value.

This might help resolve issues where libgccjit.h is not found as
reported in issue #20. Though I have not been able to reproduce this
myself, it seems adding the libgccjit's include dir has solved the issue
for some.
2021-02-21 15:22:07 +00:00
03ae8750b8 chore(release): 0.4.6 0.4.6 2021-02-15 11:43:58 +00:00
269dbdb1dd chore(build): use File.join wherever relevant
Ensures paths are correctly joined and no double and/or missing slash
errors can occur.
2021-02-15 11:42:49 +00:00
713c970da4 Merge pull request #30 from jimeh/improve-native-comp-env-setup-patch
fix(native_comp): improve env setup patch fixing potential issues
2021-02-15 11:41:52 +00:00