since 2012-05-05
http://sourceforge.jp/ticket/browse.php?group_id=4221&tid=27801
http://www.nvda-project.org/wiki/UsingASelfSignedCertificate
Windows 8 x64 にて。ソースは 2013.1 系の jp2013.1 ブランチ。
コマンドプロンプトを「管理者として実行」する(Windows 8だと「ファイル」「コマンドプロンプト」「コマンドプロンプトを管理者として実行」):
初期化する。署名つきをビルドした後で署名なしをビルドするときにも。
selfcert_clean.cmd
del /Q /F selfsigned.* .sconsign.dblite call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\setenv.cmd" /x86 color certutil -delstore root selfsigned.spc scons -c
selfcert_setup.cmd
del /Q /F selfsigned.* call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\setenv.cmd" /x86 makecert -r -n "CN=selfsigned" -sv selfsigned.pvk selfsigned.cert cert2spc selfsigned.cert selfsigned.spc pvk2pfx -pvk selfsigned.pvk -spc selfsigned.spc -PFX selfsigned.pfx certutil -addstore root selfsigned.spc
パスフレーズを3回入れる。空にすると警告が出るがエラーにはならない。 後述するが、パスワードを空にするとうまく scons できる。
出力:
root "信頼されたルート証明機関" 署名は公開キーと一致します 証明書 "CN=selfsigned" がストアに追加されました。 CertUtil: -addstore コマンドは正常に完了しました。
最後は scons をする:
selfcert_scons.cmd
scons source user_docs launcher certFile=selfsigned.pfx publisher=nvdajp release=1 version=2013.1jp-beta2 -j4
certPassword オプションを省略するとパスワードなし。成功したときの出力の最後の部分:
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f selfsigned.pfx dist\nvda_noUIAccess.exe Done Adding Additional Store Successfully signed: dist\nvda_noUIAccess.exe "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f selfsigned.pfx dist\nvda_uiAccess.exe Done Adding Additional Store Successfully signed: dist\nvda_uiAccess.exe "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f selfsigned.pfx dist\nvda_slave.exe Done Adding Additional Store Successfully signed: dist\nvda_slave.exe "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f selfsigned.pfx dist\nvda_service.exe Done Adding Additional Store Successfully signed: dist\nvda_service.exe Delete("source\_buildVersion.py") Delete("source\_buildVersion.pyc") Delete("source\_buildVersion.pyo") "C:\Program Files (x86)\NSIS\makensis.exe" /V2 /DVERSION=2013.1jp-beta2 /DPUBLISHER="nvdajp" /DCOPYRIGHT="Copyright (C) 2006-2013 NVDA Contributors" /DNVDADistDir=C:\work\nvda\jp2013.1\dist /DLAUNCHEREXE=C:\work\nvda\jp2013.1\output\nvda_2013.1jp-beta2.exe launcher\nvdaLauncher.nsi warning: Generating version information for language "0000-NorwegianNynorsk" without standard key "FileVersion" 1 warning: Generating version information for language "0000-NorwegianNynorsk" without standard key "FileVersion" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f selfsigned.pfx output\nvda_2013.1jp-beta2.exe Done Adding Additional Store Successfully signed: output\nvda_2013.1jp-beta2.exe scons: done building targets.
selfcert_pack_dist.cmd: distの中身をアーカイブして送付。
signed_makensis.cmd: 署名されたdistをmakensisでlauncherに変換。
signed_output_pack.cmd: outputフォルダの中のlauncherをアーカイブして送付。