diff --git a/site_scons/site_tools/osxapp.py b/site_scons/site_tools/osxapp.py index ae7865a..e56a795 100644 --- a/site_scons/site_tools/osxapp.py +++ b/site_scons/site_tools/osxapp.py @@ -1,11 +1,14 @@ # osxapp.py # Eryn Wells +import os.path + _BUNDLE_SUFFIX = '.app' 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? + if not bundle_name.endswith('.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') resources_dir = contents_dir.Dir('Resources') - actions = [] - contents_mkdir = env.Mkdir(contents_dir) - - return actions + return [env.Mkdir(contents_dir), + env.Copy(contents_dir.File('Info.plist'), info_list), + env.Mkdir(macos_dir), + env.Copy(macos_dir.File(bundle_name), binary) _app_builder = Builder(action=_assemble_app_bundle,