OVMS3-idf/docs/zh_CN/get-started-cmake/windows-setup.rst
liying 08ef71b386 1.Update 8 English cmake files
2.Provide Chinese translation to these 8 cmake files
2018-11-13 11:38:23 +08:00

74 lines
3.3 KiB
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

**********************************************************
Windows 平台工具链的标准设置 (CMake)
**********************************************************
:link_to_translation:`en:[英文]`
.. include:: ../cmake-warning.rst
.. note::
基于 CMake 的构建系统仅支持 64 位版本 Windows。
引言
============
ESP-IDF 需要安装必要的工具,以编译 ESP32 固件包括Git交叉编译器以及 CMake 构建工具。本文将对这些工具一一说明。
在此入门指南中,我们通过命令提示符进行有关操作。不过,安装 ESP-IDF 后你还可以使用 :doc:`Eclipse <eclipse-setup>` 或支持 CMake 的图形化工具 IDE。
.. note::
基于 GNU Make 的构建系统要求 Windows 系统兼容 MSYS2_ Unix。基于 CMake 的构建系统则无此要求。
ESP-IDF 工具安装器
=======================
安装 ESP-IDF 必备工具最简易的方式是下载 ESP-IDF 工具安装器,地址如下:
https://dl.espressif.com/dl/esp-idf-tools-setup-1.1.exe
安装器会自动安装 ESP32 Xtensa gcc 工具链Ninja_ 编译工具,以及名为 mconf-idf_ 的配置工具。此外,如果你的电脑还未安装有关 CMake_ 和 Python_ 2.7 的安装器,它还可以下载和运行与之对应的安装器。
安装器默认更新 Windows ``Path`` 环境变量,因而上述工具也可在其他环境中运行。如果禁止该选项,则需自行设置 ESP-IDF 所使用的环境(终端或所选 IDE并配置正确的路径。
请注意,此安装器仅针对 ESP-IDF 工具包,并不包括 ESP-IDF。
安装 Git
==============
ESP-IDF 工具安装器并不会安装 Git因为快速入门指南默认你将以命令行的模式使用它。你可以通过 `Git For Windows`_ 下载和安装 Windows 平台的命令行 Git 工具(包括 "Git Bash" 终端)。
如果你想使用其他图形化 Git 客户端,如 `Github Desktop` 你可以自行安装,并在快速入门中阐释相应 Git 命令,以使用你所选的 Git 客户端。
使用终端
================
在快速入门指南接下来的步骤说明中,我们将使用终端命令提示符进行有关操作。你也可以使用任何其他形式的命令提示符:
- 比如Windows 开始菜单下内置的 Command Prompt。本文档中的所有 Windows 命令行指示均为 Windows Command Prompt 中所使用的 "batch" 命令。
- 你还可以使用 `Git for Windows`_ 中的 "Git Bash" 终端,其所使用的 "bash" 命令提示符语法与 Mac OS 或 Linux 的既定语法相同。安装此终端后,你可以在开始菜单下找到命令提示符窗口。
- 如果你已安装 MSYS2_通过 ESP-IDF 之前版本),你还可以使用 MSYS 终端。
后续步骤
==========
要继续设置开发环境,请参照 :ref:`get-started-get-esp-idf-cmake`
相关文档
=================
想要自定义安装流程的高阶用户可参照:
.. toctree::
:maxdepth: 1
windows-setup-scratch
.. _MSYS2: https://msys2.github.io/
.. _cmake: https://cmake.org/download/
.. _ninja: https://ninja-build.org/
.. _Python: https://www.python.org/downloads/windows/
.. _Git for Windows: https://gitforwindows.org/
.. _mconf-idf: https://github.com/espressif/kconfig-frontends/releases/
.. _Github Desktop: https://desktop.github.com/