- Windows7 64bit
- node-gypが動作する状態である事。つまり以下の条件を満たしている。
- Python2.7 系インストール済み
- Visual Studio 2010 Express インストール済み
- Windows SDK 7.1 インストール済み
- Windows SDK 7.0A がインストール済みである
- つまり、ローカル環境において、WindowsSDK 7.1 と Windows SDK 7.0A が同時に存在している等、複数のWindows SDKが存在している状態である。
- Visual Studio 2008 Express をインストールした事があるが、アンインストール済
- これについては因果関係が不明なので無視しても良い
git clone https://github.com/joyent/node.git
- このコミットでexpressには入っていない ctrpp がビルドツールの一部として組込まれた。
よって、expressでビルドする際には、ctrppが除外される様にする。
vcbuild.bat release x64 noperfctr
以下の様なエラーが出る場合は次の作業をやる。
LINK : fatal error LNK1181: cannot open input file 'winmm.lib' [C:\development\js\workspace4.2\node\deps\v8\tools\gyp\mksnapshot.vcxproj]
WindowsSDK7.1がインストールされているが、プロジェクトのデフォルトPlatformToolsetがv100になっており、
v100はWindowsSDK7.0Aを参照している為64bit対応のアレコレが無かったりして大変素晴らしいので、そのデフォルト値を変更する。
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.default.props
を修正する。尚、このファイルは管理者権限が無いと修正できない。
修正前
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PlatformShortName>amd64</PlatformShortName>
<PlatformArchitecture>64</PlatformArchitecture>
<PlatformToolset Condition="'$(PlatformToolset)' == ''">$(DefaultX64PlatformToolset)</PlatformToolset>
<PlatformToolset Condition="'$(PlatformToolset)' == ''">v100</PlatformToolset>
<IntDir Condition="'$(IntDir)'=='' AND '$(IntermediateOutputPath)'!=''">$(IntermediateOutputPath)</IntDir>
<IntDir Condition="'$(IntDir)'=='' AND '$(IntermediateOutputPath)'==''">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(OutDir)'=='' AND '$(SolutionDir)' != ''">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(OutDir)'=='' AND '$(SolutionDir)' == ''">$(IntDir)</OutDir>
</PropertyGroup>
</Project>
修正後
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PlatformShortName>amd64</PlatformShortName>
<PlatformArchitecture>64</PlatformArchitecture>
<PlatformToolset Condition="'$(PlatformToolset)' == ''">$(DefaultX64PlatformToolset)</PlatformToolset>
<PlatformToolset Condition="'$(PlatformToolset)' == ''">Windows7.1SDK</PlatformToolset>
<IntDir Condition="'$(IntDir)'=='' AND '$(IntermediateOutputPath)'!=''">$(IntermediateOutputPath)</IntDir>
<IntDir Condition="'$(IntDir)'=='' AND '$(IntermediateOutputPath)'==''">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(OutDir)'=='' AND '$(SolutionDir)' != ''">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(OutDir)'=='' AND '$(SolutionDir)' == ''">$(IntDir)</OutDir>
</PropertyGroup>
</Project>
以下の様なエラーが出るが恐らくリリース作業をする人にだけ関係のあるエラーなので無視する。
SignTool Error: No certificates were found that met all the given criteria.