mirror of
https://github.com/mintty/wsltty.git
synced 2025-11-06 01:51:52 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
480bbce851 | ||
|
|
f5df7b32d3 | ||
|
|
91c1b89050 | ||
|
|
ff527bcd12 |
Binary file not shown.
@@ -4,11 +4,11 @@ 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 “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
|
||||
* 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
|
||||
* context menu entries for Windows Explorer to start WSL with a bash in the respective directory
|
||||
|
||||
An uninstaller is not provided.
|
||||
* 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 ####
|
||||
|
||||
|
||||
26
install.bat
26
install.bat
@@ -1,12 +1,21 @@
|
||||
@echo off
|
||||
rem @echo off
|
||||
|
||||
|
||||
:deploy
|
||||
|
||||
mkdir "%LOCALAPPDATA%\wsltty"
|
||||
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"
|
||||
@@ -15,6 +24,9 @@ rem create "home directory" to enable storage of config file
|
||||
mkdir "%LOCALAPPDATA%\wsltty\home
|
||||
mkdir "%LOCALAPPDATA%\wsltty\home\%USERNAME%"
|
||||
|
||||
|
||||
:shortcuts
|
||||
|
||||
rem create Desktop Shorcut
|
||||
copy "Bash on UoW in Mintty.lnk" "%USERPROFILE%\Desktop"
|
||||
|
||||
@@ -23,6 +35,7 @@ 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
|
||||
@@ -40,13 +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
|
||||
|
||||
8
makefile
8
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,13 +53,16 @@ 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
|
||||
|
||||
#############################################################################
|
||||
|
||||
20
makewinx.cfg
20
makewinx.cfg
@@ -34,13 +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"
|
||||
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=.
|
||||
@@ -55,4 +58,7 @@ SourceFiles0=.
|
||||
%FILE6%=
|
||||
%FILE7%=
|
||||
%FILE8%=
|
||||
%FILE9%=
|
||||
%FILE10%=
|
||||
%FILE11%=
|
||||
|
||||
|
||||
27
uninstall.bat
Executable file
27
uninstall.bat
Executable file
@@ -0,0 +1,27 @@
|
||||
@echo off
|
||||
|
||||
|
||||
:undeploy
|
||||
|
||||
rem currently not removing software
|
||||
rem in any case, at least the config file (home\...) should not be removed
|
||||
|
||||
|
||||
:shortcuts
|
||||
|
||||
rem delete Desktop Shortcut and Start Menu Shortcut
|
||||
del "%USERPROFILE%\Desktop\Bash on UoW in Mintty.lnk"
|
||||
del "%APPDATA%\Microsoft\Windows\Start Menu\Bash on UoW in Mintty.lnk"
|
||||
|
||||
|
||||
:explorer
|
||||
|
||||
rem delete Explorer context menu
|
||||
set userdirname=HKEY_CURRENT_USER\Software\Classes\Directory\shell
|
||||
set userdirpane=HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell
|
||||
|
||||
reg delete "%userdirname%\wsltty" /f
|
||||
reg delete "%userdirpane%\wsltty" /f
|
||||
|
||||
|
||||
:end
|
||||
Reference in New Issue
Block a user