From 480bbce85171857db862394f07da71b2ea991ae6 Mon Sep 17 00:00:00 2001 From: mintty Date: Mon, 19 Sep 2016 00:46:51 +0200 Subject: [PATCH] 0.6.0 --- README.md | 3 ++- install.bat | 16 ++++++++++++---- makefile | 7 +++++-- makewinx.cfg | 20 ++++++++++++-------- 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index be3e508..47f3476 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@ Mintty as a terminal for Bash on Ubuntu on Windows / WSL. Run the [installer](https://github.com/mintty/wsltty/releases) to install * wsltty package components (see below) in the user’s application directory (where WSL is also installed) * an empty wsltty “home directory” to enable storage of a mintty config file -* a Desktop Shortcut and a Start Menu Shortcut to start WSL with a login bash in the **Windows user profile** directory; to start in the Linux home directory instead, add a `cd` command to your Linux `$HOME/.profile` script +* a Desktop Shortcut and a Start Menu Shortcut to start WSL with a login bash in the *Windows user profile* directory; to start in the Linux home directory instead, add a `cd` command to your Linux `$HOME/.profile` script * context menu entries for Windows Explorer to start WSL with a bash in the respective directory +* a script `wsl.bat` to invoke wsltty manually; copy the script from `%LOCALAPPDATA%\wsltty` to `%SYSTEMROOT%\System32` if desired * an uninstall script that can be invoked manually to remove shortcuts and context menu entries #### Components #### diff --git a/install.bat b/install.bat index 832e450..052305b 100755 --- a/install.bat +++ b/install.bat @@ -1,4 +1,4 @@ -@echo off +rem @echo off :deploy @@ -8,9 +8,14 @@ copy LICENSE.mintty "%LOCALAPPDATA%\wsltty" copy LICENSE.wslbridge "%LOCALAPPDATA%\wsltty" copy uninstall.bat "%LOCALAPPDATA%\wsltty" +copy wsl.bat "%LOCALAPPDATA%\wsltty" +rem does not work without admin rights: +rem copy wsl.bat "%SYSTEMROOT%\System32" + mkdir "%LOCALAPPDATA%\wsltty\bin" copy cygwin1.dll "%LOCALAPPDATA%\wsltty\bin" copy cygwin-console-helper.exe "%LOCALAPPDATA%\wsltty\bin" +copy dash.exe "%LOCALAPPDATA%\wsltty\bin" copy mintty.exe "%LOCALAPPDATA%\wsltty\bin" copy wslbridge.exe "%LOCALAPPDATA%\wsltty\bin" copy wslbridge-backend "%LOCALAPPDATA%\wsltty\bin" @@ -48,15 +53,18 @@ set shell=/bin/bash rem Mintty invocation set cmd=%LOCALAPPDATA%\wsltty\bin\mintty.exe +set cset=-o Locale=C -o Charset=UTF-8 +set icon=%LOCALAPPDATA%\lxss\bash.ico set arg=/bin/wslbridge -t %shell% -set target=\"%cmd%\" %arg% +set target0=\"%cmd%\" %cset% -i \"%icon%\" %arg% +set target1=\"%cmd%\" %cset% -i \"%icon%\" /bin/dash -c \"cd '%%1'; exec %arg%\" reg add "%userdirname%\wsltty" /d "%label% %here%" /f reg add "%userdirname%\wsltty" /v Icon /d "%icon%" /f -reg add "%userdirname%\wsltty\command" /d "%target%" /f +reg add "%userdirname%\wsltty\command" /d "%target1%" /f reg add "%userdirpane%\wsltty" /d "%label% %here%" /f reg add "%userdirpane%\wsltty" /v Icon /d "%icon%" /f -reg add "%userdirpane%\wsltty\command" /d "%target%" /f +reg add "%userdirpane%\wsltty\command" /d "%target0%" /f :end diff --git a/makefile b/makefile index 783149f..47fe3da 100644 --- a/makefile +++ b/makefile @@ -2,7 +2,7 @@ # default: generate all all: wslbridge mintty cygwin wsltty pkg -ver=0.5.1 +ver=0.6.0 wslbridgever=0.1.0 TARGET := $(shell $(CC) -dumpmachine) @@ -34,7 +34,7 @@ wslbridge: mintty: $(wget) https://github.com/mintty/mintty/archive/master.zip mv master.zip mintty-master.zip - unzip mintty-master.zip + unzip -o mintty-master.zip cd mintty-master/src; make LDFLAGS="-static -static-libgcc -s" mkdir -p bin cp mintty-master/bin/mintty.exe bin/ @@ -44,6 +44,7 @@ cygwin: mkdir -p bin cp /bin/cygwin1.dll bin/ cp /bin/cygwin-console-helper.exe bin/ + cp /bin/dash.exe bin/ wsltty: @@ -52,12 +53,14 @@ pkg: sed -e "s,%version%,$(ver)," makewinx.cfg > rel/wsltty.SED cp bin/cygwin1.dll rel/ cp bin/cygwin-console-helper.exe rel/ + cp bin/dash.exe rel/ cp bin/mintty.exe rel/ cp bin/wslbridge.exe rel/ cp bin/wslbridge-backend rel/ cp LICENSE.mintty rel/ cp LICENSE.wslbridge rel/ cp "Bash on UoW in Mintty.lnk" rel/ + cp wsl.bat rel/ cp install.bat rel/ cp uninstall.bat rel/ cd rel; iexpress /n wsltty.SED diff --git a/makewinx.cfg b/makewinx.cfg index 867aa6b..0ad22df 100644 --- a/makewinx.cfg +++ b/makewinx.cfg @@ -34,14 +34,16 @@ AdminQuietInstCmd= UserQuietInstCmd= FILE0="cygwin1.dll" FILE1="cygwin-console-helper.exe" -FILE2="mintty.exe" -FILE3="wslbridge.exe" -FILE4="wslbridge-backend" -FILE5="LICENSE.mintty" -FILE6="LICENSE.wslbridge" -FILE7="Bash on UoW in Mintty.lnk" -FILE8="install.bat" -FILE9="uninstall.bat" +FILE2="dash.exe" +FILE3="mintty.exe" +FILE4="wslbridge.exe" +FILE5="wslbridge-backend" +FILE6="LICENSE.mintty" +FILE7="LICENSE.wslbridge" +FILE8="Bash on UoW in Mintty.lnk" +FILE9="wsl.bat" +FILE10="install.bat" +FILE11="uninstall.bat" [SourceFiles] SourceFiles0=. @@ -57,4 +59,6 @@ SourceFiles0=. %FILE7%= %FILE8%= %FILE9%= +%FILE10%= +%FILE11%=