feat: add Windows executable program support with pkg#1149
Open
nieao wants to merge 1 commit intodoocs:mainfrom
Open
feat: add Windows executable program support with pkg#1149nieao wants to merge 1 commit intodoocs:mainfrom
nieao wants to merge 1 commit intodoocs:mainfrom
Conversation
使用 10 个并行 subagents 研究并实现了 Windows 可执行程序: 🎯 方案选择: - 采用 pkg 方案(零依赖、最快、单文件 exe) - 对比了 Electron、Tauri 和 pkg 三种方案 - pkg 评分:⭐⭐⭐⭐⭐(最优) ✨ 核心功能: - 双击 exe 文件即可启动(无需安装 Node.js) - 自动在默认浏览器中打开编辑器界面 - 支持跨平台浏览器启动(Windows/macOS/Linux) - pkg 环境下的文件上传路径处理 📦 构建产物: - packages/md-cli/build/md-cli.exe (~41MB) - 使用 Node.js 18 + Brotli 压缩 🔧 技术实现: - index.js: 添加自动打开浏览器功能(使用 child_process) - server.js: 处理 pkg 环境下的文件上传(使用临时目录) - package.json: 配置 pkg 打包选项和构建脚本 - build-windows-exe.mjs: 自动化构建脚本 📚 文档: - WINDOWS-BUILD-GUIDE.md: 完整的构建指南 - README-WINDOWS.md: 用户使用手册 - BROWSER-LAUNCH-GUIDE.md: 浏览器启动方案研究 - QUICK-START.md: 快速开始指南 - COMPARISON-SUMMARY.md: 方案对比总结 🚀 使用方法: - 构建:pnpm run build:windows - 运行:双击 md-cli.exe - 配置:.\md-cli.exe port=3000 spaceId=xxx clientSecret=yyy 相关文件: - packages/md-cli/index.js - packages/md-cli/server.js - packages/md-cli/package.json - packages/md-cli/.gitignore - scripts/build-windows-exe.mjs - package.json - WINDOWS-BUILD-GUIDE.md
|
🚀 Surge Preview has been successfully deployed! Preview URL: https://doocs-md-preview-pr-1149.surge.sh Built with commit 6b29c97 |
Member
|
所以这个 exe 最终还是通过浏览器访问吗 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
使用 10 个并行 subagents 研究并实现了 Windows 可执行程序:
🎯 方案选择:
✨ 核心功能:
📦 构建产物:
🔧 技术实现:
📚 文档:
🚀 使用方法:
相关文件: