1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-02-07 13:41:07 +00:00

Add Shortcut and command script variants changing to Linux home directory (#3).

This commit is contained in:
Thomas Wolff 2016-10-11 18:04:15 +02:00
parent 1106032955
commit 98d4697bca
6 changed files with 43 additions and 8 deletions

BIN
Bash ~ on UoW in Mintty.lnk Executable file

Binary file not shown.

View File

@ -9,8 +9,10 @@ copy LICENSE.wslbridge "%LOCALAPPDATA%\wsltty"
copy uninstall.bat "%LOCALAPPDATA%\wsltty" copy uninstall.bat "%LOCALAPPDATA%\wsltty"
copy wsl.bat "%LOCALAPPDATA%\wsltty" copy wsl.bat "%LOCALAPPDATA%\wsltty"
copy wsl~.bat "%LOCALAPPDATA%\wsltty"
rem does not work without admin rights: rem does not work without admin rights:
rem copy wsl.bat "%SYSTEMROOT%\System32" rem copy wsl.bat "%SYSTEMROOT%\System32"
rem copy wsl~.bat "%SYSTEMROOT%\System32"
mkdir "%LOCALAPPDATA%\wsltty\bin" mkdir "%LOCALAPPDATA%\wsltty\bin"
copy cygwin1.dll "%LOCALAPPDATA%\wsltty\bin" copy cygwin1.dll "%LOCALAPPDATA%\wsltty\bin"
@ -29,9 +31,11 @@ mkdir "%LOCALAPPDATA%\wsltty\home\%USERNAME%"
rem create Desktop Shorcut rem create Desktop Shorcut
copy "Bash on UoW in Mintty.lnk" "%USERPROFILE%\Desktop" copy "Bash on UoW in Mintty.lnk" "%USERPROFILE%\Desktop"
copy "Bash ~ on UoW in Mintty.lnk" "%USERPROFILE%\Desktop"
rem create Start Menu Shortcut rem create Start Menu Shortcut
copy "Bash on UoW in Mintty.lnk" "%APPDATA%\Microsoft\Windows\Start Menu" copy "Bash on UoW in Mintty.lnk" "%APPDATA%\Microsoft\Windows\Start Menu"
copy "Bash ~ on UoW in Mintty.lnk" "%APPDATA%\Microsoft\Windows\Start Menu"
:explorer :explorer
@ -54,11 +58,12 @@ set shell=/bin/bash
rem Mintty invocation rem Mintty invocation
set cmd=%LOCALAPPDATA%\wsltty\bin\mintty.exe set cmd=%LOCALAPPDATA%\wsltty\bin\mintty.exe
set cset=-o Locale=C -o Charset=UTF-8 set cset=-o Locale=C -o Charset=UTF-8
set opts=--wsl
set icon=%LOCALAPPDATA%\lxss\bash.ico set icon=%LOCALAPPDATA%\lxss\bash.ico
set arg=/bin/wslbridge -t %shell% set arg=/bin/wslbridge -t %shell%
set target0=\"%cmd%\" %cset% -i \"%icon%\" %arg% set target0=\"%cmd%\" %opts% %cset% -i \"%icon%\" %arg%
rem set target1=\"%cmd%\" %cset% -i \"%icon%\" /bin/dash -c \"cd '%%1'; exec %arg%\" rem set target1=\"%cmd%\" %opts% %cset% -i \"%icon%\" /bin/dash -c \"cd '%%1'; exec %arg%\"
set target1=\"%cmd%\" %cset% -i \"%icon%\" --dir \"%%1\" %arg% set target1=\"%cmd%\" %opts% %cset% -i \"%icon%\" --dir \"%%1\" %arg%
reg add "%userdirname%\wsltty" /d "%label% %here%" /f reg add "%userdirname%\wsltty" /d "%label% %here%" /f
reg add "%userdirname%\wsltty" /v Icon /d "%icon%" /f reg add "%userdirname%\wsltty" /v Icon /d "%icon%" /f

View File

@ -1,8 +1,8 @@
############################################################################# #############################################################################
# default: generate all # default: generate all
all: wslbridge mintty cygwin wsltty pkg all: check wslbridge mintty cygwin wsltty pkg
ver=0.6.2 ver=0.6.3
wslbridgever=0.2.0 wslbridgever=0.2.0
TARGET := $(shell $(CC) -dumpmachine) TARGET := $(shell $(CC) -dumpmachine)
@ -21,6 +21,16 @@ endif
wget=curl -R -L -O --connect-timeout 55 wget=curl -R -L -O --connect-timeout 55
#############################################################################
# system check;
# for now, let's enforce Cygwin 32-Bit as the container for wsltty
# just in case there is a 32-Bit WSL released, and to ensure
# the path name drag-and-drop adaptation works
check:
uname | grep CYGWIN
uname -m | grep i686
############################################################################# #############################################################################
# generation # generation
@ -60,7 +70,9 @@ pkg:
cp LICENSE.mintty rel/ cp LICENSE.mintty rel/
cp LICENSE.wslbridge rel/ cp LICENSE.wslbridge rel/
cp "Bash on UoW in Mintty.lnk" rel/ cp "Bash on UoW in Mintty.lnk" rel/
cp "Bash ~ on UoW in Mintty.lnk" rel/
cp wsl.bat rel/ cp wsl.bat rel/
cp wsl~.bat rel/
cp install.bat rel/ cp install.bat rel/
cp uninstall.bat rel/ cp uninstall.bat rel/
cd rel; iexpress /n wsltty.SED cd rel; iexpress /n wsltty.SED

View File

@ -40,9 +40,11 @@ FILE4="wslbridge-backend"
FILE5="LICENSE.mintty" FILE5="LICENSE.mintty"
FILE6="LICENSE.wslbridge" FILE6="LICENSE.wslbridge"
FILE7="Bash on UoW in Mintty.lnk" FILE7="Bash on UoW in Mintty.lnk"
FILE8="wsl.bat" FILE8="Bash ~ on UoW in Mintty.lnk"
FILE9="install.bat" FILE9="wsl.bat"
FILE10="uninstall.bat" FILE10="wsl~.bat"
FILE11="install.bat"
FILE12="uninstall.bat"
[SourceFiles] [SourceFiles]
SourceFiles0=. SourceFiles0=.
@ -59,4 +61,6 @@ SourceFiles0=.
%FILE8%= %FILE8%=
%FILE9%= %FILE9%=
%FILE10%= %FILE10%=
%FILE11%=
%FILE12%=

View File

@ -11,7 +11,9 @@ rem in any case, at least the config file (home\...) should not be removed
rem delete Desktop Shortcut and Start Menu Shortcut rem delete Desktop Shortcut and Start Menu Shortcut
del "%USERPROFILE%\Desktop\Bash on UoW in Mintty.lnk" del "%USERPROFILE%\Desktop\Bash on UoW in Mintty.lnk"
del "%USERPROFILE%\Desktop\Bash ~ on UoW in Mintty.lnk"
del "%APPDATA%\Microsoft\Windows\Start Menu\Bash on UoW in Mintty.lnk" del "%APPDATA%\Microsoft\Windows\Start Menu\Bash on UoW in Mintty.lnk"
del "%APPDATA%\Microsoft\Windows\Start Menu\Bash ~ on UoW in Mintty.lnk"
:explorer :explorer

12
wsl~.bat Executable file
View File

@ -0,0 +1,12 @@
@echo off
rem Start mintty terminal for WSL in home directory
rem To enable invocation of this script from WIN+R or from cmd.exe,
rem you may want to copy this script into "%SYSTEMROOT%\System32"
rem You may want a variant of this script without trailing "-l"
rem to start in the current directory from cmd.exe
"%LOCALAPPDATA%\wsltty\bin\mintty.exe" --wsl -o Locale=C -o Charset=UTF-8 -i "%LOCALAPPDATA%\lxss\bash.ico" /bin/wslbridge -C~ -t /bin/bash -l