Skip to content

feat: 增加win平台前端适配#83

Merged
qin-ctx merged 1 commit intovolcengine:mainfrom
benhack20:main
Oct 17, 2025
Merged

feat: 增加win平台前端适配#83
qin-ctx merged 1 commit intovolcengine:mainfrom
benhack20:main

Conversation

@benhack20
Copy link
Copy Markdown
Contributor

win平台下,pnpm dev 执行报错。
本PR根据win平台命令和格式修改了dev命令和build-python,确保win平台下pnpm dev可以正常运行,打开前端。

@KashiwaByte101
Copy link
Copy Markdown
Collaborator

可以提供一些运行的照片么,以及现在可以支持在win直接使用前端么

@benhack20
Copy link
Copy Markdown
Contributor Author

minecontext动画

本PR仅用于win平台打开前端查看界面效果,但是会跳过了部分macos上专属截图功能。

因为 window_inspector 和 window_capture 使用了Quartz框架,只能在macOS上运行。

在Windows上跳过这些工具会导致:
窗口列表功能受限:

  • 无法获取详细的窗口信息
  • 可能无法检测到最小化或隐藏的窗口
  • 窗口ID可能不准确

截图功能受限:

  • 无法捕获特定窗口的截图
  • 可能只能使用系统级截图API(如整个屏幕截图)
  • 截图质量可能不如Quartz框架

应用识别功能受限:

  • 无法准确识别重要应用
  • 可能无法区分不同应用的窗口

建议的解决方案:

  • 方案1:创建Windows版本的替代工具
  • 方案2:使用现有的Node.js库
  • 方案3:优雅降级

当前状态评估:

从代码来看,应用已经有了备选的截图机制:

  • 使用了 node-screenshots 和 screenshot-desktop 库
  • 有Electron的 desktopCapturer API作为备选
  • 有系统级截图功能

结论:虽然跳过这些macOS专用工具会丢失一些高级功能(如精确窗口捕获、最小化窗口检测等),但应用的核心截图功能仍然可以工作。对于Windows用户来说,这是一个可以接受的权衡,因为:

  • 基本截图功能仍然可用
  • 应用可以正常运行
  • 不会导致应用崩溃或无法启动

如果你需要完整的Windows支持,建议后续创建Windows版本的窗口工具或使用现有的跨平台解决方案。

Copy link
Copy Markdown

@AlanWangyiran AlanWangyiran left a comment

Choose a reason for hiding this comment

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

Successfully built the Windows frontend

@KashiwaByte101
Copy link
Copy Markdown
Collaborator

Successfully built the Windows frontend

can you share us some image and test result of screen monitor

@qin-ctx qin-ctx closed this Oct 17, 2025
@qin-ctx qin-ctx reopened this Oct 17, 2025
@qin-ctx qin-ctx merged commit cfb8f69 into volcengine:main Oct 17, 2025
ldc861117 pushed a commit to ldc861117/MineContext that referenced this pull request Oct 19, 2025
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.

4 participants