Skip to content

Commit

Permalink
Adds ChromeOS, Linux GS pages (flutter#10316)
Browse files Browse the repository at this point in the history
Adds ChromeOS, Linux GS pages plus all 2nd level add-ons to getting
started.

Fixes flutter#10255
Fixes flutter#10186
Fixes flutter#10188
Fixes flutter#10191

Reviewed and approved by @anderdobo in flutter#10302 

----

## New pages
These are mostly reusing includes or include templates from the other
Getting Started pages. The main new pages are under:

- src/_includes/docs/install/reqs/linux/base.md
- src/get-started/install/chromeos/
- src/get-started/install/linux/
- src/platform-integration/android/install-android/
- src/platform-integration/linux/install-linux/
- src/platform-integration/web/install-web/

Changed to fix auto-population of current build artifacts in terminal
code blocks.
- src/assets/js/archive.js

Added tabs
- src/assets/js/main.js

Refactored other framework pages to clean up includes.

----

## New page links
It will help to see these staged because of the heavy reuse and Liquid
logic.

### ChromeOS install

- [Install on ChromeOS landing
page](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/get-started/install/chromeos/)
- [Install Flutter with Android tools on
ChromeOS](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/get-started/install/chromeos/android/)
- [Install Flutter with web tools on
ChromeOS](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/get-started/install/chromeos/web/)

### Linux Install

- [Install on Linux landing
page](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/get-started/install/linux/)
- [Install Flutter for Linux Desktop on
Linux](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/get-started/install/linux/desktop)
- [Install Flutter with Android tools on on
Linux](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/get-started/install/linux/android)
- [Install Flutter with web tools on
Linux](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/get-started/install/linux/web)

### Add Linux desktop to Linux Android or Web install

- [Add Linux Desktop tools landing
page](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/platform-integration/linux/install-linux/)
- [Add Linux Desktop tools to Flutter & Android tools on
Linux](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/platform-integration/linux/install-linux/install-linux-from-android)
- [Add Linux Desktop tools to Flutter & Web tools on
Linux](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/platform-integration/linux/install-linux/install-linux-from-web)

### Add Android to Linux Desktop install

- [Add Android tools to Flutter & Linux Desktop tools on
Linux](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/platform-integration/android/install-android/install-android-from-linux)
- [Add Android tools to Flutter & Web tools on
Linux](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/platform-integration/android/install-android/install-android-from-web-on-linux)

### Add Android to ChromeOS Web install

- [Add Android tools to Flutter on
ChromeOS](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/platform-integration/android/install-android/install-android-from-web-on-chromeos)

### Add Web to Linux Desktop install

- [Add web tools to Flutter & Linux Desktop tools on
ChromeOS](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/platform-integration/web/install-web/install-web-from-linux-desktop)
- [Add web tools to Flutter & Android tools on
ChromeOS](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/platform-integration/web/install-web/install-web-from-android-on-linux)

### Add Web to ChromeOS Android install

- [Add web tools to
ChromeOS](https://flutter-docs-prod--pr10316-fix-10255-ayluprrv.web.app/platform-integration/web/install-web/install-web-from-android-on-chromeos)

---------

Co-authored-by: Shams Zakhour (ignore Sfshaza) <[email protected]>
Co-authored-by: John Ryan <[email protected]>
  • Loading branch information
3 people committed Apr 5, 2024
1 parent 428853a commit 22b84fb
Show file tree
Hide file tree
Showing 102 changed files with 1,674 additions and 522 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ targetmin:
## Software current versions

appnow:
flutter: '3.19.0'
flutter: '3.19.3'
vscode: '1.86'
android_studio: '2023.1 (Hedgehog) or later'
android_sdk: '34.0.0'
Expand Down
48 changes: 48 additions & 0 deletions src/_data/doctor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
ChromeOSWeb:
degree: 1
windows: 'X'
linux: 'X'
android-toolchain: 'N'
chrome: 'Y'
xcode: 'X'
visual-studio: 'X'
android-studio: 'N'
errors: 3
add-android: 'Y'
add-chrome: 'N'
add-simulator: 'X'
add-xcode: 'X'
add-linux-tools: 'X'
add-visual-studio: 'X'
ChromeOSAndroid:
degree: 1
windows: 'X'
linux: 'X'
android-toolchain: 'Y'
chrome: 'N'
xcode: 'X'
visual-studio: 'X'
android-studio: 'Y'
errors: 2
add-android: 'N'
add-chrome: 'Y'
add-simulator: 'X'
add-xcode: 'X'
add-linux-tools: 'X'
add-visual-studio: 'X'
ChromeOSAndroidWeb:
degree: 2
windows: 'X'
linux: 'X'
android-toolchain: 'Y'
chrome: 'Y'
xcode: 'X'
visual-studio: 'X'
android-studio: 'Y'
errors: 0
add-android: 'N'
add-chrome: 'N'
add-simulator: 'X'
add-xcode: 'X'
add-linux-tools: 'X'
add-visual-studio: 'X'
LinuxAndroid:
degree: 1
windows: 'X'
Expand Down
14 changes: 14 additions & 0 deletions src/_data/shells.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- name: bash
set-path: echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.bash_profile
- name: zsh
set-path: echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.zshenv
- name: fish
set-path: fish_add_path -g -p $HOME/development/flutter/bin
- name: csh
set-path: echo 'setenv PATH "$HOME/development/flutter/bin:$PATH"' >> ~/.cshrc
- name: tsch
set-path: echo 'setenv PATH "$HOME/development/flutter/bin:$PATH"' >> ~/.tcshrc
- name: ksh
set-path: echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.profile
- name: sh
set-path: echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.profile
2 changes: 2 additions & 0 deletions src/_data/sidenav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@
- title: Linux
permalink: /platform-integration/linux
children:
- title: Add Linux as build target
permalink: /platform-integration/linux/install-linux
- title: Build a Linux app
permalink: /platform-integration/linux/building
- title: macOS
Expand Down
14 changes: 14 additions & 0 deletions src/_includes/docs/install/accordions/install-chrome-from-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

<details markdown="1">
<summary><b>How to install Chrome from the command line</b></summary>

```terminal
$ wget https://dl-ssl.google.com/linux/linux_signing_key.pub -O /tmp/google.pub
$ gpg --no-default-keyring \
--keyring /etc/apt/keyrings/google-chrome.gpg \
--import /tmp/google.pub
$ echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
$ sudo apt-get update -y; sudo apt-get install -y google-chrome-stable
```

</details>
3 changes: 3 additions & 0 deletions src/_includes/docs/install/admonitions/install-in-order.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{site.alert.important}}
Perform this guide in sequence. Skipping steps can cause errors.
{{site.alert.end}}
25 changes: 20 additions & 5 deletions src/_includes/docs/install/compiler/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% assign devos = include.devos %}
{% assign target = include.target %}
{% assign compiler = include.compiler %}
{% assign time = include.time %}
{% assign attempt-time = include.attempt %}

