Skip to content

Commit 4f02566

Browse files
authored
[Install] Improve the Windows install steps (#1112)
1 parent d0a06ec commit 4f02566

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

_data/new-data/install/windows/releases.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ latest-release:
22
winget:
33
pre-code-text: |
44
Install Swift via the Windows Package Manager (also known as WinGet).
5-
headline: WinGet
5+
headline: 1. Install Swift via WinGet
66
after-code-text: |
77
First, install Windows platform dependencies:
88
<pre><code>winget install --id Microsoft.VisualStudio.2022.Community --exact --force --custom "--add Microsoft.VisualStudio.Component.Windows11SDK.22000 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.Tools.ARM64"</code></pre>
@@ -15,11 +15,27 @@ latest-release:
1515
copy: "Additional details included in Instructions"
1616
vscode:
1717
pre-code-text: Visual Studio Code is a cross-platform and extensible editor that supports Swift through the Swift extension, which provides intelligent editor functionality as well as debugging and test support.
18-
headline: Visual Studio Code
18+
headline: 2. Select an Editor <br><br> Visual Studio Code
1919
links:
2020
- href: 'https://marketplace.visualstudio.com/items?itemName=swiftlang.swift-vscode'
2121
copy: 'Install Swift extension'
2222
- href: 'https://code.visualstudio.com/docs/languages/swift'
2323
copy: 'Documentation'
2424
- href: "https://www.swift.org/tools/#editors"
2525
copy: "Other Editors"
26+
build-a-package:
27+
pre-code-text: "Let’s write a small application with your new Swift development environment."
28+
headline: 3. Build a Command-line Tool
29+
after-code-text: |
30+
Create a directory:
31+
<pre><code>mkdir MyCLI</code></pre>
32+
Change the directory:
33+
<pre><code>cd MyCLI</code></pre>
34+
Create a new project:
35+
<pre><code>swift package init --name MyCLI --type executable</code></pre>
36+
Run the program with
37+
<pre><code>swift run MyCLI</code></pre>
38+
You can continue to expand the program with additional features. Check out the getting started guide for command line tools.
39+
links:
40+
- href: 'https://www.swift.org/getting-started/cli-swiftpm/'
41+
copy: 'Build a Command-line Tool Guide'

install/windows/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ title: Install Swift - Windows
2323
{% include new-includes/components/code-box.html content = site.data.new-data.install.windows.releases.latest-release.vscode%}
2424
</div>
2525
</div>
26+
<div class="release-box section">
27+
<div class="content">
28+
{% include new-includes/components/code-box.html content = site.data.new-data.install.windows.releases.latest-release.build-a-package%}
29+
</div>
30+
</div>
2631
<h2>Alternative install options</h2>
2732
<div class="releases-grid">
2833
<div class="release-box section">

0 commit comments

Comments
 (0)