fyn 1.1.45 → 2.0.0

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.
Files changed (75) hide show
  1. package/README.md +2 -2
  2. package/dist/fyn.js +135700 -89172
  3. package/dist/node_modules_f___cacache_20_0_1_cacache_node_modules_f___p-map_7_0_3_p-map_index_js +314 -0
  4. package/dist/node_modules_f___p-map_7_0_3_p-map_index_js +314 -0
  5. package/package.json +11 -11
  6. package/addon.gypi +0 -185
  7. package/bin/node-gyp.js +0 -3
  8. package/dist/Find-VisualStudio.cs +0 -250
  9. package/gyp/AUTHORS +0 -16
  10. package/gyp/LICENSE +0 -28
  11. package/gyp/data/win/large-pdb-shim.cc +0 -12
  12. package/gyp/gyp +0 -8
  13. package/gyp/gyp.bat +0 -5
  14. package/gyp/gyp_main.py +0 -45
  15. package/gyp/pylib/gyp/MSVSNew.py +0 -367
  16. package/gyp/pylib/gyp/MSVSProject.py +0 -206
  17. package/gyp/pylib/gyp/MSVSSettings.py +0 -1270
  18. package/gyp/pylib/gyp/MSVSSettings_test.py +0 -1547
  19. package/gyp/pylib/gyp/MSVSToolFile.py +0 -59
  20. package/gyp/pylib/gyp/MSVSUserFile.py +0 -153
  21. package/gyp/pylib/gyp/MSVSUtil.py +0 -271
  22. package/gyp/pylib/gyp/MSVSVersion.py +0 -574
  23. package/gyp/pylib/gyp/__init__.py +0 -666
  24. package/gyp/pylib/gyp/common.py +0 -654
  25. package/gyp/pylib/gyp/common_test.py +0 -78
  26. package/gyp/pylib/gyp/easy_xml.py +0 -165
  27. package/gyp/pylib/gyp/easy_xml_test.py +0 -109
  28. package/gyp/pylib/gyp/flock_tool.py +0 -55
  29. package/gyp/pylib/gyp/generator/__init__.py +0 -0
  30. package/gyp/pylib/gyp/generator/analyzer.py +0 -808
  31. package/gyp/pylib/gyp/generator/android.py +0 -1173
  32. package/gyp/pylib/gyp/generator/cmake.py +0 -1321
  33. package/gyp/pylib/gyp/generator/compile_commands_json.py +0 -120
  34. package/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -103
  35. package/gyp/pylib/gyp/generator/eclipse.py +0 -464
  36. package/gyp/pylib/gyp/generator/gypd.py +0 -89
  37. package/gyp/pylib/gyp/generator/gypsh.py +0 -58
  38. package/gyp/pylib/gyp/generator/make.py +0 -2518
  39. package/gyp/pylib/gyp/generator/msvs.py +0 -3978
  40. package/gyp/pylib/gyp/generator/msvs_test.py +0 -44
  41. package/gyp/pylib/gyp/generator/ninja.py +0 -2936
  42. package/gyp/pylib/gyp/generator/ninja_test.py +0 -55
  43. package/gyp/pylib/gyp/generator/xcode.py +0 -1394
  44. package/gyp/pylib/gyp/generator/xcode_test.py +0 -25
  45. package/gyp/pylib/gyp/input.py +0 -3137
  46. package/gyp/pylib/gyp/input_test.py +0 -98
  47. package/gyp/pylib/gyp/mac_tool.py +0 -771
  48. package/gyp/pylib/gyp/msvs_emulation.py +0 -1271
  49. package/gyp/pylib/gyp/ninja_syntax.py +0 -174
  50. package/gyp/pylib/gyp/simple_copy.py +0 -61
  51. package/gyp/pylib/gyp/win_tool.py +0 -374
  52. package/gyp/pylib/gyp/xcode_emulation.py +0 -1939
  53. package/gyp/pylib/gyp/xcode_ninja.py +0 -302
  54. package/gyp/pylib/gyp/xcodeproj_file.py +0 -3197
  55. package/gyp/pylib/gyp/xml_fix.py +0 -65
  56. package/gyp/requirements_dev.txt +0 -2
  57. package/gyp/setup.py +0 -42
  58. package/gyp/test_gyp.py +0 -260
  59. package/gyp/tools/README +0 -15
  60. package/gyp/tools/Xcode/README +0 -5
  61. package/gyp/tools/Xcode/Specifications/gyp.pbfilespec +0 -27
  62. package/gyp/tools/Xcode/Specifications/gyp.xclangspec +0 -226
  63. package/gyp/tools/emacs/README +0 -12
  64. package/gyp/tools/emacs/gyp-tests.el +0 -63
  65. package/gyp/tools/emacs/gyp.el +0 -275
  66. package/gyp/tools/emacs/run-unit-tests.sh +0 -7
  67. package/gyp/tools/emacs/testdata/media.gyp +0 -1105
  68. package/gyp/tools/emacs/testdata/media.gyp.fontified +0 -1107
  69. package/gyp/tools/graphviz.py +0 -102
  70. package/gyp/tools/pretty_gyp.py +0 -156
  71. package/gyp/tools/pretty_sln.py +0 -181
  72. package/gyp/tools/pretty_vcproj.py +0 -339
  73. package/node-gyp-bin/node-gyp +0 -6
  74. package/node-gyp-bin/node-gyp.cmd +0 -5
  75. package/src/win_delay_load_hook.cc +0 -39
