Commits

rmtew  committed 9ec7c93

Add a section to check for and ensure presence of user provided files.
e.g. the brogue assets (font and icon).

  • Participants
  • Parent commits ea7c4bd

Comments (0)

Files changed (1)

+REM Do not print each command as it is executed.
+
 @ECHO off
 
 REM This should only be executed from the directory it is located in.
 REM
-REM It clones or updates the external source code repositories.
+REM 1. Clone or update the external source code repositories.
+REM 2. Update them to the correct branch.
+REM 3. Verify that any additional user provided files are present.
+REM 4. Continually prompt the user until user has provided said files.
+REM
 
 SET LIBTCOD_DIR=libtcod
 SET SDL2_DIR=sdl2
 :LIBTCOD
 IF EXIST %LIBTCOD_DIR% GOTO UPDATE_LIBTCOD
 HG clone %LIBTCOD_PATH% %LIBTCOD_DIR%
+HG up
 GOTO SDL2
 :UPDATE_LIBTCOD
 PUSHD .
 :BROGUE
 IF EXIST %BROGUE_DIR% GOTO UPDATE_BROGUE
 HG clone %BROGUE_PATH% %BROGUE_DIR%
+HG up
 GOTO HG_END
 :UPDATE_BROGUE
 PUSHD .
 
 :HG_END
 POPD
+
+:ASSET_CHECK
+IF NOT EXIST assets GOTO MISSING_ASSETS
+IF NOT EXIST assets\fonts\font-1.png GOTO MISSING_ASSETS
+
+GOTO BAT_END
+:MISSING_ASSETS
+SET /P discard=Can you create an 'assets' folder with the Brogue fonts and icon?
+GOTO ASSET_CHECK
+
+:BAT_END