浏览代码

Merge pull request #1468 from marauder2k9-torque/CompileAll

Restore compileAll functionality
Brian Roberts 4 月之前
父节点
当前提交
95c496f872
共有 1 个文件被更改,包括 20 次插入0 次删除
  1. 20 0
      Templates/BaseGame/game/core/core.tscript

+ 20 - 0
Templates/BaseGame/game/core/core.tscript

@@ -38,6 +38,26 @@ function CoreModule::onCreate(%this)
    // Parse the command line arguments
    echo("\n--------- Parsing Arguments ---------");
    parseArgs();
+
+   if($compileAll)
+   {
+      echo(" --- Compiling all files ---");
+      compileFiles("*" @ $TorqueScriptFileExtension);
+      compileFiles("*.gui");
+      compileFiles("*.ts");  
+      echo(" --- Exiting after compile ---");
+      quit();
+   }
+
+   if($compileTools)
+   {
+      echo(" --- Compiling tools scritps ---");
+      compileFiles("tools/*" @ $TorqueScriptFileExtension);
+      compileFiles("tools/*.gui");
+      compileFiles("tools/*.ts");  
+      echo(" --- Exiting after compile ---");
+      quit();
+   }
    
    // The canvas needs to be initialized before any gui scripts are run since
    // some of the controls assume that the canvas exists at load time.