1. 程式人生 > >從peach原始碼生成工程檔案

從peach原始碼生成工程檔案

編譯過程中幾個軟體

  1. ‘msvc’

Microsoft Visual C++ (often abbreviated as MSVC or VC++) is an integrated development environment (IDE) product from Microsoft for the C, C++, and C++/CLI programming languages.MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studio and made available in both trialware and freeware forms. It features tools for developing and debugging C++ code, especially code written for Windows API, DirectX and .NET Framework.

- MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015)

- MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013)

- MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012)

- MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010)

- MSVC++ 9.0  _MSC_VER == 1500 (Visual Studio 2008)
  1. ‘tools.msbuild’

Microsoft Build Tools (also known as MSBuild and Microsoft Build Engine) is a build tool set for managed code as well as native C++ code and was part of .NET Framework. Visual Studio depends on MSBuild, but MSBuild does not depend on Visual Studio.

MSBuild is a build tool that helps automate the process of creating a software product, including compiling the source code, packaging, testing, deployment and creating documentations. With MSBuild, it is possible to build Visual Studio projects and solutions without the Visual Studio IDE installed. MSBuild is available at no cost.[3] MSBuild was previously bundled with .NET Framework; starting with Visual Studio 2013, however, it is bundled with Visual Studio instead.[4] MSBuild is a functional replacement for the nmake utility, the latter of which remains in use in projects that originated in older Visual Studio releases.

  1. ‘tools.wix’

The Windows Installer XML Toolset (WiX, pronounced “wicks”), is a free software toolset that builds Windows Installer packages from XML code. It consists of a command-line environment that developers may integrate into their build processes to build MSI and MSM packages. WiX was the first Microsoft project to be released under an open-source license,[2] the Common Public License.

  1. Waf Build Tool

是基於python的開源編譯系統

問題

peach的團隊提供了原始碼,使用waf 來build原始碼的,所以找不到.sln和vcproj檔案,沒法用vs 2010開啟工程檔案。

參考連結

方法:

waf msvs2012 或者 waf msvs2010 

來生成visual studio 工程檔案。

用waf來編譯原始碼命令。

waf configure

waf build

waf install

安裝過程中可能問題

注意:

遇到問題時這個命令很有用waf configure -v,可以打印出詳細出錯資訊。

情況一

本來是打算在主機上安裝,主機上安裝的是vs 2015,然後各種編譯失敗!出現的問題:

runner 'C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\BIN\\amd64\\CL.exe', '/help'

最後沒能解決,在虛擬機器下從新搭建環境,安裝了vs 2010, sp1,wix toolset , .netframe work 4; 然後順利通過。

看到討論區中有人在vs2012、vs 2013上安裝。

情況二 Could not verify version of cl.exe

  • 到相應目錄下去執行一下cl.exe,可以得到相應的版本號。

  • 然後在peach-3.1.124-source\build\config 中找到win.py,

  • 修改內部 conf.ensure_version('CXX', ['16.00.40219.01', '17.00.61030', '18.00.21005.1', '18.00.31101']),將剛才執行cl.exe得到的版本加進去。

情況三

在解決問題的過程中發現有人講peach放在了中文目錄下,可能會出現問題,解決方法:一種:換為英文目錄;二種:修改配置檔案,參考連結