lounge_lizard 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Guardfile +33 -0
- data/LICENSE.txt +21 -0
- data/README.md +50 -0
- data/Rakefile +43 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/circle.yml +14 -0
- data/ext/drafter/CHANGELOG.md +278 -0
- data/ext/drafter/Dockerfile +17 -0
- data/ext/drafter/Makefile +62 -0
- data/ext/drafter/appveyor.yml +17 -0
- data/ext/drafter/bin/drafter +0 -0
- data/ext/drafter/build/Makefile +387 -0
- data/ext/drafter/build/drafter.Makefile +6 -0
- data/ext/drafter/build/drafter.target.mk +159 -0
- data/ext/drafter/build/ext/snowcrash/libmarkdownparser.target.mk +141 -0
- data/ext/drafter/build/ext/snowcrash/libsnowcrash.target.mk +154 -0
- data/ext/drafter/build/ext/snowcrash/libsundown.target.mk +149 -0
- data/ext/drafter/build/ext/snowcrash/perf-libsnowcrash.target.mk +147 -0
- data/ext/drafter/build/ext/snowcrash/snowcrash.Makefile +6 -0
- data/ext/drafter/build/gyp-mac-tool +606 -0
- data/ext/drafter/build/libdrafter.target.mk +186 -0
- data/ext/drafter/build/libsos.target.mk +137 -0
- data/ext/drafter/build/out/Release/drafter +0 -0
- data/ext/drafter/build/out/Release/libdrafter.dylib +0 -0
- data/ext/drafter/build/out/Release/libmarkdownparser.a +0 -0
- data/ext/drafter/build/out/Release/libsnowcrash.a +0 -0
- data/ext/drafter/build/out/Release/libsos.a +0 -0
- data/ext/drafter/build/out/Release/libsundown.a +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/config.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/main.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/drafter/src/reporting.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/ConversionContext.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/NamedTypesRegistry.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractAPI.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractDataStructure.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractElementFactory.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractSourceMap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Render.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Serialize.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeAST.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeResult.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter_private.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/ComparableVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Element.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/ExpandVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/IsExpandableVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/JSONSchemaVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/PrintVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Query.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Registry.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/RenderJSONVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/SerializeCompactVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/SerializeVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/TypeQueryVisitor.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/VisitorUtils.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Blueprint.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/BlueprintSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HTTP.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HeadersParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSON.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONOneOfParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONSourcemap.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONTypeSectionParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONValueMemberParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Section.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Signature.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/UriTemplateParser.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/posix/RegexMatch.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/snowcrash.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsos/ext/sos/src/sos.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.o +0 -0
- data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.o +0 -0
- data/ext/drafter/circle.yml +32 -0
- data/ext/drafter/config.gypi +10 -0
- data/ext/drafter/config.mk +5 -0
- data/ext/drafter/configure +224 -0
- data/ext/drafter/drafter.gyp +189 -0
- data/ext/drafter/drafter.xcworkspace/contents.xcworkspacedata +13 -0
- data/ext/drafter/ext/snowcrash/Makefile +58 -0
- data/ext/drafter/ext/snowcrash/appveyor.yml +7 -0
- data/ext/drafter/ext/snowcrash/common.gypi +165 -0
- data/ext/drafter/ext/snowcrash/configure +197 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/Makefile +90 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/CONTRIBUTING.md +10 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/Makefile +84 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/Makefile.win +33 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/examples/smartypants.c +72 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/examples/sundown.c +80 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini.h +37 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.c +108 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.c +84 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.c +647 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.h +77 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.c +389 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html_block_names.txt +25 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.c +297 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.h +51 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.c +225 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.h +96 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/html_blocks.h +206 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.c +2726 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.h +147 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.c +204 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.h +58 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.c +81 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.h +29 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/sundown.def +20 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/markdown/markdown.vcproj +188 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/msvc.sln +38 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/sundown/sundown.vcproj +206 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.cc +160 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.h +90 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.cc +152 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.h +103 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.cc +388 -0
- data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.h +106 -0
- data/ext/drafter/ext/snowcrash/snowcrash.gyp +196 -0
- data/ext/drafter/ext/snowcrash/src/ActionParser.h +560 -0
- data/ext/drafter/ext/snowcrash/src/AssetParser.h +123 -0
- data/ext/drafter/ext/snowcrash/src/AttributesParser.h +123 -0
- data/ext/drafter/ext/snowcrash/src/Blueprint.cc +90 -0
- data/ext/drafter/ext/snowcrash/src/Blueprint.h +489 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintParser.h +845 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc +81 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.h +345 -0
- data/ext/drafter/ext/snowcrash/src/BlueprintUtility.h +111 -0
- data/ext/drafter/ext/snowcrash/src/CodeBlockUtility.h +276 -0
- data/ext/drafter/ext/snowcrash/src/DataStructureGroupParser.h +157 -0
- data/ext/drafter/ext/snowcrash/src/HTTP.cc +49 -0
- data/ext/drafter/ext/snowcrash/src/HTTP.h +108 -0
- data/ext/drafter/ext/snowcrash/src/HeadersParser.cc +117 -0
- data/ext/drafter/ext/snowcrash/src/HeadersParser.h +377 -0
- data/ext/drafter/ext/snowcrash/src/MSON.cc +272 -0
- data/ext/drafter/ext/snowcrash/src/MSON.h +405 -0
- data/ext/drafter/ext/snowcrash/src/MSONMixinParser.h +103 -0
- data/ext/drafter/ext/snowcrash/src/MSONNamedTypeParser.h +135 -0
- data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.cc +132 -0
- data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.h +80 -0
- data/ext/drafter/ext/snowcrash/src/MSONParameterParser.h +166 -0
- data/ext/drafter/ext/snowcrash/src/MSONPropertyMemberParser.h +106 -0
- data/ext/drafter/ext/snowcrash/src/MSONSourcemap.cc +141 -0
- data/ext/drafter/ext/snowcrash/src/MSONSourcemap.h +181 -0
- data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.cc +209 -0
- data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.h +213 -0
- data/ext/drafter/ext/snowcrash/src/MSONUtility.h +506 -0
- data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.cc +214 -0
- data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.h +390 -0
- data/ext/drafter/ext/snowcrash/src/ModelTable.h +87 -0
- data/ext/drafter/ext/snowcrash/src/ParameterParser.h +516 -0
- data/ext/drafter/ext/snowcrash/src/ParametersParser.h +222 -0
- data/ext/drafter/ext/snowcrash/src/PayloadParser.h +733 -0
- data/ext/drafter/ext/snowcrash/src/Platform.h +33 -0
- data/ext/drafter/ext/snowcrash/src/RegexMatch.h +32 -0
- data/ext/drafter/ext/snowcrash/src/RelationParser.h +87 -0
- data/ext/drafter/ext/snowcrash/src/ResourceGroupParser.h +297 -0
- data/ext/drafter/ext/snowcrash/src/ResourceParser.h +536 -0
- data/ext/drafter/ext/snowcrash/src/Section.cc +48 -0
- data/ext/drafter/ext/snowcrash/src/Section.h +60 -0
- data/ext/drafter/ext/snowcrash/src/SectionParser.h +246 -0
- data/ext/drafter/ext/snowcrash/src/SectionParserData.h +109 -0
- data/ext/drafter/ext/snowcrash/src/SectionProcessor.h +299 -0
- data/ext/drafter/ext/snowcrash/src/Signature.cc +75 -0
- data/ext/drafter/ext/snowcrash/src/Signature.h +103 -0
- data/ext/drafter/ext/snowcrash/src/SignatureSectionProcessor.h +442 -0
- data/ext/drafter/ext/snowcrash/src/SourceAnnotation.h +166 -0
- data/ext/drafter/ext/snowcrash/src/StringUtility.h +323 -0
- data/ext/drafter/ext/snowcrash/src/UriTemplateParser.cc +195 -0
- data/ext/drafter/ext/snowcrash/src/UriTemplateParser.h +240 -0
- data/ext/drafter/ext/snowcrash/src/ValuesParser.h +111 -0
- data/ext/drafter/ext/snowcrash/src/posix/RegexMatch.cc +99 -0
- data/ext/drafter/ext/snowcrash/src/snowcrash.cc +90 -0
- data/ext/drafter/ext/snowcrash/src/snowcrash.h +44 -0
- data/ext/drafter/ext/snowcrash/src/win/RegexMatch.cc +78 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/AUTHORS +12 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/DEPS +23 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/OWNERS +1 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/PRESUBMIT.py +137 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/buildbot_run.py +136 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/commit_queue/OWNERS +6 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/commit_queue/cq_config.json +15 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/codereview.settings +10 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/data/win/large-pdb-shim.cc +12 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/gyp +8 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/gyp.bat +5 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/gyp_main.py +16 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSNew.py +340 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSProject.py +208 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSSettings.py +1096 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSToolFile.py +58 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUserFile.py +147 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.py +270 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.py +445 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/__init__.py +548 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/__init__.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.py +608 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/easy_xml.py +157 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/flock_tool.py +54 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.py +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/analyzer.py +741 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/android.py +1069 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/cmake.py +1248 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/dump_dependency_json.py +99 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/eclipse.py +425 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypd.py +94 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypsh.py +56 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.py +2218 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/msvs.py +3467 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.py +2427 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.py +1300 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/input.py +2899 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/input.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/mac_tool.py +605 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.py +1093 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.py +160 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ordered_dict.py +289 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/simple_copy.py +46 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/simple_copy.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/win_tool.py +314 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.py +1664 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_ninja.py +276 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_ninja.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.py +2927 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xml_fix.py +69 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/pylintrc +307 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/samples/samples +81 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/samples/samples.bat +5 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/setup.py +19 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/emacs/gyp.el +275 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/graphviz.py +100 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_gyp.py +155 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_sln.py +169 -0
- data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_vcproj.py +329 -0
- data/ext/drafter/ext/snowcrash/vcbuild.bat +139 -0
- data/ext/drafter/ext/sos/Makefile +62 -0
- data/ext/drafter/ext/sos/src/sos.cc +235 -0
- data/ext/drafter/ext/sos/src/sos.h +188 -0
- data/ext/drafter/ext/sos/src/sosJSON.h +121 -0
- data/ext/drafter/ext/sos/src/sosYAML.h +105 -0
- data/ext/drafter/src/ConversionContext.cc +39 -0
- data/ext/drafter/src/ConversionContext.h +34 -0
- data/ext/drafter/src/NamedTypesRegistry.cc +405 -0
- data/ext/drafter/src/NamedTypesRegistry.h +28 -0
- data/ext/drafter/src/NodeInfo.h +143 -0
- data/ext/drafter/src/RefractAPI.cc +579 -0
- data/ext/drafter/src/RefractAPI.h +28 -0
- data/ext/drafter/src/RefractDataStructure.cc +1199 -0
- data/ext/drafter/src/RefractDataStructure.h +26 -0
- data/ext/drafter/src/RefractElementFactory.cc +107 -0
- data/ext/drafter/src/RefractElementFactory.h +67 -0
- data/ext/drafter/src/RefractSourceMap.cc +29 -0
- data/ext/drafter/src/RefractSourceMap.h +57 -0
- data/ext/drafter/src/Render.cc +157 -0
- data/ext/drafter/src/Render.h +40 -0
- data/ext/drafter/src/Serialize.cc +160 -0
- data/ext/drafter/src/Serialize.h +289 -0
- data/ext/drafter/src/SerializeAST.cc +507 -0
- data/ext/drafter/src/SerializeAST.h +29 -0
- data/ext/drafter/src/SerializeResult.cc +170 -0
- data/ext/drafter/src/SerializeResult.h +34 -0
- data/ext/drafter/src/SerializeSourcemap.cc +331 -0
- data/ext/drafter/src/SerializeSourcemap.h +21 -0
- data/ext/drafter/src/Version.h +40 -0
- data/ext/drafter/src/config.cc +91 -0
- data/ext/drafter/src/config.h +38 -0
- data/ext/drafter/src/drafter.cc +137 -0
- data/ext/drafter/src/drafter.h +102 -0
- data/ext/drafter/src/drafter_private.cc +85 -0
- data/ext/drafter/src/drafter_private.h +34 -0
- data/ext/drafter/src/main.cc +137 -0
- data/ext/drafter/src/refract/AppendDecorator.h +58 -0
- data/ext/drafter/src/refract/Build.h +67 -0
- data/ext/drafter/src/refract/ComparableVisitor.cc +43 -0
- data/ext/drafter/src/refract/ComparableVisitor.h +62 -0
- data/ext/drafter/src/refract/Element.cc +409 -0
- data/ext/drafter/src/refract/Element.h +656 -0
- data/ext/drafter/src/refract/ElementFwd.h +37 -0
- data/ext/drafter/src/refract/ElementInserter.h +59 -0
- data/ext/drafter/src/refract/Exception.h +31 -0
- data/ext/drafter/src/refract/ExpandVisitor.cc +359 -0
- data/ext/drafter/src/refract/ExpandVisitor.h +58 -0
- data/ext/drafter/src/refract/FilterVisitor.h +52 -0
- data/ext/drafter/src/refract/IsExpandableVisitor.cc +140 -0
- data/ext/drafter/src/refract/IsExpandableVisitor.h +31 -0
- data/ext/drafter/src/refract/Iterate.h +160 -0
- data/ext/drafter/src/refract/JSONSchemaVisitor.cc +675 -0
- data/ext/drafter/src/refract/JSONSchemaVisitor.h +73 -0
- data/ext/drafter/src/refract/PrintVisitor.cc +164 -0
- data/ext/drafter/src/refract/PrintVisitor.h +50 -0
- data/ext/drafter/src/refract/Query.cc +13 -0
- data/ext/drafter/src/refract/Query.h +38 -0
- data/ext/drafter/src/refract/Registry.cc +114 -0
- data/ext/drafter/src/refract/Registry.h +43 -0
- data/ext/drafter/src/refract/RenderJSONVisitor.cc +255 -0
- data/ext/drafter/src/refract/RenderJSONVisitor.h +51 -0
- data/ext/drafter/src/refract/SerializeCompactVisitor.cc +167 -0
- data/ext/drafter/src/refract/SerializeCompactVisitor.h +56 -0
- data/ext/drafter/src/refract/SerializeVisitor.cc +214 -0
- data/ext/drafter/src/refract/SerializeVisitor.h +55 -0
- data/ext/drafter/src/refract/TypeQueryVisitor.cc +46 -0
- data/ext/drafter/src/refract/TypeQueryVisitor.h +110 -0
- data/ext/drafter/src/refract/Visitor.h +126 -0
- data/ext/drafter/src/refract/VisitorUtils.cc +63 -0
- data/ext/drafter/src/refract/VisitorUtils.h +231 -0
- data/ext/drafter/src/reporting.cc +263 -0
- data/ext/drafter/src/reporting.h +39 -0
- data/ext/drafter/src/stream.h +148 -0
- data/ext/drafter/tools/homebrew/drafter.rb +18 -0
- data/ext/drafter/tools/make-tarball.sh +39 -0
- data/ext/drafter/tools/refract-filter.py +96 -0
- data/ext/drafter/tools/release.sh +17 -0
- data/ext/drafter/vcbuild.bat +203 -0
- data/lib/lounge_lizard/binding.rb +29 -0
- data/lib/lounge_lizard/version.rb +3 -0
- data/lib/lounge_lizard.rb +18 -0
- data/lounge_lizard.gemspec +37 -0
- metadata +547 -0
@@ -0,0 +1,445 @@
|
|
1
|
+
# Copyright (c) 2013 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
|
+
"""Handle version information related to Visual Stuio."""
|
6
|
+
|
7
|
+
import errno
|
8
|
+
import os
|
9
|
+
import re
|
10
|
+
import subprocess
|
11
|
+
import sys
|
12
|
+
import gyp
|
13
|
+
import glob
|
14
|
+
|
15
|
+
|
16
|
+
class VisualStudioVersion(object):
|
17
|
+
"""Information regarding a version of Visual Studio."""
|
18
|
+
|
19
|
+
def __init__(self, short_name, description,
|
20
|
+
solution_version, project_version, flat_sln, uses_vcxproj,
|
21
|
+
path, sdk_based, default_toolset=None):
|
22
|
+
self.short_name = short_name
|
23
|
+
self.description = description
|
24
|
+
self.solution_version = solution_version
|
25
|
+
self.project_version = project_version
|
26
|
+
self.flat_sln = flat_sln
|
27
|
+
self.uses_vcxproj = uses_vcxproj
|
28
|
+
self.path = path
|
29
|
+
self.sdk_based = sdk_based
|
30
|
+
self.default_toolset = default_toolset
|
31
|
+
|
32
|
+
def ShortName(self):
|
33
|
+
return self.short_name
|
34
|
+
|
35
|
+
def Description(self):
|
36
|
+
"""Get the full description of the version."""
|
37
|
+
return self.description
|
38
|
+
|
39
|
+
def SolutionVersion(self):
|
40
|
+
"""Get the version number of the sln files."""
|
41
|
+
return self.solution_version
|
42
|
+
|
43
|
+
def ProjectVersion(self):
|
44
|
+
"""Get the version number of the vcproj or vcxproj files."""
|
45
|
+
return self.project_version
|
46
|
+
|
47
|
+
def FlatSolution(self):
|
48
|
+
return self.flat_sln
|
49
|
+
|
50
|
+
def UsesVcxproj(self):
|
51
|
+
"""Returns true if this version uses a vcxproj file."""
|
52
|
+
return self.uses_vcxproj
|
53
|
+
|
54
|
+
def ProjectExtension(self):
|
55
|
+
"""Returns the file extension for the project."""
|
56
|
+
return self.uses_vcxproj and '.vcxproj' or '.vcproj'
|
57
|
+
|
58
|
+
def Path(self):
|
59
|
+
"""Returns the path to Visual Studio installation."""
|
60
|
+
return self.path
|
61
|
+
|
62
|
+
def ToolPath(self, tool):
|
63
|
+
"""Returns the path to a given compiler tool. """
|
64
|
+
return os.path.normpath(os.path.join(self.path, "VC/bin", tool))
|
65
|
+
|
66
|
+
def DefaultToolset(self):
|
67
|
+
"""Returns the msbuild toolset version that will be used in the absence
|
68
|
+
of a user override."""
|
69
|
+
return self.default_toolset
|
70
|
+
|
71
|
+
def SetupScript(self, target_arch):
|
72
|
+
"""Returns a command (with arguments) to be used to set up the
|
73
|
+
environment."""
|
74
|
+
# If WindowsSDKDir is set and SetEnv.Cmd exists then we are using the
|
75
|
+
# depot_tools build tools and should run SetEnv.Cmd to set up the
|
76
|
+
# environment. The check for WindowsSDKDir alone is not sufficient because
|
77
|
+
# this is set by running vcvarsall.bat.
|
78
|
+
assert target_arch in ('x86', 'x64')
|
79
|
+
sdk_dir = os.environ.get('WindowsSDKDir')
|
80
|
+
if sdk_dir:
|
81
|
+
setup_path = os.path.normpath(os.path.join(sdk_dir, 'Bin/SetEnv.Cmd'))
|
82
|
+
if self.sdk_based and sdk_dir and os.path.exists(setup_path):
|
83
|
+
return [setup_path, '/' + target_arch]
|
84
|
+
else:
|
85
|
+
# We don't use VC/vcvarsall.bat for x86 because vcvarsall calls
|
86
|
+
# vcvars32, which it can only find if VS??COMNTOOLS is set, which it
|
87
|
+
# isn't always.
|
88
|
+
if target_arch == 'x86':
|
89
|
+
if self.short_name >= '2013' and self.short_name[-1] != 'e' and (
|
90
|
+
os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or
|
91
|
+
os.environ.get('PROCESSOR_ARCHITEW6432') == 'AMD64'):
|
92
|
+
# VS2013 and later, non-Express have a x64-x86 cross that we want
|
93
|
+
# to prefer.
|
94
|
+
return [os.path.normpath(
|
95
|
+
os.path.join(self.path, 'VC/vcvarsall.bat')), 'amd64_x86']
|
96
|
+
# Otherwise, the standard x86 compiler.
|
97
|
+
return [os.path.normpath(
|
98
|
+
os.path.join(self.path, 'Common7/Tools/vsvars32.bat'))]
|
99
|
+
else:
|
100
|
+
assert target_arch == 'x64'
|
101
|
+
arg = 'x86_amd64'
|
102
|
+
# Use the 64-on-64 compiler if we're not using an express
|
103
|
+
# edition and we're running on a 64bit OS.
|
104
|
+
if self.short_name[-1] != 'e' and (
|
105
|
+
os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or
|
106
|
+
os.environ.get('PROCESSOR_ARCHITEW6432') == 'AMD64'):
|
107
|
+
arg = 'amd64'
|
108
|
+
return [os.path.normpath(
|
109
|
+
os.path.join(self.path, 'VC/vcvarsall.bat')), arg]
|
110
|
+
|
111
|
+
|
112
|
+
def _RegistryQueryBase(sysdir, key, value):
|
113
|
+
"""Use reg.exe to read a particular key.
|
114
|
+
|
115
|
+
While ideally we might use the win32 module, we would like gyp to be
|
116
|
+
python neutral, so for instance cygwin python lacks this module.
|
117
|
+
|
118
|
+
Arguments:
|
119
|
+
sysdir: The system subdirectory to attempt to launch reg.exe from.
|
120
|
+
key: The registry key to read from.
|
121
|
+
value: The particular value to read.
|
122
|
+
Return:
|
123
|
+
stdout from reg.exe, or None for failure.
|
124
|
+
"""
|
125
|
+
# Skip if not on Windows or Python Win32 setup issue
|
126
|
+
if sys.platform not in ('win32', 'cygwin'):
|
127
|
+
return None
|
128
|
+
# Setup params to pass to and attempt to launch reg.exe
|
129
|
+
cmd = [os.path.join(os.environ.get('WINDIR', ''), sysdir, 'reg.exe'),
|
130
|
+
'query', key]
|
131
|
+
if value:
|
132
|
+
cmd.extend(['/v', value])
|
133
|
+
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
134
|
+
# Obtain the stdout from reg.exe, reading to the end so p.returncode is valid
|
135
|
+
# Note that the error text may be in [1] in some cases
|
136
|
+
text = p.communicate()[0]
|
137
|
+
# Check return code from reg.exe; officially 0==success and 1==error
|
138
|
+
if p.returncode:
|
139
|
+
return None
|
140
|
+
return text
|
141
|
+
|
142
|
+
|
143
|
+
def _RegistryQuery(key, value=None):
|
144
|
+
r"""Use reg.exe to read a particular key through _RegistryQueryBase.
|
145
|
+
|
146
|
+
First tries to launch from %WinDir%\Sysnative to avoid WoW64 redirection. If
|
147
|
+
that fails, it falls back to System32. Sysnative is available on Vista and
|
148
|
+
up and available on Windows Server 2003 and XP through KB patch 942589. Note
|
149
|
+
that Sysnative will always fail if using 64-bit python due to it being a
|
150
|
+
virtual directory and System32 will work correctly in the first place.
|
151
|
+
|
152
|
+
KB 942589 - http://support.microsoft.com/kb/942589/en-us.
|
153
|
+
|
154
|
+
Arguments:
|
155
|
+
key: The registry key.
|
156
|
+
value: The particular registry value to read (optional).
|
157
|
+
Return:
|
158
|
+
stdout from reg.exe, or None for failure.
|
159
|
+
"""
|
160
|
+
text = None
|
161
|
+
try:
|
162
|
+
text = _RegistryQueryBase('Sysnative', key, value)
|
163
|
+
except OSError, e:
|
164
|
+
if e.errno == errno.ENOENT:
|
165
|
+
text = _RegistryQueryBase('System32', key, value)
|
166
|
+
else:
|
167
|
+
raise
|
168
|
+
return text
|
169
|
+
|
170
|
+
|
171
|
+
def _RegistryGetValueUsingWinReg(key, value):
|
172
|
+
"""Use the _winreg module to obtain the value of a registry key.
|
173
|
+
|
174
|
+
Args:
|
175
|
+
key: The registry key.
|
176
|
+
value: The particular registry value to read.
|
177
|
+
Return:
|
178
|
+
contents of the registry key's value, or None on failure. Throws
|
179
|
+
ImportError if _winreg is unavailable.
|
180
|
+
"""
|
181
|
+
import _winreg
|
182
|
+
try:
|
183
|
+
root, subkey = key.split('\\', 1)
|
184
|
+
assert root == 'HKLM' # Only need HKLM for now.
|
185
|
+
with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, subkey) as hkey:
|
186
|
+
return _winreg.QueryValueEx(hkey, value)[0]
|
187
|
+
except WindowsError:
|
188
|
+
return None
|
189
|
+
|
190
|
+
|
191
|
+
def _RegistryGetValue(key, value):
|
192
|
+
"""Use _winreg or reg.exe to obtain the value of a registry key.
|
193
|
+
|
194
|
+
Using _winreg is preferable because it solves an issue on some corporate
|
195
|
+
environments where access to reg.exe is locked down. However, we still need
|
196
|
+
to fallback to reg.exe for the case where the _winreg module is not available
|
197
|
+
(for example in cygwin python).
|
198
|
+
|
199
|
+
Args:
|
200
|
+
key: The registry key.
|
201
|
+
value: The particular registry value to read.
|
202
|
+
Return:
|
203
|
+
contents of the registry key's value, or None on failure.
|
204
|
+
"""
|
205
|
+
try:
|
206
|
+
return _RegistryGetValueUsingWinReg(key, value)
|
207
|
+
except ImportError:
|
208
|
+
pass
|
209
|
+
|
210
|
+
# Fallback to reg.exe if we fail to import _winreg.
|
211
|
+
text = _RegistryQuery(key, value)
|
212
|
+
if not text:
|
213
|
+
return None
|
214
|
+
# Extract value.
|
215
|
+
match = re.search(r'REG_\w+\s+([^\r]+)\r\n', text)
|
216
|
+
if not match:
|
217
|
+
return None
|
218
|
+
return match.group(1)
|
219
|
+
|
220
|
+
|
221
|
+
def _CreateVersion(name, path, sdk_based=False):
|
222
|
+
"""Sets up MSVS project generation.
|
223
|
+
|
224
|
+
Setup is based off the GYP_MSVS_VERSION environment variable or whatever is
|
225
|
+
autodetected if GYP_MSVS_VERSION is not explicitly specified. If a version is
|
226
|
+
passed in that doesn't match a value in versions python will throw a error.
|
227
|
+
"""
|
228
|
+
if path:
|
229
|
+
path = os.path.normpath(path)
|
230
|
+
versions = {
|
231
|
+
'2015': VisualStudioVersion('2015',
|
232
|
+
'Visual Studio 2015',
|
233
|
+
solution_version='12.00',
|
234
|
+
project_version='14.0',
|
235
|
+
flat_sln=False,
|
236
|
+
uses_vcxproj=True,
|
237
|
+
path=path,
|
238
|
+
sdk_based=sdk_based,
|
239
|
+
default_toolset='v140'),
|
240
|
+
'2013': VisualStudioVersion('2013',
|
241
|
+
'Visual Studio 2013',
|
242
|
+
solution_version='13.00',
|
243
|
+
project_version='12.0',
|
244
|
+
flat_sln=False,
|
245
|
+
uses_vcxproj=True,
|
246
|
+
path=path,
|
247
|
+
sdk_based=sdk_based,
|
248
|
+
default_toolset='v120'),
|
249
|
+
'2013e': VisualStudioVersion('2013e',
|
250
|
+
'Visual Studio 2013',
|
251
|
+
solution_version='13.00',
|
252
|
+
project_version='12.0',
|
253
|
+
flat_sln=True,
|
254
|
+
uses_vcxproj=True,
|
255
|
+
path=path,
|
256
|
+
sdk_based=sdk_based,
|
257
|
+
default_toolset='v120'),
|
258
|
+
'2012': VisualStudioVersion('2012',
|
259
|
+
'Visual Studio 2012',
|
260
|
+
solution_version='12.00',
|
261
|
+
project_version='4.0',
|
262
|
+
flat_sln=False,
|
263
|
+
uses_vcxproj=True,
|
264
|
+
path=path,
|
265
|
+
sdk_based=sdk_based,
|
266
|
+
default_toolset='v110'),
|
267
|
+
'2012e': VisualStudioVersion('2012e',
|
268
|
+
'Visual Studio 2012',
|
269
|
+
solution_version='12.00',
|
270
|
+
project_version='4.0',
|
271
|
+
flat_sln=True,
|
272
|
+
uses_vcxproj=True,
|
273
|
+
path=path,
|
274
|
+
sdk_based=sdk_based,
|
275
|
+
default_toolset='v110'),
|
276
|
+
'2010': VisualStudioVersion('2010',
|
277
|
+
'Visual Studio 2010',
|
278
|
+
solution_version='11.00',
|
279
|
+
project_version='4.0',
|
280
|
+
flat_sln=False,
|
281
|
+
uses_vcxproj=True,
|
282
|
+
path=path,
|
283
|
+
sdk_based=sdk_based),
|
284
|
+
'2010e': VisualStudioVersion('2010e',
|
285
|
+
'Visual C++ Express 2010',
|
286
|
+
solution_version='11.00',
|
287
|
+
project_version='4.0',
|
288
|
+
flat_sln=True,
|
289
|
+
uses_vcxproj=True,
|
290
|
+
path=path,
|
291
|
+
sdk_based=sdk_based),
|
292
|
+
'2008': VisualStudioVersion('2008',
|
293
|
+
'Visual Studio 2008',
|
294
|
+
solution_version='10.00',
|
295
|
+
project_version='9.00',
|
296
|
+
flat_sln=False,
|
297
|
+
uses_vcxproj=False,
|
298
|
+
path=path,
|
299
|
+
sdk_based=sdk_based),
|
300
|
+
'2008e': VisualStudioVersion('2008e',
|
301
|
+
'Visual Studio 2008',
|
302
|
+
solution_version='10.00',
|
303
|
+
project_version='9.00',
|
304
|
+
flat_sln=True,
|
305
|
+
uses_vcxproj=False,
|
306
|
+
path=path,
|
307
|
+
sdk_based=sdk_based),
|
308
|
+
'2005': VisualStudioVersion('2005',
|
309
|
+
'Visual Studio 2005',
|
310
|
+
solution_version='9.00',
|
311
|
+
project_version='8.00',
|
312
|
+
flat_sln=False,
|
313
|
+
uses_vcxproj=False,
|
314
|
+
path=path,
|
315
|
+
sdk_based=sdk_based),
|
316
|
+
'2005e': VisualStudioVersion('2005e',
|
317
|
+
'Visual Studio 2005',
|
318
|
+
solution_version='9.00',
|
319
|
+
project_version='8.00',
|
320
|
+
flat_sln=True,
|
321
|
+
uses_vcxproj=False,
|
322
|
+
path=path,
|
323
|
+
sdk_based=sdk_based),
|
324
|
+
}
|
325
|
+
return versions[str(name)]
|
326
|
+
|
327
|
+
|
328
|
+
def _ConvertToCygpath(path):
|
329
|
+
"""Convert to cygwin path if we are using cygwin."""
|
330
|
+
if sys.platform == 'cygwin':
|
331
|
+
p = subprocess.Popen(['cygpath', path], stdout=subprocess.PIPE)
|
332
|
+
path = p.communicate()[0].strip()
|
333
|
+
return path
|
334
|
+
|
335
|
+
|
336
|
+
def _DetectVisualStudioVersions(versions_to_check, force_express):
|
337
|
+
"""Collect the list of installed visual studio versions.
|
338
|
+
|
339
|
+
Returns:
|
340
|
+
A list of visual studio versions installed in descending order of
|
341
|
+
usage preference.
|
342
|
+
Base this on the registry and a quick check if devenv.exe exists.
|
343
|
+
Only versions 8-10 are considered.
|
344
|
+
Possibilities are:
|
345
|
+
2005(e) - Visual Studio 2005 (8)
|
346
|
+
2008(e) - Visual Studio 2008 (9)
|
347
|
+
2010(e) - Visual Studio 2010 (10)
|
348
|
+
2012(e) - Visual Studio 2012 (11)
|
349
|
+
2013(e) - Visual Studio 2013 (12)
|
350
|
+
2015 - Visual Studio 2015 (14)
|
351
|
+
Where (e) is e for express editions of MSVS and blank otherwise.
|
352
|
+
"""
|
353
|
+
version_to_year = {
|
354
|
+
'8.0': '2005',
|
355
|
+
'9.0': '2008',
|
356
|
+
'10.0': '2010',
|
357
|
+
'11.0': '2012',
|
358
|
+
'12.0': '2013',
|
359
|
+
'14.0': '2015',
|
360
|
+
}
|
361
|
+
versions = []
|
362
|
+
for version in versions_to_check:
|
363
|
+
# Old method of searching for which VS version is installed
|
364
|
+
# We don't use the 2010-encouraged-way because we also want to get the
|
365
|
+
# path to the binaries, which it doesn't offer.
|
366
|
+
keys = [r'HKLM\Software\Microsoft\VisualStudio\%s' % version,
|
367
|
+
r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\%s' % version,
|
368
|
+
r'HKLM\Software\Microsoft\VCExpress\%s' % version,
|
369
|
+
r'HKLM\Software\Wow6432Node\Microsoft\VCExpress\%s' % version]
|
370
|
+
for index in range(len(keys)):
|
371
|
+
path = _RegistryGetValue(keys[index], 'InstallDir')
|
372
|
+
if not path:
|
373
|
+
continue
|
374
|
+
path = _ConvertToCygpath(path)
|
375
|
+
# Check for full.
|
376
|
+
full_path = os.path.join(path, 'devenv.exe')
|
377
|
+
express_path = os.path.join(path, '*express.exe')
|
378
|
+
if not force_express and os.path.exists(full_path):
|
379
|
+
# Add this one.
|
380
|
+
versions.append(_CreateVersion(version_to_year[version],
|
381
|
+
os.path.join(path, '..', '..')))
|
382
|
+
# Check for express.
|
383
|
+
elif glob.glob(express_path):
|
384
|
+
# Add this one.
|
385
|
+
versions.append(_CreateVersion(version_to_year[version] + 'e',
|
386
|
+
os.path.join(path, '..', '..')))
|
387
|
+
|
388
|
+
# The old method above does not work when only SDK is installed.
|
389
|
+
keys = [r'HKLM\Software\Microsoft\VisualStudio\SxS\VC7',
|
390
|
+
r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VC7']
|
391
|
+
for index in range(len(keys)):
|
392
|
+
path = _RegistryGetValue(keys[index], version)
|
393
|
+
if not path:
|
394
|
+
continue
|
395
|
+
path = _ConvertToCygpath(path)
|
396
|
+
if version != '14.0': # There is no Express edition for 2015.
|
397
|
+
versions.append(_CreateVersion(version_to_year[version] + 'e',
|
398
|
+
os.path.join(path, '..'), sdk_based=True))
|
399
|
+
|
400
|
+
return versions
|
401
|
+
|
402
|
+
|
403
|
+
def SelectVisualStudioVersion(version='auto', allow_fallback=True):
|
404
|
+
"""Select which version of Visual Studio projects to generate.
|
405
|
+
|
406
|
+
Arguments:
|
407
|
+
version: Hook to allow caller to force a particular version (vs auto).
|
408
|
+
Returns:
|
409
|
+
An object representing a visual studio project format version.
|
410
|
+
"""
|
411
|
+
# In auto mode, check environment variable for override.
|
412
|
+
if version == 'auto':
|
413
|
+
version = os.environ.get('GYP_MSVS_VERSION', 'auto')
|
414
|
+
version_map = {
|
415
|
+
'auto': ('14.0', '12.0', '10.0', '9.0', '8.0', '11.0'),
|
416
|
+
'2005': ('8.0',),
|
417
|
+
'2005e': ('8.0',),
|
418
|
+
'2008': ('9.0',),
|
419
|
+
'2008e': ('9.0',),
|
420
|
+
'2010': ('10.0',),
|
421
|
+
'2010e': ('10.0',),
|
422
|
+
'2012': ('11.0',),
|
423
|
+
'2012e': ('11.0',),
|
424
|
+
'2013': ('12.0',),
|
425
|
+
'2013e': ('12.0',),
|
426
|
+
'2015': ('14.0',),
|
427
|
+
}
|
428
|
+
override_path = os.environ.get('GYP_MSVS_OVERRIDE_PATH')
|
429
|
+
if override_path:
|
430
|
+
msvs_version = os.environ.get('GYP_MSVS_VERSION')
|
431
|
+
if not msvs_version:
|
432
|
+
raise ValueError('GYP_MSVS_OVERRIDE_PATH requires GYP_MSVS_VERSION to be '
|
433
|
+
'set to a particular version (e.g. 2010e).')
|
434
|
+
return _CreateVersion(msvs_version, override_path, sdk_based=True)
|
435
|
+
version = str(version)
|
436
|
+
versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
|
437
|
+
if not versions:
|
438
|
+
if not allow_fallback:
|
439
|
+
raise ValueError('Could not locate Visual Studio installation.')
|
440
|
+
if version == 'auto':
|
441
|
+
# Default to 2005 if we couldn't find anything
|
442
|
+
return _CreateVersion('2005', None)
|
443
|
+
else:
|
444
|
+
return _CreateVersion(version, None)
|
445
|
+
return versions[0]
|
Binary file
|