{% case devos %}
{% when 'Windows' -%}
Expand All @@ -21,8 +21,23 @@

{% include docs/help-link.md location='android-studio' section='#android-setup' %}

To create Android apps with Flutter, verify that the following Android
components have been installed.

* **Android SDK Platform, API {{ site.appnow.android_sdk }}**
* **Android SDK Command-line Tools**
* **Android SDK Build-Tools**
* **Android SDK Platform-Tools**
* **Android Emulator**

If you haven't installed these, or you don't know, continue with the following procedure.

Otherwise, you can skip to the [next section][check-dev].

[check-dev]: #check-your-development-setup

{% comment %} Nav tabs {% endcomment -%}
<ul class="nav nav-tabs" id="android-studio-start-{{devos | downcase}}" role="tablist">
<ul class="nav nav-tabs" id="android-studio-start" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="first-start-tab" href="#first-start" role="tab" aria-controls="first-start" aria-selected="true">First time using Android Studio</a>
</li>
Expand All @@ -40,7 +55,7 @@
aria-labelledby="first-start-tab"
markdown="1">

1. Start **Android Studio**.
1. Launch **Android Studio**.

The **Welcome to Android Studio** dialog displays.

Expand All @@ -62,7 +77,7 @@
aria-labelledby="later-start-tab"
markdown="1">

1. Start **Android Studio**.
1. Launch **Android Studio**.

1. Go to the **Settings** dialog to view the **SDK Manager**.

Expand Down Expand Up @@ -153,7 +168,7 @@
</div>
{% comment %} End: Tab panes. {% endcomment -%}

{% if time=="first" %}
{% if attempt-time == 'first' %}

### Agree to Android licenses

Expand Down
6 changes: 3 additions & 3 deletions src/_includes/docs/install/compiler/xcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
{% assign prompt1='$' %}
{% assign devos = include.devos %}
{% assign target = include.target %}
{% assign time = include.time %}
{% assign attempt = include.attempt %}

