def make_app_bundle(self):
        plist_path = os.path.join(
            self.bundle_skeleton_dir, 'Contents', 'Info.plist')
        app_name = 'Unknown'
        plist = None
        if os.path.exists(plist_path):
            plist = Plist.fromFile(plist_path)
            app_name = plist['CFBundleExecutable']
        else:
            print 'Warning: no Contents/Info.plist in .app skeleton'

        self.bundle_app_dir = os.path.join(
            self.bundle_output_dir, app_name + '.app')
        self.bundle_contents_dir = os.path.join(
            self.bundle_app_dir, 'Contents')
        self.bundle_res_dir = os.path.join(
            self.bundle_contents_dir, 'Resources')
        self.bundle_macos_dir = os.path.join(self.bundle_contents_dir, 'MacOS')

        # Create the .app tree, copying the skeleton
        shutil.rmtree(self.bundle_app_dir, ignore_errors=True)
        shutil.copytree(self.bundle_skeleton_dir, self.bundle_app_dir)
        if not os.path.exists(self.bundle_contents_dir):
            os.makedirs(self.bundle_contents_dir)
        if not os.path.exists(self.bundle_res_dir):
            os.makedirs(self.bundle_res_dir)
        if not os.path.exists(self.bundle_macos_dir):
            os.makedirs(self.bundle_macos_dir)

        # Generate the PkgInfo
        pkginfo_path = os.path.join(self.bundle_contents_dir, 'PkgInfo')
        if not os.path.exists(pkginfo_path) and not plist is None:
            fp = open(pkginfo_path, 'w')
            fp.write(plist['CFBundlePackageType'])
            fp.write(plist['CFBundleSignature'])
            fp.close()

        # Run solitary against the installation to collect files
        files = ''
        for file in self.bundle_from_build:
            files = files + ' "%s"' % os.path.join(self.prefix, file)

        run_shell('mono --debug ../../solitary/Solitary.exe '
                  '--mono-prefix="%s" --root="%s" --out="%s" %s' %
                  (self.prefix, self.prefix, self.bundle_res_dir, files))
        self.configure_gtk()
        self.configure_gdk_pixbuf()
dataset/ETHPy150Open mono/bockbuild/bockbuild/darwinprofile.py/DarwinProfile.make_app_bundle/original