You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by wy...@apache.org on 2026/09/04 04:52:55 UTC
(maka) 01/01: fix(desktop): enable Windows local remote access
This is an automated email from the ASF dual-hosted git repository.
M4n5ter pushed a commit to branch fix/windows-local-remote-access
in repository https://gitbox.apache.org/repos/asf/maka.git
commit dbc6798d66e1e2e0f96fd52cdab1397a481dd252
Author: M4n5ter <m4...@gmail.com>
AuthorDate: Fri Sep 4 12:52:43 2026 +0800
fix(desktop): enable Windows local remote access
---
apps/desktop/src/main/runtime-host-local-remote-access.ts | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/apps/desktop/src/main/runtime-host-local-remote-access.ts b/apps/desktop/src/main/runtime-host-local-remote-access.ts
index 268fa68dee..15da36327c 100644
--- a/apps/desktop/src/main/runtime-host-local-remote-access.ts
+++ b/apps/desktop/src/main/runtime-host-local-remote-access.ts
@@ -253,7 +253,7 @@ export function createDesktopLocalRuntimeHostRemoteAccess(input: {
try {
const lifecycle = await readLifecycle(lifecyclePath, input.rootPath, input.rootId);
managedService = lifecycle !== undefined && hasManagedServiceTarget(lifecycle);
- if (!supported(input.directPeerAvailable)) {
+ if (!input.directPeerAvailable) {
return {
...unsupportedSnapshot(),
...(managedService ? { managedService: true as const } : {}),
@@ -289,7 +289,7 @@ export function createDesktopLocalRuntimeHostRemoteAccess(input: {
const enable = (value: unknown): Promise<DesktopLocalRuntimeHostRemoteAccessEnableResult> =>
serialize(async () => {
const request = requireEnableInput(value);
- if (!supported(input.directPeerAvailable)) throw new Error(unsupportedSnapshot().message);
+ if (!input.directPeerAvailable) throw new Error(unsupportedSnapshot().message);
let lifecycle = await readLifecycle(lifecyclePath, input.rootPath, input.rootId);
if (lifecycle?.state === 'uninstalling') {
const recovered = await finishUninstall(lifecycle);
@@ -895,7 +895,7 @@ export function createDesktopLocalRuntimeHostRemoteAccess(input: {
if (lifecycle.state === 'handoff' || lifecycle.state === 'setupPending') {
const committed = await adoptCommittedSetup(lifecycle);
if (committed.kind === 'managed') return;
- if (!supported(input.directPeerAvailable)) return;
+ if (!input.directPeerAvailable) return;
if (lifecycle.state === 'handoff') await recoverLegacyHandoff(lifecycle);
else await finishSetup(lifecycle, 'recovery');
return;
@@ -914,20 +914,13 @@ function conflictReplacementError(pid: number, reason: string): Error {
return new Error(`Maka could not replace Runtime Host process ${pid}: ${reason}`);
}
-function supported(directPeerAvailable: boolean): boolean {
- return directPeerAvailable && (process.platform === 'darwin' || process.platform === 'linux');
-}
-
function unsupportedSnapshot(): Extract<
DesktopLocalRuntimeHostRemoteAccessSnapshot,
{ state: 'unsupported' }
> {
return {
state: 'unsupported',
- message:
- process.platform === 'darwin' || process.platform === 'linux'
- ? 'This Desktop build does not include Direct peer support'
- : 'Remote access to this computer currently requires macOS or Linux',
+ message: 'This Desktop build does not include Direct peer support',
};
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org