1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-11-19 08:15:54 +00:00

Compare commits

..

3 Commits
3.7.7 ... 3.7.8

Author SHA1 Message Date
Thomas Wolff
7074ff02b9 3.7.8 2025-03-29 00:00:00 +00:00
Thomas Wolff
4e0bbddcc0 revise command-line launch scripts, support arguments (#365) 2025-03-29 00:00:00 +00:00
Thomas Wolff
68e11e5775 revise command-line launch scripts, support arguments (#365) 2025-03-29 00:00:00 +00:00
4 changed files with 44 additions and 17 deletions

View File

@@ -218,6 +218,8 @@ WSLtty installs the following scripts into `%LOCALAPPDATA%\Microsoft\WindowsApps
* For each installed WSL distribution, e.g. Ubuntu, a command script like `Ubuntu~.bat` to start in the WSL user home
* `WSL.bat` and `WSL~.bat` to start the default WSL distribution
The scripts accept an optional invocation command (since 3.7.8).
Given that `%LOCALAPPDATA%\Microsoft\WindowsApps` is in your PATH,
the scripts can be invoked from cmd.exe, PowerShell, or via WIN+R.

View File

@@ -1 +1 @@
3.7.7
3.7.8

View File

@@ -155,17 +155,40 @@ regtool () {
}
fi
if $config
then while read line; do echo "$line"; done <</EOB > mkbat.bat
@echo off
echo Creating %1.bat
echo @echo off> %1.bat
echo rem Start mintty terminal for WSL package %name% in current directory>> %1.bat
echo %target% -i "%icon%" %minttyargs% %bridgeargs% %%*>> %1.bat
/EOB
fi
mkbat () {
echo Creating "$1.bat"
while read line; do echo "$line"; done <<-\/EOB > "$1".bat
@echo off
rem Start mintty terminal for WSL
rem get basename of this script file,
rem use it to select WSL distribution and homedir flag
set dist=%~n0
rem start in current directory
set cdir=
rem if script name ends with ~, extract WSL distribution and param -~
if "%dist:~-1%" == "~" set cdir=-~ && set dist=%dist:~0,-1%
rem map WSL default distribution
if "%dist%" == "WSL" set dist=
rem check if we have an explicit -d DIST parameter
if "%1" == "-d" set dist=%2 && shift && shift
chcp 65001 > nul:
if "%1" == "" goto login
:cmd
"%LOCALAPPDATA%/wsltty/bin/mintty.exe" -i "%LOCALAPPDATA%/wsltty/wsl.ico" --WSL="%dist%" --configdir="%APPDATA%/wsltty" %cdir% %*
goto end
:login
"%LOCALAPPDATA%/wsltty/bin/mintty.exe" -i "%LOCALAPPDATA%/wsltty/wsl.ico" --WSL="%dist%" --configdir="%APPDATA%/wsltty" %cdir% -
:end
/EOB
}
if $custominst && $config && ! $remove
then
@@ -366,7 +389,8 @@ config () {
copy "$name Terminal %.lnk" "$APPDATA\\Microsoft\\Windows\\Start Menu\\Programs\\WSLtty"
# launch script in . -> WSLtty home, WindowsApps launch folder
cmd /C mkbat.bat "$name"
#cmd /C mkbat.bat "$name"
mkbat "$name"
copy "$name.bat" "$LOCALAPPDATA\\Microsoft\\WindowsApps"
# store backup copies in installation dir
@@ -402,7 +426,8 @@ config () {
fi
# launch script in ~ -> WSLtty home, WindowsApps launch folder
cmd /C mkbat.bat "$name~"
#cmd /C mkbat.bat "$name~"
mkbat "$name~"
copy "$name~.bat" "$LOCALAPPDATA\\Microsoft\\WindowsApps"
# store backup copies in installation dir

View File

@@ -10,16 +10,16 @@
# wsltty release
ver=3.7.7
ver=3.7.8
# wsltty appx release - must have 4 parts!
verx=3.7.7.1
verx=3.7.8.1
##############################
# mintty release version
minttyver=3.7.7
minttyver=3.7.8
minrepo=git@github.com:mintty/mintty.git