Commit Graph
222 Commits
Author SHA1 Message Date
Kovid Goyal 6f8214c15c Add the generated macOS icons to git
Removes the need for optipng/librsvg when building kitty.
2019-06-28 13:48:09 +05:30
Kovid Goyal df5a73bb35 Dont change dirs when packaging 2019-06-28 12:00:12 +05:30
Kovid Goyal a50bf59a2c macOS: Use a minimal bundle for the in-source kitty launcher
This should allow the Cocoa UI integration to work when running
kitty as kitty/launcher/kitty

Fixes #1756
2019-06-28 11:20:59 +05:30
Kovid Goyal 241354ae52 Move generation of Info.plist into its own function 2019-06-28 10:47:00 +05:30
Luflosi 5cbd591a1e .strip() only once
`ans.append('KITTY_VCS_REV="{}"'.format(rev.strip()))` strips the
whitespace again later.
2019-06-26 19:48:58 +02:00
Luflosi 4708b592e2 Unify compilation_database access
`file` and `arguments` are accessed using the square bracket syntax, while `output` is accessed using `.get()`. This commit uses square brackets for all three. This will throw a `KeyError` if `compilation_database` does not have the key, which is the correct behaviour IMO.
2019-06-26 15:16:14 +02:00
Luflosi e178e7f6a5 Clean asan-launcher and kitty-profile 2019-06-25 20:22:23 +02:00
Kovid Goyal d0bf21ab16 ... 2019-06-25 20:00:58 +05:30
Kovid Goyal c826965833 Use libdir_name when bundle gunking on linux 2019-06-25 18:47:09 +05:30
Kovid Goyal a76db39c19 Use a symlink for the in src launcher in a package 2019-06-25 18:37:11 +05:30
Kovid Goyal 323a538bdd Fix #1744 2019-06-25 18:16:00 +05:30
Kovid Goyal 2435feca3b oops 2019-06-25 08:26:19 +05:30
Kovid Goyal 29d059680c Merge branch 'fix_kitty.app_incremental_build' of https://github.com/Luflosi/kitty 2019-06-25 08:14:23 +05:30
Luflosi aaaf7f9d8b Fix incremental compilation
The macOS specific `package()` code changes the directory. This didn't cause any problems before 9135387cfa since `compile_commands.json` was written to the filesystem before `package()` was called. This is not the case anymore, which results in `compile_commands.json` being written into the `kitty.app` bundle. I fixed the problem by using a context manager to change the direcctory back after `kitty.app` was created.
2019-06-25 02:55:13 +02:00
Kovid Goyal 9135387cfa Get rid of the various different launchers
Now there is only one launcher. Which means it can be used to start
kitty with profiling and ASAN in the natural way. The recommended
way to run kitty from source is now:

./kitty/launcher/kitty

The launcher also automatically re-execs to resolve symlinks on macOS.
2019-06-24 17:21:30 +05:30
Luflosi f28383206a Delete *.dSYM directories when cleaning 2019-06-24 10:48:33 +02:00
Luflosi 3ea3a85694 Never delete any files in the .git directory when cleaning manually
This is how results can be removed from os.walk(), according to https://docs.python.org/3/library/os.html#os.walk.
2019-06-23 21:08:46 +02:00
Luflosi 0e1a423889 Always clean files manually instead of using git
I see a couple problems with using git to determine the files to delete:
- git needs to be installed
- The manual cleaning code is supposed to function correctly, so why not always use it? That way bugs in the manual cleaning code are also more likely to get discovered
- If some files ignored by git should not be deleted, they need to be added to a sort of blacklist. If some files should be deleted by the manual cleanup code, they need to be added to a sort of whitelist. If someone forgets to add files to one of these lists, then not deleting files that should be deleted is better than deleting files that should not be deleted.
2019-06-23 21:08:16 +02:00
Kovid Goyal ff89c1d8e4 oops 2019-06-23 07:36:21 +05:30
Kovid Goyal 96703c23c8 Deal with .git being a file when getting the VCS commit hash during building 2019-06-23 07:36:03 +05:30
Luflosi 7709cdb12b Make default argument non-mutable
Calling `Env()` without the `ldpaths` parameter after a call with the `ldpaths` parameter, keeps the list from the first call because the argument is mutable. This is probably not what was intended. This commit fixes this issue and also reverts a change to two lines introduced in 091e74d618, which was probably a workaround for this issue.
2019-06-22 16:57:38 +02:00
Kovid Goyal f6051f73f5 Use SPECIAL_SOURCES for KITTY_VCS_REV
Fixes #1734
2019-06-22 18:54:58 +05:30
Kovid Goyal d12a4b0a1a Test changing of update_check_interval on the CI server 2019-06-04 14:32:37 +05:30
Kovid Goyal a75d075dd1 Add an option to control the default update_check_interval when building kitty packages
Fixes #1675
2019-06-04 14:27:28 +05:30
Luflosi 2b095f720e Use "with suppress()" to suppress python exceptions
Using
```Python
with suppress(OSError):
    os.remove('somefile.tmp')
```
instead of
```Python
try:
    os.remove('somefile.tmp')
except OSError:
    pass
```
makes the code more compact and more readable IMO.

