macOS: Add an entry point to use that works even if run via a symlink

Fixes #1539
This commit is contained in:
Kovid Goyal
2019-05-11 10:25:06 +05:30
parent 268e5cef3b
commit bdeec61266
2 changed files with 51 additions and 0 deletions

View File

@@ -744,6 +744,10 @@ Categories=System;TerminalEmulator;
os.rename('../lib', 'Frameworks')
if not os.path.exists(logo_dir):
raise SystemExit('The kitty logo has not been generated, you need to run logo/make.py')
cmd = [env.cc] + ['-Wall', '-Werror'] + [
'symlink-deref.c', '-o', os.path.join('MacOS', 'kitty-deref-symlink')]
run_tool(cmd)
subprocess.check_call([
'iconutil', '-c', 'icns', logo_dir, '-o',
os.path.join('Resources', os.path.basename(logo_dir).partition('.')[0] + '.icns')