home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / web_dev / files / mwjpp516.exe / %MAINDIR% / Tools / Make / nmake.script
Encoding:
Text File  |  2001-06-19  |  1.5 KB  |  46 lines

  1. !!Script
  2.  
  3. var gOutput = getOutput("Build");
  4.  
  5. function DoCommand()
  6. {
  7.     alert("You must edit this script before running it");
  8.     return;
  9.     
  10.     var tool = newTool();
  11.     
  12.     // To run a bat or command file you need to use the runbatch.exe tool
  13.     var runbatch = File.getApplicationPath() + "\\Ide\\Programs\\runbatch.exe";
  14.     
  15.     var commandLine = runbatch + " nmake.exe"; // this assumes that nmake is
  16.     // in a folder in the PATH envrionment variable.
  17.     
  18.     // -------------------------------------------------------------------
  19.     // Add nmake options as needed
  20.     // Create a copy of this script for different build commands
  21.     // e.g., commandLine += "/f client.mak build_all"; 
  22.     // -------------------------------------------------------------------
  23.     
  24.     // -------------------------------------------------------------------
  25.     // Set environment varialbles if not set in environment using
  26.     // tool.setEnvironmentVariable(<name>, <value>); 
  27.     // -------------------------------------------------------------------
  28.     
  29.     // -------------------------------------------------------------------
  30.     // Set directory if needed using File.setDirectory(<path>)
  31.     // -------------------------------------------------------------------
  32.     
  33.     gOutput.writeLine("Command line: " + commandLine);
  34.     
  35.     var startData = new Date();
  36.     
  37.     tool.run(commandLine);
  38.     
  39.     var endDate = new Date();
  40.     var buildTime = (endDate.getTime() - startData.getTime())/1000;
  41.     gOutput.writeLine("" + "Finished - build time: " + buildTime + " seconds");  
  42. }
  43.  
  44. !!/Script
  45.  
  46.