MYNT-EYE-S-SDK/guide_build_win.html

154 lines
8.8 KiB
HTML
Raw Normal View History

2018-06-10 10:49:12 +03:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MYNT EYE SDK: 编译 on Windows</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="icon.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MYNT EYE SDK
&#160;<span id="projectnumber">2.0.0-rc</span>
</div>
<div id="projectbrief">http://www.myntai.com/camera</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="搜索" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('guide_build_win.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">编译 on Windows </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><blockquote class="doxtable">
<p>Windows 10 </p>
</blockquote>
<h2>前提条件</h2>
<ul>
<li><a href="https://git-scm.com/downloads">Git</a>,用于获取代码。</li>
<li><a href="https://cmake.org/download/">CMake</a>,用于构建编译。</li>
<li><a href="http://www.stack.nl/~dimitri/doxygen/download.html">Doxygen</a>,用于生成文档。</li>
</ul>
<p>最终命令提示符Command Prompt, cmd里可找到如下命令</p>
<div class="fragment"><div class="line">&gt;cmake --version</div><div class="line">cmake version 3.10.1</div><div class="line"></div><div class="line">&gt;git --version</div><div class="line">git version 2.11.1.windows.1</div><div class="line"></div><div class="line">&gt;doxygen --version</div><div class="line">1.8.13</div></div><!-- fragment --><ul>
<li><a href="https://www.visualstudio.com/">Visual Studio</a><ul>
<li><a href="https://my.visualstudio.com/Downloads?q=Visual Studio 2015">Visual Studio 2015</a></li>
<li><a href="https://my.visualstudio.com/Downloads?q=Visual Studio 2017">Visual Studio 2017</a></li>
</ul>
</li>
<li><a href="https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk">Windows 10 SDK</a></li>
</ul>
<p>以 Visual Studio 2015 举例,请在系统环境变量 <code>PATH</code> 里添加上如下路径: </p><pre class="fragment">C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
C:\Program Files (x86)\MSBuild\14.0\Bin
</pre><p>最终命令提示符Command Prompt, cmd里可找到如下命令</p>
<div class="fragment"><div class="line">&gt;cl</div><div class="line">Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x86</div><div class="line"></div><div class="line">&gt;link</div><div class="line">Microsoft (R) Incremental Linker Version 14.00.24215.1</div><div class="line"></div><div class="line">&gt;lib</div><div class="line">Microsoft (R) Library Manager Version 14.00.24215.1</div><div class="line"></div><div class="line">&gt;msbuild</div><div class="line">Microsoft (R) 生成引擎版本 14.0.25420.1</div></div><!-- fragment --><ul>
<li><a href="http://www.msys2.org/">MSYS2</a><ul>
<li><a href="https://lug.ustc.edu.cn/wiki/mirrors/help/msys2">国内镜像</a></li>
<li><a href="https://wiki.archlinux.org/index.php/pacman">pacman</a></li>
</ul>
</li>
</ul>
<p>打开 MSYS2 MSYS ,然后执行:</p>
<div class="fragment"><div class="line">$ pacman -Syu</div><div class="line">$ pacman -S make</div></div><!-- fragment --><p>并在系统环境变量 <code>PATH</code> 里添加上如下路径: </p><pre class="fragment">C:\msys64\usr\bin
</pre><p>最终命令提示符Command Prompt, cmd里可找到如下命令</p>
<div class="fragment"><div class="line">&gt;make --version</div><div class="line">GNU Make 4.2.1</div></div><!-- fragment --><h2>获取代码</h2>
<div class="fragment"><div class="line">&gt;git clone https://github.com/slightech/MYNT-EYE-SDK-2.git</div></div><!-- fragment --><h2>准备依赖</h2>
<div class="fragment"><div class="line">&gt;cd mynt-eye-sdk-2</div><div class="line">&gt;make init</div><div class="line">Make init</div><div class="line">Init deps</div><div class="line">Install cmd: pacman -S</div><div class="line">Install deps: git clang-format</div><div class="line">pacman -S clang-format (not exists)</div><div class="line">error: target not found: clang-format</div><div class="line">pip install --upgrade autopep8 cpplint pylint requests</div><div class="line">...</div><div class="line">Init git hooks</div><div class="line">ERROR: clang-format-diff is not installed!</div><div class="line">Expect cmake version &gt;= 3.0</div><div class="line">cmake version 3.10.1</div></div><!-- fragment --><h3><a href="https://opencv.org/">OpenCV</a></h3>
<p>编译前可在系统终端Windows 命令提示符)里如下指定 OpenCV 路径,其为 <code>OpenCVConfig.cmake</code> 目录:</p>
<div class="fragment"><div class="line"># Linux, macOS</div><div class="line">export OpenCV_DIR=~/opencv</div><div class="line"></div><div class="line"># Windows</div><div class="line">set OpenCV_DIR=C:\opencv</div></div><!-- fragment --><h2>编译代码</h2>
<div class="fragment"><div class="line">&gt;make install</div></div><!-- fragment --> </div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">制作者
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
</ul>
</div>
</body>
</html>