mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 10:41:58 +02:00
Fix freezing of quick-access sub app
This commit is contained in:
@@ -173,6 +173,7 @@ class Freeze(object):
|
|||||||
self.freeze_python()
|
self.freeze_python()
|
||||||
self.add_ca_certs()
|
self.add_ca_certs()
|
||||||
self.build_frozen_tools()
|
self.build_frozen_tools()
|
||||||
|
self.complete_sub_bundles()
|
||||||
if not self.dont_strip:
|
if not self.dont_strip:
|
||||||
self.strip_files()
|
self.strip_files()
|
||||||
if not self.skip_tests:
|
if not self.skip_tests:
|
||||||
@@ -183,6 +184,16 @@ class Freeze(object):
|
|||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
@flush
|
||||||
|
def complete_sub_bundles(self):
|
||||||
|
count = 0
|
||||||
|
for qapp in glob.glob(join(self.contents_dir, '*.app')):
|
||||||
|
for exe in glob.glob(join(self.contents_dir, 'MacOS', '*')):
|
||||||
|
os.symlink(f'../../../MacOS/{os.path.basename(exe)}', os.path.join(qapp, 'Contents', 'MacOS', os.path.basename(exe)))
|
||||||
|
count += 1
|
||||||
|
if count < 2:
|
||||||
|
raise SystemExit(f'Could not complete sub-bundles in {self.contents_dir}')
|
||||||
|
|
||||||
@flush
|
@flush
|
||||||
def add_ca_certs(self):
|
def add_ca_certs(self):
|
||||||
print('\nDownloading CA certs...')
|
print('\nDownloading CA certs...')
|
||||||
@@ -376,6 +387,9 @@ class Freeze(object):
|
|||||||
os.rename(join(dirname(self.contents_dir), 'bin', 'kitty'), join(self.contents_dir, 'MacOS', 'kitty'))
|
os.rename(join(dirname(self.contents_dir), 'bin', 'kitty'), join(self.contents_dir, 'MacOS', 'kitty'))
|
||||||
shutil.rmtree(join(dirname(self.contents_dir), 'bin'))
|
shutil.rmtree(join(dirname(self.contents_dir), 'bin'))
|
||||||
self.fix_dependencies_in_lib(join(self.contents_dir, 'MacOS', 'kitty'))
|
self.fix_dependencies_in_lib(join(self.contents_dir, 'MacOS', 'kitty'))
|
||||||
|
for f in glob.glob(join(self.contents_dir, '*.app', 'Contents', 'MacOS', '*')):
|
||||||
|
if not os.path.islink(f):
|
||||||
|
self.fix_dependencies_in_lib(f)
|
||||||
for f in walk(pdir):
|
for f in walk(pdir):
|
||||||
if f.endswith('.so') or f.endswith('.dylib'):
|
if f.endswith('.so') or f.endswith('.dylib'):
|
||||||
self.fix_dependencies_in_lib(f)
|
self.fix_dependencies_in_lib(f)
|
||||||
|
|||||||
Reference in New Issue
Block a user