home *** CD-ROM | disk | FTP | other *** search
/ UnrealScript Game Programming All in One / UnrealScriptGameProgrammingAllInOne.iso / UGPAIOListings / UGPAIOListingsCh06 / System / Make.bat
Encoding:
DOS Batch File  |  2006-01-22  |  969 b   |  50 lines

  1. @echo off
  2. rem Make.bat
  3. rem #1
  4. if "%1"=="" (
  5. echo You must enter a package name
  6. echo make [package_name]
  7. echo or if using context, the first line
  8. echo of your program must be //%PARAMETERS = [package_name] [path_to_UT2004]
  9. echo example: Make HelloWorld c:\ut2004
  10.  
  11. goto ERROR
  12. )
  13.  
  14. rem #2
  15. if "%2"=="" (
  16.   echo You must enter the path to the UT2004 directory
  17.   echo or if using ConTEXT, the first line
  18.   echo of your program must be //%PARAMETERS = [package_name] [path_to_UT2004]
  19.   echo example: Make HelloWorld c:\ut2004
  20.   goto ERROR
  21. )
  22.  
  23.  
  24. rem #3
  25. echo Okay, package named:  %1
  26. echo Deleting %1.u...
  27. if exist %2\System\%1.u del %2\System\%1.u
  28.  
  29. echo Deleted %1.u...
  30.  
  31. rem #4
  32.  
  33. if NOT exist %2\System\UT2004_%1.ini (
  34.   echo create UT2004_%1.ini
  35.   echo before proceeding
  36.   goto ERROR
  37. )
  38.  
  39. rem #5
  40.  
  41. %2\System\ucc make -ini=%2\System\UT2004_%1.ini
  42. goto DONE
  43. :ERROR
  44. echo No action performed
  45. goto EOF
  46. :DONE
  47. echo Make action complete
  48. :EOF
  49.  
  50.