Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
mintty committed Sep 14, 2016
1 parent aab1ef4 commit 15e9457
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 11 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Mintty as a terminal for Bash on Ubuntu on Windows / WSL.

#### Overview ####

Run the installer to install
* wsltty package components (see below) in the user’s application directory (where WSL is also installed)
* an empty “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 user’s WSL home directory
* context menu entries for Windows Explorer to start WSL with a bash in the respective directory

An uninstaller is not provided.

#### Components ####

For mintty, see the [Mintty homepage](http://mintty.github.io/).

It is based on [Cygwin](http://cygwin.com)
and includes its runtime library ([sources](http://mirrors.dotsrc.org/cygwin/x86/release/cygwin)).

For interacting with WSL, it uses [wslbridge](https://github.com/rprichard/wslbridge).

45 changes: 41 additions & 4 deletions install.bat
Original file line number Diff line number Diff line change
@@ -1,16 +1,53 @@
@echo off
goto explorer

mkdir "%LOCALAPPDATA%\wsltty"
mkdir "%LOCALAPPDATA%\wsltty\bin"
rem mkdir "%LOCALAPPDATA%\wsltty\etc"
mkdir "%LOCALAPPDATA%\wsltty\%USERNAME%"
copy LICENSE.mintty "%LOCALAPPDATA%\wsltty"
copy LICENSE.wslbridge "%LOCALAPPDATA%\wsltty"
rem copy etc/minttyrc "%LOCALAPPDATA%\wsltty\etc"

mkdir "%LOCALAPPDATA%\wsltty\bin"
copy cygwin1.dll "%LOCALAPPDATA%\wsltty\bin"
copy cygwin-console-helper.exe "%LOCALAPPDATA%\wsltty\bin"
copy mintty.exe "%LOCALAPPDATA%\wsltty\bin"
copy wslbridge.exe "%LOCALAPPDATA%\wsltty\bin"
copy wslbridge-backend "%LOCALAPPDATA%\wsltty\bin"

rem create "home directory" to enable storage of config file
mkdir "%LOCALAPPDATA%\wsltty\home
mkdir "%LOCALAPPDATA%\wsltty\home\%USERNAME%"

rem create Desktop Shorcut
copy "Bash on UoW in Mintty.lnk" "%USERPROFILE%\Desktop"

rem create Start Menu Shortcut
copy "Bash on UoW in Mintty.lnk" "%APPDATA%\Microsoft\Windows\Start Menu"


:explorer
rem Explorer context menu
set userdirname=HKEY_CURRENT_USER\Software\Classes\Directory\shell
set userdirpane=HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell

rem WSL in Mintty
set label=WSL in Mintty
rem set here=in this directory
set here=Here

rem WSL icon
set icon=%LOCALAPPDATA%\lxss\bash.ico

rem WSL target shell
set shell=/bin/bash

rem Mintty invocation
set cmd=%LOCALAPPDATA%\wsltty\bin\mintty.exe
set arg=/bin/wslbridge -t %shell%
set target=\"%cmd%\" %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 "%userdirpane%\wsltty" /d "%label% %here%" /f
reg add "%userdirpane%\wsltty" /v Icon /d "%icon%" /f
reg add "%userdirpane%\wsltty\command" /d "%target%" /f

3 changes: 0 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ cygwin:
cp /bin/cygwin-console-helper.exe bin/

wsltty:
mkdir -p etc
touch etc/minttyrc

pkg:
mkdir -p rel
Expand All @@ -56,7 +54,6 @@ pkg:
cp bin/wslbridge-backend rel/
cp LICENSE.mintty rel/
cp LICENSE.wslbridge rel/
cp etc/minttyrc rel/
cp "Bash on UoW in Mintty.lnk" rel/
cp install.bat rel/
cd rel; iexpress /n wsltty.SED
Expand Down
6 changes: 2 additions & 4 deletions makewinx.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ FILE3="wslbridge.exe"
FILE4="wslbridge-backend"
FILE5="LICENSE.mintty"
FILE6="LICENSE.wslbridge"
FILE7="minttyrc"
FILE8="Bash on UoW in Mintty.lnk"
FILE9="install.bat"
FILE7="Bash on UoW in Mintty.lnk"
FILE8="install.bat"

[SourceFiles]
SourceFiles0=.
Expand All @@ -56,5 +55,4 @@ SourceFiles0=.
%FILE6%=
%FILE7%=
%FILE8%=
%FILE9%=

0 comments on commit 15e9457

Please sign in to comment.