MCPcopy Create free account
hub / github.com/nodejs/node / VisualStudioVersion

Class VisualStudioVersion

tools/gyp/pylib/gyp/MSVSVersion.py:19–159  ·  view source on GitHub ↗

Information regarding a version of Visual Studio.

Source from the content-addressed store, hash-verified

17
18
19class VisualStudioVersion:
20 """Information regarding a version of Visual Studio."""
21
22 def __init__(
23 self,
24 short_name,
25 description,
26 solution_version,
27 project_version,
28 flat_sln,
29 uses_vcxproj,
30 path,
31 sdk_based,
32 default_toolset=None,
33 compatible_sdks=None,
34 ):
35 self.short_name = short_name
36 self.description = description
37 self.solution_version = solution_version
38 self.project_version = project_version
39 self.flat_sln = flat_sln
40 self.uses_vcxproj = uses_vcxproj
41 self.path = path
42 self.sdk_based = sdk_based
43 self.default_toolset = default_toolset
44 compatible_sdks = compatible_sdks or []
45 compatible_sdks.sort(key=lambda v: float(v.replace("v", "")), reverse=True)
46 self.compatible_sdks = compatible_sdks
47
48 def ShortName(self):
49 return self.short_name
50
51 def Description(self):
52 """Get the full description of the version."""
53 return self.description
54
55 def SolutionVersion(self):
56 """Get the version number of the sln files."""
57 return self.solution_version
58
59 def ProjectVersion(self):
60 """Get the version number of the vcproj or vcxproj files."""
61 return self.project_version
62
63 def FlatSolution(self):
64 return self.flat_sln
65
66 def UsesVcxproj(self):
67 """Returns true if this version uses a vcxproj file."""
68 return self.uses_vcxproj
69
70 def ProjectExtension(self):
71 """Returns the file extension for the project."""
72 return (self.uses_vcxproj and ".vcxproj") or ".vcproj"
73
74 def Path(self):
75 """Returns the path to Visual Studio installation."""
76 return self.path

Callers 1

_CreateVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected