예제 #1
0
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self._prepare_pack()

        if isinstance(self.package, MetaPackage):
            packager = self._create_framework_bundle_packager()
            self._create_framework_bundle_layout(packager)
            self._create_framework_bundle_package(packager)
        self._create_packages()

        paths = []
        try:
            # create runtime package
            r_path = self._create_product(PackageType.RUNTIME)
            paths.append(r_path)

            if devel:
                # create devel package
                d_path = self._create_product(PackageType.DEVEL)
                paths.append(d_path)

            self.package.set_mode(PackageType.RUNTIME)
            self._create_packages_dmg()
        finally:
            if not keep_temp:
                shutil.rmtree(self.tmp)

        return paths
예제 #2
0
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        framework_name = self.package.osx_framework_library[0]
        self._prepare_pack()
        self.fw_path = os.path.join(self.tmp, '%s.framework' % framework_name)
        os.mkdir(self.fw_path)

        files = [os.path.join(self.config.prefix, x) for x in
                 self.package.all_files_list()]

        version_dir = os.path.join(self.fw_path, 'Versions', self.package.sdk_version)
        libname = os.path.join(version_dir, framework_name)
        packager = self._create_framework_bundle_packager()
        self._create_framework_bundle_layout(packager)
        self._copy_templates(files)
        self._copy_headers(files, version_dir)
        self._create_framework_headers(self.config.prefix,
                                       self.include_dirs, version_dir)
        if os.path.exists(os.path.join(version_dir, 'include')):
            shutil.rmtree(os.path.join(version_dir, 'include'))
        if os.path.exists(os.path.join(version_dir, 'lib')):
            shutil.rmtree(os.path.join(version_dir, 'lib'))
        self._create_merged_lib(libname, files)
        self.package.packages = []
        self.fw_path = self.tmp
        self._create_framework_bundle_package(packager)

        paths = [self._create_product(PackageType.DEVEL)]
        if self.package.user_resources:
            paths = [self._create_dmg (paths[0])]
        if not keep_temp:
            shutil.rmtree(self.tmp)
        return paths
예제 #3
0
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self._prepare_pack()

        if isinstance(self.package, MetaPackage):
            packager = self._create_framework_bundle_packager()
            self._create_framework_bundle_layout(packager)
            self._create_framework_bundle_package(packager)
        self._create_packages()

        paths = []
        # create runtime package
        r_path = self._create_product(PackageType.RUNTIME)
        paths.append(r_path)

        if devel:
            # create devel package
            d_path = self._create_product(PackageType.DEVEL)
            paths.append(d_path)

        self.package.set_mode(PackageType.RUNTIME)
        self._create_packages_dmg()

        if not keep_temp:
            shutil.rmtree(self.tmp)

        return paths
예제 #4
0
파일: packager.py 프로젝트: llenroc/cerbero
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self.tmp = tempfile.mkdtemp()
        self.approot = os.path.join(self.tmp, 'app')
        self.appdir = os.path.join(self.approot,
                                   '%s.app' % self.package.app_name)

        # copy files to the bundle. it needs to be done first because the app
        # bundle will try to create links for the main executable
        self._create_bundle()
        self._create_app_bundle()
        homedir = os.path.join(self.appdir, 'Contents', 'Home')
        self._strip_binaries(homedir)
        self._relocate_binaries(homedir)
        if self.package.osx_create_pkg:
            pkg = self._create_product()
            self._add_applications_link()
        else:
            pkg = ''
        if self.package.osx_create_dmg:
            dmg = self._create_dmg()
        else:
            dmg = ''

        return [dmg, pkg]
예제 #5
0
파일: packager.py 프로젝트: deepak6/cerbero
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self.include_dirs = PkgConfig.list_all_include_dirs()
        self.tmp = tempfile.mkdtemp()

        self.empty_packages = {PackageType.RUNTIME: [], PackageType.DEVEL: []}
        self.packages_paths = {PackageType.RUNTIME: {}, PackageType.DEVEL: {}}

        if isinstance(self.package, SDKPackage):
            self._create_framework_bundle_package()
        self._create_packages()

        paths = []
        # create runtime package
        r_path = self._create_pmdoc(PackageType.RUNTIME)
        paths.append(r_path)

        if devel:
            # create devel package
            d_path = self._create_pmdoc(PackageType.DEVEL)
            paths.append(d_path)

        # FIXME: Figure out why PackageMaker refuses to create flat meta-packages
        # using flat packages created by himself
        self.package.set_mode(PackageType.RUNTIME)
        for path in paths:
            self._create_dmgs(paths)

        if not keep_temp:
            shutil.rmtree(self.tmp)

        return paths
