()
| 302 | |
| 303 | // Main execution |
| 304 | function main() { |
| 305 | if (containerRuntime.isAvailable()) { |
| 306 | buildWithContainer(); |
| 307 | } else if (checkWSL()) { |
| 308 | buildWithWSL(); |
| 309 | } else { |
| 310 | console.error('ERROR: No container runtime (Docker/Podman) or WSL dev distro is available.'); |
| 311 | console.error('\nTo build Linux AppImage from Windows, you need one of:'); |
| 312 | console.error('1. Docker Desktop or Podman - Recommended'); |
| 313 | console.error(' Docker: https://www.docker.com/products/docker-desktop'); |
| 314 | console.error(' Podman: https://podman.io/getting-started/installation'); |
| 315 | console.error(' Optional: set CONTAINER_RUNTIME=podman or CONTAINER_RUNTIME=docker'); |
| 316 | console.error(' (Podman inside WSL/Podman Machine is detected automatically)'); |
| 317 | console.error('\n2. A full WSL Linux distro (e.g. Ubuntu), not Podman Machine alone'); |
| 318 | console.error(' Install: wsl --install -d Ubuntu'); |
| 319 | console.error(' Then install Node.js in WSL: sudo apt-get install nodejs npm'); |
| 320 | process.exit(1); |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | main(); |
| 325 |
no test coverage detected