[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 0e9da3a 01/18: Use Ubuntu 18.04 only for WSL
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 0e9da3a 01/18: Use Ubuntu 18.04 only for WSL |
Date: |
Wed, 29 May 2019 18:49:06 -0400 (EDT) |
branch: master
commit 0e9da3aa250fc7fa1b391dfa7678a738ede492ec
Author: Ilya Sinitsyn <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Use Ubuntu 18.04 only for WSL
Only Ubuntu 18.04 is supported now because non-Debian-based OS won't
work, as we use apt, Debian and Ubuntu 16.04 uses the
i686-w64-mingw32-g++ package of lower version than required, so can't
be used too.
---
INSTALL | 5 ++++-
install_wsl.ps1 | 43 ++++++-------------------------------------
2 files changed, 10 insertions(+), 38 deletions(-)
diff --git a/INSTALL b/INSTALL
index 0594599..9c38eaa 100644
--- a/INSTALL
+++ b/INSTALL
@@ -83,7 +83,10 @@ and execute the installation script:
C:\cache_for_lmi\install_wsl.ps1
-Select preferred OS or simply press Enter to install Ubuntu 18.04.
+Note: Only Ubuntu 18.04 is supported now because non-Debian-based OS won't
work,
+as we use apt, Debian and Ubuntu 16.04 uses the i686-w64-mingw32-g++ package of
+lower version than required, so can't be used too.
+
After a few minutes, you should see something like this at the end:
"WSL installation seems to have succeeded"
diff --git a/install_wsl.ps1 b/install_wsl.ps1
index ff32b80..73c5307 100644
--- a/install_wsl.ps1
+++ b/install_wsl.ps1
@@ -32,42 +32,10 @@ if ((Test-Path -Path $wsl_registry) -And `
(Get-ChildItem $wsl_registry).Length -gt 0) {
Write-Output 'WSL OS already installed:'
Write-Output (Get-ChildItem $wsl_registry | ForEach-Object
{Get-ItemProperty $_.PSPath}).DistributionName
+ Write-Output 'Note: Only "Ubuntu 18.04" is currently supported.'
return
}
-# Select a Debian-compatible OS: our build scripts use apt.
-$os_list = @(
- @{
- name = 'Ubuntu 18.04'
- filename = 'Ubuntu_18_04.appx'
- uri = 'https://aka.ms/wsl-ubuntu-1804'
- }
- @{
- name = 'Ubuntu 16.04'
- filename = 'Ubuntu_16_04.appx'
- uri = 'https://aka.ms/wsl-ubuntu-1604'
- }
- @{
- name = 'Debian GNU/Linux'
- filename = 'Debian_GNU_Linux.appx'
- uri = 'https://aka.ms/wsl-debian-gnulinux'
- }
-)
-
-$options = @()
-for ($i=1; $i -le $os_list.Length; $i++) {
- $os_name = $os_list[$i-1].name
- $d = [System.Management.Automation.Host.ChoiceDescription]::new("&$i.
$os_name")
- $options += $d
-}
-
-$title = 'Please select the OS to install'
-$description = "Note: Non-Debian-based OS won't work, as we use apt."
-
-$opt = $host.UI.PromptForChoice($title, $description, $options, 0)
-$os = $os_list[$opt]
-Write-Output ('"' + $os.name + '" was chosen.')
-
# Create the download directory.
$dir = 'C:\cache_for_lmi\downloads\'
If (!(Test-Path -Path $dir)) {
@@ -75,14 +43,15 @@ If (!(Test-Path -Path $dir)) {
}
# Download the OS distribution.
-$path = 'C:\cache_for_lmi\downloads\' + $os.filename
+$path = 'C:\cache_for_lmi\downloads\Ubuntu_18_04.appx'
If (!(Test-Path -Path $path)) {
- Write-Output ('Downloading "' + $os.name + '"...')
- Invoke-WebRequest -Uri $os.uri -OutFile $path -UseBasicParsing
+ Write-Output ('Downloading "Ubuntu 18.04"...')
+ $os_uri = 'https://aka.ms/wsl-ubuntu-1804'
+ Invoke-WebRequest -Uri $os_uri -OutFile $path -UseBasicParsing
}
# Install the OS.
-Write-Output ('Installing "' + $os.name + '"...')
+Write-Output ('Installing "Ubuntu 18.04"...')
Add-AppxPackage -Path $path
Write-Output 'WSL installation seems to have succeeded'
- [lmi-commits] [lmi] master updated (e503910 -> b30b5db), Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 0d8f53e 02/18: Resolve shellcheck "SC1117" warning, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 1d9b9a6 04/18: Deduplicate, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 0e9da3a 01/18: Use Ubuntu 18.04 only for WSL,
Greg Chicares <=
- [lmi-commits] [lmi] master 66fe46b 03/18: Resolve more shellcheck "SC1117" warnings, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master a4ee62f 07/18: Suppress certain shellcheck warnings, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master b25a732 06/18: Resolve all shellcheck "SC2038" warnings, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master d52c37f 09/18: Resolve a shellcheck "SC2034" warning, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master ee293d1 10/18: Update certain URLs, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 19c0946 13/18: Copy compiler runtime files in one makefile target only, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 3873eb0 15/18: Fix defect committed 20190521T2101: tested 'md5sums' in wrong directory, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master c40f2f8 14/18: Routinely run shellcheck, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master aebe56b 17/18: Don't copy compiler runtime files to build directory, Greg Chicares, 2019/05/29
- [lmi-commits] [lmi] master 9b9978f 16/18: Avoid 'ls --classify', Greg Chicares, 2019/05/29