@@ -1,339 +0,0 @@
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
- """Make the format of a vcproj really pretty.
8
-
9
- This script normalize and sort an xml. It also fetches all the properties
10
- inside linked vsprops and include them explicitly in the vcproj.
11
-
12
- It outputs the resulting xml to stdout.
13
- """
14
-
15
-
16
- import os
17
- import sys
18
-
19
- from xml.dom.minidom import parse
20
- from xml.dom.minidom import Node
21
-
22
- __author__ = "nsylvain (Nicolas Sylvain)"
23
- ARGUMENTS = None
24
- REPLACEMENTS = dict()
25
-
26
-
27
- def cmp(x, y):
28
- return (x > y) - (x < y)
29
-
30
-
31
- class CmpTuple:
32
- """Compare function between 2 tuple."""
33
-
34
- def __call__(self, x, y):
35
- return cmp(x[0], y[0])
36
-
37
-
38
- class CmpNode:
39
- """Compare function between 2 xml nodes."""
40
-
41
- def __call__(self, x, y):
42
- def get_string(node):
43
- node_string = "node"
44
- node_string += node.nodeName
45
- if node.nodeValue:
46
- node_string += node.nodeValue
47
-
48
- if node.attributes:
49
- # We first sort by name, if present.
50
- node_string += node.getAttribute("Name")
51
-
52
- all_nodes = []
53
- for (name, value) in node.attributes.items():
54
- all_nodes.append((name, value))
55
-
56
- all_nodes.sort(CmpTuple())
57
- for (name, value) in all_nodes:
58
- node_string += name
59
- node_string += value
60
-
61
- return node_string
62
-
63
- return cmp(get_string(x), get_string(y))
64
-
65
-
66
- def PrettyPrintNode(node, indent=0):
67
- if node.nodeType == Node.TEXT_NODE:
68
- if node.data.strip():
69
- print("{}{}".format(" " * indent, node.data.strip()))
70
- return
71
-
72
- if node.childNodes:
73
- node.normalize()
74
- # Get the number of attributes
75
- attr_count = 0
76
- if node.attributes:
77
- attr_count = node.attributes.length
78
-
79
- # Print the main tag
80
- if attr_count == 0:
81
- print("{}<{}>".format(" " * indent, node.nodeName))
82
- else:
83
- print("{}<{}".format(" " * indent, node.nodeName))
84
-
85
- all_attributes = []
86
- for (name, value) in node.attributes.items():
87
- all_attributes.append((name, value))
88
- all_attributes.sort(CmpTuple())
89
- for (name, value) in all_attributes:
90
- print('{} {}="{}"'.format(" " * indent, name, value))
91
- print("%s>" % (" " * indent))
92
- if node.nodeValue:
93
- print("{} {}".format(" " * indent, node.nodeValue))
94
-
95
- for sub_node in node.childNodes:
96
- PrettyPrintNode(sub_node, indent=indent + 2)
97
- print("{}</{}>".format(" " * indent, node.nodeName))
98
-
99
-
100
- def FlattenFilter(node):
101
- """Returns a list of all the node and sub nodes."""
102
- node_list = []
103
-
104
- if node.attributes and node.getAttribute("Name") == "_excluded_files":
105
- # We don't add the "_excluded_files" filter.
106
- return []
107
-
108
- for current in node.childNodes:
109
- if current.nodeName == "Filter":
110
- node_list.extend(FlattenFilter(current))
111
- else:
112
- node_list.append(current)
113
-
114
- return node_list
115
-
116
-
117
- def FixFilenames(filenames, current_directory):
118
- new_list = []
119
- for filename in filenames:
120
- if filename:
121
- for key in REPLACEMENTS:
122
- filename = filename.replace(key, REPLACEMENTS[key])
123
- os.chdir(current_directory)
124
- filename = filename.strip("\"' ")
125
- if filename.startswith("$"):
126
- new_list.append(filename)
127
- else:
128
- new_list.append(os.path.abspath(filename))
129
- return new_list
130
-
131
-
132
- def AbsoluteNode(node):
133
- """Makes all the properties we know about in this node absolute."""
134
- if node.attributes:
135
- for (name, value) in node.attributes.items():
136
- if name in [
137
- "InheritedPropertySheets",
138
- "RelativePath",
139
- "AdditionalIncludeDirectories",
140
- "IntermediateDirectory",
141
- "OutputDirectory",
142
- "AdditionalLibraryDirectories",
143
- ]:
144
- # We want to fix up these paths
145
- path_list = value.split(";")
146
- new_list = FixFilenames(path_list, os.path.dirname(ARGUMENTS[1]))
147
- node.setAttribute(name, ";".join(new_list))
148
- if not value:
149
- node.removeAttribute(name)
150
-
151
-
152
- def CleanupVcproj(node):
153
- """For each sub node, we call recursively this function."""
154
- for sub_node in node.childNodes:
155
- AbsoluteNode(sub_node)
156
- CleanupVcproj(sub_node)
157
-
158
- # Normalize the node, and remove all extraneous whitespaces.
159
- for sub_node in node.childNodes:
160
- if sub_node.nodeType == Node.TEXT_NODE:
161
- sub_node.data = sub_node.data.replace("\r", "")
162
- sub_node.data = sub_node.data.replace("\n", "")
163
- sub_node.data = sub_node.data.rstrip()
164
-
165
- # Fix all the semicolon separated attributes to be sorted, and we also
166
- # remove the dups.
167
- if node.attributes:
168
- for (name, value) in node.attributes.items():
169
- sorted_list = sorted(value.split(";"))
170
- unique_list = []
171
- for i in sorted_list:
172
- if not unique_list.count(i):
173
- unique_list.append(i)
174
- node.setAttribute(name, ";".join(unique_list))
175
- if not value:
176
- node.removeAttribute(name)
177
-
178
- if node.childNodes:
179
- node.normalize()
180
-
181
- # For each node, take a copy, and remove it from the list.
182
- node_array = []
183
- while node.childNodes and node.childNodes[0]:
184
- # Take a copy of the node and remove it from the list.
185
- current = node.childNodes[0]
186
- node.removeChild(current)
187
-
188
- # If the child is a filter, we want to append all its children
189
- # to this same list.
190
- if current.nodeName == "Filter":
191
- node_array.extend(FlattenFilter(current))
192
- else:
193
- node_array.append(current)
194
-
195
- # Sort the list.
196
- node_array.sort(CmpNode())
197
-
198
- # Insert the nodes in the correct order.
199
- for new_node in node_array:
200
- # But don't append empty tool node.
201
- if new_node.nodeName == "Tool":
202
- if new_node.attributes and new_node.attributes.length == 1:
203
- # This one was empty.
204
- continue
205
- if new_node.nodeName == "UserMacro":
206
- continue
207
- node.appendChild(new_node)
208
-
209
-
210
- def GetConfiguationNodes(vcproj):
211
- # TODO(nsylvain): Find a better way to navigate the xml.
212
- nodes = []
213
- for node in vcproj.childNodes:
214
- if node.nodeName == "Configurations":
215
- for sub_node in node.childNodes:
216
- if sub_node.nodeName == "Configuration":
217
- nodes.append(sub_node)
218
-
219
- return nodes
220
-
221
-
222
- def GetChildrenVsprops(filename):
223
- dom = parse(filename)
224
- if dom.documentElement.attributes:
225
- vsprops = dom.documentElement.getAttribute("InheritedPropertySheets")
226
- return FixFilenames(vsprops.split(";"), os.path.dirname(filename))
227
- return []
228
-
229
-
230
- def SeekToNode(node1, child2):
231
- # A text node does not have properties.
232
- if child2.nodeType == Node.TEXT_NODE:
233
- return None
234
-
235
- # Get the name of the current node.
236
- current_name = child2.getAttribute("Name")
237
- if not current_name:
238
- # There is no name. We don't know how to merge.
239
- return None
240
-
241
- # Look through all the nodes to find a match.
242
- for sub_node in node1.childNodes:
243
- if sub_node.nodeName == child2.nodeName:
244
- name = sub_node.getAttribute("Name")
245
- if name == current_name:
246
- return sub_node
247
-
248
- # No match. We give up.
249
- return None
250
-
251
-
252
- def MergeAttributes(node1, node2):
253
- # No attributes to merge?
254
- if not node2.attributes:
255
- return
256
-
257
- for (name, value2) in node2.attributes.items():
258
- # Don't merge the 'Name' attribute.
259
- if name == "Name":
260
- continue
261
- value1 = node1.getAttribute(name)
262
- if value1:
263
- # The attribute exist in the main node. If it's equal, we leave it
264
- # untouched, otherwise we concatenate it.
265
- if value1 != value2:
266
- node1.setAttribute(name, ";".join([value1, value2]))
267
- else:
268
- # The attribute does not exist in the main node. We append this one.
269
- node1.setAttribute(name, value2)
270
-
271
- # If the attribute was a property sheet attributes, we remove it, since
272
- # they are useless.
273
- if name == "InheritedPropertySheets":
274
- node1.removeAttribute(name)
275
-
276
-
277
- def MergeProperties(node1, node2):
278
- MergeAttributes(node1, node2)
279
- for child2 in node2.childNodes:
280
- child1 = SeekToNode(node1, child2)
281
- if child1:
282
- MergeProperties(child1, child2)
283
- else:
284
- node1.appendChild(child2.cloneNode(True))
285
-
286
-
287
- def main(argv):
288
- """Main function of this vcproj prettifier."""
289
- global ARGUMENTS
290
- ARGUMENTS = argv
291
-
292
- # check if we have exactly 1 parameter.
293
- if len(argv) < 2:
294
- print(
295
- 'Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] '
296
- "[key2=value2]" % argv[0]
297
- )
298
- return 1
299
-
300
- # Parse the keys
301
- for i in range(2, len(argv)):
302
- (key, value) = argv[i].split("=")
303
- REPLACEMENTS[key] = value
304
-
305
- # Open the vcproj and parse the xml.
306
- dom = parse(argv[1])
307
-
308
- # First thing we need to do is find the Configuration Node and merge them
309
- # with the vsprops they include.
310
- for configuration_node in GetConfiguationNodes(dom.documentElement):
311
- # Get the property sheets associated with this configuration.
312
- vsprops = configuration_node.getAttribute("InheritedPropertySheets")
313
-
314
- # Fix the filenames to be absolute.
315
- vsprops_list = FixFilenames(
316
- vsprops.strip().split(";"), os.path.dirname(argv[1])
317
- )
318
-
319
- # Extend the list of vsprops with all vsprops contained in the current
320
- # vsprops.
321
- for current_vsprops in vsprops_list:
322
- vsprops_list.extend(GetChildrenVsprops(current_vsprops))
323
-
324
- # Now that we have all the vsprops, we need to merge them.
325
- for current_vsprops in vsprops_list:
326
- MergeProperties(configuration_node, parse(current_vsprops).documentElement)
327
-
328
- # Now that everything is merged, we need to cleanup the xml.
329
- CleanupVcproj(dom.documentElement)
330
-
331
- # Finally, we use the prett xml function to print the vcproj back to the
332
- # user.
333
- # print dom.toprettyxml(newl="\n")
334
- PrettyPrintNode(dom.documentElement)
335
- return 0
336
-
337
-
338
- if __name__ == "__main__":
339
- sys.exit(main(sys.argv))
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env sh
2
- if [ "x$npm_config_node_gyp" = "x" ]; then
3
- node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@"
4
- else
5
- "$npm_config_node_gyp" "$@"
6
- fi
@@ -1,5 +0,0 @@
1
- if not defined npm_config_node_gyp (
2
- node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %*
3
- ) else (
4
- node "%npm_config_node_gyp%" %*
5
- )
@@ -1,39 +0,0 @@
1
- /*
2
- * When this file is linked to a DLL, it sets up a delay-load hook that
3
- * intervenes when the DLL is trying to load the host executable
4
- * dynamically. Instead of trying to locate the .exe file it'll just
5
- * return a handle to the process image.
6
- *
7
- * This allows compiled addons to work when the host executable is renamed.
8
- */
9
-
10
- #ifdef _MSC_VER
11
-
12
- #pragma managed(push, off)
13
-
14
- #ifndef WIN32_LEAN_AND_MEAN
15
- #define WIN32_LEAN_AND_MEAN
16
- #endif
17
-
18
- #include <windows.h>
19
-
20
- #include <delayimp.h>
21
- #include <string.h>
22
-
23
- static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
24
- HMODULE m;
25
- if (event != dliNotePreLoadLibrary)
26
- return NULL;
27
-
28
- if (_stricmp(info->szDll, HOST_BINARY) != 0)
29
- return NULL;
30
-
31
- m = GetModuleHandle(NULL);
32
- return (FARPROC) m;
33
- }
34
-
35
- decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = load_exe_hook;
36
-
37
- #pragma managed(pop)
38
-
39
- #endif