Beispiel #1
0
	def __init__( self, sourcePackage = False, licenseFile = None, extraCPackLogic = None, name = None ):
		PackageProvider.__init__( self, name )
		self._setCommand( "cpack" )
		self._setCommandSearchPaths( getCMakeSearchPaths() )

		if sourcePackage:
			self.__configFile = "CPackSourceConfig.cmake"
		else:
			self.__configFile = "CPackConfig.cmake"
		self._sourcePackage = sourcePackage
		self._setCommandArguments( [ "--verbose", "--config", self.__configFile ] )
		self._licenseFile = licenseFile
		self._extraCPackLogic = extraCPackLogic
Beispiel #2
0
	def makePackageStep( self ):
		"""Create packages for the project using CPack."""
		configuration = self.getInstructions()
		step = configuration.getStep( 'create-packages' )
		project = configuration.getProject()
		if self._sourcePackage:
			packagedDirectory = os.path.join( project.getSourceDir(), configuration.getSourcePrefix() )
		else:
			packagedDirectory = configuration.getTargetDir()
		generateConfig = _CPackGenerateConfigurationAction( self._sourcePackage, self._licenseFile, self.__configFile,
		                                                    packagedDirectory, self.sourceGenerators(), self.binaryGenerators(),
		                                                    self._extraCPackLogic )
		generateConfig.setWorkingDirectory( configuration.getBuildDir() )
		step.addMainAction( generateConfig )
		makePackage = PackageProvider.makePackageStep( self )
		movePackageDestination = self.getInstructions().getPackagesDir()
		movePackage = _CPackMovePackageAction( makePackage, movePackageDestination )
		step.addMainAction( movePackage )
Beispiel #3
0
	def __init__( self, name = None ):
		PackageProvider.__init__( self, name )
		self.__makeTool = maketools.getMakeTool()
		self._setCommand( self.__makeTool.getCommand() )
		self._setCommandSearchPaths( self.__makeTool.getCommandSearchPaths() )
		self._setCommandArguments( ["package"] )