mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Move generation of Info.plist into its own function
This commit is contained in:
16
setup.py
16
setup.py
@@ -712,12 +712,8 @@ Categories=System;TerminalEmulator;
|
||||
os.symlink(os.path.relpath(launcher, os.path.dirname(in_src_launcher)), in_src_launcher)
|
||||
|
||||
|
||||
def create_macos_bundle_gunk(ddir):
|
||||
def macos_info_plist():
|
||||
import plistlib
|
||||
logo_dir = os.path.abspath(os.path.join('logo', appname + '.iconset'))
|
||||
with current_dir(ddir):
|
||||
os.mkdir('Contents')
|
||||
os.chdir('Contents')
|
||||
VERSION = '.'.join(map(str, version))
|
||||
pl = dict(
|
||||
CFBundleDevelopmentRegion='English',
|
||||
@@ -757,8 +753,16 @@ def create_macos_bundle_gunk(ddir):
|
||||
},
|
||||
],
|
||||
)
|
||||
return plistlib.dumps(pl)
|
||||
|
||||
|
||||
def create_macos_bundle_gunk(ddir):
|
||||
logo_dir = os.path.abspath(os.path.join('logo', appname + '.iconset'))
|
||||
with current_dir(ddir):
|
||||
os.mkdir('Contents')
|
||||
os.chdir('Contents')
|
||||
with open('Info.plist', 'wb') as fp:
|
||||
plistlib.dump(pl, fp)
|
||||
fp.write(macos_info_plist())
|
||||
os.rename('../share', 'Resources')
|
||||
os.rename('../bin', 'MacOS')
|
||||
os.rename('../lib', 'Frameworks')
|
||||
|
||||
Reference in New Issue
Block a user