1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-11-17 23:35:53 +00:00

Compare commits

..

7 Commits

Author SHA1 Message Date
mintty
bbee0d6339 3.1.4 2020-03-07 19:05:28 +01:00
Thomas Wolff
00c4c2f20b tweak removal of ALL previous shortcuts, also on reconfigure (#218) 2020-03-05 14:15:57 +01:00
Thomas Wolff
9ae697ac20 fix cd /D "%installdir%" for drive changing (#223) 2020-03-05 11:07:31 +01:00
mintty
6397307878 3.1.0.3; fix wsl invocation from cygwin32 2020-02-15 13:44:53 +01:00
Thomas Wolff
67b1596fd2 Merge branch 'master' of https://github.com/mintty/wsltty 2020-01-20 15:49:58 +01:00
Thomas Wolff
433b11c47b remove ALL shortcut lnk and bat files (#218) 2020-01-20 15:49:04 +01:00
Thomas Wolff
2aace74c9d additional quoting for CMD variables (#213) 2020-01-20 15:47:56 +01:00
5 changed files with 58 additions and 22 deletions

View File

@@ -1 +1 @@
3.1.0.2
3.1.4

View File

@@ -5,7 +5,7 @@ case "$installdir" in
"") custominst=false;;
esac
INSTDIR=${installdir:-$LOCALAPPDATA/wsltty}
INSTDIR="${installdir:-$LOCALAPPDATA/wsltty}"
INSTDIR=`cd "$INSTDIR"; pwd`
installdir=${installdir:-'%LOCALAPPDATA%\wsltty'}
@@ -15,7 +15,7 @@ case "$INSTDIR" in
*) TARGETPATH="$INSTDIR"/bin/mintty.exe;;
esac
CONFDIR=${configdir:-$APPDATA/wsltty}
CONFDIR="${configdir:-$APPDATA/wsltty}"
configdir=${configdir:-'%APPDATA%\wsltty'}
PATH=/bin:"$PATH":$SYSTEMROOT/System32
@@ -34,6 +34,8 @@ case "$1" in
-info)
config=false
shift;;
-shortcuts)
shift;;
-shortcuts-remove)
remove=true
shift;;
@@ -74,6 +76,25 @@ case "$1" in
shift;;
esac
if $config && ! $contextmenu
then
# remove shortcut entries in Start menu and cmd-line bat shortcuts
(cd "$INSTDIR"
for lnk in *.lnk
do
if cmd /C comp/M "$lnk" "%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\$lnk"
then cmd /C del "%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\$lnk"
fi
done
for bat in *.bat
do
if cmd /C comp/M "$bat" "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$bat"
then cmd /C del "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\$bat"
fi
done
)
fi
# test w/o WSL: call this script with REGTOOLFAKE=true dash config-distros.sh
if ${REGTOOLFAKE:-false}
then
@@ -255,6 +276,7 @@ config () {
keyname="${name}_Terminal"
if $remove
then
# obsolete; handled above
reg delete "$direckey\\shell\\$keyname" /f
reg delete "$direckey\\Background\\shell\\$keyname" /f
else
@@ -288,9 +310,15 @@ config () {
# launch script in . -> WSLtty home, WindowsApps launch folder
cmd /C mkbat.bat "$name"
cmd /C copy "$name.bat" "$installdir"
cmd /C copy "$name.bat" "%LOCALAPPDATA%\\Microsoft\\WindowsApps"
# store backup copies in installation dir
if [ "$PWD" != "$INSTDIR" ]
then
cmd /C copy "$name Terminal %.lnk" "$installdir"
cmd /C copy "$name.bat" "$installdir"
fi
# prepare versions to target WSL home directory
#bridgeargs="-C~ $bridgeargs"
minttyargs="$minttyargs -~"
@@ -315,8 +343,14 @@ config () {
# launch script in ~ -> WSLtty home, WindowsApps launch folder
cmd /C mkbat.bat "$name~"
cmd /C copy "$name~.bat" "$installdir"
cmd /C copy "$name~.bat" "%LOCALAPPDATA%\\Microsoft\\WindowsApps"
# store backup copies in installation dir
if [ "$PWD" != "$INSTDIR" ]
then
cmd /C copy "$name Terminal.lnk" "$installdir"
cmd /C copy "$name~.bat" "$installdir"
fi
fi
fi

View File

@@ -1,12 +1,12 @@
@echo off
set refinstalldir=%%LOCALAPPDATA%%\wsltty
set installdir=%LOCALAPPDATA%\wsltty
set installdir="%LOCALAPPDATA%\wsltty"
set refconfigdir=%%APPDATA%%\wsltty
set configdir=%APPDATA%\wsltty
set oldroot=%installdir%
set oldhomedir=%installdir%\home\%USERNAME%
set oldconfigdir=%oldhomedir%\.config\mintty
set configdir="%APPDATA%\wsltty"
set oldroot="%installdir%"
set oldhomedir="%installdir%\home\%USERNAME%"
set oldconfigdir="%oldhomedir%\.config\mintty"
if not "%1" == "" set refinstalldir=%1 && set installdir=%1
if not "%2" == "" set refconfigdir=%2 && set configdir=%2
@@ -79,7 +79,7 @@ copy mintty.ico "%installdir%\usr\share\mintty\icon"
rem create Start Menu Folder
set smf=%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty
set smf="%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty"
mkdir "%smf%"
rem clean up previous installation
@@ -131,7 +131,7 @@ rem create config file if it does not yet exist
if not exist "%configdir%\config" echo # To use common configuration in %%APPDATA%%\mintty, simply remove this file>"%configdir%\config"
rem distro-specific stuff: shortcuts and launch scripts
cd "%installdir%"
cd /D "%installdir%"
bin\dash.exe "%installdir%\config-distros.sh"
rem bin\dash.exe "%installdir%\config-distros.sh" -contextmenu

View File

@@ -8,13 +8,13 @@
# wsltty release
ver=3.1.0.2
ver=3.1.4
# wsltty appx release - must have 4 parts!
verx=3.1.0.2
verx=3.1.4.0
# mintty release version
minttyver=3.1.0
minttyver=3.1.4
# wslbridge2 release version
wslbridgever=0.5
@@ -117,14 +117,16 @@ wslbridge-frontend: wslbridge-source
# build backend on a musl-libc-based distribution
BuildDistr=Alpine
windir=$(shell cd "${WINDIR}"; pwd)
wslbridge-backend: wslbridge-source
echo ------------- Compiling wslbridge2 backend
#uname -m | grep x86_64
mkdir -p bin
# provide dependencies for backend build
PATH="${WINDIR}/Sysnative:${PATH}" cmd /C wsl.exe -u root -d $(BuildDistr) $(shell env | grep http_proxy=) apk add make g++ linux-headers < /dev/null
PATH="$(windir)/Sysnative:${PATH}" cmd /C wsl.exe -u root -d $(BuildDistr) $(shell env | grep http_proxy=) apk add make g++ linux-headers < /dev/null
# invoke backend build
cd wslbridge2-$(wslbridgever)/src; PATH="${WINDIR}/Sysnative:${PATH}" cmd /C wsl.exe -d $(BuildDistr) make -f Makefile.backend RELEASE=1 < /dev/null
cd wslbridge2-$(wslbridgever)/src; PATH="$(windir)/Sysnative:${PATH}" cmd /C wsl.exe -d $(BuildDistr) make -f Makefile.backend RELEASE=1 < /dev/null
# extract binaries
cp wslbridge2-$(wslbridgever)/bin/wslbridge2-backend bin/

View File

@@ -1,30 +1,30 @@
@echo off
if "%installdir%" == "" set installdir=%LOCALAPPDATA%\wsltty
if "%installdir%" == "" set installdir="%LOCALAPPDATA%\wsltty"
:shortcuts
rem delete Start Menu Folder
set smf=%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty
set smf="%APPDATA%\Microsoft\Windows\Start Menu\Programs\WSLtty"
rmdir /S /Q "%smf%"
:start menu
cd %installdir%
cd /D "%installdir%"
bin\dash.exe config-distros.sh -shortcuts-remove
:explorer context menu
cd %installdir%
cd /D "%installdir%"
bin\dash.exe config-distros.sh -contextmenu-remove
:undeploy
cd %installdir%
cd /D "%installdir%"
rem currently not removing software