如何在 Windows 8 上安装 Apiaryio Drafter?

How to install Apiaryio Drafter on Windows 8?

我想在 windows 上安装 apiaryio/drafter。 我安装了 python 2.7 和 visual studio 12 "Full version"。它需要添加一些文件夹到系统路径,因为没有找到一些文件,如 "mspdb110.dll"。但是最新的"fatal error LNK1104: cannot open file 'kernel32.lib'"相关的问题,把它的地址添加到系统路径也没有解决。

我该如何解决?

C:\WINDOWS\system32>cd C:\Users\MJZ\Documents\GitHub\drafter

C:\Users\MJZ\Documents\GitHub\drafter>vcbuild.bat
creating config.gypi
creating config.mk
creating makefiles
Warning: Missing input files:
./build\ext\snowcrash\..\..\..\ext\snowcrash\src\Version.h
All OK.
Project files generated.
ERROR: Cannot determine the location of the VS Common Tools folder.
Building Snow Crash...
Build started 2015-05-02 9:27:50 AM.
     1>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.sln" on nod
       e 1 (default targets).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Release|Win32".
     1>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.sln" (1) is
        building "C:\Users\MJZ\Documents\GitHub\drafter\build\test-libdrafter.v
       cxproj.metaproj" (3) on node 1 (default targets).
     3>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\test-libdrafter.vcx
       proj.metaproj" (3) is building "C:\Users\MJZ\Documents\GitHub\drafter\bu
       ild\ext\snowcrash\libmarkdownparser.vcxproj" (4) on node 1 (default targ
       ets).
     4>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\ext\snowcrash\libmarkdownparser.vcxproj]
     1>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.sln" (1) is
        building "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.vcxproj.m
       etaproj" (2) on node 1 (default targets).
     2>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.vcxproj.met
       aproj" (2) is building "C:\Users\MJZ\Documents\GitHub\drafter\build\ext\
       snowcrash\libsnowcrash.vcxproj" (5) on node 4 (default targets).
     5>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\ext\snowcrash\libsnowcrash.vcxproj]
     2>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.vcxproj.met
       aproj" (2) is building "C:\Users\MJZ\Documents\GitHub\drafter\build\libs
       os.vcxproj" (7) on node 3 (default targets).
     7>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\libsos.vcxproj]
     2>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.vcxproj.met
       aproj" (2) is building "C:\Users\MJZ\Documents\GitHub\drafter\build\libd
       rafter.vcxproj" (6) on node 2 (default targets).
     6>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\libdrafter.vcxproj]
     4>InitializeBuildStatus:
         Creating "Release\obj\libmarkdownparser\libmarkdownparser.unsuccessful
         build" because "AlwaysCreate" was specified.
     7>InitializeBuildStatus:
         Creating "Release\obj\libsos\libsos.unsuccessfulbuild" because "Always
         Create" was specified.
     5>InitializeBuildStatus:
         Creating "Release\obj\libsnowcrash\libsnowcrash.unsuccessfulbuild" bec
         ause "AlwaysCreate" was specified.
     6>InitializeBuildStatus:
         Creating "Release\obj\libdrafter\libdrafter.unsuccessfulbuild" because
          "AlwaysCreate" was specified.
     4>ClCompile:
         All outputs are up-to-date.
       Lib:
         All outputs are up-to-date.
         libmarkdownparser.vcxproj -> C:\Users\MJZ\Documents\GitHub\drafter\bui
         ld\Release\lib\libmarkdownparser.lib
       FinalizeBuildStatus:
         Deleting file "Release\obj\libmarkdownparser\libmarkdownparser.unsucce
         ssfulbuild".
         Touching "Release\obj\libmarkdownparser\libmarkdownparser.lastbuildsta
         te".
     4>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\ext\s
       nowcrash\libmarkdownparser.vcxproj" (default targets).
     3>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\test-libdrafter.vcx
       proj.metaproj" (3) is building "C:\Users\MJZ\Documents\GitHub\drafter\bu
       ild\ext\snowcrash\libsundown.vcxproj" (8) on node 1 (default targets).
     8>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\ext\snowcrash\libsundown.vcxproj]
     8>InitializeBuildStatus:
         Creating "Release\obj\libsundown\libsundown.unsuccessfulbuild" because
          "AlwaysCreate" was specified.
     7>ClCompile:
         All outputs are up-to-date.
     6>ClCompile:
         All outputs are up-to-date.
     5>ClCompile:
         All outputs are up-to-date.
     7>Lib:
         All outputs are up-to-date.
         libsos.vcxproj -> C:\Users\MJZ\Documents\GitHub\drafter\build\Release\
         lib\libsos.lib
     6>Lib:
         All outputs are up-to-date.
         libdrafter.vcxproj -> C:\Users\MJZ\Documents\GitHub\drafter\build\Rele
         ase\lib\libdrafter.lib
     8>ClCompile:
         All outputs are up-to-date.
     5>Lib:
         All outputs are up-to-date.
     7>FinalizeBuildStatus:
         Deleting file "Release\obj\libsos\libsos.unsuccessfulbuild".
         Touching "Release\obj\libsos\libsos.lastbuildstate".
     6>FinalizeBuildStatus:
         Deleting file "Release\obj\libdrafter\libdrafter.unsuccessfulbuild".
     7>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\libso
       s.vcxproj" (default targets).
     6>FinalizeBuildStatus:
         Touching "Release\obj\libdrafter\libdrafter.lastbuildstate".
     5>Lib:
         libsnowcrash.vcxproj -> C:\Users\MJZ\Documents\GitHub\drafter\build\Re
         lease\lib\libsnowcrash.lib
       FinalizeBuildStatus:
         Deleting file "Release\obj\libsnowcrash\libsnowcrash.unsuccessfulbuild
         ".
         Touching "Release\obj\libsnowcrash\libsnowcrash.lastbuildstate".
     6>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\libdr
       after.vcxproj" (default targets).
     5>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\ext\s
       nowcrash\libsnowcrash.vcxproj" (default targets).
     8>Lib:
         All outputs are up-to-date.
         libsundown.vcxproj -> C:\Users\MJZ\Documents\GitHub\drafter\build\Rele
         ase\lib\libsundown.lib
       FinalizeBuildStatus:
         Deleting file "Release\obj\libsundown\libsundown.unsuccessfulbuild".
         Touching "Release\obj\libsundown\libsundown.lastbuildstate".
     8>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\ext\s
       nowcrash\libsundown.vcxproj" (default targets).
     2>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\drafter.vcxproj.met
       aproj" (2) is building "C:\Users\MJZ\Documents\GitHub\drafter\build\draf
       ter.vcxproj" (9) on node 3 (default targets).
     9>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\drafter.vcxproj]
     3>Project "C:\Users\MJZ\Documents\GitHub\drafter\build\test-libdrafter.vcx
       proj.metaproj" (3) is building "C:\Users\MJZ\Documents\GitHub\drafter\bu
       ild\test-libdrafter.vcxproj" (10) on node 2 (default targets).
    10>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuil
       d.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable
        from the registry.  TargetFrameworkVersion or PlatformToolset may be se
       t to an invalid version number. [C:\Users\MJZ\Documents\GitHub\drafter\b
       uild\test-libdrafter.vcxproj]
     9>InitializeBuildStatus:
         Touching "Release\obj\drafter\drafter.unsuccessfulbuild".
    10>InitializeBuildStatus:
         Touching "Release\obj\test-libdrafter\test-libdrafter.unsuccessfulbuil
         d".
     9>ClCompile:
         All outputs are up-to-date.
    10>ClCompile:
         C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /
         I..\src /I..\test /I..\test\vendor\Catch\include /I..\ext\snowcrash\sr
         c /I"..\ext\snowcrash\ext\markdown-parser\src" /I"..\ext\snowcrash\ext
         \markdown-parser\ext\sundown\src" /I..\ext\sos\src /Zi /nologo /W1 /WX
         - /Od /Ob2 /Oi /Ot /Oy /GL /D BUILDING_SNOWCRASH=1 /D WIN32 /D _CRT_SE
         CURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D WIN /Gm- /EHsc /MD /
         GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"Release\obj\test-l
         ibdrafter\" /Fd"Release\obj\test-libdrafter\vc110.pdb" /Gd /TP /analy
         ze- /errorReport:queue /MP "..\test\test-main.cc"
     9>Link:
         C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe /E
         RRORREPORT:QUEUE /OUT:"C:\Users\MJZ\Documents\GitHub\drafter\build\Rel
         ease\drafter.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTUAC:"leve
         l='asInvoker' uiAccess='false'" /manifest:embed /PDB:"C:\Users\MJZ\Doc
         uments\GitHub\drafter\build\Release\drafter.pdb" /SUBSYSTEM:CONSOLE /O
         PT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\User
         s\MJZ\Documents\GitHub\drafter\build\Release\drafter.lib" /MACHINE:X86
          /SAFESEH Release\obj\drafter\main.obj
         Release\obj\drafter\config.obj
         Release\obj\drafter\reporting.obj
         C:\Users\MJZ\Documents\GitHub\drafter\build\Release\lib\libdrafter.lib
         C:\Users\MJZ\Documents\GitHub\drafter\build\Release\lib\libsos.lib
         C:\Users\MJZ\Documents\GitHub\drafter\build\Release\lib\libsnowcrash.l
         ib
         C:\Users\MJZ\Documents\GitHub\drafter\build\Release\lib\libmarkdownpar
         ser.lib
         C:\Users\MJZ\Documents\GitHub\drafter\build\Release\lib\libsundown.lib
    10>ClCompile:
         test-main.cc
     9>LINK : fatal error LNK1104: cannot open file 'kernel32.lib' [C:\Users\MJ
       Z\Documents\GitHub\drafter\build\drafter.vcxproj]
     9>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\draft
       er.vcxproj" (default targets) -- FAILED.
     2>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\draft
       er.vcxproj.metaproj" (default targets) -- FAILED.
    10>c:\users\mjz\documents\github\drafter\test\vendor\catch\include\internal
       \catch_console_colour_impl.hpp(29): fatal error C1083: Cannot open inclu
       de file: 'windows.h': No such file or directory [C:\Users\MJZ\Documents\
       GitHub\drafter\build\test-libdrafter.vcxproj]
    10>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\test-
       libdrafter.vcxproj" (default targets) -- FAILED.
     3>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\test-
       libdrafter.vcxproj.metaproj" (default targets) -- FAILED.
     1>Done Building Project "C:\Users\MJZ\Documents\GitHub\drafter\build\draft
       er.sln" (default targets) -- FAILED.
Build FAILED.

Time Elapsed 00:00:10.03

tl;dr:安装 Visual Studio Express

长版:

Dredd 依赖 drafter.js and according to this issue, it looks that now relies on C++ drafter 需要在安装时编译。

主要开发者points here to the drafter Windows installation notes

自版本 1.4.0 Dredd 在安装过程中不需要 C++ 编译器或类似的东西。我希望您现在可以在 Windows 上毫无问题地安装它!


同时,我需要提醒你的是 Dredd 的 support for Windows is flaky. It's not officially supported platform yet, we don't run any tests on AppVeyor 呢。这是有计划的,但我们还没有。据报道,有些用户在 Windows 上使用 Dredd 没有任何问题,有些则有问题。如果您遇到任何问题,请转到 Dredd 的 GitHub 存储库并帮助我们至少跟踪它们,如果没有尝试提供修复。