mirror of
https://github.com/mintty/wsltty.git
synced 2025-11-02 16:11:55 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c91ec886b5 | ||
|
|
4caa2c34eb | ||
|
|
73fcc66790 | ||
|
|
5cee2c341b | ||
|
|
ea570a191e | ||
|
|
2dd099265d | ||
|
|
2ddd2cd1ff | ||
|
|
d1fa49985b |
62
0002-add-com-for-lifted-wsl.patch
Normal file
62
0002-add-com-for-lifted-wsl.patch
Normal 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,
|
||||
@@ -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.
|
||||
|
||||
30
README.md
30
README.md
@@ -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:
|
||||
|
||||
27
install-portable.bat
Executable file
27
install-portable.bat
Executable 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"
|
||||
|
||||
11
install.bat
11
install.bat
@@ -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
|
||||
|
||||
35
makefile
35
makefile
@@ -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
|
||||
|
||||
|
||||
@@ -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%=
|
||||
|
||||
|
||||
Reference in New Issue
Block a user