### Configure Xcode

{% if time=="first" %}
{% if attempt=="first" %}

To develop Flutter apps for {{target}}, install Xcode to compile to native bytecode.

Expand Down Expand Up @@ -82,7 +82,7 @@ With Xcode, you can run Flutter apps on an iOS device or on the simulator.

{% endif %}

{% if time=="first" %}
{% if attempt=="first" %}

### Install CocoaPods

Expand Down
23 changes: 12 additions & 11 deletions src/_includes/docs/install/devices/android-emulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
{% assign devos = include.devos %}
{% assign target = include.target %}
{% assign compiler = include.compiler %}
{% assign time = include.time %}
{% assign attempt = include.attempt %}

{% if devos=='Windows' -%}
{% case devos %}
{% when 'Windows','Linux' -%}
{% assign images = '**x86 Images**' -%}
{% elsif devos=='macOS' -%}
{% when 'macOS' -%}
{% assign images = '**x86 Images** if your Mac runs on an Intel CPU or **ARM Images** if your Mac runs on an Apple CPU' -%}
{% endif -%}
{% endcase -%}

To configure your Flutter app to run in the Android emulator,
follow these steps:
To configure your Flutter app to run in an Android emulator,
follow these steps to create and select an emulator.

1. Enable
[VM acceleration]({{site.android-dev}}/studio/run/emulator-acceleration#accel-vm)
Expand Down Expand Up @@ -65,13 +66,11 @@ follow these steps:
1. To rename the Android Virtual Device (AVD), change the value in the
**AVD Name** box.

1. Click **Show Advanced Settings**.

1. Scroll to **Emulated Performance**.
1. Click **Show Advanced Settings** and scroll to **Emulated Performance**.

1. From the **Graphics** dropdown menu, select **Hardware - GLES 2.0**.

This enables [hardware acceleration]({{site.android-dev}}/studio/run/emulator-acceleration).
This enables [hardware acceleration][] and improves rendering performance.

1. Verify your AVD configuration. If it is correct, click **Finish**.

Expand All @@ -81,4 +80,6 @@ follow these steps:
1. In the **Device Manager** dialog, click the **Run** icon to the right
of your desired AVD.
The emulator starts up and displays the default canvas for your
selected OS version and device.
selected Android OS version and device.

[hardware acceleration]: {{site.android-dev}}/studio/run/emulator-acceleration
2 changes: 1 addition & 1 deletion src/_includes/docs/install/devices/android-physical.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% assign devos = include.devos %}
{% assign target = include.target %}
{% assign compiler = include.compiler %}
{% assign time = include.time %}
{% assign attempt = include.attempt %}

To configure your Flutter app to run on a physical Android device,
you need an Android device running {{site.targetmin.android}} or later.
Expand Down
66 changes: 45 additions & 21 deletions src/_includes/docs/install/flutter-doctor-success.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,64 @@
{% assign doctor = site.data.doctor %}
{% assign config = site.data.doctor[include.config] %}
{% case include.devos %}
{% when 'macOS' %}
{% assign displayos = 'macOS 14.4.0 23E214 darwin-arm64' %}
{% when 'Windows' %}
{% assign displayos = 'Microsoft Windows 11 [Version 10.0.22621.3155]' %}
{% when 'Linux' %}
{% assign displayos = 'Ubuntu 20.04 (LTS)' %}
{% endcase %}

{% comment %}
Don't change the whitespace control dashes in this list.
It took about two hours to get exactly right. @atsansone
{% endcomment %}

