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,65 @@
|
|
|
1
|
+
# Copyright (c) 2011 Google Inc. All rights reserved.
|
|
2
|
+
# Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
# found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
"""Applies a fix to CR LF TAB handling in xml.dom.
|
|
6
|
+
|
|
7
|
+
Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293
|
|
8
|
+
Working around this: http://bugs.python.org/issue5752
|
|
9
|
+
TODO(bradnelson): Consider dropping this when we drop XP support.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import xml.dom.minidom
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _Replacement_write_data(writer, data, is_attrib=False):
|
|
17
|
+
"""Writes datachars to writer."""
|
|
18
|
+
data = data.replace("&", "&").replace("<", "<")
|
|
19
|
+
data = data.replace('"', """).replace(">", ">")
|
|
20
|
+
if is_attrib:
|
|
21
|
+
data = data.replace("\r", "
").replace("\n", "
").replace("\t", "	")
|
|
22
|
+
writer.write(data)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _Replacement_writexml(self, writer, indent="", addindent="", newl=""):
|
|
26
|
+
# indent = current indentation
|
|
27
|
+
# addindent = indentation to add to higher levels
|
|
28
|
+
# newl = newline string
|
|
29
|
+
writer.write(indent + "<" + self.tagName)
|
|
30
|
+
|
|
31
|
+
attrs = self._get_attributes()
|
|
32
|
+
a_names = sorted(attrs.keys())
|
|
33
|
+
|
|
34
|
+
for a_name in a_names:
|
|
35
|
+
writer.write(' %s="' % a_name)
|
|
36
|
+
_Replacement_write_data(writer, attrs[a_name].value, is_attrib=True)
|
|
37
|
+
writer.write('"')
|
|
38
|
+
if self.childNodes:
|
|
39
|
+
writer.write(">%s" % newl)
|
|
40
|
+
for node in self.childNodes:
|
|
41
|
+
node.writexml(writer, indent + addindent, addindent, newl)
|
|
42
|
+
writer.write(f"{indent}</{self.tagName}>{newl}")
|
|
43
|
+
else:
|
|
44
|
+
writer.write("/>%s" % newl)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class XmlFix:
|
|
48
|
+
"""Object to manage temporary patching of xml.dom.minidom."""
|
|
49
|
+
|
|
50
|
+
def __init__(self):
|
|
51
|
+
# Preserve current xml.dom.minidom functions.
|
|
52
|
+
self.write_data = xml.dom.minidom._write_data
|
|
53
|
+
self.writexml = xml.dom.minidom.Element.writexml
|
|
54
|
+
# Inject replacement versions of a function and a method.
|
|
55
|
+
xml.dom.minidom._write_data = _Replacement_write_data
|
|
56
|
+
xml.dom.minidom.Element.writexml = _Replacement_writexml
|
|
57
|
+
|
|
58
|
+
def Cleanup(self):
|
|
59
|
+
if self.write_data:
|
|
60
|
+
xml.dom.minidom._write_data = self.write_data
|
|
61
|
+
xml.dom.minidom.Element.writexml = self.writexml
|
|
62
|
+
self.write_data = None
|
|
63
|
+
|
|
64
|
+
def __del__(self):
|
|
65
|
+
self.Cleanup()
|
package/gyp/setup.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2009 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
|
+
from os import path
|
|
8
|
+
|
|
9
|
+
from setuptools import setup
|
|
10
|
+
|
|
11
|
+
here = path.abspath(path.dirname(__file__))
|
|
12
|
+
# Get the long description from the README file
|
|
13
|
+
with open(path.join(here, "README.md")) as in_file:
|
|
14
|
+
long_description = in_file.read()
|
|
15
|
+
|
|
16
|
+
setup(
|
|
17
|
+
name="gyp-next",
|
|
18
|
+
version="0.10.0",
|
|
19
|
+
description="A fork of the GYP build system for use in the Node.js projects",
|
|
20
|
+
long_description=long_description,
|
|
21
|
+
long_description_content_type="text/markdown",
|
|
22
|
+
author="Node.js contributors",
|
|
23
|
+
author_email="ryzokuken@disroot.org",
|
|
24
|
+
url="https://github.com/nodejs/gyp-next",
|
|
25
|
+
package_dir={"": "pylib"},
|
|
26
|
+
packages=["gyp", "gyp.generator"],
|
|
27
|
+
entry_points={"console_scripts": ["gyp=gyp:script_main"]},
|
|
28
|
+
python_requires=">=3.6",
|
|
29
|
+
classifiers=[
|
|
30
|
+
"Development Status :: 3 - Alpha",
|
|
31
|
+
"Environment :: Console",
|
|
32
|
+
"Intended Audience :: Developers",
|
|
33
|
+
"License :: OSI Approved :: BSD License",
|
|
34
|
+
"Natural Language :: English",
|
|
35
|
+
"Programming Language :: Python",
|
|
36
|
+
"Programming Language :: Python :: 3",
|
|
37
|
+
"Programming Language :: Python :: 3.6",
|
|
38
|
+
"Programming Language :: Python :: 3.7",
|
|
39
|
+
"Programming Language :: Python :: 3.8",
|
|
40
|
+
"Programming Language :: Python :: 3.9",
|
|
41
|
+
],
|
|
42
|
+
)
|
package/gyp/test_gyp.py
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# Copyright (c) 2012 Google Inc. All rights reserved.
|
|
3
|
+
# Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
# found in the LICENSE file.
|
|
5
|
+
|
|
6
|
+
"""gyptest.py -- test runner for GYP tests."""
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import os
|
|
11
|
+
import platform
|
|
12
|
+
import subprocess
|
|
13
|
+
import sys
|
|
14
|
+
import time
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def is_test_name(f):
|
|
18
|
+
return f.startswith("gyptest") and f.endswith(".py")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def find_all_gyptest_files(directory):
|
|
22
|
+
result = []
|
|
23
|
+
for root, dirs, files in os.walk(directory):
|
|
24
|
+
result.extend([os.path.join(root, f) for f in files if is_test_name(f)])
|
|
25
|
+
result.sort()
|
|
26
|
+
return result
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def main(argv=None):
|
|
30
|
+
if argv is None:
|
|
31
|
+
argv = sys.argv
|
|
32
|
+
|
|
33
|
+
parser = argparse.ArgumentParser()
|
|
34
|
+
parser.add_argument("-a", "--all", action="store_true", help="run all tests")
|
|
35
|
+
parser.add_argument("-C", "--chdir", action="store", help="change to directory")
|
|
36
|
+
parser.add_argument(
|
|
37
|
+
"-f",
|
|
38
|
+
"--format",
|
|
39
|
+
action="store",
|
|
40
|
+
default="",
|
|
41
|
+
help="run tests with the specified formats",
|
|
42
|
+
)
|
|
43
|
+
parser.add_argument(
|
|
44
|
+
"-G",
|
|
45
|
+
"--gyp_option",
|
|
46
|
+
action="append",
|
|
47
|
+
default=[],
|
|
48
|
+
help="Add -G options to the gyp command line",
|
|
49
|
+
)
|
|
50
|
+
parser.add_argument(
|
|
51
|
+
"-l", "--list", action="store_true", help="list available tests and exit"
|
|
52
|
+
)
|
|
53
|
+
parser.add_argument(
|
|
54
|
+
"-n",
|
|
55
|
+
"--no-exec",
|
|
56
|
+
action="store_true",
|
|
57
|
+
help="no execute, just print the command line",
|
|
58
|
+
)
|
|
59
|
+
parser.add_argument(
|
|
60
|
+
"--path", action="append", default=[], help="additional $PATH directory"
|
|
61
|
+
)
|
|
62
|
+
parser.add_argument(
|
|
63
|
+
"-q",
|
|
64
|
+
"--quiet",
|
|
65
|
+
action="store_true",
|
|
66
|
+
help="quiet, don't print anything unless there are failures",
|
|
67
|
+
)
|
|
68
|
+
parser.add_argument(
|
|
69
|
+
"-v",
|
|
70
|
+
"--verbose",
|
|
71
|
+
action="store_true",
|
|
72
|
+
help="print configuration info and test results.",
|
|
73
|
+
)
|
|
74
|
+
parser.add_argument("tests", nargs="*")
|
|
75
|
+
args = parser.parse_args(argv[1:])
|
|
76
|
+
|
|
77
|
+
if args.chdir:
|
|
78
|
+
os.chdir(args.chdir)
|
|
79
|
+
|
|
80
|
+
if args.path:
|
|
81
|
+
extra_path = [os.path.abspath(p) for p in args.path]
|
|
82
|
+
extra_path = os.pathsep.join(extra_path)
|
|
83
|
+
os.environ["PATH"] = extra_path + os.pathsep + os.environ["PATH"]
|
|
84
|
+
|
|
85
|
+
if not args.tests:
|
|
86
|
+
if not args.all:
|
|
87
|
+
sys.stderr.write("Specify -a to get all tests.\n")
|
|
88
|
+
return 1
|
|
89
|
+
args.tests = ["test"]
|
|
90
|
+
|
|
91
|
+
tests = []
|
|
92
|
+
for arg in args.tests:
|
|
93
|
+
if os.path.isdir(arg):
|
|
94
|
+
tests.extend(find_all_gyptest_files(os.path.normpath(arg)))
|
|
95
|
+
else:
|
|
96
|
+
if not is_test_name(os.path.basename(arg)):
|
|
97
|
+
print(arg, "is not a valid gyp test name.", file=sys.stderr)
|
|
98
|
+
sys.exit(1)
|
|
99
|
+
tests.append(arg)
|
|
100
|
+
|
|
101
|
+
if args.list:
|
|
102
|
+
for test in tests:
|
|
103
|
+
print(test)
|
|
104
|
+
sys.exit(0)
|
|
105
|
+
|
|
106
|
+
os.environ["PYTHONPATH"] = os.path.abspath("test/lib")
|
|
107
|
+
|
|
108
|
+
if args.verbose:
|
|
109
|
+
print_configuration_info()
|
|
110
|
+
|
|
111
|
+
if args.gyp_option and not args.quiet:
|
|
112
|
+
print("Extra Gyp options: %s\n" % args.gyp_option)
|
|
113
|
+
|
|
114
|
+
if args.format:
|
|
115
|
+
format_list = args.format.split(",")
|
|
116
|
+
else:
|
|
117
|
+
format_list = {
|
|
118
|
+
"aix5": ["make"],
|
|
119
|
+
"freebsd7": ["make"],
|
|
120
|
+
"freebsd8": ["make"],
|
|
121
|
+
"openbsd5": ["make"],
|
|
122
|
+
"cygwin": ["msvs"],
|
|
123
|
+
"win32": ["msvs", "ninja"],
|
|
124
|
+
"linux": ["make", "ninja"],
|
|
125
|
+
"linux2": ["make", "ninja"],
|
|
126
|
+
"linux3": ["make", "ninja"],
|
|
127
|
+
# TODO: Re-enable xcode-ninja.
|
|
128
|
+
# https://bugs.chromium.org/p/gyp/issues/detail?id=530
|
|
129
|
+
# 'darwin': ['make', 'ninja', 'xcode', 'xcode-ninja'],
|
|
130
|
+
"darwin": ["make", "ninja", "xcode"],
|
|
131
|
+
}[sys.platform]
|
|
132
|
+
|
|
133
|
+
gyp_options = []
|
|
134
|
+
for option in args.gyp_option:
|
|
135
|
+
gyp_options += ["-G", option]
|
|
136
|
+
|
|
137
|
+
runner = Runner(format_list, tests, gyp_options, args.verbose)
|
|
138
|
+
runner.run()
|
|
139
|
+
|
|
140
|
+
if not args.quiet:
|
|
141
|
+
runner.print_results()
|
|
142
|
+
|
|
143
|
+
return 1 if runner.failures else 0
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def print_configuration_info():
|
|
147
|
+
print("Test configuration:")
|
|
148
|
+
if sys.platform == "darwin":
|
|
149
|
+
sys.path.append(os.path.abspath("test/lib"))
|
|
150
|
+
import TestMac
|
|
151
|
+
|
|
152
|
+
print(f" Mac {platform.mac_ver()[0]} {platform.mac_ver()[2]}")
|
|
153
|
+
print(f" Xcode {TestMac.Xcode.Version()}")
|
|
154
|
+
elif sys.platform == "win32":
|
|
155
|
+
sys.path.append(os.path.abspath("pylib"))
|
|
156
|
+
import gyp.MSVSVersion
|
|
157
|
+
|
|
158
|
+
print(" Win %s %s\n" % platform.win32_ver()[0:2])
|
|
159
|
+
print(" MSVS %s" % gyp.MSVSVersion.SelectVisualStudioVersion().Description())
|
|
160
|
+
elif sys.platform in ("linux", "linux2"):
|
|
161
|
+
print(" Linux %s" % " ".join(platform.linux_distribution()))
|
|
162
|
+
print(f" Python {platform.python_version()}")
|
|
163
|
+
print(f" PYTHONPATH={os.environ['PYTHONPATH']}")
|
|
164
|
+
print()
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class Runner:
|
|
168
|
+
def __init__(self, formats, tests, gyp_options, verbose):
|
|
169
|
+
self.formats = formats
|
|
170
|
+
self.tests = tests
|
|
171
|
+
self.verbose = verbose
|
|
172
|
+
self.gyp_options = gyp_options
|
|
173
|
+
self.failures = []
|
|
174
|
+
self.num_tests = len(formats) * len(tests)
|
|
175
|
+
num_digits = len(str(self.num_tests))
|
|
176
|
+
self.fmt_str = "[%%%dd/%%%dd] (%%s) %%s" % (num_digits, num_digits)
|
|
177
|
+
self.isatty = sys.stdout.isatty() and not self.verbose
|
|
178
|
+
self.env = os.environ.copy()
|
|
179
|
+
self.hpos = 0
|
|
180
|
+
|
|
181
|
+
def run(self):
|
|
182
|
+
run_start = time.time()
|
|
183
|
+
|
|
184
|
+
i = 1
|
|
185
|
+
for fmt in self.formats:
|
|
186
|
+
for test in self.tests:
|
|
187
|
+
self.run_test(test, fmt, i)
|
|
188
|
+
i += 1
|
|
189
|
+
|
|
190
|
+
if self.isatty:
|
|
191
|
+
self.erase_current_line()
|
|
192
|
+
|
|
193
|
+
self.took = time.time() - run_start
|
|
194
|
+
|
|
195
|
+
def run_test(self, test, fmt, i):
|
|
196
|
+
if self.isatty:
|
|
197
|
+
self.erase_current_line()
|
|
198
|
+
|
|
199
|
+
msg = self.fmt_str % (i, self.num_tests, fmt, test)
|
|
200
|
+
self.print_(msg)
|
|
201
|
+
|
|
202
|
+
start = time.time()
|
|
203
|
+
cmd = [sys.executable, test] + self.gyp_options
|
|
204
|
+
self.env["TESTGYP_FORMAT"] = fmt
|
|
205
|
+
proc = subprocess.Popen(
|
|
206
|
+
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=self.env
|
|
207
|
+
)
|
|
208
|
+
proc.wait()
|
|
209
|
+
took = time.time() - start
|
|
210
|
+
|
|
211
|
+
stdout = proc.stdout.read().decode("utf8")
|
|
212
|
+
if proc.returncode == 2:
|
|
213
|
+
res = "skipped"
|
|
214
|
+
elif proc.returncode:
|
|
215
|
+
res = "failed"
|
|
216
|
+
self.failures.append(f"({test}) {fmt}")
|
|
217
|
+
else:
|
|
218
|
+
res = "passed"
|
|
219
|
+
res_msg = f" {res} {took:.3f}s"
|
|
220
|
+
self.print_(res_msg)
|
|
221
|
+
|
|
222
|
+
if stdout and not stdout.endswith(("PASSED\n", "NO RESULT\n")):
|
|
223
|
+
print()
|
|
224
|
+
print("\n".join(f" {line}" for line in stdout.splitlines()))
|
|
225
|
+
elif not self.isatty:
|
|
226
|
+
print()
|
|
227
|
+
|
|
228
|
+
def print_(self, msg):
|
|
229
|
+
print(msg, end="")
|
|
230
|
+
index = msg.rfind("\n")
|
|
231
|
+
if index == -1:
|
|
232
|
+
self.hpos += len(msg)
|
|
233
|
+
else:
|
|
234
|
+
self.hpos = len(msg) - index
|
|
235
|
+
sys.stdout.flush()
|
|
236
|
+
|
|
237
|
+
def erase_current_line(self):
|
|
238
|
+
print("\b" * self.hpos + " " * self.hpos + "\b" * self.hpos, end="")
|
|
239
|
+
sys.stdout.flush()
|
|
240
|
+
self.hpos = 0
|
|
241
|
+
|
|
242
|
+
def print_results(self):
|
|
243
|
+
num_failures = len(self.failures)
|
|
244
|
+
if num_failures:
|
|
245
|
+
print()
|
|
246
|
+
if num_failures == 1:
|
|
247
|
+
print("Failed the following test:")
|
|
248
|
+
else:
|
|
249
|
+
print("Failed the following %d tests:" % num_failures)
|
|
250
|
+
print("\t" + "\n\t".join(sorted(self.failures)))
|
|
251
|
+
print()
|
|
252
|
+
print(
|
|
253
|
+
"Ran %d tests in %.3fs, %d failed."
|
|
254
|
+
% (self.num_tests, self.took, num_failures)
|
|
255
|
+
)
|
|
256
|
+
print()
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
if __name__ == "__main__":
|
|
260
|
+
sys.exit(main())
|
package/gyp/tools/README
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
pretty_vcproj:
|
|
2
|
+
Usage: pretty_vcproj.py "c:\path\to\vcproj.vcproj" [key1=value1] [key2=value2]
|
|
3
|
+
|
|
4
|
+
They key/value pair are used to resolve vsprops name.
|
|
5
|
+
|
|
6
|
+
For example, if I want to diff the base.vcproj project:
|
|
7
|
+
|
|
8
|
+
pretty_vcproj.py z:\dev\src-chrome\src\base\build\base.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > original.txt
|
|
9
|
+
pretty_vcproj.py z:\dev\src-chrome\src\base\base_gyp.vcproj "$(SolutionDir)=z:\dev\src-chrome\src\chrome\\" "$(CHROMIUM_BUILD)=" "$(CHROME_BUILD_TYPE)=" > gyp.txt
|
|
10
|
+
|
|
11
|
+
And you can use your favorite diff tool to see the changes.
|
|
12
|
+
|
|
13
|
+
Note: In the case of base.vcproj, the original vcproj is one level up the generated one.
|
|
14
|
+
I suggest you do a search and replace for '"..\' and replace it with '"' in original.txt
|
|
15
|
+
before you perform the diff.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Specifications contains syntax formatters for Xcode 3. These do not appear to be supported yet on Xcode 4. To use these with Xcode 3 please install both the gyp.pbfilespec and gyp.xclangspec files in
|
|
2
|
+
|
|
3
|
+
~/Library/Application Support/Developer/Shared/Xcode/Specifications/
|
|
4
|
+
|
|
5
|
+
and restart Xcode.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
gyp.pbfilespec
|
|
3
|
+
GYP source file spec for Xcode 3
|
|
4
|
+
|
|
5
|
+
There is not much documentation available regarding the format
|
|
6
|
+
of .pbfilespec files. As a starting point, see for instance the
|
|
7
|
+
outdated documentation at:
|
|
8
|
+
http://maxao.free.fr/xcode-plugin-interface/specifications.html
|
|
9
|
+
and the files in:
|
|
10
|
+
/Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/
|
|
11
|
+
|
|
12
|
+
Place this file in directory:
|
|
13
|
+
~/Library/Application Support/Developer/Shared/Xcode/Specifications/
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
(
|
|
17
|
+
{
|
|
18
|
+
Identifier = sourcecode.gyp;
|
|
19
|
+
BasedOn = sourcecode;
|
|
20
|
+
Name = "GYP Files";
|
|
21
|
+
Extensions = ("gyp", "gypi");
|
|
22
|
+
MIMETypes = ("text/gyp");
|
|
23
|
+
Language = "xcode.lang.gyp";
|
|
24
|
+
IsTextFile = YES;
|
|
25
|
+
IsSourceFile = YES;
|
|
26
|
+
}
|
|
27
|
+
)
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2011 Google Inc. All rights reserved.
|
|
3
|
+
Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
found in the LICENSE file.
|
|
5
|
+
|
|
6
|
+
gyp.xclangspec
|
|
7
|
+
GYP language specification for Xcode 3
|
|
8
|
+
|
|
9
|
+
There is not much documentation available regarding the format
|
|
10
|
+
of .xclangspec files. As a starting point, see for instance the
|
|
11
|
+
outdated documentation at:
|
|
12
|
+
http://maxao.free.fr/xcode-plugin-interface/specifications.html
|
|
13
|
+
and the files in:
|
|
14
|
+
/Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/
|
|
15
|
+
|
|
16
|
+
Place this file in directory:
|
|
17
|
+
~/Library/Application Support/Developer/Shared/Xcode/Specifications/
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
(
|
|
21
|
+
|
|
22
|
+
{
|
|
23
|
+
Identifier = "xcode.lang.gyp.keyword";
|
|
24
|
+
Syntax = {
|
|
25
|
+
Words = (
|
|
26
|
+
"and",
|
|
27
|
+
"or",
|
|
28
|
+
"<!",
|
|
29
|
+
"<",
|
|
30
|
+
);
|
|
31
|
+
Type = "xcode.syntax.keyword";
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
{
|
|
36
|
+
Identifier = "xcode.lang.gyp.target.declarator";
|
|
37
|
+
Syntax = {
|
|
38
|
+
Words = (
|
|
39
|
+
"'target_name'",
|
|
40
|
+
);
|
|
41
|
+
Type = "xcode.syntax.identifier.type";
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
{
|
|
46
|
+
Identifier = "xcode.lang.gyp.string.singlequote";
|
|
47
|
+
Syntax = {
|
|
48
|
+
IncludeRules = (
|
|
49
|
+
"xcode.lang.string",
|
|
50
|
+
"xcode.lang.gyp.keyword",
|
|
51
|
+
"xcode.lang.number",
|
|
52
|
+
);
|
|
53
|
+
Start = "'";
|
|
54
|
+
End = "'";
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
{
|
|
59
|
+
Identifier = "xcode.lang.gyp.comma";
|
|
60
|
+
Syntax = {
|
|
61
|
+
Words = ( ",", );
|
|
62
|
+
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
{
|
|
67
|
+
Identifier = "xcode.lang.gyp";
|
|
68
|
+
Description = "GYP Coloring";
|
|
69
|
+
BasedOn = "xcode.lang.simpleColoring";
|
|
70
|
+
IncludeInMenu = YES;
|
|
71
|
+
Name = "GYP";
|
|
72
|
+
Syntax = {
|
|
73
|
+
Tokenizer = "xcode.lang.gyp.lexer.toplevel";
|
|
74
|
+
IncludeRules = (
|
|
75
|
+
"xcode.lang.gyp.dictionary",
|
|
76
|
+
);
|
|
77
|
+
Type = "xcode.syntax.plain";
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
// The following rule returns tokens to the other rules
|
|
82
|
+
{
|
|
83
|
+
Identifier = "xcode.lang.gyp.lexer";
|
|
84
|
+
Syntax = {
|
|
85
|
+
IncludeRules = (
|
|
86
|
+
"xcode.lang.gyp.comment",
|
|
87
|
+
"xcode.lang.string",
|
|
88
|
+
'xcode.lang.gyp.targetname.declarator',
|
|
89
|
+
"xcode.lang.gyp.string.singlequote",
|
|
90
|
+
"xcode.lang.number",
|
|
91
|
+
"xcode.lang.gyp.comma",
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
{
|
|
97
|
+
Identifier = "xcode.lang.gyp.lexer.toplevel";
|
|
98
|
+
Syntax = {
|
|
99
|
+
IncludeRules = (
|
|
100
|
+
"xcode.lang.gyp.comment",
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
{
|
|
106
|
+
Identifier = "xcode.lang.gyp.assignment";
|
|
107
|
+
Syntax = {
|
|
108
|
+
Tokenizer = "xcode.lang.gyp.lexer";
|
|
109
|
+
Rules = (
|
|
110
|
+
"xcode.lang.gyp.assignment.lhs",
|
|
111
|
+
":",
|
|
112
|
+
"xcode.lang.gyp.assignment.rhs",
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
{
|
|
119
|
+
Identifier = "xcode.lang.gyp.target.declaration";
|
|
120
|
+
Syntax = {
|
|
121
|
+
Tokenizer = "xcode.lang.gyp.lexer";
|
|
122
|
+
Rules = (
|
|
123
|
+
"xcode.lang.gyp.target.declarator",
|
|
124
|
+
":",
|
|
125
|
+
"xcode.lang.gyp.target.name",
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
{
|
|
131
|
+
Identifier = "xcode.lang.gyp.target.name";
|
|
132
|
+
Syntax = {
|
|
133
|
+
Tokenizer = "xcode.lang.gyp.lexer";
|
|
134
|
+
Rules = (
|
|
135
|
+
"xcode.lang.gyp.string.singlequote",
|
|
136
|
+
);
|
|
137
|
+
Type = "xcode.syntax.definition.function";
|
|
138
|
+
};
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
{
|
|
142
|
+
Identifier = "xcode.lang.gyp.assignment.lhs";
|
|
143
|
+
Syntax = {
|
|
144
|
+
Tokenizer = "xcode.lang.gyp.lexer";
|
|
145
|
+
Rules = (
|
|
146
|
+
"xcode.lang.gyp.string.singlequote",
|
|
147
|
+
);
|
|
148
|
+
Type = "xcode.syntax.identifier.type";
|
|
149
|
+
};
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
{
|
|
153
|
+
Identifier = "xcode.lang.gyp.assignment.rhs";
|
|
154
|
+
Syntax = {
|
|
155
|
+
Tokenizer = "xcode.lang.gyp.lexer";
|
|
156
|
+
Rules = (
|
|
157
|
+
"xcode.lang.gyp.string.singlequote?",
|
|
158
|
+
"xcode.lang.gyp.array?",
|
|
159
|
+
"xcode.lang.gyp.dictionary?",
|
|
160
|
+
"xcode.lang.number?",
|
|
161
|
+
);
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
{
|
|
166
|
+
Identifier = "xcode.lang.gyp.dictionary";
|
|
167
|
+
Syntax = {
|
|
168
|
+
Tokenizer = "xcode.lang.gyp.lexer";
|
|
169
|
+
Start = "{";
|
|
170
|
+
End = "}";
|
|
171
|
+
Foldable = YES;
|
|
172
|
+
Recursive = YES;
|
|
173
|
+
IncludeRules = (
|
|
174
|
+
"xcode.lang.gyp.target.declaration",
|
|
175
|
+
"xcode.lang.gyp.assignment",
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
{
|
|
181
|
+
Identifier = "xcode.lang.gyp.array";
|
|
182
|
+
Syntax = {
|
|
183
|
+
Tokenizer = "xcode.lang.gyp.lexer";
|
|
184
|
+
Start = "[";
|
|
185
|
+
End = "]";
|
|
186
|
+
Foldable = YES;
|
|
187
|
+
Recursive = YES;
|
|
188
|
+
IncludeRules = (
|
|
189
|
+
"xcode.lang.gyp.array",
|
|
190
|
+
"xcode.lang.gyp.dictionary",
|
|
191
|
+
"xcode.lang.gyp.string.singlequote",
|
|
192
|
+
);
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
|
|
196
|
+
{
|
|
197
|
+
Identifier = "xcode.lang.gyp.todo.mark";
|
|
198
|
+
Syntax = {
|
|
199
|
+
StartChars = "T";
|
|
200
|
+
Match = (
|
|
201
|
+
"^\(TODO\(.*\):[ \t]+.*\)$", // include "TODO: " in the markers list
|
|
202
|
+
);
|
|
203
|
+
// This is the order of captures. All of the match strings above need the same order.
|
|
204
|
+
CaptureTypes = (
|
|
205
|
+
"xcode.syntax.mark"
|
|
206
|
+
);
|
|
207
|
+
Type = "xcode.syntax.comment";
|
|
208
|
+
};
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
{
|
|
212
|
+
Identifier = "xcode.lang.gyp.comment";
|
|
213
|
+
BasedOn = "xcode.lang.comment"; // for text macros
|
|
214
|
+
Syntax = {
|
|
215
|
+
Start = "#";
|
|
216
|
+
End = "\n";
|
|
217
|
+
IncludeRules = (
|
|
218
|
+
"xcode.lang.url",
|
|
219
|
+
"xcode.lang.url.mail",
|
|
220
|
+
"xcode.lang.comment.mark",
|
|
221
|
+
"xcode.lang.gyp.todo.mark",
|
|
222
|
+
);
|
|
223
|
+
Type = "xcode.syntax.comment";
|
|
224
|
+
};
|
|
225
|
+
},
|
|
226
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
How to install gyp-mode for emacs:
|
|
2
|
+
|
|
3
|
+
Add the following to your ~/.emacs (replace ... with the path to your gyp
|
|
4
|
+
checkout).
|
|
5
|
+
|
|
6
|
+
(setq load-path (cons ".../tools/emacs" load-path))
|
|
7
|
+
(require 'gyp)
|
|
8
|
+
|
|
9
|
+
Restart emacs (or eval-region the added lines) and you should be all set.
|
|
10
|
+
|
|
11
|
+
Please note that ert is required for running the tests, which is included in
|
|
12
|
+
Emacs 24, or available separately from https://github.com/ohler/ert
|