Skip to content

Fix win 0.0.82 prebuilt issue#1109

Merged
Wendong-Fan merged 16 commits intomainfrom
fix-win-0.0.82-add-mac-intel
Feb 5, 2026
Merged

Fix win 0.0.82 prebuilt issue#1109
Wendong-Fan merged 16 commits intomainfrom
fix-win-0.0.82-add-mac-intel

Conversation

@4pmtong
Copy link
Copy Markdown
Collaborator

@4pmtong 4pmtong commented Jan 30, 2026

Description

This PR fixes Windows prebuilt venv path portability issues and adds macOS x64 / Intel CI build support.

Summary of changes:

  1. Prebuilt venv portability and build pipeline

    • Unifies and tightens prebuilt venv path and install logic for reliable cross-platform use (including Windows).
    • Refines build pipeline scripts and configuration.
  2. Windows path and placeholder fixes

    • Corrects Windows path separator handling in venv portability so build/run no longer fails on Windows due to path format.
    • Fixes venv placeholder paths on Windows, resolving the Windows build failure they caused.
  3. CI: macOS x64 and Intel builds

    • Adds a macOS x64 build job in build-view.yml.
    • Adds macOS 15 Intel build so Intel Mac builds and artifacts are available.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

fix #1084 #943 #998

@4pmtong 4pmtong added enhancement New feature or request high priority labels Jan 30, 2026
@4pmtong 4pmtong added this to the Sprint 12 milestone Jan 30, 2026
@4pmtong 4pmtong marked this pull request as draft January 30, 2026 12:31
@4pmtong
Copy link
Copy Markdown
Collaborator Author

4pmtong commented Feb 2, 2026

@Pakchoioioi @Wendong-Fan could you help test the installers? https://github.com/eigent-ai/eigent/actions/runs/21521114829 if works well, we can close #868

@4pmtong 4pmtong marked this pull request as ready for review February 2, 2026 01:36
@Wendong-Fan Wendong-Fan linked an issue Feb 2, 2026 that may be closed by this pull request
Comment thread electron/main/utils/process.ts Outdated

if (newContent !== content) {
fs.writeFileSync(filePath, newContent, 'utf-8');
fs.chmodSync(filePath, 0o755);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPT told me chmod may fail on windows but IDK. Not sure whether we need to only chmod for non windows only.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! fs.chmodSync() works on Windows but has different behavior - it can only set/unset the read-only flag, while Unix permissions (0o755) are ignored. However, Node.js won't throw an error; it just silently skips the permission bits on Windows.

Comment thread scripts/fix-venv-paths.js
// Use appropriate path separator for the platform
const pathSep = isWindowsPath ? '\\' : '/';
const newHome = `{{PREBUILT_PYTHON_DIR}}${pathSep}${cpythonDir}${pathSep}${binDir}`;
content = content.replace(/^home\s*=\s*.+$/m, `home = ${newHome}`);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we only have one home?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there should only have one "home" line.

Comment thread scripts/fix-venv-paths.js Outdated
const cpythonDir = cpythonMatch[1];

// Determine if this is Windows or Unix path
const isWindowsPath = originalHome.includes('\\') || originalHome.includes('Scripts');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we prevent the case that for example

home = /opt/vendor/Scripts/cpython-3.10.19-linux-x86_64/bin

which is unix but it will detected as windows

Maybe something like

const isWindowsPath =
  /^[A-Za-z]:\\/.test(originalHome) || originalHome.startsWith('\\\\') || originalHome.includes('\\');

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your suggestion is more robust. I'll push the update and re-test the installers.

@4pmtong 4pmtong force-pushed the fix-win-0.0.82-add-mac-intel branch from b1cc491 to bd29b69 Compare February 4, 2026 15:10
@4pmtong 4pmtong marked this pull request as draft February 4, 2026 17:00
@4pmtong 4pmtong force-pushed the fix-win-0.0.82-add-mac-intel branch from 7c5cf83 to bdda1b4 Compare February 5, 2026 03:31
@4pmtong 4pmtong marked this pull request as ready for review February 5, 2026 12:21
Copy link
Copy Markdown
Contributor

@Wendong-Fan Wendong-Fan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall! Just two small things.

Comment thread scripts/fix-symlinks.js Outdated
if (
fs.existsSync(symlinkPath) ||
fs.lstatSync(symlinkPath).isSymbolicLink()
) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When symlink doesnt exist, lstatSync throws, making the else block at L171 unreachable. Maybe wrap the lstat check in try/catch first?

Comment thread scripts/compile-babel.js Outdated
// Prebuild uses resources/prebuilt/venv; dev may use backend/.venv
const venvDir = fs.existsSync(prebuiltVenvDir)
? prebuiltVenvDir
: path.join(backendDir, '.venv');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no venv exists, this fails with ENOENT. Worth adding a quick existence check with a friendly error?

@Wendong-Fan Wendong-Fan merged commit 38f5fbc into main Feb 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request high priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question] backend service start took too long [BUG] Backend Startup Failed due to no Python at uv

3 participants