windows7编译svn 64位

环境准备
  • windows7 sp1
  • vs2017 (需要安装vc++ ATL/MFC for X86/x64)
  • svn版本:1.11.1
  • check svn代码,地址: https://svn.osdn.net/svnroot/tortoisesvn/tags/version-1.11.1
安装必要工具(详情参考源码下的build.txt)
  • Java runtime https://www.java.com
  • Python 2.6(\b 1 \b 3) https://www.python.org/windows/
  • libxml2 python bindings(\b 2) http://users.skynet.be/sbi/libxml-python/
  • Perl http://strawberryperl.com/releases.html
    or
    https://www.activestate.com/Products/ActivePerl/
  • WiX 3.10(\b 1) http://wixtoolset.org/
  • NAnt 0.92(\b 1) http://nant.sourceforge.net

(\b 1) Add the paths of the binaries to the PATH environment variable. You may have to
logoff/logon to make the new environment variables take effect!
Also make sure to “unblock” the zip file before extracting when you install NAnt.
(\b 2) right-click on the installer file and “run as administrator” to install it.
(\b 3) use 32 bit installer (even on x64 OS)

\subsection Requirements3 Finally, you may need to install some fonts.

  • Arabic(\b Optional) http://www7.bev.net/civic/icb/quran/Iqraa_ttf.zip
  • Japanese(\b Optional) msgothic.ttc and msmincho.ttc should be available
    if you activate support for international fonts in your OS.
  • Chinese(\b Optional) simhei.ttf and simsun.httf should be available
    if you activate support for international fonts in your OS.

\section Preparations Preparations

Now you’re almost ready. Only a few more steps to do:

  • create a new folder on your harddisk, e.g. SVN. Make sure you have at least
    4 GB of free space left!!!
  • Checkout the TortoiseSVN sources from the Subversion repository into
    SVN\TortoiseSVN. Make sure the path does not have ‘[’ or ‘]’ chars in it!
  • Make a copy of the file default.build.user.tmpl in the TortoiseSVN root folder and
    rename that copy to default.build.user. Then adjust the paths as mentioned
    in that file. You may leave it unchanged if you installed / copied everything
    into the suggested default paths.
  • Make a copy of the file doc\doc.build.user.tmpl and rename that copy to
    doc\doc.build.user. Then adjust the paths in that file according to your
    setup. You need to edit this file if your installed version of Tortoise has a different
    working-copy database version than the tool expects.
  • Unzip (if necessary) and copy the font files into %WINDIR%\Fonts.
    You will need them only if you are building the respective language packs.
  • run ‘nant init’ to fetch and unzip the required tools. Note: you need to call vcvars32.bat first.
删除不需要的组件
  • 修改src/Resources\TortoiseMerge.rc2,删除include “TortoiseMergeRibbon.rc”
  • 修改src/TortoiseMerge/TortoiseMerge.vcxproj删除如下内容
   <CustomBuild Include="..\Resources\TortoiseMergeRibbon.xml">
     <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">uicc.exe %(FullPath) $(IntDir)TortoiseMergeRibbon.bml /header:$(IntDir)TortoiseMergeRibbon.h /res:$(IntDir)TortoiseMergeRibbon.rc /name:TortoiseMergeRibbon</Command>
     <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">uicc.exe %(FullPath) $(IntDir)TortoiseMergeRibbon.bml /header:$(IntDir)TortoiseMergeRibbon.h /res:$(IntDir)TortoiseMergeRibbon.rc /name:TortoiseMergeRibbon</Command>
     <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">uicc.exe %(FullPath) $(IntDir)TortoiseMergeRibbon.bml /header:$(IntDir)TortoiseMergeRibbon.h /res:$(IntDir)TortoiseMergeRibbon.rc /name:TortoiseMergeRibbon</Command>
     <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">uicc.exe %(FullPath) $(IntDir)TortoiseMergeRibbon.bml /header:$(IntDir)TortoiseMergeRibbon.h /res:$(IntDir)TortoiseMergeRibbon.rc /name:TortoiseMergeRibbon</Command>
     <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)TortoiseMergeRibbon.bml;$(IntDir)TortoiseMergeRibbon.rc;$(IntDir)TortoiseMergeRibbon.h;%(Outputs)</Outputs>
     <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)TortoiseMergeRibbon.bml;$(IntDir)TortoiseMergeRibbon.rc;$(IntDir)TortoiseMergeRibbon.h;%(Outputs)</Outputs>
     <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)TortoiseMergeRibbon.bml;$(IntDir)TortoiseMergeRibbon.rc;$(IntDir)TortoiseMergeRibbon.h;%(Outputs)</Outputs>
     <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)TortoiseMergeRibbon.bml;$(IntDir)TortoiseMergeRibbon.rc;$(IntDir)TortoiseMergeRibbon.h;%(Outputs)</Outputs>
     <SubType>Designer</SubType>
   </CustomBuild>
  • 修改src/TortoiseSVNSetup/FeaturesFragment.wxs,删除如下内容

  • 修改src/TortoiseSVNSetup/StructureFragment.wxs,删除如下内容

  • 将doc目录重命名为doc.bak

编译
  • 打开64位vs编译工具,步骤如下

    开始菜单->所有程序->Visual Studio 2017->Vistual Studio Tools->VC->VS2017 x64工具

  • 查看所有支持的选项,执行命令如下

    nant

  • 编译64位svn,执行如下命令

    nant release x64 setup

  • 编译32位依赖库,先打开32位vs命令行工具

    开始菜单->所有程序->Visual Studio 2017->Vistual Studio Tools->VC->VS2017 x64_x86兼容工具

  • 编译32位Subversion库

    nant Subversion
    nant TortoiseSVN

  • 打包,在vs64位命令行工具执行

    nant x64 msi

注意事项
  • 编译64位时,在最后会依赖一些32位的库,务必在提示错误为32位库不存在的时候,再编译32位依赖库,编译完32位库后,再重新编译64位,如果报的是doc的错,则直接忽略,然后执行打包操作。
  • 切记要先编译64位,再编译32位依赖库
  • 不要在vs32位命令行工具中编译64位
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值