예제 #6
0
    def pack(
        self,
        output_dir,
        devel=True,
        force=False,
        keep_temp=False,
        version=None,
        install_dir=None,
        include_dirs=None,
        sdk_version=None,
    ):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self.install_dir = install_dir or self.package.get_install_dir()
        self.version = version or self.package.version
        self.sdk_version = sdk_version or self.version
        self.include_dirs = include_dirs or PkgConfig.list_all_include_dirs()

        # create the runtime package
        try:
            runtime_path = self._create_package(PackageType.RUNTIME, output_dir, force)
        except EmptyPackageError, e:
            if not devel:
                raise e
            runtime_path = None
예제 #7
0
파일: packager.py 프로젝트: fluendo/cerbero
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self.tmp = tempfile.mkdtemp()
        self.approot = os.path.join(self.tmp, 'app')
        self.appdir = os.path.join(self.approot, '%s.app' % self.package.app_name)

        # copy files to the bundle. it needs to be done first because the app
        # bundle will try to create links for the main executable
        self._create_bundle()
        self._create_app_bundle()
        homedir = os.path.join(self.appdir, 'Contents', 'Home')
        self._strip_binaries(homedir)
        self._relocate_binaries(homedir)
        if self.package.osx_create_pkg:
            pkg = self._create_product()
            self._add_applications_link()
        else:
            pkg = ''
        if self.package.osx_create_dmg:
            dmg = self._create_dmg()
        else:
            dmg = ''

        return [dmg, pkg]
예제 #8
0
파일: packager.py 프로젝트: dashesy/cerbero
    def pack(self, output_dir, devel=True, force=False, keep_temp=False,
             version=None, install_dir=None, include_dirs=None,
             sdk_version=None):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self.install_dir = install_dir or self.package.get_install_dir()
        self.version = version or self.package.version
        self.sdk_version = sdk_version or self.version
        self.include_dirs = include_dirs or PkgConfig.list_all_include_dirs()

        # create the runtime package
        try:
            runtime_path = self._create_package(PackageType.RUNTIME,
                    output_dir, force)
        except EmptyPackageError as e:
            if not devel:
                raise e
            runtime_path = None

        if not devel:
            return [runtime_path, None]

        try:
            # create the development package
            devel_path = self._create_package(PackageType.DEVEL, output_dir,
                    force)
        except EmptyPackageError as e:
            if runtime_path is None:
                raise e
            devel_path = None

        return [runtime_path, devel_path]
예제 #9
0
    def pack(self,
             output_dir,
             devel=True,
             force=False,
             keep_temp=False,
             version=None,
             target='10.5',
             install_dir=None,
             include_dirs=None,
             sdk_version=None):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self.install_dir = install_dir or self.package.get_install_dir()
        self.version = version or self.package.version
        self.sdk_version = sdk_version or self.version
        self.include_dirs = include_dirs or PkgConfig.list_all_include_dirs()

        # create the runtime package
        try:
            runtime_path = self._create_package(PackageType.RUNTIME,
                                                output_dir, force, target)
        except EmptyPackageError, e:
            if not devel:
                raise e
            runtime_path = None
예제 #10
0
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self.include_dirs = PkgConfig.list_all_include_dirs()
        self.tmp = tempfile.mkdtemp()

        self.empty_packages = {PackageType.RUNTIME: [], PackageType.DEVEL: []}
        self.packages_paths = {PackageType.RUNTIME: {}, PackageType.DEVEL: {}}

        if isinstance(self.package, SDKPackage):
            self._create_framework_bundle_package()
        self._create_packages()

        paths = []
        # create runtime package
        r_path = self._create_pmdoc(PackageType.RUNTIME)
        paths.append(r_path)

        if devel:
            # create devel package
            d_path = self._create_pmdoc(PackageType.DEVEL)
            paths.append(d_path)

        # FIXME: Figure out why PackageMaker refuses to create flat meta-packages
        # using flat packages created by himself
        self.package.set_mode(PackageType.RUNTIME)
        for path in paths:
            self._create_dmgs(paths)

        if not keep_temp:
            shutil.rmtree(self.tmp)

        return paths
예제 #11
0
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        paths = []

        # create runtime package
        p = self.create_merge_module(output_dir, PackageType.RUNTIME, force,
                                     self.package.version, keep_temp)
        paths.append(p)

        if devel:
            p = self.create_merge_module(output_dir, PackageType.DEVEL, force,
                                         self.package.version, keep_temp)
            paths.append(p)

        return paths
