mirror of
https://github.com/mintty/wsltty.git
synced 2025-10-30 14:43:53 +00:00
support new WSL distribution model (#52)
This commit is contained in:
@@ -8,11 +8,13 @@ rem -l
|
||||
rem /arguments:--wsl -h err -o Locale=C -o Charset=UTF-8 /bin/wslbridge -t /bin/bash -l
|
||||
rem /target:%LOCALAPPDATA%\wsltty\bin\mintty.exe
|
||||
rem /workingdir:%USERPROFILE%
|
||||
rem /icon:%LOCALAPPDATA%\lxss\bash.ico
|
||||
rem rem /icon:%LOCALAPPDATA%\lxss\bash.ico
|
||||
rem /icon:%LOCALAPPDATA%\wsltty\wsl.ico
|
||||
|
||||
rem General - Name:
|
||||
name = Wscript.Arguments.Named("name") & ".lnk"
|
||||
set wshell = WScript.CreateObject("WScript.Shell")
|
||||
wscript.echo "Creating " & name
|
||||
set lnk = wshell.CreateShortcut(name)
|
||||
|
||||
rem Target:
|
||||
@@ -23,8 +25,8 @@ lnk.TargetPath = wshell.ExpandEnvironmentStrings("%target%")
|
||||
minttyargs = wshell.ExpandEnvironmentStrings("%minttyargs%")
|
||||
bridgeargs = wshell.ExpandEnvironmentStrings("%bridgeargs%")
|
||||
lnk.Arguments = minttyargs & bridgeargs
|
||||
wscript.echo "minttyargs: " & minttyargs
|
||||
wscript.echo lnk.Arguments
|
||||
rem wscript.echo "minttyargs: " & minttyargs
|
||||
rem wscript.echo lnk.Arguments
|
||||
|
||||
rem Start in:
|
||||
rem lnk.WorkingDirectory = Wscript.Arguments.Named("workingdir")
|
||||
@@ -35,9 +37,10 @@ rem icon = Wscript.Arguments.Named("icon")
|
||||
rem rem iconoffset = Wscript.Arguments.Named("iconoffset")
|
||||
rem rem icon = icon & ", " & iconoffset
|
||||
icon = wshell.ExpandEnvironmentStrings("%icon%")
|
||||
wscript.echo "icon: " & icon
|
||||
rem wscript.echo "icon: " & icon
|
||||
lnk.IconLocation = icon
|
||||
rem lnk.IconLocation = "%LOCALAPPDATA%\lxss\bash.ico"
|
||||
rem rem lnk.IconLocation = "%LOCALAPPDATA%\lxss\bash.ico"
|
||||
rem lnk.IconLocation = "%LOCALAPPDATA%\wsltty\wsl.ico"
|
||||
|
||||
rem Shorcut key:
|
||||
rem lnk.HotKey = "ALT+CTRL+W"
|
||||
@@ -50,3 +53,5 @@ rem lnk.IconLocation = Wscript.Arguments.Named("desc")
|
||||
rem lnk.Description = "WSLtty"
|
||||
|
||||
lnk.Save
|
||||
wscript.echo "Created " & name
|
||||
wscript.echo
|
||||
|
||||
Reference in New Issue
Block a user