Browse Source

Adding commands which don't require license validation (like bindings C++ code to JS/TS)

Josh Engebretson 10 years ago
parent
commit
d202cfd7cf
2 changed files with 16 additions and 1 deletions
  1. 14 1
      Source/AtomicTool/AtomicTool.cpp
  2. 2 0
      Source/ToolCore/Command/Command.h

+ 14 - 1
Source/AtomicTool/AtomicTool.cpp

@@ -301,7 +301,20 @@ void AtomicTool::Start()
     command_ = cmd;
     command_ = cmd;
 
 
     // BEGIN LICENSE MANAGEMENT
     // BEGIN LICENSE MANAGEMENT
-    GetSubsystem<LicenseSystem>()->Initialize();
+    if (cmd->RequiresLicenseValidation())
+    {
+        GetSubsystem<LicenseSystem>()->Initialize();
+    }
+    else
+    {
+        if (command_.Null())
+        {
+            GetSubsystem<Engine>()->Exit();
+            return;
+        }
+
+        command_->Run();
+    }
     // END LICENSE MANAGEMENT
     // END LICENSE MANAGEMENT
 
 
 }
 }

+ 2 - 0
Source/ToolCore/Command/Command.h

@@ -42,6 +42,8 @@ public:
 
 
     virtual bool RequiresProjectLoad() { return true; }
     virtual bool RequiresProjectLoad() { return true; }
 
 
+    virtual bool RequiresLicenseValidation() { return false; }
+
 private:
 private:
 
 
     float timeOut_;
     float timeOut_;