Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Chore: Updated prerequisite to check Win Store version #96

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
3 changes: 2 additions & 1 deletion src/main/handlers/Utilities/Prerequisites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { AppModel, getAppModel } from '../../../models/AppStatus'

export const WindowsPrerequisites: AppModel[] = [
getAppModel('wsl', 'Windows Subsystem for Linux (WSL)', 'wsl --status;', false),
getAppModel('wslUbuntu', 'WSL Ubuntu Distribution', 'wsl --status;', false),
getAppModel('wslUbuntu', 'WSL Ubuntu Distribution', 'wsl --list --quiet Ubuntu;', false),
getAppModel('wslUbuntuStore', 'WSL Ubuntu Distribution from Windows Store', 'wsl --list --quiet Ubuntu-20.04;', false),
hanzlamateen marked this conversation as resolved.
Show resolved Hide resolved
hanzlamateen marked this conversation as resolved.
Show resolved Hide resolved
getAppModel('dockerDesktop', 'Docker Desktop', 'docker version;', false),
getAppModel('dockerDesktopUbuntu', 'Docker Desktop WSL Ubuntu Integration', 'wsl docker version;', false)
]
26 changes: 19 additions & 7 deletions src/renderer/components/Config/PrereqsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ const PrereqsView = ({ sx }: Props) => {
}

const processDescriptions = (status: AppModel) => {
if (status.id === 'wsl' || status.id === 'wslUbuntu') {
if (status.id === 'wsl' || status.id === 'wslUbuntu' || status.id === 'wslUbuntuStore') {
hanzlamateen marked this conversation as resolved.
Show resolved Hide resolved
status.description = (
<Typography fontSize={14}>
<span style={{ fontSize: 14, opacity: 0.6 }}>
Make sure WSL is installed and Ubuntu is selected as default distribution.{' '}
Make sure WSL is installed and Ubuntu is selected as the default distribution.{' '}
</span>
<a style={{ color: 'var(--textColor)' }} target="_blank" href={Endpoints.Docs.INSTALL_WSL}>
Install WSL
Expand All @@ -63,18 +63,30 @@ const PrereqsView = ({ sx }: Props) => {
<br />
<br />
<span style={{ fontSize: 14, opacity: 0.6 }}>
To ensure 'Ubuntu' is set as default WSL distribution. You can check your default distribution by
running following command in Powershell/CMD:
To ensure 'Ubuntu' is set as the default WSL distribution, you can check your default distribution by
running the following command in PowerShell/CMD:
</span>
<br />
<code>wsl -l</code>
<code>wsl --list --quiet</code>
hanzlamateen marked this conversation as resolved.
Show resolved Hide resolved
<br />
<br />
<span style={{ fontSize: 14, opacity: 0.6 }}>
Afterwards, if Ubuntu is not selected as default, then you can do so by running following command:
Afterwards, if Ubuntu is not selected as the default, you can set it as the default by running the
hanzlamateen marked this conversation as resolved.
Show resolved Hide resolved
following command:
</span>
<br />
<code>wsl -s Ubuntu</code>
<code>wsl --set-default Ubuntu</code>
</>
)}
{status.id === 'wslUbuntuStore' && (
<>
<br />
<br />
<span style={{ fontSize: 14, opacity: 0.6 }}>
To install the Ubuntu distribution from the Windows Store, you can run the following command:
</span>
<br />
<code>wsl --install -d Ubuntu-20.04</code>
hanzlamateen marked this conversation as resolved.
Show resolved Hide resolved
</>
)}
</Typography>
Expand Down