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

Compare commits

...

9 Commits
3.7.1 ... 3.7.6

Author SHA1 Message Date
mintty
be4e7fef44 download mintty via git; fix wsltty version info 2024-10-10 22:54:54 +02:00
mintty
a2df28017b 3.7.6 2024-10-10 22:35:16 +02:00
mintty
09972471b9 add rluetzner's patch Get VmId from registry (#356) 2024-10-10 22:33:39 +02:00
mintty
c13340b328 decouple wslbridge build from download to support build of patched version 2024-10-10 22:32:18 +02:00
mintty
8d7ffa75bb 3.7.5 2024-09-17 10:56:47 +02:00
mintty
305fd0f273 2024-09-17 10:56:29 +02:00
mintty
fb1bf601e9 3.7.4 2024-07-03 19:23:59 +02:00
mintty
adc7036609 3.7.3 2024-06-29 00:08:29 +02:00
mintty
fef944e1bb 3.7.2 2024-06-27 05:23:41 +02:00
3 changed files with 63 additions and 10 deletions

View File

@@ -0,0 +1,40 @@
--- wslbridge2/src/wslbridge2.cpp 2024-10-10 20:20:21.931891800 +0000
+++ wslbridge2-0.12/src/wslbridge2.cpp 2024-10-08 09:31:35.954145800 +0000
@@ -228,6 +228,26 @@ static void start_dummy(std::wstring wsl
CloseHandle(pi.hThread);
}
+bool GetIdFromRegistry(GUID *guid) {
+ HKEY hKeyRoot = HKEY_LOCAL_MACHINE;
+ std::wstring subKey = L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\HostComputeService\\VolatileStore\\ComputeSystem";
+ HKEY hKey;
+ if (RegOpenKeyEx(hKeyRoot, subKey.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
+ DWORD index = 0;
+ WCHAR keyName[256];
+ DWORD keyNameSize = sizeof(keyName) / sizeof(keyName[0]);
+
+ while (RegEnumKeyEx(hKey, index, keyName, &keyNameSize, nullptr, nullptr, nullptr, nullptr) == ERROR_SUCCESS) {
+ RegCloseKey(hKey);
+ std::wstring id = L"{" + std::wstring(keyName) + L"}";
+ return IIDFromString(id.c_str(), guid) == S_OK;
+ }
+ RegCloseKey(hKey);
+ }
+ return false;
+}
+
+
int main(int argc, char *argv[])
{
/* Minimum requirement Windows 10 build 17763 aka. version 1809 */
@@ -387,8 +407,8 @@ int main(int argc, char *argv[])
if (LiftedWSLVersion)
start_dummy(wslPath, wslCmdLine, distroName, debugMode);
- const HRESULT hRes = GetVmId(&DistroId, &VmId, LiftedWSLVersion);
- if (hRes != 0)
+ const bool hRes = GetIdFromRegistry(&VmId);
+ if (!hRes)
fatal("GetVmId: %s\n", GetErrorMessage(hRes).c_str());
inputSock = win_vsock_create();

View File

@@ -1 +1 @@
3.7.1
3.7.6

View File

@@ -10,16 +10,16 @@
# wsltty release
ver=3.7.1
ver=3.7.6
# wsltty appx release - must have 4 parts!
verx=3.7.1.1
verx=3.7.6.1
##############################
# mintty release version
minttyver=3.7.1
minttyver=3.7.6
##############################
@@ -56,7 +56,7 @@ wslbridgedir=wslbridge2-$(wslbridgever)
#minttyver=master
# wslbridge branch or commit to build from source;
wslbridge=wslbridge-frontend wslbridge-backend
wslbridge=wslbridge-source wslbridge-frontend wslbridge-backend
##############################
# build backend on a musl-libc-based distribution
@@ -73,10 +73,15 @@ WINSDKVER=`regtool list '$(WINSDKKEY)' | sed -e '$$ q' -e d`
all: all-$(notdir $(CURDIR))
all-wsltty: check pkg
# targets and version checking
all-wsltty: check committed pkg
all-wsltty.appx: appx
committed:
if git status -suno | sed -e "s,^..,," | grep .; then false; fi
#############################################################################
# target checking and some defs
@@ -154,8 +159,10 @@ wslbridge-source: $(wslbridgedir).zip
#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
# patch to fix WSL 2 launching, again
cd $(wslbridgedir); patch -p1 < ../0012-get-vmid-from-registry.patch
wslbridge-frontend: wslbridge-source
wslbridge-frontend:
echo ------------- Compiling wslbridge2 frontend
mkdir -p bin
# frontend build
@@ -165,7 +172,7 @@ wslbridge-frontend: wslbridge-source
windir=$(shell cd "${WINDIR}"; pwd)
wslbridge-backend: wslbridge-source
wslbridge-backend:
echo ------------- Compiling wslbridge2 backend
#uname -m | grep x86_64
mkdir -p bin
@@ -176,10 +183,16 @@ wslbridge-backend: wslbridge-source
# extract binaries
cp $(wslbridgedir)/bin/wslbridge2-backend bin/
mintty-get:
mintty-get: mintty-git # mintty-download or mintty-git
cp mintty-$(minttyver)/icon/terminal.ico mintty.ico
mintty-download:
$(wgeto) https://github.com/mintty/mintty/archive/$(minttyver).zip -o mintty-$(minttyver).zip
unzip -o mintty-$(minttyver).zip
cp mintty-$(minttyver)/icon/terminal.ico mintty.ico
mintty-git:
test -d mintty-$(minttyver) || git clone --depth 111 https://github.com/mintty/mintty.git mintty-$(minttyver)
cd mintty-$(minttyver); git checkout $(minttyver)
wslbuild=LDFLAGS="-static -static-libgcc -s"
appxbuild=$(wslbuild) CCOPT=-DWSLTTY_APPX