Skip to content

fix: improve Windows compatibility for Makefile and sync tools#530

Merged
NA-Wen merged 2 commits intoOpenBMB:mainfrom
rainoeelmae:fix/windows-cross-platform-support
Feb 13, 2026
Merged

fix: improve Windows compatibility for Makefile and sync tools#530
NA-Wen merged 2 commits intoOpenBMB:mainfrom
rainoeelmae:fix/windows-cross-platform-support

Conversation

@rainoeelmae
Copy link

This PR provides full cross-platform support (Windows/macOS/Linux) for the development environment. Key Changes
Makefile: Refactored dev and stop targets using cross-env and kill-port to support PowerShell/CMD. Compatibility: Replaced Unix-specific grep/awk in the help target with a Python one-liner. Bug Fix: Added encoding='utf-8' to tools/sync_vuegraphs.py to prevent charmap decode errors on Windows systems. Dependencies: Added necessary dev-tools to package.json files to ensure a seamless "clone and run" experience.

This PR provides full cross-platform support (Windows/macOS/Linux) for the development environment.
Key Changes
Makefile: Refactored dev and stop targets using cross-env and kill-port to support PowerShell/CMD.
Compatibility: Replaced Unix-specific grep/awk in the help target with a Python one-liner.
Bug Fix: Added encoding='utf-8' to tools/sync_vuegraphs.py to prevent charmap decode errors on Windows systems.
Dependencies: Added necessary dev-tools to package.json files to ensure a seamless "clone and run" experience.
@huatl98
Copy link
Collaborator

huatl98 commented Feb 10, 2026

Thanks for the PR! I tested it on Windows (PowerShell/CMD) and the overall direction looks good — make dev / make stop and tools/sync_vuegraphs.py work as expected.

One issue: make help fails with:
FileNotFoundError: [Errno 2] No such file or directory: ' Makefile'

It looks like $(MAKEFILE_LIST) expands with leading whitespace. A minimal cross-platform fix is to sanitize the path before open():
@python -c "import re;
p=r'$(firstword $(MAKEFILE_LIST))'.strip();
print('\n'.join(f'{m[0]:<20} {m[1]}' for m in re.findall(r'^([a-zA-Z_-]+):.?## (.)$$', open(p, encoding='utf-8').read(), re.M)))" | sort

Fix make help FileNotFoundError
@rainoeelmae
Copy link
Author

Updated Makefile.

Copy link
Collaborator

@NA-Wen NA-Wen left a comment

Choose a reason for hiding this comment

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

Also works well for unix system. lgtm

@NA-Wen NA-Wen merged commit 8d67831 into OpenBMB:main Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants