Flutter Engine
The Flutter Engine
Functions | Variables
gn.gn_meta_sln Namespace Reference

Functions

def ensureExists (path)
 
def writeLinesToFile (lines, fileName)
 
def extractIdg (projFileName)
 

Variables

list configs = []
 
 gnFile = os.path.join("out", outDir, "build.ninja.d")
 
 slnFile = os.path.join("out", outDir, "all.sln")
 
string cppTypeGuid = "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942"
 
dictionary allProjects = {}
 
tuple projectPattern
 
tuple projectNamePattern = (r'obj/(.*)\.vcxproj')
 
 slnLines = iter(open("out/" + config[0] + "/all.sln"))
 
 matchObj = re.match(projectPattern, slnLine)
 
 projPath = matchObj.group(2)
 
 nameObj = re.match(projectNamePattern, projPath)
 
 projName = nameObj.group(1).replace('/', '.')
 
list newSlnLines = []
 
 projGuid = projConfigs[0][2]
 
string idgHdr = "<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='"
 
 srcProjPath = os.path.join("out", projConfigs[0][0], projConfigs[0][1])
 
 dstProjPath = os.path.join("out", "sln", projConfigs[0][1])
 
string srcFilterPath = srcProjPath + ".filters"
 
string dstFilterPath = dstProjPath + ".filters"
 
 projLines = iter(srcProjFile)
 
list newProjLines = []
 
list idgLines = []
 
 line = next(projLines)
 
def configIdgLines
 
list projConfigLines
 

Function Documentation

◆ ensureExists()

def gn.gn_meta_sln.ensureExists (   path)

Definition at line 14 of file gn_meta_sln.py.

14def ensureExists(path):
15 try:
16 os.makedirs(path)
17 except OSError:
18 pass
19
def ensureExists(path)
Definition: gn_meta_sln.py:14

◆ extractIdg()

def gn.gn_meta_sln.extractIdg (   projFileName)

Definition at line 25 of file gn_meta_sln.py.

25def extractIdg(projFileName):
26 result = []
27 with open(projFileName) as projFile:
28 lines = iter(projFile)
29 for pLine in lines:
30 if "<ItemDefinitionGroup" in pLine:
31 while not "</ItemDefinitionGroup" in pLine:
32 result.append(pLine)
33 pLine = next(lines)
34 result.append(pLine)
35 return result
36
37# [ (name, hasSln), ... ]
static float next(float f)
def extractIdg(projFileName)
Definition: gn_meta_sln.py:25

◆ writeLinesToFile()

def gn.gn_meta_sln.writeLinesToFile (   lines,
  fileName 
)

Definition at line 20 of file gn_meta_sln.py.

20def writeLinesToFile(lines, fileName):
21 ensureExists(os.path.dirname(fileName))
22 with open(fileName, "w") as f:
23 f.writelines(lines)
24
def writeLinesToFile(lines, fileName)
Definition: gn_meta_sln.py:20

Variable Documentation

◆ allProjects

dictionary gn.gn_meta_sln.allProjects = {}

Definition at line 54 of file gn_meta_sln.py.

◆ configIdgLines

def gn.gn_meta_sln.configIdgLines
Initial value:
1= extractIdg(os.path.join("out",
2 projConfig[0],
3 projConfig[1]))

Definition at line 147 of file gn_meta_sln.py.

◆ configs

list gn.gn_meta_sln.configs = []

Definition at line 38 of file gn_meta_sln.py.

◆ cppTypeGuid

string gn.gn_meta_sln.cppTypeGuid = "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942"

Definition at line 51 of file gn_meta_sln.py.

◆ dstFilterPath

string gn.gn_meta_sln.dstFilterPath = dstProjPath + ".filters"

Definition at line 127 of file gn_meta_sln.py.

◆ dstProjPath

gn.gn_meta_sln.dstProjPath = os.path.join("out", "sln", projConfigs[0][1])

Definition at line 125 of file gn_meta_sln.py.

◆ gnFile

gn.gn_meta_sln.gnFile = os.path.join("out", outDir, "build.ninja.d")

Definition at line 44 of file gn_meta_sln.py.

◆ idgHdr

string gn.gn_meta_sln.idgHdr = "<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='"

Definition at line 119 of file gn_meta_sln.py.

◆ idgLines

list gn.gn_meta_sln.idgLines = []

Definition at line 141 of file gn_meta_sln.py.

◆ line

gn.gn_meta_sln.line = next(projLines)

Definition at line 144 of file gn_meta_sln.py.

◆ matchObj

gn.gn_meta_sln.matchObj = re.match(projectPattern, slnLine)

Definition at line 63 of file gn_meta_sln.py.

◆ nameObj

gn.gn_meta_sln.nameObj = re.match(projectNamePattern, projPath)

Definition at line 66 of file gn_meta_sln.py.

◆ newProjLines

list gn.gn_meta_sln.newProjLines = []

Definition at line 136 of file gn_meta_sln.py.

◆ newSlnLines

list gn.gn_meta_sln.newSlnLines = []

Definition at line 83 of file gn_meta_sln.py.

◆ projConfigLines

list gn.gn_meta_sln.projConfigLines
Initial value:
1= [
2 next(projLines),
3 next(projLines),
4 next(projLines),
5 next(projLines) ]

Definition at line 155 of file gn_meta_sln.py.

◆ projectNamePattern

tuple gn.gn_meta_sln.projectNamePattern = (r'obj/(.*)\.vcxproj')

Definition at line 57 of file gn_meta_sln.py.

◆ projectPattern

tuple gn.gn_meta_sln.projectPattern
Initial value:
1= (r'Project\‍("\{' + cppTypeGuid +
2 r'\}"\‍) = "([^"]*)", "([^"]*)", "\{([^\}]*)\}"')

Definition at line 55 of file gn_meta_sln.py.

◆ projGuid

gn.gn_meta_sln.projGuid = projConfigs[0][2]

Definition at line 102 of file gn_meta_sln.py.

◆ projLines

gn.gn_meta_sln.projLines = iter(srcProjFile)

Definition at line 135 of file gn_meta_sln.py.

◆ projName

gn.gn_meta_sln.projName = nameObj.group(1).replace('/', '.')

Definition at line 68 of file gn_meta_sln.py.

◆ projPath

gn.gn_meta_sln.projPath = matchObj.group(2)

Definition at line 65 of file gn_meta_sln.py.

◆ slnFile

gn.gn_meta_sln.slnFile = os.path.join("out", outDir, "all.sln")

Definition at line 46 of file gn_meta_sln.py.

◆ slnLines

gn.gn_meta_sln.slnLines = iter(open("out/" + config[0] + "/all.sln"))

Definition at line 61 of file gn_meta_sln.py.

◆ srcFilterPath

string gn.gn_meta_sln.srcFilterPath = srcProjPath + ".filters"

Definition at line 126 of file gn_meta_sln.py.

◆ srcProjPath

gn.gn_meta_sln.srcProjPath = os.path.join("out", projConfigs[0][0], projConfigs[0][1])

Definition at line 124 of file gn_meta_sln.py.