-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
64 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters