From 75482c1d8f321439ecaa641536694f0ed2e54a7f Mon Sep 17 00:00:00 2001 From: Carlos Rafael Ramirez Date: Mon, 3 Dec 2018 15:01:20 -0500 Subject: [PATCH 01/35] Fix: Open With WLinux in Context Menu leads to error #195 --- linux_files/setup | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/linux_files/setup b/linux_files/setup index 32f4de03..e76bfdc1 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -707,7 +707,7 @@ fi } function explorerintegration { -if (whiptail --title "EXPLORER" --yesno "Would you like to enable Windows Explorer shell integration?" 8 65) then +if (whiptail --title "EXPLORER" --yesno "Would you like to enable Windows Explorer shell integration?" 8 65); then echo "Enabling Windows Explorer shell integration." createtmp cat << 'EOF' >> Install.reg @@ -715,12 +715,14 @@ if (whiptail --title "EXPLORER" --yesno "Would you like to enable Windows Explor [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\WLinux] @="Open with WLinux" [HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\WLinux\command] - @="wlinux.exe run \"cd \\\"$(wslpath \\\"%V\\\")\\\" && $(getent passwd $LOGNAME | cut -d: -f7)\"" + @="_wlinuxPath_ run \"cd \\\"$(wslpath \\\"%V\\\")\\\" && $(getent passwd $LOGNAME | cut -d: -f7)\"" [HKEY_CURRENT_USER\Software\Classes\Directory\shell\WLinux] @="Open with WLinux" [HKEY_CURRENT_USER\Software\Classes\Directory\shell\WLinux\command] - @="wlinux.exe run \"cd \\\"$(wslpath \\\"%V\\\")\\\" && $(getent passwd $LOGNAME | cut -d: -f7)\"" + @="_wlinuxPath_ run \"cd \\\"$(wslpath \\\"%V\\\")\\\" && $(getent passwd $LOGNAME | cut -d: -f7)\"" EOF + wlinuxPath=$(wslpath -m "$(whereis wlinux.exe | cut --delimiter=' ' -f2)" | sed 's$/$\\\\\\\\$g') + sed -i "s/_wlinuxPath_/${wlinuxPath}/g" Install.reg cp Install.reg $(wslpath "$(cmd.exe /c 'echo %TEMP%' 2>&1 | tr -d '\r')")/Install.reg cmd.exe /C "Reg import %TEMP%\Install.reg" cleantmp From 363d80766d241381acb87299923258a5498ed996 Mon Sep 17 00:00:00 2001 From: Hayden Date: Mon, 3 Dec 2018 22:26:01 -0500 Subject: [PATCH 02/35] Update LICENSE.md --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.md b/LICENSE.md index f49ee5fd..6887ff41 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -7,7 +7,7 @@ # Trademarks -- WLinux is a trademark of Whitewater Foundry, Ltd. Co. You may use the WLinux trademark in any lawful manner in compliance with your local trademark laws. +- WLinux and Whitewater Foundry are trademarks of Whitewater Foundry, Ltd. Co. You may use the WLinux and Whitewater Foundry trademark in any lawful manner in compliance with your local trademark laws. - Debian® is a registered trademark of Software in the Public Interest, Inc. and is used in compliance with the [Debian Trademark Policy](https://www.debian.org/trademark). From a78c24823d7ab7c78b3f7c769b34e22dc01206e4 Mon Sep 17 00:00:00 2001 From: Hayden Date: Thu, 6 Dec 2018 07:06:06 -0500 Subject: [PATCH 03/35] 1.1.27 fix --- DistroLauncher-Appx/MyDistro.appxmanifest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DistroLauncher-Appx/MyDistro.appxmanifest b/DistroLauncher-Appx/MyDistro.appxmanifest index 016d45d6..3d9bcba6 100644 --- a/DistroLauncher-Appx/MyDistro.appxmanifest +++ b/DistroLauncher-Appx/MyDistro.appxmanifest @@ -1,6 +1,6 @@  - + WLinux @@ -30,7 +30,7 @@ - + From 87726f8787697549f8a9562b9d2ecfff9265b725 Mon Sep 17 00:00:00 2001 From: Carlos Ramirez Date: Thu, 6 Dec 2018 16:20:44 -0500 Subject: [PATCH 04/35] Catch if Docker for Windows is not installed --- linux_files/setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux_files/setup b/linux_files/setup index e76bfdc1..133e020b 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -842,14 +842,14 @@ function dockerinstall { if (whiptail --title "DOCKER" --yesno "Would you like to install the bridge to Docker?" 8 55); then echo "Installing the bridge to Docker." - connected=$(docker.exe version 2>&1 | grep -c "docker daemon is not running.") + connected=$(docker.exe version 2>&1 | grep -c "docker daemon is not running.\|docker.exe: command not found") while [[ ${connected} != 0 ]]; do - if ! (whiptail --title "DOCKER" --yesno "Docker for Windows appears not to be running, please check it and ensure that it is running correctly. Would you like to try again?" 9 75); then + if ! (whiptail --title "DOCKER" --yesno "Docker Desktop appears not to be running, please check it and ensure that it is running correctly. Would you like to try again?" 9 75); then return fi - connected=$(docker.exe version 2>&1 | grep -c "docker daemon is not running.") + connected=$(docker.exe version 2>&1 | grep -c "docker daemon is not running.\|docker.exe: command not found") done From a21d00a62749e4867d961791335508979097aead Mon Sep 17 00:00:00 2001 From: dazjjackson <7090355+dazjjackson@users.noreply.github.com> Date: Thu, 6 Dec 2018 21:21:00 +0000 Subject: [PATCH 05/35] Update setup Fix uninstall of shell integration --- linux_files/setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux_files/setup b/linux_files/setup index 32f4de03..2be89fca 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -732,7 +732,7 @@ EOF [-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\WLinux] [-HKEY_CURRENT_USER\Software\Classes\Directory\shell\WLinux] EOF - cp Install.reg $(wslpath "$(cmd.exe /c 'echo %TEMP%' 2>&1 | tr -d '\r')")/Uninstall.reg + cp Uninstall.reg $(wslpath "$(cmd.exe /c 'echo %TEMP%' 2>&1 | tr -d '\r')")/Uninstall.reg cmd.exe /C "Reg import %TEMP%\Uninstall.reg" cleantmp fi From 043d681f24e5771af5807c5c70a295bf72dd42a8 Mon Sep 17 00:00:00 2001 From: Hayden Date: Mon, 10 Dec 2018 12:29:55 -0500 Subject: [PATCH 06/35] Add Kim to Credits --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8886a7a5..8043e90f 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ Purchases of WLinux in the Microsoft Store pay for a team of open source indie d - [Hayden Barnes](https://github.com/sirredbeard) - [Patrick Wu](https://github.com/patrick330602) - [Carlos Rafael Ramirez](https://github.com/crramirez) +- [Kim](https://github.com/grufwub) ### Contributors From 2e8f577614514dafa302449357e019187fe680b7 Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Mon, 10 Dec 2018 18:17:08 +0000 Subject: [PATCH 07/35] Update oh-my-zsh whiptail installation message Updates installation message to explain what the oh-my-zsh framework does for your zsh installation (and why you might want to install it). Signed-off-by: Kim Bradley --- linux_files/setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux_files/setup b/linux_files/setup index b2381141..47a6c79e 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -268,7 +268,7 @@ EOF sudo cp zshrc /etc/zsh/zshrc cleantmp - if (whiptail --title "zsh" --yesno "Would you like to download and install oh-my-zsh?" 8 55) then + if (whiptail --title "zsh" --yesno "Would you like to download and install oh-my-zsh? This is a framework for managing your zsh installation" 8 95) then createtmp whiptail --title "zsh" --msgbox "After oh my zsh is installed and launched, type 'exit' and ENTER to return to wlinux-setup" 8 95 mkdir "Type exit to return to wlinux-setup" From cb8bff35dc4fb1707c4e16b4a4f4ac2451269642 Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Mon, 10 Dec 2018 18:20:37 +0000 Subject: [PATCH 08/35] Backup old zshrc if existent as previously was totally rewritten Signed-off-by: Kim Bradley --- linux_files/setup | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux_files/setup b/linux_files/setup index 47a6c79e..101a03eb 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -256,6 +256,12 @@ for i in ${!options[@]}; do if [ ${options[i]} = "zsh" ] then + + # Backup old zshrc if existent (e.g. wlinux-setup being re-run) + if [ ! -d "/etc/zsh/zshrc" ] ; then + echo "Old zshrc found. Backing up and replacing" + sudo mv /etc/zsh/zshrc /etc/zsh/zshrc.old + fi createtmp at << 'EOF' >> zshrc From 9b808defc0d18bec231b1054def2b1ee2364322b Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Mon, 10 Dec 2018 18:26:43 +0000 Subject: [PATCH 09/35] Change method of rewriting zsh Works better than previously, and this way we can append to old in the future if necessary. Signed-off-by: Kim Bradley --- linux_files/setup | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/linux_files/setup b/linux_files/setup index 101a03eb..8d383c34 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -263,16 +263,14 @@ for i in ${!options[@]}; do sudo mv /etc/zsh/zshrc /etc/zsh/zshrc.old fi - createtmp - at << 'EOF' >> zshrc -export DISPLAY=:0 -export LIBGL_ALWAYS_INDIRECT=1 -export NO_AT_BRIDGE=1 -alias wlinux-setup='bash /etc/setup' -alias wlinux-help='bash /etc/helpme' -EOF - sudo cp zshrc /etc/zsh/zshrc - cleantmp + # Need to "unsetopt no_match" to stop line31 in /etc/profile failing on not finding anything under /etc/profile.d/* + # Reset after to prevent any unforeseen consequences + # ALTERNATIVE: "shopt -s failglob" in /etc/profile fixes bash to act more similarly to zsh (we're currently doing reverse) + # This might help if other alternative shells run into same issue + sudo touch /etc/zsh/zshrc + echo "unsetopt no_match" | sudo tee -a /etc/zsh/zshrc + echo "source /etc/profile" | sudo tee -a /etc/zsh/zshrc + echo "setopt no_match" | sudo tee -a /etc/zsh/zshrc if (whiptail --title "zsh" --yesno "Would you like to download and install oh-my-zsh? This is a framework for managing your zsh installation" 8 95) then createtmp From 08f732884b1c9a5aed5441179aa574df9ca629b3 Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Mon, 10 Dec 2018 18:35:06 +0000 Subject: [PATCH 10/35] Small whitespace changes Signed-off-by: Kim Bradley --- linux_files/setup | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/linux_files/setup b/linux_files/setup index 8d383c34..a0a72382 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -254,34 +254,34 @@ for i in ${!options[@]}; do echo "Installing ${options[i]}..." sudo apt install ${options[i]} -y - if [ ${options[i]} = "zsh" ] - then + if [ ${options[i]} = "zsh" ] + then - # Backup old zshrc if existent (e.g. wlinux-setup being re-run) - if [ ! -d "/etc/zsh/zshrc" ] ; then - echo "Old zshrc found. Backing up and replacing" - sudo mv /etc/zsh/zshrc /etc/zsh/zshrc.old - fi + # Backup old zshrc if existent (e.g. wlinux-setup being re-run) + if [ ! -d "/etc/zsh/zshrc" ] ; then + echo "Old zshrc found. Backing up and replacing" + sudo mv /etc/zsh/zshrc /etc/zsh/zshrc.old + fi # Need to "unsetopt no_match" to stop line31 in /etc/profile failing on not finding anything under /etc/profile.d/* - # Reset after to prevent any unforeseen consequences - # ALTERNATIVE: "shopt -s failglob" in /etc/profile fixes bash to act more similarly to zsh (we're currently doing reverse) - # This might help if other alternative shells run into same issue - sudo touch /etc/zsh/zshrc - echo "unsetopt no_match" | sudo tee -a /etc/zsh/zshrc - echo "source /etc/profile" | sudo tee -a /etc/zsh/zshrc - echo "setopt no_match" | sudo tee -a /etc/zsh/zshrc + # Reset after to prevent any unforeseen consequences + # ALTERNATIVE: "shopt -s failglob" in /etc/profile fixes bash to act more similarly to zsh (we're currently doing reverse) + # This might help if other alternative shells run into same issue + sudo touch /etc/zsh/zshrc + echo "unsetopt no_match" | sudo tee -a /etc/zsh/zshrc + echo "source /etc/profile" | sudo tee -a /etc/zsh/zshrc + echo "setopt no_match" | sudo tee -a /etc/zsh/zshrc if (whiptail --title "zsh" --yesno "Would you like to download and install oh-my-zsh? This is a framework for managing your zsh installation" 8 95) then createtmp - whiptail --title "zsh" --msgbox "After oh my zsh is installed and launched, type 'exit' and ENTER to return to wlinux-setup" 8 95 + whiptail --title "zsh" --msgbox "After oh-my-zsh is installed and launched, type 'exit' and ENTER to return to wlinux-setup" 8 95 mkdir "Type exit to return to wlinux-setup" cd "Type exit to return to wlinux-setup" - sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" - cd .. + sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + cd .. cleantmp else - echo "Skipping Oh My Zsh" + echo "Skipping oh-my-zsh" fi fi @@ -289,10 +289,10 @@ for i in ${!options[@]}; do then if (whiptail --title "fish" --yesno "Would you like to download and install oh-my-fish?" 8 55) then createtmp - whiptail --title "fish" --msgbox "After oh my fish is installed and launched, type 'exit' and ENTER to return to wlinux-setup" 8 95 + whiptail --title "fish" --msgbox "After oh my fish is installed and launched, type 'exit' and ENTER to return to wlinux-setup" 8 95 mkdir "Type exit to return to wlinux-setup" cd "Type exit to return to wlinux-setup" - curl -L https://get.oh-my.fish | fish + curl -L https://get.oh-my.fish | fish cd .. cleantmp else From 0ddf7c2acfaaae8b09faabee2ad44dd7971ca368 Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Mon, 10 Dec 2018 19:25:36 +0000 Subject: [PATCH 11/35] Edit setup to backup zshrc and append to, instead of full-replace Signed-off-by: Kim Bradley --- linux_files/setup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux_files/setup b/linux_files/setup index a0a72382..0730ae86 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -259,15 +259,15 @@ for i in ${!options[@]}; do # Backup old zshrc if existent (e.g. wlinux-setup being re-run) if [ ! -d "/etc/zsh/zshrc" ] ; then - echo "Old zshrc found. Backing up and replacing" - sudo mv /etc/zsh/zshrc /etc/zsh/zshrc.old + echo "Old zshrc found. Backing up" + sudo cp /etc/zsh/zshrc /etc/zsh/zshrc.old fi # Need to "unsetopt no_match" to stop line31 in /etc/profile failing on not finding anything under /etc/profile.d/* # Reset after to prevent any unforeseen consequences # ALTERNATIVE: "shopt -s failglob" in /etc/profile fixes bash to act more similarly to zsh (we're currently doing reverse) # This might help if other alternative shells run into same issue - sudo touch /etc/zsh/zshrc + echo "" | sudo tee -a /etc/zsh/zshrc echo "unsetopt no_match" | sudo tee -a /etc/zsh/zshrc echo "source /etc/profile" | sudo tee -a /etc/zsh/zshrc echo "setopt no_match" | sudo tee -a /etc/zsh/zshrc From 3d747fbffef6025656ac69893fda0a97429071c8 Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Mon, 10 Dec 2018 21:04:26 +0000 Subject: [PATCH 12/35] Added check to see if wlinux-setup edited zshrc before Touches /etc/zsh/.zsh_wlinux on zshrc modification and backs up old to zshrc.old. Stops repeated appending of /etc/profile sourcing to zshrc if zsh option is repicked. Signed-off-by: Kim Bradley --- linux_files/setup | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/linux_files/setup b/linux_files/setup index 0730ae86..64861641 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -252,26 +252,37 @@ for i in ${!options[@]}; do then toselect+=("${options[i]}") echo "Installing ${options[i]}..." - sudo apt install ${options[i]} -y - + sudo apt install ${options[i]} -y + if [ ${options[i]} = "zsh" ] then + ZSH_SETUP=".zsh_wlinux" + # Backup old zshrc if existent (e.g. wlinux-setup being re-run) - if [ ! -d "/etc/zsh/zshrc" ] ; then - echo "Old zshrc found. Backing up" - sudo cp /etc/zsh/zshrc /etc/zsh/zshrc.old + if [ -f "/etc/zsh/zshrc" ] ; then + if [ -f "/etc/zsh/"$ZSH_SETUP ] ; then + echo "wlinux-setup has already modified zshrc" + echo "run 'sudo rm /etc/zsh/" $ZSH_INSTALLED " && wlinux-setup' to re-create config file" + else + echo "Old zshrc found & not edited before --> backing up" + sudo cp /etc/zsh/zshrc /etc/zsh/zshrc.old + + # Need to "unsetopt no_match" to stop line31 in /etc/profile failing on not finding anything under /etc/profile.d/* + # Reset after to prevent any unforeseen consequences. + # ALTERNATIVE: "shopt -s failglob" in /etc/profile fixes bash to act more like zsh (we're currently doing reverse) + # This would prevent issues in other shell alternatives if they appear. + echo "Modifying zshrc to source /etc/profile" + echo "" | sudo tee -a /etc/zsh/zshrc + echo "unsetopt no_match" | sudo tee -a /etc/zsh/zshrc + echo "source /etc/profile" | sudo tee -a /etc/zsh/zshrc + echo "setopt no_match" | sudo tee -a /etc/zsh/zshrc + + # Create .zsh_wlinux file to let future runs know zshrc has been modified by wlinux-setup + sudo touch /etc/zsh/$ZSH_SETUP + fi fi - - # Need to "unsetopt no_match" to stop line31 in /etc/profile failing on not finding anything under /etc/profile.d/* - # Reset after to prevent any unforeseen consequences - # ALTERNATIVE: "shopt -s failglob" in /etc/profile fixes bash to act more similarly to zsh (we're currently doing reverse) - # This might help if other alternative shells run into same issue - echo "" | sudo tee -a /etc/zsh/zshrc - echo "unsetopt no_match" | sudo tee -a /etc/zsh/zshrc - echo "source /etc/profile" | sudo tee -a /etc/zsh/zshrc - echo "setopt no_match" | sudo tee -a /etc/zsh/zshrc - + if (whiptail --title "zsh" --yesno "Would you like to download and install oh-my-zsh? This is a framework for managing your zsh installation" 8 95) then createtmp whiptail --title "zsh" --msgbox "After oh-my-zsh is installed and launched, type 'exit' and ENTER to return to wlinux-setup" 8 95 From c00573bb80dbc34b599cbc3f9e4be80b23a5a2aa Mon Sep 17 00:00:00 2001 From: Hayden Date: Mon, 10 Dec 2018 17:59:00 -0500 Subject: [PATCH 13/35] Update ROADMAP.md --- ROADMAP.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index ac309868..fe9423e2 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -76,7 +76,7 @@ Status: Released. ## Release 1.1.26 -Status: Early December. Testing. +Status: Released. - Apache Cassandra inclusion. - Latest Debian build. @@ -84,10 +84,17 @@ Status: Early December. Testing. ## Release 1.1.27 -Status: Mid December. +Status: Released. + +- Minor fix to UWP app. -- Initial ARM64 support. -- Minor fixes and improvements. +## Release 1.1.28 + +Status: Late December. + +https://github.com/WhitewaterFoundry/WLinux/milestone/11 + +================ See https://github.com/WhitewaterFoundry/WLinux/pulls for features under testing/active developmment. From 751debbe726c56714d4319af557d707b8c3fad2e Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Tue, 11 Dec 2018 11:02:44 +0000 Subject: [PATCH 14/35] Updated zshrc backup mechanism to use date modifier (>1 backup) Signed-off-by: Kim Bradley --- linux_files/setup | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/linux_files/setup b/linux_files/setup index 64861641..7fea6405 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -263,17 +263,23 @@ for i in ${!options[@]}; do if [ -f "/etc/zsh/zshrc" ] ; then if [ -f "/etc/zsh/"$ZSH_SETUP ] ; then echo "wlinux-setup has already modified zshrc" - echo "run 'sudo rm /etc/zsh/" $ZSH_INSTALLED " && wlinux-setup' to re-create config file" + echo "run 'sudo rm /etc/zsh/$ZSH_INSTALLED && wlinux-setup' to re-create config file" else echo "Old zshrc found & not edited before --> backing up" - sudo cp /etc/zsh/zshrc /etc/zsh/zshrc.old + + # Get current date-time + dt=$(date '+%d/%m/%Y %H:%M:%S') + # Save backup with date-time + sudo cp /etc/zsh/zshrc /etc/zsh/zshrc_$dt.old + # Delete old zshrc so we can start fresh + sudo rm /etc/zsh/zshrc # Need to "unsetopt no_match" to stop line31 in /etc/profile failing on not finding anything under /etc/profile.d/* # Reset after to prevent any unforeseen consequences. # ALTERNATIVE: "shopt -s failglob" in /etc/profile fixes bash to act more like zsh (we're currently doing reverse) # This would prevent issues in other shell alternatives if they appear. - echo "Modifying zshrc to source /etc/profile" - echo "" | sudo tee -a /etc/zsh/zshrc + echo "Creating fresh zshrc and modifying to source /etc/profile" + sudo touch /etc/zsh/zshrc echo "unsetopt no_match" | sudo tee -a /etc/zsh/zshrc echo "source /etc/profile" | sudo tee -a /etc/zsh/zshrc echo "setopt no_match" | sudo tee -a /etc/zsh/zshrc From 612bfba3f41e82124b47f43b0f8bc1715af8790c Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Tue, 11 Dec 2018 11:35:06 +0000 Subject: [PATCH 15/35] See previous commit Signed-off-by: Kim Bradley --- linux_files/setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux_files/setup b/linux_files/setup index 7fea6405..06110eb9 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -268,7 +268,7 @@ for i in ${!options[@]}; do echo "Old zshrc found & not edited before --> backing up" # Get current date-time - dt=$(date '+%d/%m/%Y %H:%M:%S') + dt=$(date '+%d%m%Y-%H%M') # Save backup with date-time sudo cp /etc/zsh/zshrc /etc/zsh/zshrc_$dt.old # Delete old zshrc so we can start fresh From c8901de0183dff65c9cb5e5f02e9a87fc78f710b Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Tue, 11 Dec 2018 13:20:18 +0000 Subject: [PATCH 16/35] Add rust-lang installer support to setup Signed-off-by: Kim Bradley --- linux_files/setup | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/linux_files/setup b/linux_files/setup index b2381141..9aa48965 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -92,7 +92,7 @@ fi function installmenu { CHOICE=$( -whiptail --title "wlinux-setup" --checklist --separate-output "\nHand-curated add-ons [SPACE to select, ENTER to confirm]:" 22 99 14 \ +whiptail --title "wlinux-setup" --checklist --separate-output "\nHand-curated add-ons [SPACE to select, ENTER to confirm]:" 22 99 15 \ "LANGUAGE" "Change default language and keyboard setting in WLinux" off \ "EXPLORER" "Enable right-click on folders in Windows Explorer to open them in WLinux " off \ "SHELLS" "Install and configure zsh, csh, and fish" off \ @@ -101,6 +101,7 @@ whiptail --title "wlinux-setup" --checklist --separate-output "\nHand-curated ad "NODEJS" "Install Node.js and npm" off \ "GO" "Install the latest Go from Google" off \ "RUBY" "Install Ruby using rbenv and optionally install Rails" off \ + "RUST" "Install latest version of Rust via rustup installer" off \ "DOTNET" "Install .NET Core SDK from Microsoft and optionally install NuGet" off \ "JAVA" "Install the Java OpenJDK and JRE" off \ "POWERSHELL" "Install PowerShell for Linux and/or Azure CLI tools" off \ @@ -151,6 +152,11 @@ if [[ $CHOICE == *"RUBY"* ]] ; then rubyinstall fi +if [[ $CHOICE == *"RUST"* ]] ; then + echo "RUST" + rustlanginstall +fi + if [[ $CHOICE == *"DOTNET"* ]] ; then echo "DOTNET" dotnetinstall @@ -637,6 +643,25 @@ else fi } +function rustlanginstall { +if (whiptail --title "RUST" --yesno "Would you like to download and install the latest version of Rust from the rust-lang website?" 8 85) then + echo "Installing rust" + + # Create temp directory and download rustup installer here + createtmp + echo "Downloading and latest version of rustup installer" + wget https://sh.rustup.rs -O rustup.rs + + echo "Executing..." + chmod +x rustup.rs + sh rustup.rs -y + + # Cleanup + echo "Cleaning up rustup temporary folder" + cleantmp +fi +} + function dotnetinstall { if (whiptail --title "DOTNET" --yesno "Would you like to download and install the .NET Core SDK for Linux?" 8 75) then From 1769a7a4ad45dc734397dc666d86e15523a0bb37 Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Tue, 11 Dec 2018 16:28:30 +0000 Subject: [PATCH 17/35] Initial code to download and place Win10 themes in .themes Signed-off-by: Kim Bradley --- linux_files/setup | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/linux_files/setup b/linux_files/setup index 32f4de03..aa9dae0c 100644 --- a/linux_files/setup +++ b/linux_files/setup @@ -401,6 +401,52 @@ else echo "Skipping GUILIB" fi + +if (whiptail --title "Win10 GTK Theme" --yesno "Would you like to install a Windows 10 GTK theme?" 8 70) then + echo "Installing Windows 10 GTK themes (light & dark)" + + # Source files locations + W10GTK_LIGHT="https://github.com/B00merang-Project/Windows-10/archive/master.zip" + W10GTK_DARK="https://github.com/B00merang-Project/Windows-10-Dark/archive/master.zip" + + # Need to make sure we have unzip installed + updateupgrade + sudo apt install unzip -y + + # Download themes to temporary folder (sub folders for light & dark) then unzip + echo "Downloading themes to temporary folder" + createtmp + + wget $W10GTK_LIGHT -O master_light.zip + unzip -qq master_light.zip + + wget $W10GTK_DARK -O master_dark.zip + unzip -qq master_dark.zip + + echo "Creating user .themes directory if not exist" + # Create .themes if not exist + if [ ! -d "$HOME/.themes" ] ; then + mkdir $HOME/.themes + else + echo "Directory already exists" + fi + + # Move folders to user themes directory + echo "Moving downloaded directory to user .themes directory" + mv Windows-10-master $HOME/.themes/windows-10-light + mv Windows-10-Dark-master $HOME/.themes/windows-10-dark + + # Cleanup + echo "Cleaning up temporary folder" + cleantmp + + # TODO: automatically set up theme + + # TODO: add light dark theme setup choice here +else + echo "Skipping Windows 10 GTK themes install" +fi + if (whiptail --title "fcitx" --yesno "Would you like to install fcitx for improved non-Latin input?" 8 65) then echo "Installing fcitx" From 9bc45454f451f59493a58027bfcba383f06a3269 Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Fri, 14 Dec 2018 14:46:10 +0000 Subject: [PATCH 18/35] Finalized install dialogues and DLing/MVing theme to install directory Signed-off-by: Kim Bradley --- linux_files/setup | 64 +++++++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 24 deletions(-) mode change 100644 => 100755 linux_files/setup diff --git a/linux_files/setup b/linux_files/setup old mode 100644 new mode 100755 index aa9dae0c..4cf5f21a --- a/linux_files/setup +++ b/linux_files/setup @@ -402,47 +402,63 @@ else fi -if (whiptail --title "Win10 GTK Theme" --yesno "Would you like to install a Windows 10 GTK theme?" 8 70) then - echo "Installing Windows 10 GTK themes (light & dark)" - +if (whiptail --title "Windows 10 Theme" --yesno "Would you like to install a Windows 10 theme? (Experimental)" 8 70) then + echo "Installing Windows 10 theme" # Source files locations - W10GTK_LIGHT="https://github.com/B00merang-Project/Windows-10/archive/master.zip" - W10GTK_DARK="https://github.com/B00merang-Project/Windows-10-Dark/archive/master.zip" + W10LIGHT_URL="https://github.com/B00merang-Project/Windows-10/archive/master.zip" + W10DARK_URL="https://github.com/B00merang-Project/Windows-10-Dark/archive/master.zip" + INSTALLDIR="/usr/share/themes" + LIGHTDIR="windows-10-light" + DARKDIR="windows-10-dark" - # Need to make sure we have unzip installed updateupgrade + + echo "$ sudo apt install unzip -y" sudo apt install unzip -y # Download themes to temporary folder (sub folders for light & dark) then unzip echo "Downloading themes to temporary folder" createtmp - wget $W10GTK_LIGHT -O master_light.zip - unzip -qq master_light.zip + wget $W10LIGHT_URL -O master-light.zip -q --show-progress + echo "Unzipping master-light.zip..." + unzip -qq master-light.zip - wget $W10GTK_DARK -O master_dark.zip - unzip -qq master_dark.zip + wget $W10DARK_URL -O master-dark.zip -q --show-progress + echo "Unzipping master-dark.zip..." + unzip -qq master-dark.zip - echo "Creating user .themes directory if not exist" - # Create .themes if not exist - if [ ! -d "$HOME/.themes" ] ; then - mkdir $HOME/.themes - else - echo "Directory already exists" + if [ ! -d $INSTALLDIR ] ; then + echo "$INSTALLDIR does not exist, creating" + sudo mkdir -p $INSTALLDIR fi - # Move folders to user themes directory - echo "Moving downloaded directory to user .themes directory" - mv Windows-10-master $HOME/.themes/windows-10-light - mv Windows-10-Dark-master $HOME/.themes/windows-10-dark + if [ -d "$INSTALLDIR/$LIGHTDIR" ] ; then + echo "$INSTALLDIR/$LIGHTDIR already exists, removing old" + sudo rm -r $INSTALLDIR/$LIGHTDIR + fi + + if [ -d "$INSTALLDIR/$DARKDIR" ] ; then + echo "$INSTALLDIR/$DARKDIR already exists, removing old" + sudo rm -r $INSTALLDIR/$DARKDIR + fi + + # Move to themes folder + echo "Moving themes to $INSTALLDIR" + sudo mv Windows-10-master "$INSTALLDIR/$LIGHTDIR" + sudo mv Windows-10-Dark-master "$INSTALLDIR/$DARKDIR" + + # Set correct permissions + echo "Setting correct theme folder permissions" + sudo chown -R root:root $INSTALLDIR/windows-10-light + sudo chown -R root:root $INSTALLDIR/windows-10-dark + sudo chmod -R 0755 $INSTALLDIR/windows-10-light + sudo chmod -R 0755 $INSTALLDIR/windows-10-dark # Cleanup - echo "Cleaning up temporary folder" cleantmp - # TODO: automatically set up theme - - # TODO: add light dark theme setup choice here + whiptail --title "How to set Windows 10 theme" --msgbox "Download a Linux desktop environment of your choice and these themes will show up under themes / appearance settings. In the future we plan on setting this theme for Linux GUI applications even without a full desktop environment installed" 9 90 else echo "Skipping Windows 10 GTK themes install" fi From 863dcbbc12260702fc4ac8b880c5ec8824912711 Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Fri, 14 Dec 2018 14:49:29 +0000 Subject: [PATCH 19/35] Slight install dialogue change Signed-off-by: Kim Bradley --- linux_files/setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux_files/setup b/linux_files/setup index 4cf5f21a..ca20ee50 100755 --- a/linux_files/setup +++ b/linux_files/setup @@ -460,7 +460,7 @@ if (whiptail --title "Windows 10 Theme" --yesno "Would you like to install a Win whiptail --title "How to set Windows 10 theme" --msgbox "Download a Linux desktop environment of your choice and these themes will show up under themes / appearance settings. In the future we plan on setting this theme for Linux GUI applications even without a full desktop environment installed" 9 90 else - echo "Skipping Windows 10 GTK themes install" + echo "Skipping Windows 10 theme install" fi if (whiptail --title "fcitx" --yesno "Would you like to install fcitx for improved non-Latin input?" 8 65) then From 4bef1ac1edf36c51ba619e60ea24776e1f8b4d9b Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Mon, 17 Dec 2018 19:26:37 +0000 Subject: [PATCH 20/35] Added curly braces and double brackets Signed-off-by: Kim Bradley --- linux_files/setup | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/linux_files/setup b/linux_files/setup index ca20ee50..d295076e 100755 --- a/linux_files/setup +++ b/linux_files/setup @@ -420,40 +420,40 @@ if (whiptail --title "Windows 10 Theme" --yesno "Would you like to install a Win echo "Downloading themes to temporary folder" createtmp - wget $W10LIGHT_URL -O master-light.zip -q --show-progress + wget ${W10LIGHT_URL} -O master-light.zip -q --show-progress echo "Unzipping master-light.zip..." unzip -qq master-light.zip - wget $W10DARK_URL -O master-dark.zip -q --show-progress + wget ${W10DARK_URL} -O master-dark.zip -q --show-progress echo "Unzipping master-dark.zip..." unzip -qq master-dark.zip - if [ ! -d $INSTALLDIR ] ; then - echo "$INSTALLDIR does not exist, creating" + if [[ ! -d "${INSTALLDIR}" ]] ; then + echo "${INSTALLDIR} does not exist, creating" sudo mkdir -p $INSTALLDIR fi - if [ -d "$INSTALLDIR/$LIGHTDIR" ] ; then - echo "$INSTALLDIR/$LIGHTDIR already exists, removing old" + if [[ -d "${INSTALLDIR}/${LIGHTDIR}" ]] ; then + echo "${INSTALLDIR}/${LIGHTDIR} already exists, removing old" sudo rm -r $INSTALLDIR/$LIGHTDIR fi - if [ -d "$INSTALLDIR/$DARKDIR" ] ; then - echo "$INSTALLDIR/$DARKDIR already exists, removing old" + if [[ -d "${INSTALLDIR}/${DARKDIR}" ]] ; then + echo "${INSTALLDIR}/${DARKDIR} already exists, removing old" sudo rm -r $INSTALLDIR/$DARKDIR fi # Move to themes folder - echo "Moving themes to $INSTALLDIR" - sudo mv Windows-10-master "$INSTALLDIR/$LIGHTDIR" - sudo mv Windows-10-Dark-master "$INSTALLDIR/$DARKDIR" + echo "Moving themes to ${INSTALLDIR}" + sudo mv Windows-10-master "${INSTALLDIR}/${LIGHTDIR}" + sudo mv Windows-10-Dark-master "${INSTALLDIR}/${DARKDIR}" # Set correct permissions echo "Setting correct theme folder permissions" - sudo chown -R root:root $INSTALLDIR/windows-10-light - sudo chown -R root:root $INSTALLDIR/windows-10-dark - sudo chmod -R 0755 $INSTALLDIR/windows-10-light - sudo chmod -R 0755 $INSTALLDIR/windows-10-dark + sudo chown -R root:root ${INSTALLDIR}/windows-10-light + sudo chown -R root:root ${INSTALLDIR}/windows-10-dark + sudo chmod -R 0755 ${INSTALLDIR}/windows-10-light + sudo chmod -R 0755 ${INSTALLDIR}/windows-10-dark # Cleanup cleantmp From 9809702c7e8713974ce40ba40868188284ad6cef Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Mon, 17 Dec 2018 20:28:57 +0000 Subject: [PATCH 21/35] Update README.md with Kim's fullname Signed-off-by: Kim Bradley --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8043e90f..36b62117 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Purchases of WLinux in the Microsoft Store pay for a team of open source indie d - [Hayden Barnes](https://github.com/sirredbeard) - [Patrick Wu](https://github.com/patrick330602) - [Carlos Rafael Ramirez](https://github.com/crramirez) -- [Kim](https://github.com/grufwub) +- [Kim Bradley](https://github.com/grufwub) ### Contributors From f651de2c528b1c6a03ddb1963ec01d102c4110e9 Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Mon, 17 Dec 2018 20:31:44 +0000 Subject: [PATCH 22/35] Update README.md WLinux version reference Signed-off-by: Kim Bradley --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36b62117..f83be2f0 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ The first Linux® distribution optimized for WSL. Based on Debian®. From open-s - A handful of unnecessary packages, such as systemd, have been removed from the base image to reduce image size and increase stability. - New features are [actively developed](https://github.com/WhitewaterFoundry/WLinux/pulls) based on [community input](https://github.com/WhitewaterFoundry/WLinux/issues). Learn how you can [earn paid grants](CONTRIBUTING.md) improving WLinux. -Note: The features above refer to the version slated for release as 1.1.25 on the Microsoft Store in late November. Build WLinux yourself and help us test and debug new features. +Note: The features above refer to release version 1.1.27 currently on the Microsoft Store. Build WLinux yourself and help us test and debug new features. ## Obtaining Support From cf531dbf2b21c4c24925a3814a74fd42fbd168bb Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Tue, 18 Dec 2018 11:06:11 +0000 Subject: [PATCH 23/35] Update README version & features to match current version Signed-off-by: Kim Bradley --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f83be2f0..4ef62ac8 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,10 @@ The first Linux® distribution optimized for WSL. Based on Debian®. From open-s - Change language and keyboard settings. - Select optional shells: csh, zsh (with [oh-my-zsh](https://ohmyz.sh/)), and [fish](https://fishshell.com/) (with [oh-my-fish](https://github.com/oh-my-fish/oh-my-fish)). - Choose text editors: [emacs](https://www.gnu.org/software/emacs/), [neovim](https://neovim.io/), and [Visual Studio Code](https://code.visualstudio.com/). - - Unpack your favorite development environment [NodeJS](https://nodejs.org/) (with n, npm, and/or yarn), Python 3.7 (with pip), [Ruby](http://www.ruby-lang.org/) (via rbenv), and [Go](https://golang.org/). + - Unpack your favorite development environment [NodeJS](https://nodejs.org/) (with n, npm, and/or yarn), Python 3.7 (with pip), [Ruby](http://www.ruby-lang.org/) (via rbenv), [Rust](https://www.rust-lang.org/) (via rustup installer) and [Go](https://golang.org/). - Manage your Microsoft Windows and Azure deployments with [PowerShell](https://github.com/PowerShell/PowerShell) and [azure-cli](https://github.com/Azure/azure-cli), command line tools for Azure. - Enable/disable Windows Explorer shell integration. - - Configure experimental GUI settings, including HiDPI support and international input methods. + - Configure experimental GUI settings, including a [Windows 10 theme](https://github.com/B00merang-Project/Windows-10) for your Linux applications, HiDPI support and international input methods. - Create a secure bridge to Docker running on Windows. - Support for [many Linux graphical applications](https://github.com/ethanhs/WSL-Programs) with no need to configure display or libGL in Wlinux. (Requires a Windows-based X client, such as [X410](http://afflnk.microsoft.com/c/1291904/459838/7593?prodsku=9NLP712ZMN9Q&u=https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fstore%2Fp%2Fx410%2F9NLP712ZMN9Q).) - Install over 27,790 open source packages via the apt package management system from the [expansive Debian repositories](https://packages.debian.org/testing/) and any third-party Debian-compatible repositories from outside projects. @@ -35,7 +35,7 @@ The first Linux® distribution optimized for WSL. Based on Debian®. From open-s - A handful of unnecessary packages, such as systemd, have been removed from the base image to reduce image size and increase stability. - New features are [actively developed](https://github.com/WhitewaterFoundry/WLinux/pulls) based on [community input](https://github.com/WhitewaterFoundry/WLinux/issues). Learn how you can [earn paid grants](CONTRIBUTING.md) improving WLinux. -Note: The features above refer to release version 1.1.27 currently on the Microsoft Store. Build WLinux yourself and help us test and debug new features. +Note: The features above refer to release version 1.1.28 currently on the Microsoft Store. Build WLinux yourself and help us test and debug new features. ## Obtaining Support From 0b7face93855008ead0a4913f9c60880de91575c Mon Sep 17 00:00:00 2001 From: Carlos Ramirez Date: Tue, 18 Dec 2018 17:57:12 -0500 Subject: [PATCH 24/35] Warn if the user didn't select anything --- linux_files/setup | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linux_files/setup b/linux_files/setup index 38375271..fdd5b0f3 100755 --- a/linux_files/setup +++ b/linux_files/setup @@ -107,7 +107,8 @@ whiptail --title "wlinux-setup" --checklist --separate-output "\nHand-curated ad "POWERSHELL" "Install PowerShell for Linux and/or Azure CLI tools" off \ "GUI" "Install the basics needed for most GUI apps and configure GUI options" off \ "DOCKER" "Install a secure bridge to Docker for Windows" off \ - "CASSANDRA" "Install the NoSQL server Cassandra from Apache" off 3>&1 1>&2 2>&3 + "CASSANDRA" "Install the NoSQL server Cassandra from Apache" off \ + "NONE" "" on 3>&1 1>&2 2>&3 ) echo "Selected:" $CHOICE @@ -187,6 +188,12 @@ if [[ $CHOICE == *"CASSANDRA"* ]] ; then echo "CASSANDRA" cassandrainstall fi + +if [[ $CHOICE == "NONE" ]] ; then + echo "NONE" + whiptail --title "No selection" --msgbox "Please select your desired options using the SPACE bar and then hit ENTER to confirm." 8 80 + installmenu +fi } function updateupgrade { From 5844a8e48dccdfe54a9743ce943e8211ecb2d72c Mon Sep 17 00:00:00 2001 From: Kim Bradley Date: Thu, 20 Dec 2018 15:40:03 +0000 Subject: [PATCH 25/35] Add message to README recommending WLE to enterprise customers Signed-off-by: Kim Bradley --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4ef62ac8..482b5f4a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ The first Linux® distribution optimized for WSL. Based on Debian®. From open-source software startup [Whitewater Foundry](https://whitewaterfoundry.com). +(if you are an enterprise customer, you may like to check out our enterprise-focused distribution, [WLE](https://github.com/WhitewaterFoundry/WLE)) + Store badge From 80640971fce3fe9c4014ad21591d056b5d6472b7 Mon Sep 17 00:00:00 2001 From: Hayden Date: Thu, 20 Dec 2018 16:05:13 -0500 Subject: [PATCH 26/35] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 482b5f4a..c4a9a1b4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The first Linux® distribution optimized for WSL. Based on Debian®. From open-source software startup [Whitewater Foundry](https://whitewaterfoundry.com). -(if you are an enterprise customer, you may like to check out our enterprise-focused distribution, [WLE](https://github.com/WhitewaterFoundry/WLE)) +(if you are an enterprise customer, you may like to check out our enterprise-focused distribution, [WLinux Enterprise](https://github.com/WhitewaterFoundry/WLE)) From 1053d4709fc6a4664db354707fc50fa5c96cea08 Mon Sep 17 00:00:00 2001 From: Carlos Ramirez Date: Fri, 21 Dec 2018 21:12:58 -0500 Subject: [PATCH 27/35] Add --debug option --- linux_files/setup | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/linux_files/setup b/linux_files/setup index fdd5b0f3..2e6c208d 100755 --- a/linux_files/setup +++ b/linux_files/setup @@ -14,6 +14,23 @@ wHome=$(wslpath -u "${wHomeWinPath}") ## core functions +function processarguments { + +while [[ $# -gt 0 ]] +do + case "$1" in + --debug|-d|--verbose|-v) + echo "Running in Debug mode" + set -x + shift + ;; + *) + shift + esac +done + +} + function welcomeprompt { whiptail --title "Welcome to WLinux" --msgbox "Thank you for supporting sustainable independent open source development.\n WLinux comes with a core set of useful packages pre-installed, such as curl, git, and wslu. \n @@ -1143,6 +1160,7 @@ fi } # main +processarguments "$@" if [ ! -f ~/.updated ]; then welcomeprompt From ff74bb295cd53f8e5c8cc3347de6e9b5db20b786 Mon Sep 17 00:00:00 2001 From: Andrew Fehr Date: Sat, 22 Dec 2018 20:06:50 -0500 Subject: [PATCH 28/35] Update build.bat Adds support for the new Visual Studio 2019 Preview --- build.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.bat b/build.bat index 4dcc6d2d..3c636135 100644 --- a/build.bat +++ b/build.bat @@ -34,6 +34,10 @@ if exist "%ProgramFiles%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bi set MSBUILD="%ProgramFiles%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\msbuild.exe" goto :FOUND_MSBUILD ) +if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\MSBuild.exe" ( + set MSBUILD="%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\MSBuild.exe" + goto :FOUND_MSBUILD +) if exist "%ProgramFiles(x86)%\MSBuild\14.0\bin" ( set MSBUILD="%ProgramFiles(x86)%\MSBuild\14.0\bin\msbuild.exe" goto :FOUND_MSBUILD From 5e7256ff2047e4b7060eabb8f41ac579c7238cbb Mon Sep 17 00:00:00 2001 From: Andrew Fehr Date: Sat, 22 Dec 2018 20:42:33 -0500 Subject: [PATCH 29/35] Update DistroLauncher-Appx.vcxproj This changes the build output to the out folder. I feel like this would be easier to find than creating a new user directory. What's your opinion? --- DistroLauncher-Appx/DistroLauncher-Appx.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj b/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj index 91aefc67..060b84ca 100644 --- a/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj +++ b/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj @@ -82,7 +82,7 @@ x64|arm64 1 OnApplicationRun - C:\Users\Hayden\OneDrive\Desktop\ + $(SolutionDir)\out\ @@ -173,4 +173,4 @@ - \ No newline at end of file + From 18dc2ae27ba4afa8d088089186c7558cc56cea48 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sun, 23 Dec 2018 19:38:12 +0800 Subject: [PATCH 30/35] updating according to chinese copywriting guidelines --- README.zh-hans.md | 52 ++++++++++++++++++++++++----------------------- README.zh-hant.md | 52 ++++++++++++++++++++++++----------------------- 2 files changed, 54 insertions(+), 50 deletions(-) diff --git a/README.zh-hans.md b/README.zh-hans.md index 90710fe8..9ddb2b82 100644 --- a/README.zh-hans.md +++ b/README.zh-hans.md @@ -1,6 +1,6 @@ # WLinux -专门为Windows 10 Linux® 子系统调整的 Linux® 发行版,基于Debian®,由[Whitewater Foundry](https://whitewaterfoundry.com)出品。 +专门为 Windows 10 Linux® 子系统调整的 Linux® 发行版,基于 Debian®,由 [Whitewater Foundry](https://whitewaterfoundry.com) 出品。 Chinese badge @@ -10,32 +10,33 @@ ## 功能 -- WLinux是第一款使用Microsoft Research开源技术基于Debian发行版的Windows 10上的发行版。 -- WLinux是第一款专门为开发者和资深用户设计的在[Windows 10 Linux 子系统](https://github.com/sirredbeard/Awesome-WSL)(WSL)上运行的Linux开发环境。 -- 预装[wslu](https://github.com/wslutilities/wslu),一款专门为WSL而设计的工具组。 -- `$ wlinux-setup`协助你配置你的Linux到你最喜欢的样子: - - 修改你的WLinux语言设置。 - - 可选的terminal shells: csh,zsh (带[oh-my-zsh](https://ohmyz.sh/))或者[fish](https://fishshell.com/) (带 [oh-my-fish](https://github.com/oh-my-fish/oh-my-fish))。 - - 可选的文字编辑器: [emacs](https://www.gnu.org/software/emacs/),[neovim](https://neovim.io/)或者[Visual Studio Code](https://code.visualstudio.com/)。 - - 安装你最喜爱的开发环境:[NodeJS](https://nodejs.org/) (n,npm和/或yarn), Python 3.7 (带pip), [Ruby](http://www.ruby-lang.org/) (通过rbenv)与[Go](https://golang.org/)。 - - 用这些工具来管理你的Windows和Azure:[PowerShell](https://github.com/PowerShell/PowerShell)和[azure-cli](https://github.com/Azure/azure-cli)。 - - 开启/关闭Windows文件管理器右键菜单支持。 - - 配置WSL的GUI设置,包括高分辨率支持和CJK输入法支持。 -- 支持大部分的[GUI应用](https://github.com/ethanhs/WSL-Programs)! 注:需要安装Windows下的X服务器,如[X410](http://afflnk.microsoft.com/c/1291904/459838/7593?prodsku=9NLP712ZMN9Q&u=https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fstore%2Fp%2Fx410%2F9NLP712ZMN9Q)。 -- WLinux提供与其他WSL支持的发行版相比更快的Bug修复。 +- WLinux 是第一款使用 Microsoft Research 开源技术基于 Debian 发行版的 Windows 10 Linux 子系统发行版。 +- WLinux 是第一款专门为开发者和资深用户设计的在 [Windows 10 Linux 子系统](https://github.com/sirredbeard/Awesome-WSL)(WSL) 上运行的 Linux 开发环境。 +- 预装 [wslu](https://github.com/wslutilities/wslu), 一款专门为WSL而设计的工具组。 +- `$ wlinux-setup`协助你配置你的 Linux 到你最喜欢的样子: + - 修改你的 WLinux 语言设置。 + - 可选的 terminal shells: csh, zsh (带 [oh-my-zsh](https://ohmyz.sh/))或者 [fish](https://fishshell.com/) (带 [oh-my-fish](https://github.com/oh-my-fish/oh-my-fish))。 + - 可选的文字编辑器: [emacs](https://www.gnu.org/software/emacs/), [neovim](https://neovim.io/) 或者 [Visual Studio Code](https://code.visualstudio.com/)。 + - 安装你最喜爱的开发环境: [NodeJS](https://nodejs.org/) (n,npm和/或yarn), Python 3.7 (带pip), [Ruby](http://www.ruby-lang.org/) (通过rbenv )与 [Go](https://golang.org/)。 + - 用这些工具来管理你的 Windows 和 Azure: [PowerShell](https://github.com/PowerShell/PowerShell) 和 [azure-cli](https://github.com/Azure/azure-cli)。 + - 开启/关闭 Windows 文件管理器右键菜单支持。 + - 配置 WSL 的 GUI 设置,包括高分辨率支持和 CJK 输入法支持。 + - 支持 Docker 桥的创建。 +- 支持大部分的 [GUI 应用](https://github.com/ethanhs/WSL-Programs)! 注:需要安装 Windows 下的X服务器,如 [X410](http://afflnk.microsoft.com/c/1291904/459838/7593?prodsku=9NLP712ZMN9Q&u=https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fstore%2Fp%2Fx410%2F9NLP712ZMN9Q)。 +- WLinux 提供与其他 WSL 支持的发行版相比更快的 Bug 修复。 - 一些不必要或者不支持的应用如`systemd`已被移除。 -- 我们会基于[社区反馈](https://github.com/WhitewaterFoundry/WLinux/issues)不断的开发[新功能](https://github.com/WhitewaterFoundry/WLinux/pulls)。还有,[我们的WLinux赏金计划](CONTRIBUTING.md)了解一下。 +- 我们会基于[社区反馈](https://github.com/WhitewaterFoundry/WLinux/issues)不断的开发[新功能](https://github.com/WhitewaterFoundry/WLinux/pulls)。还有,[我们的 WLinux 赏金计划](CONTRIBUTING.md)了解一下。 注:以上功能为最新的商店版本更新内容。你也可以自行编译WLinux来帮我们测试新功能。 ## 支持 -WLinux在商店的购买可以是独立的开源开发者们能够持续的开发,测试和调整WLinux。我们尝试为您提供最好的用户服务。大部分问题可以通过以下方法解决。 +WLinux 在商店的购买可以是独立的开源开发者们能够持续的开发,测试和调整 WLinux。我们尝试为您提供最好的用户服务。大部分问题可以通过以下方法解决。 - 请先[在此](https://github.com/sirredbeard/WLinux/issues)搜索你的问题。 -- 如果找不到,请在[WSL反馈页](https://github.com/Microsoft/WSL/issues)搜索你的问题。 -- 你也可以查看微软官方的[WSL故障排除](https://docs.microsoft.com/en-us/windows/wsl/troubleshooting)档案。 -- 如果你无法找到你的问题,请[开一个新的issue](https://github.com/WhitewaterFoundry/WLinux/issues/new?template=bug_report.md)。我们通常会在几个小时内回复你,请您耐心等待。 +- 如果找不到,请在[ WSL 反馈页](https://github.com/Microsoft/WSL/issues)搜索你的问题。 +- 你也可以查看微软官方的[ WSL 故障排除](https://docs.microsoft.com/en-us/windows/wsl/troubleshooting)档案。 +- 如果你无法找到你的问题,请[开一个新的 issue](https://github.com/WhitewaterFoundry/WLinux/issues/new?template=bug_report.md). 我们通常会在几个小时内回复你,请您耐心等待。 ## 其他文档 @@ -57,13 +58,14 @@ WLinux在商店的购买可以是独立的开源开发者们能够持续的开 - [Hayden Barnes](https://github.com/sirredbeard) - [Patrick Wu](https://github.com/patrick330602) - -### 测试/QA - -- [Jack Mangano](https://thechipcollective.com/) -- [Nuno do Carmo](http://wslcorsair.blogspot.com/) +- [Carlos Rafael Ramirez](https://github.com/crramirez) +- [Kim Bradley](https://github.com/grufwub) ### 贡献者 -- [Carlos Rafael Ramirez](https://github.com/crramirez) - [Andrew Fehr](https://github.com/ThatWeirdAndrew) + +### 测试/QA + +- [Jack Mangano](https://thechipcollective.com/) +- [Nuno do Carmo](http://wslcorsair.blogspot.com/) \ No newline at end of file diff --git a/README.zh-hant.md b/README.zh-hant.md index 5241613c..426d978f 100644 --- a/README.zh-hant.md +++ b/README.zh-hant.md @@ -1,6 +1,6 @@ # WLinux -專門為Windows 10 Linux® 子系統調整的 Linux® 發行版,基於Debian®,由[Whitewater Foundry](https://whitewaterfoundry.com)出品。 +專門為 Windows 10 Linux® 子系統調整的 Linux® 發行版,基於 Debian®,由 [Whitewater Foundry](https://whitewaterfoundry.com) 出品。 Chinese Traditional badge @@ -10,32 +10,33 @@ ## 功能 -- WLinux是第一款使用Microsoft Research開源技術基於Debian發行版的Windows 10上的發行版。 -- WLinux是第一款專門為開發者和資深使用者設計的在[Windows 10 Linux 子系統](https://github.com/sirredbeard/Awesome-WSL)(WSL)上執行的Linux開發環境。 -- 預裝[wslu](https://github.com/wslutilities/wslu),一款專門為WSL而設計的工具組。 -- `$ wlinux-setup`協助你配置你的Linux到你最喜歡的樣子: - - 修改你的WLinux語言設定。 - - 可選的terminal shells: csh,zsh (帶[oh-my-zsh](https://ohmyz.sh/))或者[fish](https://fishshell.com/) (帶 [oh-my-fish](https://github.com/oh-my-fish/oh-my-fish))。 - - 可選的文字編輯器: [emacs](https://www.gnu.org/software/emacs/),[neovim](https://neovim.io/)或者[Visual Studio Code](https://code.visualstudio.com/)。 - - 安裝你最喜愛的開發環境:[NodeJS](https://nodejs.org/) (n,npm和/或yarn), Python 3.7 (帶pip), [Ruby](http://www.ruby-lang.org/) (通過rbenv)與[Go](https://golang.org/)。 - - 用這些工具來管理你的Windows和Azure:[PowerShell](https://github.com/PowerShell/PowerShell)和[azure-cli](https://github.com/Azure/azure-cli)。 - - 開啟/關閉Windows檔案管理器右鍵選單支援。 - - 配置WSL的GUI設定,包括高解析度支援和CJK輸入法支援。 -- 支援大部分的[GUI應用](https://github.com/ethanhs/WSL-Programs)! 注:需要安裝Windows下的X伺服器,如[X410](http://afflnk.microsoft.com/c/1291904/459838/7593?prodsku=9NLP712ZMN9Q&u=https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fstore%2Fp%2Fx410%2F9NLP712ZMN9Q)。 -- WLinux提供與其他WSL支援的發行版相比更快的Bug修復。 +- WLinux 是第一款使用 Microsoft Research 開源技術基於 Debian 發行版的 Windows 10 Linux 子系統發行版。 +- WLinux 是第一款專門為開發者和資深使用者設計的在 [Windows 10 Linux 子系統](https://github.com/sirredbeard/Awesome-WSL)(WSL) 上執行的 Linux 開發環境。 +- 預裝 [wslu](https://github.com/wslutilities/wslu), 一款專門為WSL而設計的工具組。 +- `$ wlinux-setup`協助你配置你的 Linux 到你最喜歡的樣子: + - 修改你的 WLinux 語言設定。 + - 可選的 terminal shells: csh, zsh (帶 [oh-my-zsh](https://ohmyz.sh/))或者 [fish](https://fishshell.com/) (帶 [oh-my-fish](https://github.com/oh-my-fish/oh-my-fish))。 + - 可選的文字編輯器: [emacs](https://www.gnu.org/software/emacs/), [neovim](https://neovim.io/) 或者 [Visual Studio Code](https://code.visualstudio.com/)。 + - 安裝你最喜愛的開發環境: [NodeJS](https://nodejs.org/) (n,npm和/或yarn), Python 3.7 (帶pip), [Ruby](http://www.ruby-lang.org/) (通過rbenv )與 [Go](https://golang.org/)。 + - 用這些工具來管理你的 Windows 和 Azure: [PowerShell](https://github.com/PowerShell/PowerShell) 和 [azure-cli](https://github.com/Azure/azure-cli)。 + - 開啟/關閉 Windows 檔案管理器右鍵選單支援。 + - 配置 WSL 的 GUI 設定,包括高解析度支援和 CJK 輸入法支援。 + - 支援 Docker 橋的建立。 +- 支援大部分的 [GUI 應用](https://github.com/ethanhs/WSL-Programs)! 注:需要安裝 Windows 下的X伺服器,如 [X410](http://afflnk.microsoft.com/c/1291904/459838/7593?prodsku=9NLP712ZMN9Q&u=https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fstore%2Fp%2Fx410%2F9NLP712ZMN9Q)。 +- WLinux 提供與其他 WSL 支援的發行版相比更快的 Bug 修復。 - 一些不必要或者不支援的應用如`systemd`已被移除。 -- 我們會基於[社羣反饋](https://github.com/WhitewaterFoundry/WLinux/issues)不斷的開發[新功能](https://github.com/WhitewaterFoundry/WLinux/pulls)。還有,[我們的WLinux賞金計劃](CONTRIBUTING.md)瞭解一下。 +- 我們會基於[社羣反饋](https://github.com/WhitewaterFoundry/WLinux/issues)不斷的開發[新功能](https://github.com/WhitewaterFoundry/WLinux/pulls)。還有,[我們的 WLinux 賞金計劃](CONTRIBUTING.md)瞭解一下。 注:以上功能為最新的商店版本更新內容。你也可以自行編譯WLinux來幫我們測試新功能。 ## 支援 -WLinux在商店的購買可以是獨立的開源開發者們能夠持續的開發,測試和調整WLinux。我們嘗試為您提供最好的使用者服務。大部分問題可以通過以下方法解決。 +WLinux 在商店的購買可以是獨立的開源開發者們能夠持續的開發,測試和調整 WLinux。我們嘗試為您提供最好的使用者服務。大部分問題可以通過以下方法解決。 - 請先[在此](https://github.com/sirredbeard/WLinux/issues)搜尋你的問題。 -- 如果找不到,請在[WSL反饋頁](https://github.com/Microsoft/WSL/issues)搜尋你的問題。 -- 你也可以檢視微軟官方的[WSL故障排除](https://docs.microsoft.com/en-us/windows/wsl/troubleshooting)檔案。 -- 如果你無法找到你的問題,請[開一個新的issue](https://github.com/WhitewaterFoundry/WLinux/issues/new?template=bug_report.md)。我們通常會在幾個小時內回覆你,請您耐心等待。 +- 如果找不到,請在[ WSL 反饋頁](https://github.com/Microsoft/WSL/issues)搜尋你的問題。 +- 你也可以檢視微軟官方的[ WSL 故障排除](https://docs.microsoft.com/en-us/windows/wsl/troubleshooting)檔案。 +- 如果你無法找到你的問題,請[開一個新的 issue](https://github.com/WhitewaterFoundry/WLinux/issues/new?template=bug_report.md). 我們通常會在幾個小時內回覆你,請您耐心等待。 ## 其他文件 @@ -57,13 +58,14 @@ WLinux在商店的購買可以是獨立的開源開發者們能夠持續的開 - [Hayden Barnes](https://github.com/sirredbeard) - [Patrick Wu](https://github.com/patrick330602) - -### 測試/QA - -- [Jack Mangano](https://thechipcollective.com/) -- [Nuno do Carmo](http://wslcorsair.blogspot.com/) +- [Carlos Rafael Ramirez](https://github.com/crramirez) +- [Kim Bradley](https://github.com/grufwub) ### 貢獻者 -- [Carlos Rafael Ramirez](https://github.com/crramirez) - [Andrew Fehr](https://github.com/ThatWeirdAndrew) + +### 測試/QA + +- [Jack Mangano](https://thechipcollective.com/) +- [Nuno do Carmo](http://wslcorsair.blogspot.com/) \ No newline at end of file From 72fec0ecac5fbcf63cad0c3cc8ebe9dbe14bd476 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sun, 23 Dec 2018 19:42:14 +0800 Subject: [PATCH 31/35] addition lines and decoration --- README.zh-hans.md | 13 ++++++++++++- README.zh-hant.md | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/README.zh-hans.md b/README.zh-hans.md index 9ddb2b82..3f6c1fee 100644 --- a/README.zh-hans.md +++ b/README.zh-hans.md @@ -2,12 +2,21 @@ 专门为 Windows 10 Linux® 子系统调整的 Linux® 发行版,基于 Debian®,由 [Whitewater Foundry](https://whitewaterfoundry.com) 出品。 +(如果你是企业用户,你也许会对我们专门针对企业用户开发的 [WLinux 企业版](https://github.com/WhitewaterFoundry/WLE)感兴趣) + + + Chinese badge - [English](EADME.md) - [繁體中文](README.zh-hant.md) - [日本語](README.ja.md) +[![Twitter Follow](https://img.shields.io/twitter/follow/espadrine.svg?label=Follow&style=social)](https://twitter.com/WLinuxApp) +[![VK Follow](https://img.shields.io/badge/VK-WLinux-4c75a3.svg)](https://vk.com/wlinux) +[![LINE Follow](https://img.shields.io/badge/LINE-WLinux-00c300.svg)](https://line.me/R/ti/p/%40yck9322o) +[![Telegram](https://img.shields.io/badge/Telegram-wslinux-0088cc.svg)](https://t.me/wslinux) + ## 功能 - WLinux 是第一款使用 Microsoft Research 开源技术基于 Debian 发行版的 Windows 10 Linux 子系统发行版。 @@ -68,4 +77,6 @@ WLinux 在商店的购买可以是独立的开源开发者们能够持续的开 ### 测试/QA - [Jack Mangano](https://thechipcollective.com/) -- [Nuno do Carmo](http://wslcorsair.blogspot.com/) \ No newline at end of file +- [Nuno do Carmo](http://wslcorsair.blogspot.com/) + +Chinese badge \ No newline at end of file diff --git a/README.zh-hant.md b/README.zh-hant.md index 426d978f..f9889f5c 100644 --- a/README.zh-hant.md +++ b/README.zh-hant.md @@ -2,12 +2,21 @@ 專門為 Windows 10 Linux® 子系統調整的 Linux® 發行版,基於 Debian®,由 [Whitewater Foundry](https://whitewaterfoundry.com) 出品。 +(如果你是企業使用者,你也許會對我們專門針對企業使用者開發的 [WLinux 企業版](https://github.com/WhitewaterFoundry/WLE)感興趣) + + + Chinese Traditional badge - [English](EADME.md) - [簡體中文](README.zh-hans.md) - [日本語](README.ja.md) +[![Twitter Follow](https://img.shields.io/twitter/follow/espadrine.svg?label=Follow&style=social)](https://twitter.com/WLinuxApp) +[![VK Follow](https://img.shields.io/badge/VK-WLinux-4c75a3.svg)](https://vk.com/wlinux) +[![LINE Follow](https://img.shields.io/badge/LINE-WLinux-00c300.svg)](https://line.me/R/ti/p/%40yck9322o) +[![Telegram](https://img.shields.io/badge/Telegram-wslinux-0088cc.svg)](https://t.me/wslinux) + ## 功能 - WLinux 是第一款使用 Microsoft Research 開源技術基於 Debian 發行版的 Windows 10 Linux 子系統發行版。 @@ -68,4 +77,6 @@ WLinux 在商店的購買可以是獨立的開源開發者們能夠持續的開 ### 測試/QA - [Jack Mangano](https://thechipcollective.com/) -- [Nuno do Carmo](http://wslcorsair.blogspot.com/) \ No newline at end of file +- [Nuno do Carmo](http://wslcorsair.blogspot.com/) + +Chinese Traditional badge \ No newline at end of file From c54e07f818dc549a18b566a1067d16b0ad41bf2e Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sun, 23 Dec 2018 21:05:22 +0800 Subject: [PATCH 32/35] update shell installation menu to be more consistent --- linux_files/setup | 209 ++++++++++++++++++++-------------------------- 1 file changed, 92 insertions(+), 117 deletions(-) diff --git a/linux_files/setup b/linux_files/setup index fdd5b0f3..92cdf028 100755 --- a/linux_files/setup +++ b/linux_files/setup @@ -236,128 +236,103 @@ fi ### shells -function installandsetshell () { -echo "Entering shell setup" -options=("zsh" "fish" "csh") -prompt="Check a shell by entering it's corresponding number (again to uncheck, ENTER when done): " -msg="" - -shellmenu () { - echo "bash is the default shell included in WLinux. You may select additional shells to install here." - for i in ${!options[@]}; do - printf "%3d%s) %s\n" $((i+1)) "${choices[i]:- }" "${options[i]}" - done - [[ "$msg" ]] && echo "$msg"; : +function installandsetshell { +EDITORCHOICE=$( +whiptail --title "Shell Menu" --checklist --separate-output "Custom shells (bash included)\n[SPACE to select, ENTER to confirm]:" 12 55 3 \ + "ZSH" "zsh" off \ + "FISH" "fish" off \ + "CSH" "csh" off 3>&1 1>&2 2>&3 +) + +if [[ $EDITORCHOICE == *"ZSH"* ]] ; then + echo "Installing zsh..." + sudo apt install zsh -y + zshinstall +fi + +if [[ $EDITORCHOICE == *"FISH"* ]] ; then + echo "Installing fish..." + sudo apt install fish -y + fishinstall +fi + +if [[ $EDITORCHOICE == *"CSH"* ]] ; then + echo "Installing csh..." + sudo apt install csh -y + cshinstall +fi } -while clear -x && shellmenu && read -rp "$prompt" num && [[ "$num" ]]; do - [[ "$num" != *[![:digit:]]* ]] && - (( num > 0 && num <= ${#options[@]} )) || - { msg="Invalid option: $num"; continue; } - ((num--)); msg="${options[num]} was ${choices[num]:+un}checked" - [[ "${choices[num]}" ]] && choices[num]="" || choices[num]="+" -done - -toselect=("bash") -msg="1" -for i in ${!options[@]}; do - if [[ "${choices[i]}" ]] - then - toselect+=("${options[i]}") - echo "Installing ${options[i]}..." - sudo apt install ${options[i]} -y - - if [ ${options[i]} = "zsh" ] - then - - ZSH_SETUP=".zsh_wlinux" - - # Backup old zshrc if existent (e.g. wlinux-setup being re-run) - if [ -f "/etc/zsh/zshrc" ] ; then - if [ -f "/etc/zsh/"$ZSH_SETUP ] ; then - echo "wlinux-setup has already modified zshrc" - echo "run 'sudo rm /etc/zsh/$ZSH_INSTALLED && wlinux-setup' to re-create config file" - else - echo "Old zshrc found & not edited before --> backing up" - - # Get current date-time - dt=$(date '+%d%m%Y-%H%M') - # Save backup with date-time - sudo cp /etc/zsh/zshrc /etc/zsh/zshrc_$dt.old - # Delete old zshrc so we can start fresh - sudo rm /etc/zsh/zshrc - - # Need to "unsetopt no_match" to stop line31 in /etc/profile failing on not finding anything under /etc/profile.d/* - # Reset after to prevent any unforeseen consequences. - # ALTERNATIVE: "shopt -s failglob" in /etc/profile fixes bash to act more like zsh (we're currently doing reverse) - # This would prevent issues in other shell alternatives if they appear. - echo "Creating fresh zshrc and modifying to source /etc/profile" - sudo touch /etc/zsh/zshrc - echo "unsetopt no_match" | sudo tee -a /etc/zsh/zshrc - echo "source /etc/profile" | sudo tee -a /etc/zsh/zshrc - echo "setopt no_match" | sudo tee -a /etc/zsh/zshrc - - # Create .zsh_wlinux file to let future runs know zshrc has been modified by wlinux-setup - sudo touch /etc/zsh/$ZSH_SETUP - fi - fi +function zshinstall { +ZSH_SETUP=".zsh_wlinux" - if (whiptail --title "zsh" --yesno "Would you like to download and install oh-my-zsh? This is a framework for managing your zsh installation" 8 95) then - createtmp - whiptail --title "zsh" --msgbox "After oh-my-zsh is installed and launched, type 'exit' and ENTER to return to wlinux-setup" 8 95 - mkdir "Type exit to return to wlinux-setup" - cd "Type exit to return to wlinux-setup" - sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" - cd .. - cleantmp - else - echo "Skipping oh-my-zsh" - fi - fi - - if [ ${options[i]} = "fish" ] - then - if (whiptail --title "fish" --yesno "Would you like to download and install oh-my-fish?" 8 55) then - createtmp - whiptail --title "fish" --msgbox "After oh my fish is installed and launched, type 'exit' and ENTER to return to wlinux-setup" 8 95 - mkdir "Type exit to return to wlinux-setup" - cd "Type exit to return to wlinux-setup" - curl -L https://get.oh-my.fish | fish - cd .. - cleantmp - else - echo "Skipping Oh My Fish" - fi - - fi - - msg="0" +# Backup old zshrc if existent (e.g. wlinux-setup being re-run) +if [ -f "/etc/zsh/zshrc" ] ; then + if [ -f "/etc/zsh/"$ZSH_SETUP ] ; then + echo "wlinux-setup has already modified zshrc" + echo "run 'sudo rm /etc/zsh/$ZSH_INSTALLED && wlinux-setup' to re-create config file" + else + echo "Old zshrc found & not edited before --> backing up" + + # Get current date-time + dt=$(date '+%d%m%Y-%H%M') + # Save backup with date-time + sudo cp /etc/zsh/zshrc /etc/zsh/zshrc_$dt.old + # Delete old zshrc so we can start fresh + sudo rm /etc/zsh/zshrc + + # Need to "unsetopt no_match" to stop line31 in /etc/profile failing on not finding anything under /etc/profile.d/* + # Reset after to prevent any unforeseen consequences. + # ALTERNATIVE: "shopt -s failglob" in /etc/profile fixes bash to act more like zsh (we're currently doing reverse) + # This would prevent issues in other shell alternatives if they appear. + echo "Creating fresh zshrc and modifying to source /etc/profile" + sudo touch /etc/zsh/zshrc + echo "unsetopt no_match" | sudo tee -a /etc/zsh/zshrc + echo "source /etc/profile" | sudo tee -a /etc/zsh/zshrc + echo "setopt no_match" | sudo tee -a /etc/zsh/zshrc + # Create .zsh_wlinux file to let future runs know zshrc has been modified by wlinux-setup + sudo touch /etc/zsh/$ZSH_SETUP fi -done -if [[ "$msg" == "1" ]] -then - echo "No additional shell(s) selected, continuing setup..." +fi + +if (whiptail --title "zsh" --yesno "Would you like to download and install oh-my-zsh? This is a framework for managing your zsh installation" 8 95) then + createtmp + whiptail --title "zsh" --msgbox "After oh-my-zsh is installed and launched, type 'exit' and ENTER to return to wlinux-setup" 8 95 + mkdir "Type exit to return to wlinux-setup" + cd "Type exit to return to wlinux-setup" + sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + cd .. + cleantmp else - echo "Set default shell:" - for i in ${!toselect[@]}; do - printf "%3d) %s\n" $((i)) "${toselect[i]}" - done - passed="1" - while [[ "$passed" == "1" ]] - do - read -rp "Type a number and enter: " opt - if [[ "$opt" != *[![:digit:]]* ]] && (( opt < 0 && opt >= ${#toselect[@]} )) - then - echo "Invalid option: $opt" - elif [[ "$opt" == "" ]] - then - echo "You must select a default shell." - else - passed="0" - fi - done - echo "Setting ${toselect[$opt]} as default using chsh." - chsh -s $(which ${toselect[$opt]}) + echo "Skipping oh-my-zsh" +fi + +if (whiptail --title "zsh" --yesno "Would you like to set zsh as the default shell?" 8 55) then + chsh -s $(which zsh) +fi +} + +function fishinstall { +if (whiptail --title "fish" --yesno "Would you like to download and install oh-my-fish?" 8 55) then + createtmp + whiptail --title "fish" --msgbox "After oh my fish is installed and launched, type 'exit' and ENTER to return to wlinux-setup" 8 95 + mkdir "Type exit to return to wlinux-setup" + cd "Type exit to return to wlinux-setup" + curl -L https://get.oh-my.fish | fish + cd .. + cleantmp +else + echo "Skipping Oh My Fish" +fi + +if (whiptail --title "fish" --yesno "Would you like to set fish as the default shell?" 8 55) then + chsh -s $(which fish) +fi +} + +function cshinstall { +if (whiptail --title "csh" --yesno "Would you like to set csh as the default shell?" 8 55) then + chsh -s $(which csh) fi } From 81d444e30676d4ac71a5b5ce7a41f8201c84f776 Mon Sep 17 00:00:00 2001 From: Patrick Wu Date: Sun, 23 Dec 2018 21:07:33 +0800 Subject: [PATCH 33/35] a small fix --- linux_files/setup | 1 + 1 file changed, 1 insertion(+) diff --git a/linux_files/setup b/linux_files/setup index 92cdf028..0b094434 100755 --- a/linux_files/setup +++ b/linux_files/setup @@ -237,6 +237,7 @@ fi ### shells function installandsetshell { + EDITORCHOICE=$( whiptail --title "Shell Menu" --checklist --separate-output "Custom shells (bash included)\n[SPACE to select, ENTER to confirm]:" 12 55 3 \ "ZSH" "zsh" off \ From c8781dab5cfd86e5cf7b12e81de8fc3c1de0ceca Mon Sep 17 00:00:00 2001 From: Hayden Date: Wed, 26 Dec 2018 19:17:57 -0500 Subject: [PATCH 34/35] Update Go version --- linux_files/setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux_files/setup b/linux_files/setup index fb5f0873..59a961b2 100755 --- a/linux_files/setup +++ b/linux_files/setup @@ -3,8 +3,8 @@ RESPONSE="" CURDUR="" TMPDIR="" -VERSION="1.1.26a" -GOVERSION="1.11.2" +VERSION="1.1.28a" +GOVERSION="1.11.4" DOCKERVERSION="18.09.0" DOCKERCOMPOSEVERSION="1.23.1" wHomeWinPath=$(cmd.exe /c 'echo %HOMEDRIVE%%HOMEPATH%' 2>&1 | tr -d '\r') From 665cc81dccc980f1c5a955ee30890f1db1851512 Mon Sep 17 00:00:00 2001 From: Hayden Date: Tue, 1 Jan 2019 10:07:28 -0500 Subject: [PATCH 35/35] Update ROADMAP.md --- ROADMAP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index fe9423e2..ca7c478b 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -90,7 +90,7 @@ Status: Released. ## Release 1.1.28 -Status: Late December. +Status: Mid January. https://github.com/WhitewaterFoundry/WLinux/milestone/11