下载 Tomato 安装包
Tomato 的安装包可以在各大软件商店找到:
- Windows: Tomato 安装包
- Linux: Tomato 安装包
- macOS: Tomato 安装包
访问 Tomato 安装页面
访问 Tomato 的官网或 GitHub 路径,如:
- Windows: Tomato 安装页面
- Linux: Tomato 安装页面
- macOS: Tomato 安装页面
安装
Windows:
- 打开命令提示符(
cmd),输入以下命令:chown -R root:root /var/www/html/Tomato-1.6. cd /var/www/html download "https://github.com/mikera-riken/tomato/releases/download/1.6./tomato-1.6.-windows.exe"
- 打开 Tomato。
Linux:
- 输入以下命令安装到根目录:
sudo apt-get update sudo apt-get install -y https://github.com/mikera-riken/tomato/releases/download/1.6./tomato-1.6.-lts.rpm
macOS:
- 输入以下命令安装到 root 目录:
sudo tar -xzf /var/www/html/Tomato-1.6.-lts.tar.gz
配置
Windows:
- 打开 Tomato。
- Tomato 不能运行,请运行以下命令:
Tomatamakefile --version Tomatashell --version
Linux:
- 在 Tomatashell 中运行:
Tomashell -c "Tomato::createTask(); exit;"
macOS:
- 在 Tomato 中运行:
Tomatamakefile
设置配置
Windows:
- 在 Tomato 中设置配置文件:
- 打开 Tomato。
- 输入以下命令:
Tomatashell -c "config = Tomacfg[dict]" config["action"] = "run" config["inputFile"] = "path/to/your/feature/file.ts" Tomatashell -c "exit;"
macOS:
- 在 Tomato 中设置配置文件:
- 打开 Tomato。
- 输入以下命令:
Tomatamakefile --config /path/to/your/feature/config.json
编译
Windows:
- 选择 Tomato 的编译方式:
- 如果需要 C 语言编译:
Tomatamakefile -buildC
- 如果不需要编译,请不选择。
- 如果需要 C 语言编译:
Linux:
- 编译 Tomato:
Tomatashell -c "Tomatacreate -build -version"
macOS:
- 编译 Tomato:
- 如果需要 C 语言编译:
Tomatashell -c "Tomatacreate -build -version"
- 如果不需要编译,请不选择。
- 如果需要 C 语言编译:
安装到服务器
Windows:
- 按照上述步骤安装到根目录。
macOS:
- 将 Tomato 安装到根目录。
测试
- 打开 Tomatashell:
Tomashell -c "Tomatashell -version"
- 执行你的任务:
Tomatashell -c "task = createTask(); print(task.getAction()); exit;"
注意事项
- 确保 Tomato 的版本是正确的(如 1.6.)。
- 安装前检查系统是否支持 Tomato。
通过以上步骤,你应该能够成功安装并使用 Tomato!



