mirror of
https://github.com/mintty/wsltty.git
synced 2025-01-31 10:11:02 +00:00
consider manually tuned installdir and configdir (#119)
This commit is contained in:
parent
46ee1b4c1c
commit
d7f14146fd
@ -1,5 +1,8 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
installdir=${installdir:-'%LOCALAPPDATA%\wsltty'}
|
||||||
|
configdir=${configdir:-'%APPDATA%\wsltty'}
|
||||||
|
|
||||||
PATH=/bin:"$PATH"
|
PATH=/bin:"$PATH"
|
||||||
|
|
||||||
contextmenu=false
|
contextmenu=false
|
||||||
@ -130,7 +133,7 @@ do
|
|||||||
instdir=`regtool get "$schema/$package/Schemas/PackageFullName"`
|
instdir=`regtool get "$schema/$package/Schemas/PackageFullName"`
|
||||||
if [ -r "$ProgramW6432/WindowsApps/$instdir/images/icon.ico" ]
|
if [ -r "$ProgramW6432/WindowsApps/$instdir/images/icon.ico" ]
|
||||||
then icon="%PROGRAMFILES%/WindowsApps/$instdir/images/icon.ico"
|
then icon="%PROGRAMFILES%/WindowsApps/$instdir/images/icon.ico"
|
||||||
else icon="%LOCALAPPDATA%/wsltty/wsl.ico"
|
else icon="$installdir"'\wsl.ico'
|
||||||
fi
|
fi
|
||||||
root="$basepath/rootfs"
|
root="$basepath/rootfs"
|
||||||
else
|
else
|
||||||
@ -138,8 +141,8 @@ do
|
|||||||
root="$basepath"
|
root="$basepath"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
minttyargs='--wsl --rootfs="'"$root"'" --configdir="%APPDATA%\wsltty" -o Locale=C -o Charset=UTF-8 /bin/wslbridge '
|
minttyargs='--wsl --rootfs="'"$root"'" --configdir="'"$configdir"'" -o Locale=C -o Charset=UTF-8 /bin/wslbridge '
|
||||||
minttyargs='--WSL="'"$distro"'" --configdir="%APPDATA%\wsltty"'
|
minttyargs='--WSL="'"$distro"'" --configdir="'"$configdir"'"'
|
||||||
#if [ -z "$launch" ]
|
#if [ -z "$launch" ]
|
||||||
#then bridgeargs='-t /bin/bash'
|
#then bridgeargs='-t /bin/bash'
|
||||||
#else bridgeargs='-l "'"$launch"'" -t /bin/bash'
|
#else bridgeargs='-l "'"$launch"'" -t /bin/bash'
|
||||||
@ -151,8 +154,8 @@ do
|
|||||||
"") # WSL default installation
|
"") # WSL default installation
|
||||||
distro=
|
distro=
|
||||||
name=WSL
|
name=WSL
|
||||||
icon="%LOCALAPPDATA%/wsltty/wsl.ico"
|
icon="$installdir"'\wsl.ico'
|
||||||
minttyargs='--WSL= --configdir="%APPDATA%\wsltty"'
|
minttyargs='--WSL= --configdir="'"$configdir"'"'
|
||||||
bridgeargs='-t'
|
bridgeargs='-t'
|
||||||
|
|
||||||
ok=true;;
|
ok=true;;
|
||||||
@ -163,7 +166,7 @@ do
|
|||||||
echoc "- (launcher $launcher)"
|
echoc "- (launcher $launcher)"
|
||||||
echoc "- icon $icon"
|
echoc "- icon $icon"
|
||||||
echoc "- root $root"
|
echoc "- root $root"
|
||||||
target='%LOCALAPPDATA%\wsltty\bin\mintty.exe'
|
target="$installdir"'\bin\mintty.exe'
|
||||||
bridgeargs=" "
|
bridgeargs=" "
|
||||||
|
|
||||||
if $ok && $config
|
if $ok && $config
|
||||||
@ -201,8 +204,8 @@ do
|
|||||||
|
|
||||||
# launch script in . -> WSLtty home, WindowsApps launch folder
|
# launch script in . -> WSLtty home, WindowsApps launch folder
|
||||||
cmd /C mkbat.bat "$name"
|
cmd /C mkbat.bat "$name"
|
||||||
cmd /C copy "$name.bat" "%LOCALAPPDATA%\\wsltty\\$name.bat"
|
cmd /C copy "$name.bat" "$installdir"
|
||||||
cmd /C copy "$name.bat" "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$name.bat"
|
cmd /C copy "$name.bat" "%LOCALAPPDATA%\\Microsoft\\WindowsApps"
|
||||||
|
|
||||||
# prepare versions to target WSL home directory
|
# prepare versions to target WSL home directory
|
||||||
#bridgeargs="-C~ $bridgeargs"
|
#bridgeargs="-C~ $bridgeargs"
|
||||||
@ -219,8 +222,8 @@ do
|
|||||||
|
|
||||||
# launch script in ~ -> WSLtty home, WindowsApps launch folder
|
# launch script in ~ -> WSLtty home, WindowsApps launch folder
|
||||||
cmd /C mkbat.bat "$name~"
|
cmd /C mkbat.bat "$name~"
|
||||||
cmd /C copy "$name~.bat" "%LOCALAPPDATA%\\wsltty\\$name~.bat"
|
cmd /C copy "$name~.bat" "$installdir"
|
||||||
cmd /C copy "$name~.bat" "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$name~.bat"
|
cmd /C copy "$name~.bat" "%LOCALAPPDATA%\\Microsoft\\WindowsApps"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user