```terminal
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, {{site.appnow.flutter}}, on {{os}} A.B chipset, locale en)
[✓] Flutter (Channel stable, {{site.appnow.flutter}}, on {{displayos}}, locale en)
{%- if config.windows == 'Y' %}
[✓] Windows version (Installed version of Windows is version 10 or higher)
{%- endif %}
{% case config.android-toolchain %}
{%- when 'Y' %}[✓] Android toolchain - develop for Android devices (Android SDK version {{site.appnow.android_sdk}})
{%- when 'N' %}[!] Android toolchain - develop for Android devices
{%- endcase %}
{% case config.chrome %}
{%- when 'Y' %}[✓] Chrome - develop for the web
{%- when 'N' %}[!] Chrome - develop for the web
{%- endcase %}
{% when 'Y' %}[✓] Android toolchain - develop for Android devices (Android SDK version {{site.appnow.android_sdk}})
{% when 'N' %}[!] Android toolchain - develop for Android devices
{% endcase %}
{%- case config.chrome %}
{% when 'Y' %}[✓] Chrome - develop for the web
{% when 'N' %}[!] Chrome - develop for the web
{% endcase -%}
{% unless config.xcode == 'X' -%}
{% case config.xcode %}
{%- when 'Y' %}[✓] Xcode - develop for iOS and macOS (Xcode {{site.appnow.xcode}})
{%- when 'N' %}[!] Xcode - develop for iOS and macOS (Xcode not installed)
{%- endcase -%}
{% when 'Y' %}[✓] Xcode - develop for iOS and macOS (Xcode {{site.appnow.xcode}})
{% when 'N' %}[!] Xcode - develop for iOS and macOS (Xcode not installed)
{% endcase %}
{%- endunless -%}
{% unless config.visual-studio == 'X' -%}
{% case config.visual-studio %}
{%- when 'Y' %}[✓] Visual Studio - develop Windows apps (version 2022)
{%- when 'N' %}[!] Visual Studio - develop Windows apps
{%- endcase %}
{% case config.android-studio %}
{%- when 'Y' %}[✓] Android Studio (version {{site.appnow.android_studio}})
{%- when 'N' %}[!] Android Studio (not installed)
{%- endcase %}
{% when 'Y' %}[✓] Visual Studio - develop Windows apps (version 2022)
{% when 'N' %}[!] Visual Studio - develop Windows apps
{% endcase %}
{%- endunless %}
{%- case config.android-studio %}
{% when 'Y' %}[✓] Android Studio (version {{site.appnow.android_studio}})
{% when 'N' %}[!] Android Studio (not installed)
{% endcase -%}
{% unless config.linux == 'X' -%}
{% case config.linux %}
{%- when 'Y' %}[✓] Linux toolchain - develop for Linux desktop
{%- when 'N' %}[!] Linux toolchain - develop for Linux desktop
{%- endcase -%}
{% when 'Y' %}[✓] Linux toolchain - develop for Linux desktop
{% when 'N' %}[!] Linux toolchain - develop for Linux desktop
{% endcase %}
{%- endunless -%}
[✓] VS Code (version {{site.appnow.vscode}})
[✓] Connected device (1 available)
[✓] Network resources
{% unless config.errors == 0 %}
! Doctor found issues in {{config.errors}} categories.
{% else %}
∙ No issues found!
{% endunless -%}
```
19 changes: 15 additions & 4 deletions src/_includes/docs/install/flutter-doctor.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
{% else %}
{% assign work-target = target | append: ' on ' | append: devos %}
{% endcase %}
{% case work-target %}
{% when 'macOS desktop','Web on macOS','iOS on macOS' %}
{% assign compiler = 'Xcode' %}
{% when 'Android on Windows','Android on macOS','Android on Linux' %}
{% assign compiler = 'Android Studio' %}
{% when 'Linux desktop','Web on Linux' %}
{% assign compiler = 'one of the Linux libraries' %}
{% when 'Windows desktop','Web on Windows' %}
{% assign compiler = 'Visual Studio' %}
{% endcase %}

### Run Flutter doctor

Expand All @@ -44,7 +54,7 @@ As you chose to develop for {{target}},
you do not need _all_ components.
If you followed this guide, the result of your command should resemble:

{% include docs/install/flutter-doctor-success.md config=include.config -%}
{% include docs/install/flutter-doctor-success.md config=include.config devos=devos -%}

### Troubleshoot Flutter doctor issues

Expand All @@ -62,10 +72,11 @@ Check the output for other software you might need to install
or further tasks to perform.

If you change the configuration of your Flutter SDK or its related components,
run `flutter doctor` again to verify the installation.
run `flutter doctor` _again_ to verify the installation.

## Start developing {{work-target}} apps on Flutter
## Start developing {{work-target}} apps with Flutter

Congratulations!
Now that you have installed all prerequisites and the Flutter SDK,
you should be able to start developing Flutter apps for {{work-target}}.
you should be able to start developing Flutter apps for
{{work-target}}.
1 change: 1 addition & 0 deletions src/_includes/docs/install/flutter-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ or download and install the Flutter bundle yourself.
</div>
</div>
{% comment %} End: Tab panes. {% endcomment -%}

Loading

0 comments on commit 22b84fb

Please sign in to comment.