def __init__(self, plugin_name, outputDir="."): ''' Create an binary component ''' self.plugin_name = plugin_name SoftPackage.__init__(self, name=self.plugin_name, implementation="cpp", outputDir=outputDir) self._createWavedevContent(generator="cpp.plugin")
def __init__( self, name, implementation, outputDir=".", generator="cpp.component.pull", spdTemplateFile=OSSIEHOME + DEFAULT_SPD_TEMPLATE, scdTemplateFile=OSSIEHOME + DEFAULT_SCD_TEMPLATE, prfTemplateFile=OSSIEHOME + DEFAULT_PRF_TEMPLATE, loggingConfigUri=None, ): """ Create a resource with no ports/properties. Use helper methods to add additional elements. Note, "implementation" argument must be "cpp", "java", or "python" """ SoftPackage.__init__(self, name, implementation, outputDir) self.spd = spd.parse(spdTemplateFile) self.scd = scd.parse(scdTemplateFile) self.prf = prf.parse(prfTemplateFile) self._setImplementation() self._setNameInSpd() self._setPropertyFileInSpd() self._setDescriptorInSpd() self._createWavedevContent(generator=generator) if loggingConfigUri: self.addSimpleProperty( id="LOGGING_CONFIG_URI", value=loggingConfigUri, type="string", complex=False, kindtypes=["configure", "execparam"], )
def __init__(self, name, implementation, outputDir=".", generator="cpp.component.pull", spdTemplateFile=OSSIEHOME + DEFAULT_SPD_TEMPLATE, scdTemplateFile=OSSIEHOME + DEFAULT_SCD_TEMPLATE, prfTemplateFile=OSSIEHOME + DEFAULT_PRF_TEMPLATE, loggingConfigUri=None): ''' Create a resource with no ports/properties. Use helper methods to add additional elements. Note, "implementation" argument must be "cpp", "java", or "python" ''' SoftPackage.__init__(self, name, implementation, outputDir) self.spd = spd.parse(spdTemplateFile) self.scd = scd.parse(scdTemplateFile) self.prf = prf.parse(prfTemplateFile) self._setImplementation() self._setNameInSpd() self._setPropertyFileInSpd() self._setDescriptorInSpd() self._createWavedevContent(generator=generator) if loggingConfigUri: self.addSimpleProperty(id="LOGGING_CONFIG_URI", value=loggingConfigUri, type="string", complex=False, kindtypes=["configure", "execparam"]) self.setComponentType('resource') self.setComponentRepid('IDL:CF/Resource:1.0')
def __init__(self, name, implementation, libraryLocation, outputDir=".", sharedLibraries=[], spdTemplateFile=OSSIEHOME + DEFAULT_RESOURCE_TEMPLATE, variant=""): SoftPackage.__init__(self, name, implementation, outputDir) # intantiate the class object representing the spd file self.spd = spd.parse(spdTemplateFile) self._setNameInSpd() self._setImplementation() self._createWavedevContent( generator="project.softPackageDependency.directory") # Create the output directory strucutre. A share directory will be # created in the implemetation directory. The share directory is # a symbolic link to the target directory. fullOutputDir = outputDir + "/" + name + "/" if not os.path.exists(fullOutputDir + implementation): os.makedirs(fullOutputDir + implementation) if not os.path.exists(fullOutputDir + implementation + "/share"): if not os.path.isabs(libraryLocation): libraryLocation = os.path.join(os.getcwd(), libraryLocation) shutil.copytree(libraryLocation, fullOutputDir + implementation + "/share") # Add soft package dependencies to the package being created (in the # case that the soft package dependency being created has its own # soft package dependencies). for sharedLibrary in sharedLibraries: self.addSoftPackageDependency(sharedLibrary)
def __init__( self, name, implementation, libraryLocation, outputDir=".", sharedLibraries = [], spdTemplateFile = OSSIEHOME + DEFAULT_RESOURCE_TEMPLATE, variant = ""): SoftPackage.__init__(self, name, implementation, outputDir) # intantiate the class object representing the spd file self.spd = spd.parse(spdTemplateFile) self._setNameInSpd() self._setImplementation() self._createWavedevContent(generator="project.softPackageDependency.directory") # Create the output directory strucutre. A share directory will be # created in the implemetation directory. The share directory is # a symbolic link to the target directory. fullOutputDir = outputDir+"/" + name + "/" if not os.path.exists(fullOutputDir + implementation): os.makedirs(fullOutputDir + implementation) if not os.path.exists(fullOutputDir + implementation + "/share"): if not os.path.isabs(libraryLocation): libraryLocation = os.path.join(os.getcwd(), libraryLocation) shutil.copytree(libraryLocation, fullOutputDir + implementation + "/share") # Add soft package dependencies to the package being created (in the # case that the soft package dependency being created has its own # soft package dependencies). for sharedLibrary in sharedLibraries: self.addSoftPackageDependency(sharedLibrary)