1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-11-02 16:11:55 +00:00

Compare commits

...

8 Commits
3.5.1 ... 3.6.0

Author SHA1 Message Date
mintty
c91ec886b5 3.6.0 2022-03-25 19:28:34 +01:00
mintty
4caa2c34eb portable installation (#306) 2022-03-22 15:54:28 +01:00
mintty
73fcc66790 fix previous change 2022-03-01 00:11:44 +01:00
mintty
5cee2c341b installer: support customized install dirs via environment vars (#304) 2022-02-28 09:49:30 +01:00
mintty
ea570a191e (#304) 2022-02-19 23:50:24 +01:00
mintty
2dd099265d mention winget package 2022-02-05 22:52:32 +01:00
mintty
2ddd2cd1ff add 41575379b4
as a patch: add COM instance for new lifted WSL service
2022-02-03 21:00:40 +01:00
mintty
d1fa49985b add wsltty quiet installer (microsoft/winget-pkgs#40573) 2022-01-18 19:37:26 +01:00
8 changed files with 152 additions and 19 deletions

View File

@@ -0,0 +1,62 @@
diff -rup src/sav/GetVmId.cpp src/GetVmId.cpp
--- src/sav/GetVmId.cpp 2021-04-27 13:50:51.000000000 +0000
+++ src/GetVmId.cpp 2022-02-03 19:43:53.684999800 +0000
@@ -46,11 +46,24 @@ void ComInit(void)
EOAC_STATIC_CLOAKING, NULL);
assert(hRes == 0);
- hRes = CoCreateInstance(CLSID_LxssUserSession,
+ // First try with COM server in lifted WSL service
+ hRes = CoCreateInstance(CLSID_WslService,
NULL,
CLSCTX_LOCAL_SERVER,
- IID_ILxssUserSession,
+ IID_IWSLService,
(PVOID *)&wslSession);
+
+
+ // Now try with COM server in system WSL service
+ if (FAILED(hRes))
+ {
+ hRes = CoCreateInstance(CLSID_LxssUserSession,
+ NULL,
+ CLSCTX_LOCAL_SERVER,
+ IID_ILxssUserSession,
+ (PVOID *)&wslSession);
+ }
+
assert(hRes == 0);
}
diff -rup src/sav/LxssUserSession.hpp src/LxssUserSession.hpp
--- src/sav/LxssUserSession.hpp 2021-04-27 13:50:51.000000000 +0000
+++ src/LxssUserSession.hpp 2022-02-03 19:45:22.846298200 +0000
@@ -11,14 +11,26 @@
#ifndef LXSSUSERSESSION_H
#define LXSSUSERSESSION_H
-/* Class identifier */
+// COM IDs for lifted WSL service
+static const GUID CLSID_WslService = {
+ 0xF122531F,
+ 0x326B,
+ 0x4514,
+ { 0x85, 0xAE, 0xDC, 0x99, 0xD3, 0x1D, 0x82, 0x56 } };
+
+static const GUID IID_IWSLService = {
+ 0x50047071,
+ 0x122C,
+ 0x4CAD,
+ { 0x9C, 0x93, 0x94, 0x72, 0x0E, 0xB7, 0x7B, 0x06 } };
+
+// COM IDs for system WSL service
static const GUID CLSID_LxssUserSession = {
0x4F476546,
0xB412,
0x4579,
{ 0xB6, 0x4C, 0x12, 0x3D, 0xF3, 0x31, 0xE3, 0xD6 } };
-/* Interface identifier */
static const GUID IID_ILxssUserSession = {
0x536A6BCF,
0xFE04,

View File

@@ -1,4 +1,4 @@
mintty is copyright 2008-13 Andy Koppe, 2015-18 Thomas Wolff.
mintty is copyright 2008-13 Andy Koppe, 2015-22 Thomas Wolff.
Licensed under the terms of the GNU General Public License version 3 or later,
amended with the bundling clause to clarify ambiguous interpretation.

View File

@@ -35,11 +35,23 @@ You may need to open the Properties of the installer first, tab “General”
section “Security” (if available) and select “Unblock”,
to enable the “Run anyway” button.
#### WSLtty Portable installer
For a portable installation, e.g. on a USB stick, choose the
“-install-portable.exe” file for download. Installation will prompt
for a portable installation folder interactively.
For example, choosing `U:\opt` will create and use folder
`U:\opt\wsltty` both as installation directory and configuration directory.
Portable installation does not install any start menu or desktop shortcuts
and no context menu entries. It creates a shortcut in the selected
portable installation folder to start the default WSL distribution.
#### Installation from archive ####
In case a local anti-virus guard barfs about the wsltty installer, the
release also contains a `.cab` file. Download it, open it, extract its files
to some temporary deployment directory, and invoke `install.bat` from there.
to some temporary deployment directory, and invoke `install.bat` from there,
or `install-portable.bat` for a portable installation.
#### Installation from source repository ####
@@ -62,14 +74,20 @@ the optional second parameter designates the configuration directory.
### Installation with other package management environments ###
Note that these are 3rd-party contributions and do not necessarily
provide the latest version.
Note: These are 3rd-party packages, not managed by this repository.
#### Windows Package Manager ####
To install wsltty from the
[Windows Package Manager Community Repository](https://github.com/microsoft/winget-pkgs),
invoke one of
* `winget install wsltty`
* `winget upgrade wsltty`
#### Chocolatey ####
If you use the [Chocolatey package manager](https://chocolatey.org/),
invoke one of
<img height=222 align=right src=https://github.com/mintty/wsltty.appx/raw/master/wsltty.appx.png>
* `choco install wsltty`
* `choco upgrade wsltty`
@@ -82,10 +100,6 @@ then, invoke one of
* `scoop install wsltty`
* `scoop update wsltty`
#### Windows Appx package ####
A Windows Appx package and certificate is available in the [wsltty.appx](https://github.com/mintty/wsltty.appx/) repository.
### Uninstallation ###
To uninstall wsltty desktop, start menu, and context menu integration:

View File

@@ -1 +1 @@
3.5.1
3.6.0

27
install-portable.bat Executable file
View File

@@ -0,0 +1,27 @@
@echo off
set sel="Select folder to place installation of portable wsltty"
for /f "usebackq delims=" %%f in (`powershell "(new-object -COM Shell.Application).BrowseForFolder(0, '%sel%', 0, 0).self.path"`) do set f=%%f
set instdir=%f%\wsltty
if "%f%"=="" (
echo no installation
exit
) else if not exist "%f%" (
echo invalid installation folder %instdir%
exit
)
call install "%instdir%" "%instdir%" /P
rem create shortcut
cd /D "%instdir%"
set instpath=%instdir:~2%
set target=%%COMSPEC%%
set minttyargs=/C bin\mintty.exe --WSL= --icon=/wsl.ico --configdir=. -~
set bridgeargs= -
set wdir=%instpath%
set icon=%instpath%\wsl.ico
cscript /nologo mkshortcut.vbs "/name:WSL Terminal Portable"

View File

@@ -1,9 +1,9 @@
@echo off
set refinstalldir=%%LOCALAPPDATA%%\wsltty
set installdir="%LOCALAPPDATA%\wsltty"
set refconfigdir=%%APPDATA%%\wsltty
set configdir="%APPDATA%\wsltty"
if "%installdir%" == "" set installdir="%LOCALAPPDATA%\wsltty"
if "%configdir%" == "" set configdir="%APPDATA%\wsltty"
call dequote installdir
call dequote configdir
set oldroot="%installdir%"
@@ -137,11 +137,16 @@ mkdir "%configdir%\themes" 2> nul:
mkdir "%configdir%\sounds" 2> nul:
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"
if exist "%configdir%\config" goto appconfig
echo # To use common configuration in %%APPDATA%%\mintty, simply remove this file>"%configdir%\config"
if "%3" == "/P" echo # Do not remove this file for WSLtty Portable>>"%configdir%\config"
:appconfig
rem skip configuration for WSLtty Portable
if "%3" == "/P" goto end
rem distro-specific stuff: shortcuts and launch scripts
cd /D "%installdir%"
echo Configuring for WSL distributions

View File

@@ -10,16 +10,16 @@
# wsltty release
ver=3.5.1
ver=3.6.0
# wsltty appx release - must have 4 parts!
verx=3.5.1.1
verx=3.6.0.0
##############################
# mintty release version
minttyver=3.5.1
minttyver=3.6.0
##############################
@@ -150,6 +150,8 @@ wslbridge-source: $(wslbridgedir).zip
cp $(wslbridgedir)/LICENSE LICENSE.wslbridge2
# patch
cd $(wslbridgedir); patch -p1 < ../0001-notify-size-change-inband.patch
# patch to https://github.com/Biswa96/wslbridge2/commit/41575379b416703c49e2687e957440239a4cdfb7
cd $(wslbridgedir); patch -p0 < ../0002-add-com-for-lifted-wsl.patch
wslbridge-frontend: wslbridge-source
echo ------------- Compiling wslbridge2 frontend
@@ -277,14 +279,35 @@ cop: copcab
mkdir -p rel
cp -fl $(CAB)/* rel/
installer: cop
installer: cop cab normal-installer silent-installer portable-installer
cab:
# build cab archive
lcab -r $(CAB) rel/$(CAB).cab
normal-installer:
# prepare build of installer
rm -f rel/$(CAB)-install.exe
sed -e "s,%version%,$(ver)," -e "s,%arch%,$(arch)," makewinx.cfg > rel/wsltty.SED
# build installer
cd rel; iexpress /n wsltty.SED
# build cab archive
lcab -r $(CAB) rel/$(CAB).cab
silent-installer:
# prepare build of installer
rm -f rel/$(CAB)-install-quiet.exe
cd rel; sed -e "/ShowInstallProgramWindow/ s/0/1/" -e "/HideExtractAnimation/ s/0/1/" -e "/InstallPrompt/ s/=.*/=/" -e "/FinishMessage/ s/=.*/=/" -e "/TargetName/ s/install.exe/install-quiet.exe/" wsltty.SED > wsltty-quiet.SED
# build installer
cd rel; iexpress /n wsltty-quiet.SED
InstallPrompt=Install Mintty terminal for WSL Portable?
FinishMessage=Mintty for WSL Portable installation finished
portable-installer:
# prepare build of installer
rm -f rel/$(CAB)-install-portable.exe
cd rel; sed -e "/InstallPrompt/ s/=.*/=$(InstallPrompt)/" -e "/FinishMessage/ s/=.*/=$(FinishMessage)/" -e "/AppLaunched/ s/install/install-portable/" -e "/TargetName/ s/install.exe/install-portable.exe/" wsltty.SED > wsltty-portable.SED
# build installer
cd rel; iexpress /n wsltty-portable.SED
install: cop installbat

View File

@@ -60,6 +60,7 @@ FILE24="mintty.ico"
FILE25="mkshortcut.vbs"
FILE26="dequote.bat"
FILE27="cmd2.bat"
FILE28="install-portable.bat"
[SourceFiles]
SourceFiles0=.
@@ -93,4 +94,5 @@ SourceFiles0=.
%FILE25%=
%FILE26%=
%FILE27%=
%FILE28%=