(text: unknown)
| 46 | |
| 47 | <b>系统speedtest支持:</b> |
| 48 | 在任何测试命令中添加 <code>--system</code> 或 <code>-s</code> 标志使用系统已安装的speedtest |
| 49 | 例: <code>${commandName} --system</code> 或 <code>${commandName} -s 12345</code>`; |
| 50 | // HTML escape function |
| 51 | |
| 52 | const execAsync = promisify(exec); |
| 53 | const ASSETS_DIR = createDirectoryInAssets("speedtest"); |
| 54 | const TEMP_DIR = createDirectoryInTemp("speedtest"); |
| 55 | |
| 56 | // 根据平台确定可执行文件名 |
| 57 | function getSpeedtestExecutableName(): string { |
| 58 | return process.platform === "win32" ? "speedtest.exe" : "speedtest"; |
| 59 | } |