]>
Commit | Line | Data |
---|---|---|
caec2e78 SC |
1 | global oldDelimiters |
2 | global variables | |
3 | global variablesRef | |
4 | global bakefilesXML | |
5 | global bakefilesXMLRef | |
6 | global projectFile | |
7 | ||
8 | global osxBuildFolder | |
9 | ||
10 | property test : false | |
11 | ||
12 | -- retrieves the files from the xml node including optional conditions | |
13 | on parseSources(theName, theElement, theVariables, theConditions) | |
14 | set AppleScript's text item delimiters to " " | |
15 | set allElements to {} | |
16 | repeat with currElement in XML contents of theElement | |
17 | if class of currElement is text then | |
18 | set allElements to allElements & (every text item of currElement) | |
19 | else | |
20 | if class of currElement is XML element and XML tag of currElement is "if" then | |
21 | if (cond of XML attributes of currElement is in theConditions) then | |
22 | set allElements to allElements & (every text item of (item 1 of XML contents of currElement)) | |
23 | end if | |
24 | end if | |
25 | end if | |
26 | end repeat | |
27 | set AppleScript's text item delimiters to oldDelimiters | |
28 | copy {varname:theName, entries:allElements} to end of theVariables | |
29 | end parseSources | |
30 | ||
31 | on parseEntry(theElement, theVariables, theConditions) | |
32 | set theName to var of XML attributes of theElement | |
33 | parseSources(theName, theElement, theVariables, theConditions) | |
34 | end parseEntry | |
35 | ||
36 | on parseLib(theElement, theVariables, theConditions) | |
37 | set theName to |id| of XML attributes of theElement | |
38 | repeat with currElement in XML contents of theElement | |
39 | if class of currElement is XML element and XML tag of currElement is "sources" then | |
40 | parseSources(theName, currElement, theVariables, theConditions) | |
41 | end if | |
42 | end repeat | |
43 | end parseLib | |
44 | ||
45 | on parseNode(anElement, theVariables, theConditions) | |
9cb50d3a | 46 |