This pattern was recommended by Raymond Hettinger, a Python Core
Developer in his talk "Transforming Code into Beautiful, Idiomatic Python" at https://www.youtube.com/watch?v=OSGv2VnC0go. The transcript is available at https://github.com/JeffPaine/beautiful_idiomatic_python
2019-06-03 12:27:43 +02:00
Kovid Goyal 639b18c7e8 Better fix for python include dirs
Ensure their order is stable
2019-05-19 09:17:52 +05:30
Kovid Goyal 701942f6ef Fix #1619 2019-05-19 07:21:52 +05:30
Luflosi 581deb6073 Rename linux-launcher -> launcher
Since the launcher is also used on macOS, rename it to something more generic.
2019-05-18 19:13:56 +02:00
Kovid Goyal 4fff84b4b9 Add void to all function declarations for functions that take no arguments
Micro-optimization for some architectures. Enforced via
-Wstrict-prototypes
2019-05-13 11:04:21 +05:30
Kovid Goyal af2c9a49b1 ... 2019-05-11 12:04:07 +05:30
Kovid Goyal bdeec61266 macOS: Add an entry point to use that works even if run via a symlink
Fixes #1539
2019-05-11 10:25:06 +05:30
Kovid Goyal 8b56f1ced6 Forgot to specify the default for --extra-logging 2019-04-24 16:19:30 +05:30
Kovid Goyal 0987a536b1 Add extra logging to debug the event loop
This should make tracking down the root cause of the
event loop pauses on X11 easier. And the infrastructure
should come in handy in the future as well.
2019-04-24 16:16:40 +05:30
Kovid Goyal e5afc5297a Dont use multiprocessing to get CPU counts 2019-04-22 08:49:22 +05:30
Kovid Goyal 465ed48e73 When generating python bytecode, do it for all optimization levels 2019-04-22 08:46:33 +05:30
Kovid Goyal 13254ac4d5 Fix #1435 2019-03-03 07:24:05 +05:30
Luflosi 8177cfac2a macOS Finder Service to open a directory in a new kitty tab or window 2019-02-10 15:38:45 +01:00
Kovid Goyal 526c526bf3 Make compiler detection more robust 2019-01-30 09:05:42 +05:30
Kovid Goyal c2f6450af3 Framework for displaying simple OS notifications 2019-01-29 18:11:48 +05:30
Kovid Goyal 71091e73a4 Merge branch 'osx_to_macos' of https://github.com/Luflosi/kitty 2019-01-29 09:01:24 +05:30
Luflosi 25d1b2328f Missed one instance of "OS X" 2019-01-28 23:57:28 +01:00
Kovid Goyal 4085fe2e8e Merge branch 'osx_to_macos' of https://github.com/Luflosi/kitty 2019-01-28 08:44:37 +05:30
Luflosi c343bdd120 Rename OS X -> macOS 2019-01-28 01:25:02 +01:00
Kovid Goyal 19bce0c23c Start work on a choose kitten for fuzzy selection 2019-01-23 19:38:08 +05:30
Kovid Goyal ea37799fb0 Fix linking happening even when not needed 2019-01-06 10:25:37 +05:30
Kovid Goyal 89be7a031d Fix #1278 2018-12-30 15:22:05 +05:30
Kovid Goyal f098e6c973 Use -std=c11 when building
This is needed for harfbuzz 2.0 on macOS. -std=c11 was supported as of
gcc 4.7 released in 2014. So hopefully this wont break compilation on any
systems otherwise capable of running kitty. Fixes #1196
2018-12-17 08:41:06 +05:30
Kovid Goyal 9991dd6ce4 Generate hash based .pyc files when building
Fixes #1155
2018-11-20 08:42:08 +05:30
Luflosi 88aab20376 Loop through lines of tic output to correctly handle multiple lines 2018-10-18 12:25:19 +02:00
Luflosi a045ac3bd7 Decode tic stderr using utf-8 2018-10-18 12:15:37 +02:00