1212 super(MMPRaptorBackend,self).__init__() |
1212 super(MMPRaptorBackend,self).__init__() |
1213 self.platformblock = None |
1213 self.platformblock = None |
1214 self.__Raptor = aRaptor |
1214 self.__Raptor = aRaptor |
1215 self.__debug("-----+++++ %s " % aMmpfilename) |
1215 self.__debug("-----+++++ %s " % aMmpfilename) |
1216 self.BuildVariant = raptor_data.Variant(name = "mmp") |
1216 self.BuildVariant = raptor_data.Variant(name = "mmp") |
|
1217 self.ApplyVariants = [] |
1217 self.ResourceVariants = [] |
1218 self.ResourceVariants = [] |
1218 self.BitmapVariants = [] |
1219 self.BitmapVariants = [] |
1219 self.StringTableVariants = [] |
1220 self.StringTableVariants = [] |
1220 self.__bldInfFilename = aBldInfFilename |
1221 self.__bldInfFilename = aBldInfFilename |
1221 self.__targettype = "UNKNOWN" |
1222 self.__targettype = "UNKNOWN" |
1225 self.__sourcepath = raptor_utilities.resolveSymbianPath(self.__currentMmpFile, "") |
1226 self.__sourcepath = raptor_utilities.resolveSymbianPath(self.__currentMmpFile, "") |
1226 self.__userinclude = "" |
1227 self.__userinclude = "" |
1227 self.__systeminclude = "" |
1228 self.__systeminclude = "" |
1228 self.__bitmapSourcepath = self.__sourcepath |
1229 self.__bitmapSourcepath = self.__sourcepath |
1229 self.__current_resource = "" |
1230 self.__current_resource = "" |
|
1231 self.__resourceFiles = [] |
1230 self.__pageConflict = [] |
1232 self.__pageConflict = [] |
1231 self.__debuggable = "" |
1233 self.__debuggable = "" |
1232 self.__resourceFiles = [] |
1234 self.__compressionKeyword = "" |
1233 self.sources = [] |
1235 self.sources = [] |
1234 self.capabilities = [] |
1236 self.capabilities = [] |
1235 |
1237 |
1236 self.__TARGET = "" |
1238 self.__TARGET = "" |
1237 self.__TARGETEXT = "" |
1239 self.__TARGETEXT = "" |
1355 self.__Raptor.Warn("DEBUGGABLE keyword has no effect as DEBUGGABLE or DEBUGGABLE_UDEBONLY is already set") |
1357 self.__Raptor.Warn("DEBUGGABLE keyword has no effect as DEBUGGABLE or DEBUGGABLE_UDEBONLY is already set") |
1356 self.__debuggable = "udeb" |
1358 self.__debuggable = "udeb" |
1357 elif varname == 'FEATUREVARIANT': |
1359 elif varname == 'FEATUREVARIANT': |
1358 self.BuildVariant.AddOperation(raptor_data.Set(varname,"1")) |
1360 self.BuildVariant.AddOperation(raptor_data.Set(varname,"1")) |
1359 self.featureVariant = True |
1361 self.featureVariant = True |
|
1362 elif varname in ['COMPRESSTARGET', 'NOCOMPRESSTARGET', 'INFLATECOMPRESSTARGET', 'BYTEPAIRCOMPRESSTARGET']: |
|
1363 if self.__compressionKeyword: |
|
1364 self.__Raptor.Warn("%s keyword in %s overrides earlier use of %s" % (varname, self.__currentMmpFile, self.__compressionKeyword)) |
|
1365 self.BuildVariant.AddOperation(raptor_data.Set(self.__compressionKeyword,"")) |
|
1366 self.__debug( "Set switch " + varname + " OFF") |
|
1367 self.BuildVariant.AddOperation(raptor_data.Set(varname,"1")) |
|
1368 self.__debug( "Set switch " + varname + " ON") |
|
1369 self.__compressionKeyword = varname |
1360 else: |
1370 else: |
1361 self.__debug( "Set switch "+toks[0]+" ON") |
1371 self.__debug( "Set switch "+toks[0]+" ON") |
1362 self.BuildVariant.AddOperation(raptor_data.Set(prefix+varname, "1")) |
1372 self.BuildVariant.AddOperation(raptor_data.Set(prefix+varname, "1")) |
1363 |
1373 |
1364 return "OK" |
1374 return "OK" |
1535 toks1 = str(toks[1]).replace("\\","/") |
1545 toks1 = str(toks[1]).replace("\\","/") |
1536 if toks1.find(","): |
1546 if toks1.find(","): |
1537 toks1 = re.sub("[,'\[\]]", "", toks1).replace("//","/") |
1547 toks1 = re.sub("[,'\[\]]", "", toks1).replace("//","/") |
1538 self.__debug("Set "+toks[0]+" to " + toks1) |
1548 self.__debug("Set "+toks[0]+" to " + toks1) |
1539 self.BuildVariant.AddOperation(raptor_data.Set(varname,toks1)) |
1549 self.BuildVariant.AddOperation(raptor_data.Set(varname,toks1)) |
1540 |
1550 elif varname=='APPLY': |
|
1551 self.ApplyVariants.append(toks[1]) |
1541 else: |
1552 else: |
1542 self.__debug("Set "+toks[0]+" to " + str(toks[1])) |
1553 self.__debug("Set "+toks[0]+" to " + str(toks[1])) |
1543 self.BuildVariant.AddOperation(raptor_data.Set(varname,"".join(toks[1]))) |
1554 self.BuildVariant.AddOperation(raptor_data.Set(varname,"".join(toks[1]))) |
1544 |
1555 |
1545 if varname=='LINKAS': |
1556 if varname=='LINKAS': |
3152 var.AddOperation(raptor_data.Append("EXPORTHEADERS", str(exportfile))) |
3163 var.AddOperation(raptor_data.Append("EXPORTHEADERS", str(exportfile))) |
3153 |
3164 |
3154 # now we have something worth adding to the component |
3165 # now we have something worth adding to the component |
3155 mmpSpec.AddVariant(var) |
3166 mmpSpec.AddVariant(var) |
3156 componentNode.AddChild(mmpSpec) |
3167 componentNode.AddChild(mmpSpec) |
|
3168 |
|
3169 # if there are APPLY variants then add them to the mmpSpec too |
|
3170 for applyVar in backend.ApplyVariants: |
|
3171 try: |
|
3172 mmpSpec.AddVariant(self.__Raptor.cache.FindNamedVariant(applyVar)) |
|
3173 except KeyError: |
|
3174 self.__Raptor.Error("APPLY unknown variant '%s' in %s", |
|
3175 applyVar, |
|
3176 str(mmpFileEntry.filename), |
|
3177 bldinf=str(bldInfFile)) |
3157 |
3178 |
3158 # resources, stringtables and bitmaps are sub-nodes of this project |
3179 # resources, stringtables and bitmaps are sub-nodes of this project |
3159 # (do not add these for feature variant builds) |
3180 # (do not add these for feature variant builds) |
3160 |
3181 |
3161 if not buildPlatform["ISFEATUREVARIANT"]: |
3182 if not buildPlatform["ISFEATUREVARIANT"]: |