예제 #12
0
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self.tmp = tempfile.mkdtemp()
        self.appdir = os.path.join(self.tmp, '%s.app' % self.package.app_name)

        # copy files to the bundle. it needs to be done first because the app
        # bundle will try to create links for the main executable
        self._create_bundle()
        self._create_app_bundle()
        self._strip_binaries()
        self._relocate_binaries()
        self._add_applications_link()
        dmg = self._create_dmg()

        return [dmg, None]
예제 #13
0
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        paths = []

        # create runtime package
        p = self.create_merge_module(output_dir, PackageType.RUNTIME, force,
                                     self.package.version, keep_temp)
        paths.append(p)

        if devel:
            p = self.create_merge_module(output_dir, PackageType.DEVEL, force,
                                         self.package.version, keep_temp)
            paths.append(p)

        return paths
예제 #14
0
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        self.tmp = tempfile.mkdtemp()
        self.appdir = os.path.join(self.tmp, '%s.app' % self.package.app_name)

        # copy files to the bundle. it needs to be done first because the app
        # bundle will try to create links for the main executable
        self._create_bundle()
        self._create_app_bundle()
        self._strip_binaries()
        self._relocate_binaries()
        self._add_applications_link()
        dmg = self._create_dmg()

        return [dmg, None]
예제 #15
0
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        framework_name = self.package.osx_framework_library[0]
        self._prepare_pack()
        self.fw_path = os.path.join(self.tmp, '%s.framework' % framework_name)
        os.mkdir(self.fw_path)

        files = [
            os.path.join(self.config.prefix, x)
            for x in self.package.all_files_list()
        ]

        version_dir = os.path.join(self.fw_path, 'Versions',
                                   self.package.sdk_version)
        libname = os.path.join(version_dir, framework_name)
        packager = self._create_framework_bundle_packager()
        self._create_framework_bundle_layout(packager)
        self._copy_templates(files)
        self._copy_headers(files, version_dir)
        self._create_framework_headers(self.config.prefix, self.include_dirs,
                                       version_dir)
        if os.path.exists(os.path.join(version_dir, 'include')):
            shutil.rmtree(os.path.join(version_dir, 'include'))
        if os.path.exists(os.path.join(version_dir, 'lib')):
            shutil.rmtree(os.path.join(version_dir, 'lib'))
        self._create_merged_lib(libname, files)
        self.package.packages = []
        self.fw_path = self.tmp
        self._create_framework_bundle_package(packager)
        self.fw_path = os.path.join(self.tmp, '%s.framework' % framework_name)

        if isinstance(self.package, SDKPackage):
            pkg_path = self._create_product(PackageType.DEVEL)
            if self.package.user_resources:
                pkg_path = self._create_dmg(pkg_path,
                                            pkg_path.replace('.pkg', '.dmg'))
        else:
            pkg_path = self._create_dmg(
                self.fw_path,
                os.path.join(output_dir, self._package_name('.dmg')))

        if not keep_temp:
            shutil.rmtree(self.tmp)
        return [pkg_path]
예제 #16
0
    def pack(self, output_dir, devel=False, force=False, keep_temp=False):
        PackagerBase.pack(self, output_dir, devel, force, keep_temp)

        framework_name = self.package.osx_framework_library[0]
        self._prepare_pack()
        self.fw_path = os.path.join(self.tmp, "%s.framework" % framework_name)
        os.mkdir(self.fw_path)

        files = [os.path.join(self.config.prefix, x) for x in self.package.all_files_list()]

        version_dir = os.path.join(self.fw_path, "Versions", self.package.sdk_version)
        libname = os.path.join(version_dir, framework_name)
        packager = self._create_framework_bundle_packager()
        self._create_framework_bundle_layout(packager)
        self._copy_templates(files)
        self._copy_headers(files, version_dir)
        self._create_framework_headers(self.config.prefix, self.include_dirs, version_dir)
        if os.path.exists(os.path.join(version_dir, "include")):
            shutil.rmtree(os.path.join(version_dir, "include"))
        if os.path.exists(os.path.join(version_dir, "lib")):
            shutil.rmtree(os.path.join(version_dir, "lib"))
        self._create_merged_lib(libname, files)
        self.package.packages = []
        self.fw_path = self.tmp
        self._create_framework_bundle_package(packager)
        self.fw_path = os.path.join(self.tmp, "%s.framework" % framework_name)

        if isinstance(self.package, SDKPackage):
            pkg_path = self._create_product(PackageType.DEVEL)
            if self.package.user_resources:
                pkg_path = self._create_dmg(pkg_path, pkg_path.replace(".pkg", ".dmg"))
        else:
            pkg_path = self._create_dmg(self.fw_path, os.path.join(output_dir, self._package_name(".dmg")))

        if not keep_temp:
            shutil.rmtree(self.tmp)
        return [pkg_path]