From c9191b8a5eb6a846a43c67556d341d984eb1870f Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Fri, 14 Mar 2025 14:26:22 +0200 Subject: [PATCH 01/12] Rename conpty.cc to conpty_backend.cc --- src/win/{conpty.cc => conpty_backend.cc} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/win/{conpty.cc => conpty_backend.cc} (100%) diff --git a/src/win/conpty.cc b/src/win/conpty_backend.cc similarity index 100% rename from src/win/conpty.cc rename to src/win/conpty_backend.cc From 14219fd5e90b52ccde66cd3e78da18c4aebc25f6 Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Fri, 14 Mar 2025 14:27:02 +0200 Subject: [PATCH 02/12] Rename winpty.cc to winpty_backend.cc --- src/win/{winpty.cc => winpty_backend.cc} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/win/{winpty.cc => winpty_backend.cc} (100%) diff --git a/src/win/winpty.cc b/src/win/winpty_backend.cc similarity index 100% rename from src/win/winpty.cc rename to src/win/winpty_backend.cc From 6a5f6cdf3893d1baff3945ccc8c8c33c4ac650b5 Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Fri, 14 Mar 2025 14:37:36 +0200 Subject: [PATCH 03/12] patch:file name --- binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index f21c7df48..f35c5334b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -32,7 +32,7 @@ { 'target_name': 'conpty', 'sources' : [ - 'src/win/conpty.cc', + 'src/win/conpty_backend.cc', 'src/win/path_util.cc' ], 'libraries': [ From 0b03874ed3830ff31dcae1f18ed265db1ab7435e Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Fri, 14 Mar 2025 14:39:13 +0200 Subject: [PATCH 04/12] Update binding.gyp --- binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index f35c5334b..f3c568bbb 100644 --- a/binding.gyp +++ b/binding.gyp @@ -58,7 +58,7 @@ 'deps/winpty/src/winpty.gyp:winpty', ], 'sources' : [ - 'src/win/winpty.cc', + 'src/win/winpty_backend.cc', 'src/win/path_util.cc' ], 'libraries': [ From 8e7be77f7867961fbc847fd9a8718e5ca8867c51 Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Fri, 14 Mar 2025 15:20:21 +0200 Subject: [PATCH 05/12] Update binding.gyp --- binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index f3c568bbb..527e116e4 100644 --- a/binding.gyp +++ b/binding.gyp @@ -30,7 +30,7 @@ ['OS=="win"', { 'targets': [ { - 'target_name': 'conpty', + 'target_name': 'conpty_backend', 'sources' : [ 'src/win/conpty_backend.cc', 'src/win/path_util.cc' From 92e4bb18121363a9925a3890d6b02bfa45494060 Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Fri, 14 Mar 2025 15:25:59 +0200 Subject: [PATCH 06/12] Update windowsPtyAgent.ts --- src/windowsPtyAgent.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/windowsPtyAgent.ts b/src/windowsPtyAgent.ts index ba5dbdbc9..0f3b8f130 100644 --- a/src/windowsPtyAgent.ts +++ b/src/windowsPtyAgent.ts @@ -63,10 +63,10 @@ export class WindowsPtyAgent { if (this._useConpty) { if (!conptyNative) { try { - conptyNative = require('../build/Release/conpty.node'); + conptyNative = require('../build/Release/conpty_backend.node'); } catch (outerError) { try { - conptyNative = require('../build/Debug/conpty.node'); + conptyNative = require('../build/Debug/conpty_backend.node'); } catch (innerError) { console.error('innerError', innerError); // Re-throw the exception from the Release require if the Debug require fails as well From 07e161bb55aeeeff2509daafc1f018dab2ca3108 Mon Sep 17 00:00:00 2001 From: Basha MEGA Date: Sat, 15 Mar 2025 06:34:50 +0000 Subject: [PATCH 07/12] chore: revert file name change --- binding.gyp | 4 ++-- src/win/{conpty_backend.cc => conpty.cc} | 0 src/win/{winpty_backend.cc => winpty.cc} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/win/{conpty_backend.cc => conpty.cc} (100%) rename src/win/{winpty_backend.cc => winpty.cc} (100%) diff --git a/binding.gyp b/binding.gyp index 527e116e4..d43331bac 100644 --- a/binding.gyp +++ b/binding.gyp @@ -32,7 +32,7 @@ { 'target_name': 'conpty_backend', 'sources' : [ - 'src/win/conpty_backend.cc', + 'src/win/conpty.cc', 'src/win/path_util.cc' ], 'libraries': [ @@ -58,7 +58,7 @@ 'deps/winpty/src/winpty.gyp:winpty', ], 'sources' : [ - 'src/win/winpty_backend.cc', + 'src/win/winpty.cc', 'src/win/path_util.cc' ], 'libraries': [ diff --git a/src/win/conpty_backend.cc b/src/win/conpty.cc similarity index 100% rename from src/win/conpty_backend.cc rename to src/win/conpty.cc diff --git a/src/win/winpty_backend.cc b/src/win/winpty.cc similarity index 100% rename from src/win/winpty_backend.cc rename to src/win/winpty.cc From d252340c9945b13a7d02b7ab3611814c8328e67b Mon Sep 17 00:00:00 2001 From: Basha MEGA Date: Sat, 15 Mar 2025 06:36:47 +0000 Subject: [PATCH 08/12] chore: fix post install --- scripts/post-install.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/post-install.js b/scripts/post-install.js index d192504f0..6504f367c 100644 --- a/scripts/post-install.js +++ b/scripts/post-install.js @@ -7,8 +7,8 @@ const path = require('path'); const RELEASE_DIR = path.join(__dirname, '../build/Release'); const BUILD_FILES = [ - path.join(RELEASE_DIR, 'conpty.node'), - path.join(RELEASE_DIR, 'conpty.pdb'), + path.join(RELEASE_DIR, 'conpty_backend.node'), + path.join(RELEASE_DIR, 'conpty_backend.pdb'), path.join(RELEASE_DIR, 'conpty_console_list.node'), path.join(RELEASE_DIR, 'conpty_console_list.pdb'), path.join(RELEASE_DIR, 'pty.node'), From c42cacaff0918b5c4f842693770a201ffe815a3d Mon Sep 17 00:00:00 2001 From: Basha MEGA Date: Sat, 15 Mar 2025 07:05:43 +0000 Subject: [PATCH 09/12] - --- scripts/post-install.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/post-install.js b/scripts/post-install.js index 6504f367c..ccb8709e3 100644 --- a/scripts/post-install.js +++ b/scripts/post-install.js @@ -8,7 +8,7 @@ const path = require('path'); const RELEASE_DIR = path.join(__dirname, '../build/Release'); const BUILD_FILES = [ path.join(RELEASE_DIR, 'conpty_backend.node'), - path.join(RELEASE_DIR, 'conpty_backend.pdb'), + path.join(RELEASE_DIR, 'conpty.pdb'), path.join(RELEASE_DIR, 'conpty_console_list.node'), path.join(RELEASE_DIR, 'conpty_console_list.pdb'), path.join(RELEASE_DIR, 'pty.node'), From 5402d972b293b335a6abb97cd7f805c586324eac Mon Sep 17 00:00:00 2001 From: Basha MEGA Date: Sat, 15 Mar 2025 07:16:17 +0000 Subject: [PATCH 10/12] - --- scripts/post-install.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/post-install.js b/scripts/post-install.js index ccb8709e3..bbfa59929 100644 --- a/scripts/post-install.js +++ b/scripts/post-install.js @@ -8,7 +8,7 @@ const path = require('path'); const RELEASE_DIR = path.join(__dirname, '../build/Release'); const BUILD_FILES = [ path.join(RELEASE_DIR, 'conpty_backend.node'), - path.join(RELEASE_DIR, 'conpty.pdb'), + path.join(RELEASE_DIR, 'conpty_backend.pdb'), path.join(RELEASE_DIR, 'conpty_console_list.node'), path.join(RELEASE_DIR, 'conpty_console_list.pdb'), path.join(RELEASE_DIR, 'pty.node'), @@ -66,9 +66,9 @@ if (os.platform() !== 'win32') { const versionFolder = fs.readdirSync(CONPTY_DIR)[0]; console.log(` Found version ${versionFolder}`); const sourceFolder = path.join(CONPTY_DIR, versionFolder, `win10-${windowsArch}`); - const destFolder = path.join(RELEASE_DIR, 'conpty'); + const destFolder = path.join(RELEASE_DIR, 'conpty_backend'); fs.mkdirSync(destFolder, { recursive: true }); - for (const file of ['conpty.dll', 'OpenConsole.exe']) { + for (const file of ['conpty_backend.dll', 'OpenConsole.exe']) { const sourceFile = path.join(sourceFolder, file); const destFile = path.join(destFolder, file); console.log(` Copying ${sourceFile} -> ${destFile}`); From 503b113d368ed91787a26f79b3a3cbb1e5e4deef Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Mon, 17 Mar 2025 06:17:47 +0200 Subject: [PATCH 11/12] Update post-install.js --- scripts/post-install.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/post-install.js b/scripts/post-install.js index bbfa59929..6504f367c 100644 --- a/scripts/post-install.js +++ b/scripts/post-install.js @@ -66,9 +66,9 @@ if (os.platform() !== 'win32') { const versionFolder = fs.readdirSync(CONPTY_DIR)[0]; console.log(` Found version ${versionFolder}`); const sourceFolder = path.join(CONPTY_DIR, versionFolder, `win10-${windowsArch}`); - const destFolder = path.join(RELEASE_DIR, 'conpty_backend'); + const destFolder = path.join(RELEASE_DIR, 'conpty'); fs.mkdirSync(destFolder, { recursive: true }); - for (const file of ['conpty_backend.dll', 'OpenConsole.exe']) { + for (const file of ['conpty.dll', 'OpenConsole.exe']) { const sourceFile = path.join(sourceFolder, file); const destFile = path.join(destFolder, file); console.log(` Copying ${sourceFile} -> ${destFile}`); From 519a8aefac65b3a48f9f3b96fb90c84fb8c23138 Mon Sep 17 00:00:00 2001 From: Adam Basha <110662505+Bashamega@users.noreply.github.com> Date: Tue, 18 Mar 2025 07:23:04 +0200 Subject: [PATCH 12/12] Update conpty.cc --- src/win/conpty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/conpty.cc b/src/win/conpty.cc index 83a185fdc..63fc70626 100644 --- a/src/win/conpty.cc +++ b/src/win/conpty.cc @@ -168,7 +168,7 @@ HANDLE LoadConptyDll(const Napi::CallbackInfo& info, return LoadLibraryExW(L"kernel32.dll", 0, 0); } wchar_t currentDir[MAX_PATH]; - HMODULE hModule = GetModuleHandleA("conpty.node"); + HMODULE hModule = GetModuleHandleA("conpty_backend.node"); if (hModule == NULL) { throw errorWithCode(info, "Failed to get conpty.node module handle"); }