wpbit1
驱动牛犊
驱动牛犊
  • 注册日期2010-02-10
  • 最后登录2010-04-12
  • 粉丝0
  • 关注0
  • 积分7分
  • 威望61点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:5147回复:1

Truecrypt在vs2008下的编译完全教程

楼主#
更多 发布于:2010-03-02 17:46
前两天被这个问题弄得疲惫,现在终于搞定了,把经验与大家分享一下:
如同源码文件夹下的readme.txt,执行如下操作:
1) Create an environment variable 'MSVC16_ROOT' pointing to the installation
   directory of MS Visual C++ 1.52.

2) If you have installed the Windows Driver Development Kit in another
   directory than '%SYSTEMDRIVE%\WinDDK', create an environment variable
   'WINDDK_ROOT' pointing to the DDK installation directory.

3) Copy the PKCS #11 header files(共三个:pkcs11.h、pkcs11f.h、pkcs11t.h) to a standard include path or create an
   environment variable 'PKCS11_INC' pointing to the directory where
   the PKCS #11 header files are installed.

4) Open the 'TrueCrypt.sln' solution in Microsoft Visual Studio 2008.

5) 在http://www.gzip.org/#exe中Executables下找到Windows 9x/NT/2000/ME/XP in zip or self-extract format,下载zip格式的gzip.exe放入system32目录下。

6) 在http://www.nasm.us/pub/nasm/releasebuilds/下进入最新版本,然后进入win32路径,然后下载zip格式的文件,解压后将nasm.exe放入system32目录下。

7) 屏蔽..\Common\SecurityToken.cpp中TC_TOKEN_ERR (CKR_NEW_PIN_MODE)和TC_TOKEN_ERR (CKR_NEXT_OTP)

8) 在..\Setup\Setup.h中增加如下定义:
        /*---region add by gc---*/
        #include "wtypes.h"
        const PROPERTYKEY PKEY_AppUserModel_ID = {
            {
                (unsigned long)2009,/*unsigned long  Data1;*/
                    (unsigned short)12,/*unsigned short Data2;*/
                    (unsigned short)23,/*unsigned short Data3;*/
                    0x44,0x55,0x55,0x55,0x55,0x55,0x55,0x55
            },/*GUID fmtid;*/
            (DWORD)PID_FIRST_USABLE /*DWORD pid;*/
        };
        /*---endregion---*/

9) Select 'All' as the active solution configuration.

10) Build the solution.

11) If successful, there should be newly built TrueCrypt binaries in the
   'Release' folder.
king00star
驱动牛犊
驱动牛犊
  • 注册日期2006-08-17
  • 最后登录2014-04-19
  • 粉丝0
  • 关注0
  • 积分9分
  • 威望92点
  • 贡献值0点
  • 好评度15点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2010-03-26 16:47
我也编译过,不过 Setup.h 中文件没记得要修改啊
游客

返回顶部