Fix: 解决Win10中文乱码和编译路径问题

- 将批处理脚本改为英文输出
- 添加UTF-8编码支持(chcp 65001)
- 添加go.mod存在性检查
- 创建详细的Windows使用说明文档
This commit is contained in:
Your Name
2026-04-25 22:51:05 +08:00
parent d0927cbad5
commit 90d2a230a3
3 changed files with 208 additions and 21 deletions
+12 -10
View File
@@ -1,21 +1,23 @@
@echo off
chcp 65001 >nul 2>&1
echo ========================================
echo 网络拓扑发现系统
echo Network Topology Discovery System
echo ========================================
echo.
REM 检查可执行文件是否存在
REM Check if executable exists
if not exist network-topology.exe (
echo 错误: network-topology.exe 不存在!
echo 请先运行 build.bat 编译程序
echo Error: network-topology.exe not found!
echo Please run build.bat first to compile the program.
echo.
pause
exit /b 1
)
REM 检查配置文件
REM Check config file
if not exist config.json (
echo 提示: config.json 不存在,将使用默认配置
echo 正在创建默认配置文件...
echo Info: config.json not found, using default config
echo Creating default config file...
echo {> config.json
echo "scan_ranges": [],>> config.json
echo "devices": [],>> config.json
@@ -36,11 +38,11 @@ if not exist config.json (
echo.
)
echo 正在启动网络拓扑发现系统...
echo Starting Network Topology Discovery System...
echo.
echo ========================================
echo 访问地址: http://localhost:8080
echo Ctrl+C 停止服务
echo Web UI: http://localhost:8080
echo Press Ctrl+C to stop the service
echo ========================================
echo.