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
This commit is contained in:
Kovid Goyal
2020-06-05 22:52:30 +05:30
parent 408508247d
commit 1326532850
3 changed files with 65 additions and 6 deletions

View File

@@ -737,7 +737,7 @@ def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 's
elif bundle_type == 'source':
cppflags.append('-DFROM_SOURCE')
if bundle_type.startswith('macos-'):
klp = '../Frameworks/kitty'
klp = '../Resources/kitty'
elif bundle_type.startswith('linux-'):
klp = '../{}/kitty'.format(args.libdir_name.strip('/'))
elif bundle_type == 'source':
@@ -942,9 +942,9 @@ def create_macos_bundle_gunk(dest: str) -> None:
os.rename(ddir / 'share', ddir / 'Contents/Resources')
os.rename(ddir / 'bin', ddir / 'Contents/MacOS')
os.rename(ddir / 'lib', ddir / 'Contents/Frameworks')
os.symlink('kitty', ddir / 'Contents/MacOS/kitty-deref-symlink')
os.rename(ddir / 'Contents/Frameworks/kitty', ddir / 'Contents/Resources/kitty')
launcher = ddir / 'Contents/MacOS/kitty'
in_src_launcher = ddir / 'Contents/Frameworks/kitty/kitty/launcher/kitty'
in_src_launcher = ddir / 'Contents/Resources/kitty/kitty/launcher/kitty'
if os.path.exists(in_src_launcher):
os.remove(in_src_launcher)
os.makedirs(os.path.dirname(in_src_launcher), exist_ok=True)