358 Commits

Author SHA1 Message Date
Kovid Goyal
4fea7bd8ef
Fix building on systems with xkbcommon < 1.0 2021-01-17 07:22:21 +05:30
Peter Woodman
35982a9e58 Make is_arm predicate work on macos 2021-01-15 00:09:24 -05:00
Kovid Goyal
8ea589e5a3
Change blurb wording slightly 2021-01-12 20:01:44 +05:30
Kovid Goyal
1f7499e841
Detect more types of BSD 2020-12-31 10:26:15 +05:30
Kovid Goyal
4cf5bd8d70
Turn on the asserts in ringbuf for debug builds 2020-12-11 21:26:15 +05:30
Kovid Goyal
4cc58e8535
Better fix for filtering out -march=native 2020-12-04 20:59:18 +05:30
Runchard
c5cb4f9e69 do not use clang option -march=native on Apple Silicon
Apple Silicon arm64-apple-darwin clang do not support `-march` option.
2020-12-04 21:07:19 +08:00
Luflosi
3335f8602b
Allow reading some build system flags as environment variables 2020-10-29 12:20:11 +01:00
Luflosi
e343c9445c
Creating a temporary directory is not actually required
While developing the previous PR (https://github.com/kovidgoyal/kitty/pull/3043), I was using more compiler command line arguments, one of which was `-MMD`. This caused the .d file to be created. Without this argument, there is no need to create a temporary directory.
2020-10-19 13:08:32 +02:00
Kovid Goyal
c73e374f1a
Remove unneeded space 2020-10-19 16:02:49 +05:30
Kovid Goyal
d9b292f808
Merge branch 'fix-macos-notification-api-detection' of https://github.com/Luflosi/kitty into master 2020-10-19 16:00:38 +05:30
Luflosi
46ef2f313b
macOS: Fix detection for notification API
For some reason it can happen that the `UserNotifications` framework exists but the `UserNotifications/UserNotifications.h` header doesn't.
Closes https://github.com/kovidgoyal/kitty/issues/3042.
2020-10-19 12:19:51 +02:00
Luflosi
92a705c79e
Add language parameter to first_successful_compile() and test_compile()
This allows compiling Objective-C files.
The temporary directory is needed because clang would try to write to `/dev/null.d`, which would obviously fail.
2020-10-18 23:08:19 +02:00
Luflosi
1c4a20d86f
Remove outdated Python version check
The Python version is already checked at the top of the file. That check was added in 81a58186c6fae2de7bb4d7c7a3dc1a418d2b3d03.
2020-10-05 14:41:07 +02:00
Kovid Goyal
225e52b8b9
Merge branch 're-add-deprecated-macos-notifications' of https://github.com/Luflosi/kitty into master 2020-10-04 18:16:09 +05:30
Luflosi
0ae1f9906f
macOS: re-add deprecated notification API
The new User Notifications Framework is only available on macOS 10.14 and above, while the old NSUserNotification API is deprecated in macOS 11 (Big Sur) and will probably be removed in the future.
This commit compiles a simple test program to see if the Framework is available and then uses either the new or the old API.
2020-10-04 13:32:28 +02:00
Kovid Goyal
a5918b50f8
Merge branch 'better-build-output-for-pipes' of https://github.com/Luflosi/kitty into master 2020-10-04 15:50:39 +05:30
Luflosi
fa0374ee61
Better build system output when stdout is not a tty
When piping the output of `setup.py` to another program, that program cannot usually deal with escape sequences well. To fix this, output the compilation progress on new lines instead of overwriting the current line.
2020-10-04 12:02:49 +02:00
Luflosi
3ba11d08fb
Add flag to disable LTO
Disabling Link Time Optimization is useful for Nix on Darwin because LTO is broken there and has been for a long time, see https://github.com/NixOS/nixpkgs/pull/19312.
This is currently worked around in the Nix package with a patch that removes the lines that add -flto to the compiler flags.
2020-10-04 10:50:42 +02:00
Kovid Goyal
ef1db6d089
macOS: Add some keys to Info.plist to allow programs running inside kitty to access protected Cocoa APIs. 2020-09-22 16:32:40 +05:30
Kovid Goyal
11942ed6dc
Fix compilation on OpenBSD
Fixes #2935
2020-08-24 12:05:39 +05:30
Kovid Goyal
4e3c6e52aa
macOS: Switch to the User Notifications framework
The current notifications framework has been deprecated in Big Sur. The new
framework only allows notifications from signed and notarized applications,
so people using kitty from HomeBrew/source are out of luck. And
notifications can only be displayed once the user grants permission. A
completely brain-dead design. Complain to Apple.
2020-08-20 13:03:00 +05:30
Kovid Goyal
ae5ceedfe9
Allow kitty to build on Big Sur 2020-08-19 20:33:14 +05:30
Kovid Goyal
5eefd41059
Add support for displaying correct colors with PNG files that contain embedded ICC color profiles 2020-08-12 10:34:16 +05:30
Kovid Goyal
6ca1b7c240
Convenience command to upload CI bundles 2020-08-12 10:30:15 +05:30
Kovid Goyal
67f60847ee
Fix the spawn test in the bypy environment
Required the launcher to be built since the pre-built
one was being used. Fixes #2881
2020-07-29 15:11:35 +05:30
Kovid Goyal
2cb25cf5a8
Build the launcher when freezing on macOS as well
Can be used by the test suite
2020-06-21 14:37:36 +05:30
Kovid Goyal
8818b5d8df
Set CFBundleAllowMixedLocalizations in the app bundle to have NSLocale.currentLocale return the correct locale on non-English systems 2020-06-18 20:16:36 +05:30
Kovid Goyal
1326532850
macOS: Notarize the kitty application
This required the kitty package to be moved from Frameworks to
Resources, because Apple cant codesign .pyc files and its notarization
requires everything in Frameworks to be signed. Hopefully that does not
break anything. Also removed the kitty-deref-symlink since it is not
needed anyway and was only present for backwards compatibility.

Fixes #2040
2020-06-05 22:52:30 +05:30
Kovid Goyal
e38690e8d9
Dont link against librt and libdl on OpenBSD
These are part of libc there
2020-05-21 11:43:55 +05:30
Luflosi
7441cefdbb
Make paths to libraries configurable at build time 2020-05-19 18:36:46 +02:00
Luflosi
ac9f8595c9
DRYer
Don't write `cppflags.extend()` twice.
2020-05-13 13:43:43 +02:00
Kovid Goyal
f4e82e972e
... 2020-05-01 08:10:11 +05:30
Kovid Goyal
f66dbf111d
Pass env to get_vcs_revs() 2020-05-01 08:03:31 +05:30
Kovid Goyal
0547102bdd
Fix #2468 2020-03-24 18:33:32 +05:30
Luflosi
21c7002c68
Add support for png2icns as an alternative to iconutil
png2icns is used when building kitty with nix because iconutil seems to be closed-source.
libicns also has an iconutil clone called icnsutil in the source tree but the last release is from 2012, which does not include this utility yet.
2020-03-21 02:11:08 +01:00
Luflosi
97cae0e355
Simplify code
This piece of code ends up just extracting `appname` from `iconset_dir`.
2020-03-21 00:10:16 +01:00
Luflosi
85fc0a59b1
Rename variable logo_dir -> iconset_dir 2020-03-21 00:10:16 +01:00
Kovid Goyal
90f41108d3
... 2020-03-15 13:30:02 +05:30
Kovid Goyal
a70fa9abc5
oops 2020-03-14 14:38:56 +05:30
Kovid Goyal
5956277863
All defs are now typed 2020-03-14 14:37:11 +05:30
Kovid Goyal
9f2fb76309
more typing work 2020-03-12 15:09:21 +05:30
Kovid Goyal
ce94a9b2df
More typing work 2020-03-11 09:35:59 +05:30
Kovid Goyal
9beae321d7
More typing work 2020-03-08 22:08:18 +05:30
Kovid Goyal
cc1336a616
More typing work
Also use a mypy based linter when editing
2020-03-08 11:02:14 +05:30
Kovid Goyal
686b5f297e
Ensure glfw is imported from the correct place 2020-03-06 08:23:01 +05:30
Kovid Goyal
6609d219f4
Add type checking for glfw module as well 2020-03-06 07:59:55 +05:30
Kovid Goyal
804998ca69
oops 2020-03-06 07:55:54 +05:30
Kovid Goyal
de5254469c
Fix #2412 2020-03-06 07:48:41 +05:30
Kovid Goyal
f729985346
More typing work
Also move notification_activated into a standalone function which will
hopefully fix #2410
2020-03-06 07:07:18 +05:30