run.cmd 738 B

123456789101112131415161718192021222324252627
  1. @echo off
  2. setlocal enabledelayedexpansion
  3. rem This script launches Retro AIM Server under Windows. Because it assumes
  4. rem that the executable and settings.bat file are located in the same directory
  5. rem as this script, the script can be run from any directory.
  6. set SCRIPT_DIR=%~dp0
  7. set ENV_FILE=%SCRIPT_DIR%settings.bat
  8. set EXEC_FILE=%SCRIPT_DIR%bin\retro_aim_server.exe
  9. rem Load the settings file.
  10. if exist "%ENV_FILE%" (
  11. call "%ENV_FILE%"
  12. ) else (
  13. echo error: environment file '%ENV_FILE%' not found.
  14. exit /b 1
  15. )
  16. rem Start Retro AIM Server.
  17. if exist "%EXEC_FILE%" (
  18. echo starting...
  19. start /b "" "%EXEC_FILE%"
  20. ) else (
  21. echo error: executable '%EXEC_FILE%' not found.
  22. exit /b 1
  23. )