fyn 1.1.17 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon.gypi +185 -0
- package/bin/node-gyp.js +3 -0
- package/dist/Find-VisualStudio.cs +250 -0
- package/dist/fyn.js +86454 -56188
- package/gyp/AUTHORS +16 -0
- package/gyp/LICENSE +28 -0
- package/gyp/data/win/large-pdb-shim.cc +12 -0
- package/gyp/gyp +8 -0
- package/gyp/gyp.bat +5 -0
- package/gyp/gyp_main.py +45 -0
- package/gyp/pylib/gyp/MSVSNew.py +367 -0
- package/gyp/pylib/gyp/MSVSProject.py +206 -0
- package/gyp/pylib/gyp/MSVSSettings.py +1270 -0
- package/gyp/pylib/gyp/MSVSSettings_test.py +1547 -0
- package/gyp/pylib/gyp/MSVSToolFile.py +59 -0
- package/gyp/pylib/gyp/MSVSUserFile.py +153 -0
- package/gyp/pylib/gyp/MSVSUtil.py +271 -0
- package/gyp/pylib/gyp/MSVSVersion.py +574 -0
- package/gyp/pylib/gyp/__init__.py +666 -0
- package/gyp/pylib/gyp/common.py +654 -0
- package/gyp/pylib/gyp/common_test.py +78 -0
- package/gyp/pylib/gyp/easy_xml.py +165 -0
- package/gyp/pylib/gyp/easy_xml_test.py +109 -0
- package/gyp/pylib/gyp/flock_tool.py +55 -0
- package/gyp/pylib/gyp/generator/__init__.py +0 -0
- package/gyp/pylib/gyp/generator/analyzer.py +808 -0
- package/gyp/pylib/gyp/generator/android.py +1173 -0
- package/gyp/pylib/gyp/generator/cmake.py +1321 -0
- package/gyp/pylib/gyp/generator/compile_commands_json.py +120 -0
- package/gyp/pylib/gyp/generator/dump_dependency_json.py +103 -0
- package/gyp/pylib/gyp/generator/eclipse.py +464 -0
- package/gyp/pylib/gyp/generator/gypd.py +89 -0
- package/gyp/pylib/gyp/generator/gypsh.py +58 -0
- package/gyp/pylib/gyp/generator/make.py +2518 -0
- package/gyp/pylib/gyp/generator/msvs.py +3978 -0
- package/gyp/pylib/gyp/generator/msvs_test.py +44 -0
- package/gyp/pylib/gyp/generator/ninja.py +2936 -0
- package/gyp/pylib/gyp/generator/ninja_test.py +55 -0
- package/gyp/pylib/gyp/generator/xcode.py +1394 -0
- package/gyp/pylib/gyp/generator/xcode_test.py +25 -0
- package/gyp/pylib/gyp/input.py +3137 -0
- package/gyp/pylib/gyp/input_test.py +98 -0
- package/gyp/pylib/gyp/mac_tool.py +771 -0
- package/gyp/pylib/gyp/msvs_emulation.py +1271 -0
- package/gyp/pylib/gyp/ninja_syntax.py +174 -0
- package/gyp/pylib/gyp/simple_copy.py +61 -0
- package/gyp/pylib/gyp/win_tool.py +374 -0
- package/gyp/pylib/gyp/xcode_emulation.py +1939 -0
- package/gyp/pylib/gyp/xcode_ninja.py +302 -0
- package/gyp/pylib/gyp/xcodeproj_file.py +3197 -0
- package/gyp/pylib/gyp/xml_fix.py +65 -0
- package/gyp/requirements_dev.txt +2 -0
- package/gyp/setup.py +42 -0
- package/gyp/test_gyp.py +260 -0
- package/gyp/tools/README +15 -0
- package/gyp/tools/Xcode/README +5 -0
- package/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- package/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- package/gyp/tools/emacs/README +12 -0
- package/gyp/tools/emacs/gyp-tests.el +63 -0
- package/gyp/tools/emacs/gyp.el +275 -0
- package/gyp/tools/emacs/run-unit-tests.sh +7 -0
- package/gyp/tools/emacs/testdata/media.gyp +1105 -0
- package/gyp/tools/emacs/testdata/media.gyp.fontified +1107 -0
- package/gyp/tools/graphviz.py +102 -0
- package/gyp/tools/pretty_gyp.py +156 -0
- package/gyp/tools/pretty_sln.py +181 -0
- package/gyp/tools/pretty_vcproj.py +339 -0
- package/node-gyp-bin/node-gyp +6 -0
- package/node-gyp-bin/node-gyp.cmd +5 -0
- package/package.json +14 -10
- package/src/win_delay_load_hook.cc +39 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2011 Google Inc. All rights reserved.
|
|
4
|
+
# Use of this source code is governed by a BSD-style license that can be
|
|
5
|
+
# found in the LICENSE file.
|
|
6
|
+
|
|
7
|
+
"""Using the JSON dumped by the dump-dependency-json generator,
|
|
8
|
+
generate input suitable for graphviz to render a dependency graph of
|
|
9
|
+
targets."""
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import collections
|
|
13
|
+
import json
|
|
14
|
+
import sys
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def ParseTarget(target):
|
|
18
|
+
target, _, suffix = target.partition("#")
|
|
19
|
+
filename, _, target = target.partition(":")
|
|
20
|
+
return filename, target, suffix
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def LoadEdges(filename, targets):
|
|
24
|
+
"""Load the edges map from the dump file, and filter it to only
|
|
25
|
+
show targets in |targets| and their depedendents."""
|
|
26
|
+
|
|
27
|
+
file = open("dump.json")
|
|
28
|
+
edges = json.load(file)
|
|
29
|
+
file.close()
|
|
30
|
+
|
|
31
|
+
# Copy out only the edges we're interested in from the full edge list.
|
|
32
|
+
target_edges = {}
|
|
33
|
+
to_visit = targets[:]
|
|
34
|
+
while to_visit:
|
|
35
|
+
src = to_visit.pop()
|
|
36
|
+
if src in target_edges:
|
|
37
|
+
continue
|
|
38
|
+
target_edges[src] = edges[src]
|
|
39
|
+
to_visit.extend(edges[src])
|
|
40
|
+
|
|
41
|
+
return target_edges
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def WriteGraph(edges):
|
|
45
|
+
"""Print a graphviz graph to stdout.
|
|
46
|
+
|edges| is a map of target to a list of other targets it depends on."""
|
|
47
|
+
|
|
48
|
+
# Bucket targets by file.
|
|
49
|
+
files = collections.defaultdict(list)
|
|
50
|
+
for src, dst in edges.items():
|
|
51
|
+
build_file, target_name, toolset = ParseTarget(src)
|
|
52
|
+
files[build_file].append(src)
|
|
53
|
+
|
|
54
|
+
print("digraph D {")
|
|
55
|
+
print(" fontsize=8") # Used by subgraphs.
|
|
56
|
+
print(" node [fontsize=8]")
|
|
57
|
+
|
|
58
|
+
# Output nodes by file. We must first write out each node within
|
|
59
|
+
# its file grouping before writing out any edges that may refer
|
|
60
|
+
# to those nodes.
|
|
61
|
+
for filename, targets in files.items():
|
|
62
|
+
if len(targets) == 1:
|
|
63
|
+
# If there's only one node for this file, simplify
|
|
64
|
+
# the display by making it a box without an internal node.
|
|
65
|
+
target = targets[0]
|
|
66
|
+
build_file, target_name, toolset = ParseTarget(target)
|
|
67
|
+
print(
|
|
68
|
+
f' "{target}" [shape=box, label="{filename}\\n{target_name}"]'
|
|
69
|
+
)
|
|
70
|
+
else:
|
|
71
|
+
# Group multiple nodes together in a subgraph.
|
|
72
|
+
print(' subgraph "cluster_%s" {' % filename)
|
|
73
|
+
print(' label = "%s"' % filename)
|
|
74
|
+
for target in targets:
|
|
75
|
+
build_file, target_name, toolset = ParseTarget(target)
|
|
76
|
+
print(f' "{target}" [label="{target_name}"]')
|
|
77
|
+
print(" }")
|
|
78
|
+
|
|
79
|
+
# Now that we've placed all the nodes within subgraphs, output all
|
|
80
|
+
# the edges between nodes.
|
|
81
|
+
for src, dsts in edges.items():
|
|
82
|
+
for dst in dsts:
|
|
83
|
+
print(f' "{src}" -> "{dst}"')
|
|
84
|
+
|
|
85
|
+
print("}")
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def main():
|
|
89
|
+
if len(sys.argv) < 2:
|
|
90
|
+
print(__doc__, file=sys.stderr)
|
|
91
|
+
print(file=sys.stderr)
|
|
92
|
+
print("usage: %s target1 target2..." % (sys.argv[0]), file=sys.stderr)
|
|
93
|
+
return 1
|
|
94
|
+
|
|
95
|
+
edges = LoadEdges("dump.json", sys.argv[1:])
|
|
96
|
+
|
|
97
|
+
WriteGraph(edges)
|
|
98
|
+
return 0
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
if __name__ == "__main__":
|
|
102
|
+
sys.exit(main())
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2012 Google Inc. All rights reserved.
|
|
4
|
+
# Use of this source code is governed by a BSD-style license that can be
|
|
5
|
+
# found in the LICENSE file.
|
|
6
|
+
|
|
7
|
+
"""Pretty-prints the contents of a GYP file."""
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
import sys
|
|
11
|
+
import re
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# Regex to remove comments when we're counting braces.
|
|
15
|
+
COMMENT_RE = re.compile(r"\s*#.*")
|
|
16
|
+
|
|
17
|
+
# Regex to remove quoted strings when we're counting braces.
|
|
18
|
+
# It takes into account quoted quotes, and makes sure that the quotes match.
|
|
19
|
+
# NOTE: It does not handle quotes that span more than one line, or
|
|
20
|
+
# cases where an escaped quote is preceded by an escaped backslash.
|
|
21
|
+
QUOTE_RE_STR = r'(?P<q>[\'"])(.*?)(?<![^\\][\\])(?P=q)'
|
|
22
|
+
QUOTE_RE = re.compile(QUOTE_RE_STR)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def comment_replace(matchobj):
|
|
26
|
+
return matchobj.group(1) + matchobj.group(2) + "#" * len(matchobj.group(3))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def mask_comments(input):
|
|
30
|
+
"""Mask the quoted strings so we skip braces inside quoted strings."""
|
|
31
|
+
search_re = re.compile(r"(.*?)(#)(.*)")
|
|
32
|
+
return [search_re.sub(comment_replace, line) for line in input]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def quote_replace(matchobj):
|
|
36
|
+
return "{}{}{}{}".format(
|
|
37
|
+
matchobj.group(1),
|
|
38
|
+
matchobj.group(2),
|
|
39
|
+
"x" * len(matchobj.group(3)),
|
|
40
|
+
matchobj.group(2),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def mask_quotes(input):
|
|
45
|
+
"""Mask the quoted strings so we skip braces inside quoted strings."""
|
|
46
|
+
search_re = re.compile(r"(.*?)" + QUOTE_RE_STR)
|
|
47
|
+
return [search_re.sub(quote_replace, line) for line in input]
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def do_split(input, masked_input, search_re):
|
|
51
|
+
output = []
|
|
52
|
+
mask_output = []
|
|
53
|
+
for (line, masked_line) in zip(input, masked_input):
|
|
54
|
+
m = search_re.match(masked_line)
|
|
55
|
+
while m:
|
|
56
|
+
split = len(m.group(1))
|
|
57
|
+
line = line[:split] + r"\n" + line[split:]
|
|
58
|
+
masked_line = masked_line[:split] + r"\n" + masked_line[split:]
|
|
59
|
+
m = search_re.match(masked_line)
|
|
60
|
+
output.extend(line.split(r"\n"))
|
|
61
|
+
mask_output.extend(masked_line.split(r"\n"))
|
|
62
|
+
return (output, mask_output)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def split_double_braces(input):
|
|
66
|
+
"""Masks out the quotes and comments, and then splits appropriate
|
|
67
|
+
lines (lines that matche the double_*_brace re's above) before
|
|
68
|
+
indenting them below.
|
|
69
|
+
|
|
70
|
+
These are used to split lines which have multiple braces on them, so
|
|
71
|
+
that the indentation looks prettier when all laid out (e.g. closing
|
|
72
|
+
braces make a nice diagonal line).
|
|
73
|
+
"""
|
|
74
|
+
double_open_brace_re = re.compile(r"(.*?[\[\{\(,])(\s*)([\[\{\(])")
|
|
75
|
+
double_close_brace_re = re.compile(r"(.*?[\]\}\)],?)(\s*)([\]\}\)])")
|
|
76
|
+
|
|
77
|
+
masked_input = mask_quotes(input)
|
|
78
|
+
masked_input = mask_comments(masked_input)
|
|
79
|
+
|
|
80
|
+
(output, mask_output) = do_split(input, masked_input, double_open_brace_re)
|
|
81
|
+
(output, mask_output) = do_split(output, mask_output, double_close_brace_re)
|
|
82
|
+
|
|
83
|
+
return output
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def count_braces(line):
|
|
87
|
+
"""keeps track of the number of braces on a given line and returns the result.
|
|
88
|
+
|
|
89
|
+
It starts at zero and subtracts for closed braces, and adds for open braces.
|
|
90
|
+
"""
|
|
91
|
+
open_braces = ["[", "(", "{"]
|
|
92
|
+
close_braces = ["]", ")", "}"]
|
|
93
|
+
closing_prefix_re = re.compile(r"(.*?[^\s\]\}\)]+.*?)([\]\}\)],?)\s*$")
|
|
94
|
+
cnt = 0
|
|
95
|
+
stripline = COMMENT_RE.sub(r"", line)
|
|
96
|
+
stripline = QUOTE_RE.sub(r"''", stripline)
|
|
97
|
+
for char in stripline:
|
|
98
|
+
for brace in open_braces:
|
|
99
|
+
if char == brace:
|
|
100
|
+
cnt += 1
|
|
101
|
+
for brace in close_braces:
|
|
102
|
+
if char == brace:
|
|
103
|
+
cnt -= 1
|
|
104
|
+
|
|
105
|
+
after = False
|
|
106
|
+
if cnt > 0:
|
|
107
|
+
after = True
|
|
108
|
+
|
|
109
|
+
# This catches the special case of a closing brace having something
|
|
110
|
+
# other than just whitespace ahead of it -- we don't want to
|
|
111
|
+
# unindent that until after this line is printed so it stays with
|
|
112
|
+
# the previous indentation level.
|
|
113
|
+
if cnt < 0 and closing_prefix_re.match(stripline):
|
|
114
|
+
after = True
|
|
115
|
+
return (cnt, after)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def prettyprint_input(lines):
|
|
119
|
+
"""Does the main work of indenting the input based on the brace counts."""
|
|
120
|
+
indent = 0
|
|
121
|
+
basic_offset = 2
|
|
122
|
+
for line in lines:
|
|
123
|
+
if COMMENT_RE.match(line):
|
|
124
|
+
print(line)
|
|
125
|
+
else:
|
|
126
|
+
line = line.strip("\r\n\t ") # Otherwise doesn't strip \r on Unix.
|
|
127
|
+
if len(line) > 0:
|
|
128
|
+
(brace_diff, after) = count_braces(line)
|
|
129
|
+
if brace_diff != 0:
|
|
130
|
+
if after:
|
|
131
|
+
print(" " * (basic_offset * indent) + line)
|
|
132
|
+
indent += brace_diff
|
|
133
|
+
else:
|
|
134
|
+
indent += brace_diff
|
|
135
|
+
print(" " * (basic_offset * indent) + line)
|
|
136
|
+
else:
|
|
137
|
+
print(" " * (basic_offset * indent) + line)
|
|
138
|
+
else:
|
|
139
|
+
print("")
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def main():
|
|
143
|
+
if len(sys.argv) > 1:
|
|
144
|
+
data = open(sys.argv[1]).read().splitlines()
|
|
145
|
+
else:
|
|
146
|
+
data = sys.stdin.read().splitlines()
|
|
147
|
+
# Split up the double braces.
|
|
148
|
+
lines = split_double_braces(data)
|
|
149
|
+
|
|
150
|
+
# Indent and print the output.
|
|
151
|
+
prettyprint_input(lines)
|
|
152
|
+
return 0
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
if __name__ == "__main__":
|
|
156
|
+
sys.exit(main())
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2012 Google Inc. All rights reserved.
|
|
4
|
+
# Use of this source code is governed by a BSD-style license that can be
|
|
5
|
+
# found in the LICENSE file.
|
|
6
|
+
|
|
7
|
+
"""Prints the information in a sln file in a diffable way.
|
|
8
|
+
|
|
9
|
+
It first outputs each projects in alphabetical order with their
|
|
10
|
+
dependencies.
|
|
11
|
+
|
|
12
|
+
Then it outputs a possible build order.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import os
|
|
17
|
+
import re
|
|
18
|
+
import sys
|
|
19
|
+
import pretty_vcproj
|
|
20
|
+
|
|
21
|
+
__author__ = "nsylvain (Nicolas Sylvain)"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def BuildProject(project, built, projects, deps):
|
|
25
|
+
# if all dependencies are done, we can build it, otherwise we try to build the
|
|
26
|
+
# dependency.
|
|
27
|
+
# This is not infinite-recursion proof.
|
|
28
|
+
for dep in deps[project]:
|
|
29
|
+
if dep not in built:
|
|
30
|
+
BuildProject(dep, built, projects, deps)
|
|
31
|
+
print(project)
|
|
32
|
+
built.append(project)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def ParseSolution(solution_file):
|
|
36
|
+
# All projects, their clsid and paths.
|
|
37
|
+
projects = dict()
|
|
38
|
+
|
|
39
|
+
# A list of dependencies associated with a project.
|
|
40
|
+
dependencies = dict()
|
|
41
|
+
|
|
42
|
+
# Regular expressions that matches the SLN format.
|
|
43
|
+
# The first line of a project definition.
|
|
44
|
+
begin_project = re.compile(
|
|
45
|
+
r'^Project\("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942'
|
|
46
|
+
r'}"\) = "(.*)", "(.*)", "(.*)"$'
|
|
47
|
+
)
|
|
48
|
+
# The last line of a project definition.
|
|
49
|
+
end_project = re.compile("^EndProject$")
|
|
50
|
+
# The first line of a dependency list.
|
|
51
|
+
begin_dep = re.compile(r"ProjectSection\(ProjectDependencies\) = postProject$")
|
|
52
|
+
# The last line of a dependency list.
|
|
53
|
+
end_dep = re.compile("EndProjectSection$")
|
|
54
|
+
# A line describing a dependency.
|
|
55
|
+
dep_line = re.compile(" *({.*}) = ({.*})$")
|
|
56
|
+
|
|
57
|
+
in_deps = False
|
|
58
|
+
solution = open(solution_file)
|
|
59
|
+
for line in solution:
|
|
60
|
+
results = begin_project.search(line)
|
|
61
|
+
if results:
|
|
62
|
+
# Hack to remove icu because the diff is too different.
|
|
63
|
+
if results.group(1).find("icu") != -1:
|
|
64
|
+
continue
|
|
65
|
+
# We remove "_gyp" from the names because it helps to diff them.
|
|
66
|
+
current_project = results.group(1).replace("_gyp", "")
|
|
67
|
+
projects[current_project] = [
|
|
68
|
+
results.group(2).replace("_gyp", ""),
|
|
69
|
+
results.group(3),
|
|
70
|
+
results.group(2),
|
|
71
|
+
]
|
|
72
|
+
dependencies[current_project] = []
|
|
73
|
+
continue
|
|
74
|
+
|
|
75
|
+
results = end_project.search(line)
|
|
76
|
+
if results:
|
|
77
|
+
current_project = None
|
|
78
|
+
continue
|
|
79
|
+
|
|
80
|
+
results = begin_dep.search(line)
|
|
81
|
+
if results:
|
|
82
|
+
in_deps = True
|
|
83
|
+
continue
|
|
84
|
+
|
|
85
|
+
results = end_dep.search(line)
|
|
86
|
+
if results:
|
|
87
|
+
in_deps = False
|
|
88
|
+
continue
|
|
89
|
+
|
|
90
|
+
results = dep_line.search(line)
|
|
91
|
+
if results and in_deps and current_project:
|
|
92
|
+
dependencies[current_project].append(results.group(1))
|
|
93
|
+
continue
|
|
94
|
+
|
|
95
|
+
# Change all dependencies clsid to name instead.
|
|
96
|
+
for project in dependencies:
|
|
97
|
+
# For each dependencies in this project
|
|
98
|
+
new_dep_array = []
|
|
99
|
+
for dep in dependencies[project]:
|
|
100
|
+
# Look for the project name matching this cldis
|
|
101
|
+
for project_info in projects:
|
|
102
|
+
if projects[project_info][1] == dep:
|
|
103
|
+
new_dep_array.append(project_info)
|
|
104
|
+
dependencies[project] = sorted(new_dep_array)
|
|
105
|
+
|
|
106
|
+
return (projects, dependencies)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def PrintDependencies(projects, deps):
|
|
110
|
+
print("---------------------------------------")
|
|
111
|
+
print("Dependencies for all projects")
|
|
112
|
+
print("---------------------------------------")
|
|
113
|
+
print("-- --")
|
|
114
|
+
|
|
115
|
+
for (project, dep_list) in sorted(deps.items()):
|
|
116
|
+
print("Project : %s" % project)
|
|
117
|
+
print("Path : %s" % projects[project][0])
|
|
118
|
+
if dep_list:
|
|
119
|
+
for dep in dep_list:
|
|
120
|
+
print(" - %s" % dep)
|
|
121
|
+
print("")
|
|
122
|
+
|
|
123
|
+
print("-- --")
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def PrintBuildOrder(projects, deps):
|
|
127
|
+
print("---------------------------------------")
|
|
128
|
+
print("Build order ")
|
|
129
|
+
print("---------------------------------------")
|
|
130
|
+
print("-- --")
|
|
131
|
+
|
|
132
|
+
built = []
|
|
133
|
+
for (project, _) in sorted(deps.items()):
|
|
134
|
+
if project not in built:
|
|
135
|
+
BuildProject(project, built, projects, deps)
|
|
136
|
+
|
|
137
|
+
print("-- --")
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def PrintVCProj(projects):
|
|
141
|
+
|
|
142
|
+
for project in projects:
|
|
143
|
+
print("-------------------------------------")
|
|
144
|
+
print("-------------------------------------")
|
|
145
|
+
print(project)
|
|
146
|
+
print(project)
|
|
147
|
+
print(project)
|
|
148
|
+
print("-------------------------------------")
|
|
149
|
+
print("-------------------------------------")
|
|
150
|
+
|
|
151
|
+
project_path = os.path.abspath(
|
|
152
|
+
os.path.join(os.path.dirname(sys.argv[1]), projects[project][2])
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
pretty = pretty_vcproj
|
|
156
|
+
argv = [
|
|
157
|
+
"",
|
|
158
|
+
project_path,
|
|
159
|
+
"$(SolutionDir)=%s\\" % os.path.dirname(sys.argv[1]),
|
|
160
|
+
]
|
|
161
|
+
argv.extend(sys.argv[3:])
|
|
162
|
+
pretty.main(argv)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def main():
|
|
166
|
+
# check if we have exactly 1 parameter.
|
|
167
|
+
if len(sys.argv) < 2:
|
|
168
|
+
print('Usage: %s "c:\\path\\to\\project.sln"' % sys.argv[0])
|
|
169
|
+
return 1
|
|
170
|
+
|
|
171
|
+
(projects, deps) = ParseSolution(sys.argv[1])
|
|
172
|
+
PrintDependencies(projects, deps)
|
|
173
|
+
PrintBuildOrder(projects, deps)
|
|
174
|
+
|
|
175
|
+
if "--recursive" in sys.argv:
|
|
176
|
+
PrintVCProj(projects)
|
|
177
|
+
return 0
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
if __name__ == "__main__":
|
|
181
|
+
sys.exit(main())
|