Ejemplo n.º 1
0
 def _create_product(self):
     packagebuild = PackageBuild()
     resources = self._copy_scripts()
     app_pkg_name = self._package_name(".pkg")
     app_pkg = os.path.join(self.tmp, app_pkg_name)
     packagebuild.create_package(
         self.approot,
         self.package.identifier(),
         self.package.version,
         self.package.shortdesc,
         app_pkg,
         "/Applications",
         scripts_path=resources,
     )
     self.package.packages = [(self.package.name, True, True)]
     m.action(_("Creating Distribution.xml for package %s " % self.package))
     distro = DistributionXML(
         self.package,
         self.store,
         self.tmp,
         {self.package: app_pkg_name},
         self.store.get_package_deps(self.package),
         PackageType.RUNTIME,
         self.config.target_arch,
         home_folder=False,
     )
     distro_path = tempfile.NamedTemporaryFile().name
     distro.write(distro_path)
     output_file = os.path.join(self.output_dir, self._package_name(".pkg"))
     output_file = os.path.abspath(output_file)
     pb = ProductBuild()
     pb.create_package(distro_path, output_file, [self.package.relative_path("."), self.tmp])
     return output_file
Ejemplo n.º 2
0
 def _create_product(self):
     packagebuild = PackageBuild()
     resources = self._copy_scripts()
     app_pkg_name = self._package_name('.pkg')
     app_pkg = os.path.join(self.tmp, app_pkg_name)
     packagebuild.create_package(self.approot,
                                 self.package.identifier(),
                                 self.package.version,
                                 self.package.shortdesc,
                                 app_pkg,
                                 '/Applications',
                                 scripts_path=resources)
     self.package.packages = [(self.package.name, True, True)]
     m.action(_("Creating Distribution.xml for package %s " % self.package))
     distro = DistributionXML(self.package,
                              self.store,
                              self.tmp, {self.package: app_pkg_name},
                              self.store.get_package_deps(self.package),
                              PackageType.RUNTIME,
                              self.config.target_arch,
                              home_folder=False)
     distro_path = tempfile.NamedTemporaryFile().name
     distro.write(distro_path)
     output_file = os.path.join(self.output_dir, self._package_name('.pkg'))
     output_file = os.path.abspath(output_file)
     pb = ProductBuild()
     pb.create_package(distro_path, output_file,
                       [self.package.relative_path('.'), self.tmp])
     return output_file
Ejemplo n.º 3
0
 def _create_product(self, package_type):
     self.package.set_mode(package_type)
     m.action(_("Creating Distribution.xml for package %s " % self.package))
     distro = DistributionXML(self.package, self.store, self.tmp,
         self.packages_paths[package_type],
         self.empty_packages[package_type], package_type,
         self.config.target_arch, home_folder=self.home_folder)
     distro_path = tempfile.NamedTemporaryFile().name
     distro.write(distro_path)
     output_file = os.path.join(self.output_dir, self._package_name('.pkg'))
     output_file = os.path.abspath(output_file)
     pb = ProductBuild()
     pb.create_package(distro_path, output_file)
     return output_file
Ejemplo n.º 4
0
 def _create_product(self, package_type):
     self.package.set_mode(package_type)
     m.action(_("Creating Distribution.xml for package %s " % self.package))
     distro = DistributionXML(self.package, self.store, self.tmp,
         self.packages_paths[package_type],
         self.empty_packages[package_type], package_type,
         self.config.target_arch, home_folder=self.home_folder)
     distro_path = os.path.join(self.tmp, "Distribution.xml")
     distro.write(distro_path)
     output_file = os.path.join(self.output_dir, self._package_name('.pkg'))
     output_file = os.path.abspath(output_file)
     pb = ProductBuild()
     pb.create_package(distro_path, output_file, [self.package.relative_path('.')])
     return output_file