1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-11-01 07:31:56 +00:00
This commit is contained in:
mintty
2016-09-14 14:55:14 +02:00
parent aab1ef4bad
commit 15e94574c6
4 changed files with 64 additions and 11 deletions

View File

@@ -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