[fit-launcher] 使用 Node.js 重写启动脚本,实现真正的跨平台支持 #366
Merged
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.
🔗 相关问题 / Related Issue
📋 变更类型 / Type of Change
📝 变更目的 / Purpose of the Change
中文说明:
原有的 Bash 启动脚本存在跨平台兼容性问题:
readlink -f命令不可用)本次改进使用 Node.js 重写启动脚本,实现真正的跨平台支持,同时保持命令行接口完全兼容,无需修改现有文档和使用方式。
English Description:
The original Bash startup script has cross-platform compatibility issues:
readlink -fcommand not available)This improvement rewrites the startup script using Node.js to achieve true cross-platform support, while maintaining full command-line interface compatibility without modifying existing documentation and usage.
📋 主要变更 / Brief Changelog
启动脚本重构 / Startup Script Refactoring:
fit.js,164 行)fit脚本(Node.js 包装器)fit.cmd批处理文件fit.bat文件跨平台兼容性 / Cross-Platform Compatibility:
readlink -f不可用的问题__dirname实现跨平台路径处理功能增强 / Feature Enhancements:
文档更新 / Documentation Updates:
fit-launcher/README.md,从模块级别进行说明🧪 验证变更 / Verifying this Change
测试步骤 / Test Steps
版本信息测试:
./fit version # 预期输出:Version: 3.5.5-SNAPSHOT帮助信息测试:
启动测试(需要编译后的 JAR 文件):
mvn clean install ./fit start # 预期:能够正常启动应用参数传递测试:
./fit start -Xmx1g -Xms512m testarg # 预期:Java 参数和程序参数都能正确传递Windows 兼容性测试:
测试覆盖 / Test Coverage
fit version,fit help)📸 截图 / Screenshots
测试结果:
文件结构:
✅ 贡献者检查清单 / Contributor Checklist
基本要求 / Basic Requirements:
代码质量 / Code Quality:
测试要求 / Testing Requirements:
mvn -B clean package -Dmaven.test.skip=true/ Basic checks passmvn clean install/ Unit tests pass文档和兼容性 / Documentation and Compatibility:
fit-launcher/README.md./fit start,./fit debug,./fit version,./fit help📋 附加信息 / Additional Notes
技术栈要求 / Technical Stack Requirements:
兼容性保证 / Compatibility Guarantees:
迁移说明 / Migration Notes:
后续计划 / Future Plans:
审查者注意事项 / Reviewer Notes:
重点审查项 / Key Review Points:
跨平台兼容性验证:
向后兼容性检查:
文档完整性:
代码质量:
测试建议 / Testing Suggestions:
潜在风险 / Potential Risks:
收益 / Benefits: