This commit is contained in:
Eryn Wells 2015-09-25 16:57:51 -07:00
parent 53897b2ed3
commit 1fb32c204d

View file

@ -1,11 +1,14 @@
# osxapp.py # osxapp.py
# Eryn Wells <eryn@erynwells.me> # Eryn Wells <eryn@erynwells.me>
import os.path
_BUNDLE_SUFFIX = '.app' _BUNDLE_SUFFIX = '.app'
def _assemble_app_bundle(env, bundle_name, binary, info_plist, resources_dir): def _assemble_app_bundle(env, bundle_name, binary, info_plist, resources_dir):
# TODO: Create directory structure, copy binary, plist, and resources. Sign the binary? app bundle? # TODO: Create directory structure, copy binary, plist, and resources. Sign the binary? app bundle?
if not bundle_name.endswith('.app'): if not bundle_name.endswith('.app'):
bundle_name += '.app' bundle_name += '.app'
@ -14,10 +17,10 @@ def _assemble_app_bundle(env, bundle_name, binary, info_plist, resources_dir):
macos_dir = contents_dir.Dir('MacOS') macos_dir = contents_dir.Dir('MacOS')
resources_dir = contents_dir.Dir('Resources') resources_dir = contents_dir.Dir('Resources')
actions = [] return [env.Mkdir(contents_dir),
contents_mkdir = env.Mkdir(contents_dir) env.Copy(contents_dir.File('Info.plist'), info_list),
env.Mkdir(macos_dir),
return actions env.Copy(macos_dir.File(bundle_name), binary)
_app_builder = Builder(action=_assemble_app_bundle, _app_builder = Builder(action=_assemble_app_bundle,