1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-11-04 00:51:52 +00:00

Compare commits

...

15 Commits

Author SHA1 Message Date
mintty
5136d7e878 3.0.2.2 beta 2019-07-24 23:32:05 +02:00
mintty
0d39faaaf6 deploy uninstall.bat in installation directory (#170, ~#175, ~#15) 2019-07-24 23:30:49 +02:00
mintty
d61e551236 backend patch v3, linking properly (#169), with dlopen for getpwuid (#156) 2019-07-24 23:06:41 +02:00
mintty
3f60e3f48c find proper icon and rootfs for wsldl-built distros (#169) 2019-07-24 22:38:36 +02:00
mintty
a207cae3a8 3.0.2 2019-07-13 11:20:31 +02:00
mintty
79c3f9e450 ensure cmd.exe is available in PATH during installation/configuration (#172) 2019-07-07 19:07:48 +02:00
mintty
75c67869bf instruction to disable WSL 2 (#171) 2019-07-03 13:06:30 +02:00
mintty
7776748081 do without powershell to determine the exe with the icon 2019-05-28 22:31:08 +02:00
mintty
bac370cfce Merge pull request #111 from caksoylar/patch-1
use icon from exe if determined from manifest
2019-05-28 22:30:26 +02:00
Cem Aksoylar
fc8e7cda45 slashes in paths consistency 2018-06-20 23:29:57 -07:00
Cem Aksoylar
b23a0a4b3d restore deleted root definition, fallback to icon.ico first 2018-06-20 23:29:41 -07:00
Cem Aksoylar
a2414e0dc7 restore tabs 2018-06-20 23:13:38 -07:00
Cem Aksoylar
963a40d919 restore missing fi 2018-06-10 16:06:43 -07:00
Cem Aksoylar
017b05c48c fix EOL, restore misdeleted chunk on original L138-141, tabs to spaces 2018-06-10 12:15:21 -07:00
C Aksoylar
52b03a43d9 Fix missing icons for distros
Instead of looking for `images\icon.ico` in `$instdir` for each distro, instead check inside AppxManifest.xml for the executable name and point to it for the shortcut icon as suggested in https://github.com/mintty/wsltty/issues/110#issuecomment-395999015.
2018-06-10 11:35:20 -07:00
6 changed files with 72 additions and 21 deletions

View File

@@ -79,6 +79,13 @@ WSLtty can be invoked with
Starting the mintty terminal directly from the WSLtty installation location
is discouraged because that would bypass essential options.
#### WSL 2 ####
Due to some incompatible changes by Microsoft, wslbridge cannot connect
in WSL 2 mode at this time.
Workaround:
* `wsl --set-default-version 1`
---
### Configuration ###

View File

@@ -1 +1 @@
3.0.1.2
3.0.2.2

View File

@@ -3,7 +3,7 @@
installdir=${installdir:-'%LOCALAPPDATA%\wsltty'}
configdir=${configdir:-'%APPDATA%\wsltty'}
PATH=/bin:"$PATH"
PATH=/bin:"$PATH":$SYSTEMROOT/System32
contextmenu=false
remove=false
@@ -104,6 +104,24 @@ fi
lxss="/HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Lxss"
schema="/HKEY_CURRENT_USER/Software/Classes/Local Settings/Software/Microsoft/Windows/CurrentVersion/AppModel/SystemAppData"
appex () {
while read line
do
case "$line" in
*Application*Executable*)
for item in $line
do case "$item" in
Executable=*)
eval $item
echo "$Executable"
break;;
esac
done
break;;
esac
done < $*
}
config () {
guid="$1"
ok=false
@@ -125,11 +143,21 @@ config () {
if package=`regtool -q get "$lxss/$guid/PackageFamilyName"`
then
instdir=`regtool get "$schema/$package/Schemas/PackageFullName"`
if [ -r "$ProgramW6432/WindowsApps/$instdir/images/icon.ico" ]
# get actual executable path (may not match $distro) from app manifest
manifest="$ProgramW6432/WindowsApps/$instdir/AppxManifest.xml"
psh_cmd='([xml]$(Get-Content '"\"$manifest\""')).Package.Applications.Application.Executable'
executable=`appex "$manifest"`
if [ -r "$ProgramW6432/WindowsApps/$instdir/$executable" ]
then icon="%PROGRAMFILES%/WindowsApps/$instdir/$executable"
elif [ -r "$ProgramW6432/WindowsApps/$instdir/images/icon.ico" ]
then icon="%PROGRAMFILES%/WindowsApps/$instdir/images/icon.ico"
else icon="$installdir"'\wsl.ico'
fi
root="$basepath/rootfs"
elif [ -f "$basepath/$distro.exe" ]
then
icon="$basepath/$distro.exe"
root="$basepath/rootfs"
else
icon="%LOCALAPPDATA%/lxss/bash.ico"
root="$basepath"

View File

@@ -30,6 +30,7 @@ rem copy "WSL Terminal.lnk" "%installdir%"
rem copy "WSL Terminal %%.lnk" "%installdir%"
copy config-distros.sh "%installdir%"
copy mkshortcut.vbs "%installdir%"
copy uninstall.bat "%installdir%"
rem allow persistent customization of default icon:
if not exist "%installdir%\wsl.ico" copy tux.ico "%installdir%\wsl.ico"

View File

@@ -8,10 +8,10 @@
# wsltty release
ver=3.0.1.2
ver=3.0.2.2
# wsltty appx release - must have 4 parts!
verx=3.0.1.2
verx=3.0.2.2
# Windows SDK version for appx
WINSDKKEY=/HKEY_LOCAL_MACHINE/SOFTWARE/WOW6432Node/Microsoft/.NET Framework Platform/Setup/Multi-Targeting Pack
@@ -19,7 +19,7 @@ WINSDKVER=`regtool list '$(WINSDKKEY)' | sed -e '$$ q' -e d`
##############################
# mintty release version
minttyver=3.0.1
minttyver=3.0.2
# or mintty branch or commit version
#minttyver=master
@@ -121,7 +121,7 @@ wslbridge-package:
wslbridge-source: wslbridge-$(wslbridge-commit).zip
unzip -o wslbridge-$(wslbridge-commit).zip
#cd wslbridge-$(wslbridge-commit)/backend; patch -T -p1 < ../../wslbridge-backend-static.patch
cd wslbridge-$(wslbridge-commit)/backend; patch -T -p1 < ../../wslbridge-backend-static.patch
tr -d '\015' < wslbridge-$(wslbridge-commit)/LICENSE.txt > LICENSE.wslbridge
wslbridge-$(wslbridge-commit).zip:

View File

@@ -1,26 +1,41 @@
diff -rup orig/Makefile new/Makefile
--- orig/Makefile 2018-05-06 01:12:36.000000000 +0200
+++ new/Makefile 2019-05-01 08:16:53.647051200 +0200
@@ -5,7 +5,7 @@ all : ../out/wslbridge-backend
../out/wslbridge-backend : wslbridge-backend.cc ../common/SocketIo.cc ../common/SocketIo.h ../VERSION.txt Makefile
mkdir -p ../out
$(CXX) -std=c++11 -fno-exceptions \
- -static-libgcc -static-libstdc++ \
+ -static -static-libgcc -static-libstdc++ \
diff -rup old/Makefile new/Makefile
--- old/Makefile 2018-05-06 01:12:36.000000000 +0200
+++ new/Makefile 2019-07-24 22:29:12.874257700 +0200
@@ -8,7 +8,9 @@ all : ../out/wslbridge-backend
-static-libgcc -static-libstdc++ \
-D_GNU_SOURCE \
-DWSLBRIDGE_VERSION=$(shell cat ../VERSION.txt) \
-Wall -O2 $< ../common/SocketIo.cc -o $@ -lutil -pthread
diff -rup orig/wslbridge-backend.cc new/wslbridge-backend.cc
--- orig/wslbridge-backend.cc 2018-05-06 01:12:36.000000000 +0200
+++ new/wslbridge-backend.cc 2019-05-01 08:19:12.799688500 +0200
@@ -494,6 +494,45 @@ static void frontendVersionCheck(const c
- -Wall -O2 $< ../common/SocketIo.cc -o $@ -lutil -pthread
+ -Wall -O2 $< ../common/SocketIo.cc -o $@ \
+ -ldl -lutil -static -pthread \
+ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive
$(STRIP) $@
clean:
diff -rup old/wslbridge-backend.cc new/wslbridge-backend.cc
--- old/wslbridge-backend.cc 2018-05-06 01:12:36.000000000 +0200
+++ new/wslbridge-backend.cc 2019-07-24 22:55:25.324307400 +0200
@@ -494,6 +494,58 @@ static void frontendVersionCheck(const c
} // namespace
+#define getpwuid _getpwuid
+
+#include <dlfcn.h>
+typedef struct passwd * (*__getpwuid_t)(int uid);
+
+struct passwd * getpwuid(int uid)
+{
+ void * dl = dlopen(0, 0);
+printf("dlopen %p\n", dl);
+ if (dl) {
+ struct passwd * (*__getpwuid)(int uid) =
+ (__getpwuid_t)dlsym(dl, "getpwuid");
+printf("dlsym %p\n", __getpwuid);
+ if (__getpwuid)
+ return __getpwuid(uid);
+ }
+
+ FILE * pwd = fopen("/etc/passwd", "r");
+ if (pwd) {
+ char pwbuf[222];