Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/_includes/docs/install/flutter-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ or download and install the Flutter bundle yourself.
If you have installed all prerequisites and the Flutter SDK,
you should be able to start developing Flutter on
{{os}} for {{v-target}}.

如果你已经安装了所有必要条件和 Flutter SDK,
你应该就可以在 {{os}} 上为 {{v-target}} 开发 Flutter。
44 changes: 40 additions & 4 deletions src/_includes/docs/install/flutter/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
### Download then install Flutter
{:.no_toc}

### 下载并安装 Flutter
{:.no_toc}

{% assign os = include.os %}
{% assign osl = include.os | downcase %}
{% assign target = include.target %}
Expand All @@ -14,7 +17,7 @@
{% assign terminal='PowerShell' %}
{% assign prompt='C:>' %}
{% assign prompt2=path | append: '>' %}
{% assign diroptions='`%USERPROFILE%` (`C:\Users\{username}`) or `%LOCALAPPDATA%` (`C:\Users\{username}\AppData\Local`)' %}
{% assign diroptions='`%USERPROFILE%` (`C:\Users\{username}`) 或者 `%LOCALAPPDATA%` (`C:\Users\{username}\AppData\Local`)' %}
{% assign dirinstall='`%USERPROFILE%\dev\`' %}
{% assign dirdl='%USERPROFILE%\Downloads' %}
{% assign ps-dir-dl='$env:USERPROFILE\Downloads\' %}
Expand Down Expand Up @@ -68,47 +71,80 @@ download the Flutter SDK bundle from its archive,
move the bundle to where you want it stored,
then extract the SDK.

从归档列表中下载 Flutter SDK 压缩包,
将压缩包移动到你想要的位置,
然后解压 SDK,
以此来安装 Flutter。

1. Download the following installation bundle to get the latest
{{site.sdk.channel}} release of the Flutter SDK.

下载以下 Flutter SDK 最新 {{site.sdk.channel}} 版本的
压缩包。

{% if os=='macOS' %}

| Intel Processor | | Apple Silicon |
| <t>Intel Processor</t><t>Intel 处理器</t> | | <t>Apple Silicon</t><t>Apple Silicon 处理器</t> |
|-----------------|-|---------------|
| [(loading...)](#){:.download-latest-link-{{osl}}.btn.btn-primary} | | [(loading...)](#){:.download-latest-link-{{osl}}-arm64.apple-silicon.btn.btn-primary} |
| [(获取中...)](#){:.download-latest-link-{{osl}}.btn.btn-primary} | | [(获取中...)](#){:.download-latest-link-{{osl}}-arm64.apple-silicon.btn.btn-primary} |

{% else %}

[(loading...)](#){:.download-latest-link-{{osl}}.btn.btn-primary}
[(获取中...)](#){:.download-latest-link-{{osl}}.btn.btn-primary}

{% endif -%}

For other release channels, and older builds, check out the [SDK archive][].

关于其他发布渠道和旧版本,
请查阅 [Flutter SDK 归档列表][SDK archive]。

The Flutter SDK should download to the {{os}} default download directory:
`{{dirdl}}`.

Flutter SDK 应该会下载至 {{os}} 默认下载目录:
`{{dirdl}}`。

{% if os=='Windows' %}

If you changed the location of the Downloads directory,
replace this path with that path.
To find your Downloads directory location,
check out this [Microsoft Community post][move-dl].

如果你自行更改了下载目录的位置,
那么请将之后步骤中解压指令 (Expand-Archive) 的
路径 (-Path) 改为你更改后的路径。
如果你需要查找当前计算机下载目录的位置,
请查阅 [Microsoft Community post][move-dl]

{% endif %}

1. Create a folder where you can install Flutter.

创建一个文件夹,用于安装 Flutter。

Consider creating a directory at {{diroptions}}.

可以考虑在 {{diroptions}} 中创建一个目录。

{% if os == "Windows" -%}
{% include docs/install/admonitions/install-paths.md %}
{% endif %}

1. Extract the zip file into the directory you want to store the Flutter SDK.

将 Flutter SDK 压缩文件 (zip) 解压到你想要存储的目录中。
可以使用以下指令进行解压。

```terminal
{{uz}}
```

When finished, the Flutter SDK should be in the `{{flutter-path}}` directory.

完成后,Flutter SDK 应该会位于 `{{flutter-path}}` 目录中。

[SDK archive]: {{site.url}}/release/archive

{% case os %}
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/docs/install/flutter/vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ you have installed [Visual Studio Code][]
VS Code places you in your user profile to start.
Choose a different location.

VS Code 会打开你默认的位置 (系统环境 %USERPROFILE% 的根目录)
VS Code 会打开你默认的位置。
你可以选择其他位置。

{% if os == "Windows" -%}
Expand Down
13 changes: 13 additions & 0 deletions src/_includes/docs/install/reqs/windows/open-envvars.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
1. Press <kbd>Windows</kbd> + <kbd>Pause</kbd>.

按下快捷键 <kbd>Windows</kbd> + <kbd>Pause</kbd>。

If your keyboard lacks a <kbd>Pause</kbd> key,
try <kbd>Windows</kbd> + <kbd>Fn</kbd> + <kbd>B</kbd>.

如果你的键盘上没有 <kbd>Pause</kbd> 键,
请尝试 <kbd>Windows</kbd> + <kbd>Fn</kbd> + <kbd>B</kbd>。

The **System > About** dialog displays.

这将会显示 **系统 > 系统信息** 的窗口。

1. Click **Advanced System Settings**
<span aria-label="and then">></span> **Advanced**
<span aria-label="and then">></span> **Environment Variables...**

单击 **高级系统设置**
<span aria-label="and then">></span> **高级**
<span aria-label="and then">></span> **环境变量…**

The **Environment Variables** dialog displays.

这将会显示 **环境变量** 的窗口。
39 changes: 39 additions & 0 deletions src/_includes/docs/install/reqs/windows/set-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,85 @@
### Update your Windows PATH variable
{:.no_toc}

### 更新 Windows PATH 环境变量
{:.no_toc}

{% include docs/help-link.md location='win-path' section='#unable-to-find-the-flutter-command' %}

To run Flutter commands in {{terminal}},
add Flutter to the `PATH` environment variable.
This section presumes that you installed the Flutter SDK in
`%USERPROFILE%\dev\flutter`.

将 Flutter 添加到 `PATH` 环境变量后,
才能在 {{terminal}} 中运行 Flutter 指令。
本节假定你在 `%USERPROFILE%\dev\flutter` 中
安装了 Flutter SDK。

{% include docs/install/reqs/windows/open-envvars.md %}

1. In the **User variables for (username)** section,
look for the **Path** entry.

在 **username 用户变量** 的部分中,
找到 **Path** 条目。

{:type="a"}
1. If the entry exists, double-click on it.

如果存在该条目,请双击它。

The **Edit Environment Variable** dialog displays.

这将会显示 **编辑环境变量** 的窗口。

{:type="i"}

1. Double-click in an empty row.

双击空白行。

1. Type `%USERPROFILE%\dev\flutter\bin`.

输入 `%USERPROFILE%\dev\flutter\bin`。

1. Click the **%USERPROFILE%\dev\flutter\bin** entry.

单击选中 **%USERPROFILE%\dev\flutter\bin** 条目。

1. Click **Move Up** until the Flutter entry sits at the top of the list.

单击 **上移**,直到 Flutter 条目位于列表顶部。

1. Click **OK** three times.

顺着打开的窗口依次点击 **确认**(三次)。

1. If the entry doesn't exist, click **New...**.

如果条目不存在,请单击 **新建…**。

The **Edit Environment Variable** dialog displays.

这将会显示 **新建用户变量** 的窗口。

{:type="i"}
1. In the **Variable Name** box, type `Path`.

在 **变量名** 框中,输入 `Path`。

1. In the **Variable Value** box,
type `%USERPROFILE%\dev\flutter\bin`

在 **变量值** 框中,
输入 `%USERPROFILE%\dev\flutter\bin`。

1. Click **OK** three times.

顺着打开的窗口依次点击 **确认**(三次)。

1. To enable these changes,
close and reopen any existing command prompts and {{terminal}} instances.

为了启用这些更改,
请关闭并重新打开任何现有命令提示符和 {{terminal}} 实例。