Pārlūkot izejas kodu

NET Assembly Editor work

Josh Engebretson 10 gadi atpakaļ
vecāks
revīzija
21529ff1ca
41 mainītis faili ar 620 papildinājumiem un 74 dzēšanām
  1. 0 14
      Build/AtomicNET/AtomicNETEngine/AtomicNET.cs
  2. 0 0
      Build/AtomicNET/AtomicNETEngine/Math.cs
  3. 0 0
      Build/AtomicNET/AtomicNETEngine/SDLConsts.cs
  4. 1 1
      Build/AtomicNET/AtomicNETTools/AssemblyInspector.cs
  5. 5 4
      Build/AtomicNET/AtomicNETTools/AtomicTools.cs
  6. 1 1
      Build/AtomicNET/AtomicNETTools/CSComponentInspector.cs
  7. 0 0
      Build/AtomicNET/AtomicNETTools/MiniJSON.cs
  8. 14 15
      Build/AtomicNET/build.sh
  9. 6 0
      Script/AtomicEditor/ui/frames/inspector/ComponentInspector.ts
  10. 1 0
      Script/AtomicEditor/ui/frames/inspector/CreateComponentButton.ts
  11. 0 6
      Script/Packages/Atomic/AtomicNET.json
  12. 1 2
      Script/Packages/Atomic/Package.json
  13. 6 0
      Script/Packages/AtomicNET/AtomicNET.json
  14. 7 0
      Script/Packages/AtomicNET/Package.json
  15. 2 1
      Script/Packages/ToolCore/ToolCore.json
  16. 15 0
      Source/Atomic/Resource/JSONFile.cpp
  17. 6 0
      Source/Atomic/Resource/JSONFile.h
  18. 2 2
      Source/AtomicEditor/Application/AEEditorApp.cpp
  19. 23 12
      Source/AtomicEditor/Application/AEEditorCommon.cpp
  20. 1 1
      Source/AtomicEditor/CMakeLists.txt
  21. 0 1
      Source/AtomicJS/Javascript/JSComponent.cpp
  22. 2 2
      Source/AtomicJS/Javascript/JSComponent.h
  23. 1 1
      Source/AtomicNET/CMakeLists.txt
  24. 22 0
      Source/AtomicNET/NETCore/CSComponent.cpp
  25. 8 0
      Source/AtomicNET/NETCore/CSComponent.h
  26. 61 0
      Source/AtomicNET/NETCore/NETAssemblyFile.cpp
  27. 58 0
      Source/AtomicNET/NETCore/NETAssemblyFile.h
  28. 40 10
      Source/AtomicNET/NETCore/NETCore.cpp
  29. 3 0
      Source/AtomicNET/NETCore/NETCore.h
  30. 47 0
      Source/AtomicNET/NETJS/AtomicNETJS.cpp
  31. 21 0
      Source/AtomicNET/NETJS/AtomicNETJS.h
  32. 26 0
      Source/AtomicNET/NETJS/CMakeLists.txt
  33. 2 1
      Source/AtomicTool/CMakeLists.txt
  34. 6 0
      Source/ToolCore/Assets/Asset.cpp
  35. 1 0
      Source/ToolCore/Assets/AssetDatabase.cpp
  36. 105 0
      Source/ToolCore/Assets/NETAssemblyImporter.cpp
  37. 37 0
      Source/ToolCore/Assets/NETAssemblyImporter.h
  38. 1 0
      Source/ToolCore/CMakeLists.txt
  39. 49 0
      Source/ToolCore/NETTools/NETToolSystem.cpp
  40. 37 0
      Source/ToolCore/NETTools/NETToolSystem.h
  41. 2 0
      Source/ToolCore/ToolSystem.cpp

+ 0 - 14
Build/AtomicNET/AtomicNETRuntime/AtomicNET.cs → Build/AtomicNET/AtomicNETEngine/AtomicNET.cs

@@ -5,20 +5,6 @@ using System.Collections.Generic;
 namespace AtomicEngine
 {
 
-public class AtomicNETRuntime
-{
-  [DllImport (Constants.LIBNAME, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
-  public static extern int csb_Atomic_Test (int id);
-
-  public static void Startup()
-  {
-    //Console.WriteLine("AtomicNETRuntime Startup:" + csb_Atomic_Test(42));
-
-    Atomic.Initialize();
-
-  }
-}
-
 public static class Atomic
 {
 

+ 0 - 0
Build/AtomicNET/AtomicNETRuntime/Math.cs → Build/AtomicNET/AtomicNETEngine/Math.cs


+ 0 - 0
Build/AtomicNET/AtomicNETRuntime/SDLConsts.cs → Build/AtomicNET/AtomicNETEngine/SDLConsts.cs


+ 1 - 1
Build/AtomicNETTest/AtomicEditor/AssemblyInspector.cs → Build/AtomicNET/AtomicNETTools/AssemblyInspector.cs

@@ -14,7 +14,7 @@ using AtomicEngine;
 
 using File = System.IO.File;
 
-namespace AtomicEditor
+namespace AtomicTools
 {
 
 	class AssemblyInspector

+ 5 - 4
Build/AtomicNETTest/AtomicEditor/AtomicEditor.cs → Build/AtomicNET/AtomicNETTools/AtomicTools.cs

@@ -14,24 +14,25 @@ using AtomicEngine;
 
 using File = System.IO.File;
 
-namespace AtomicEditor
+namespace AtomicTools
 {
-	class AtomicEditor
+	class AtomicTools
 	{
 
-		public static void InspectAssembly (String pathToAssembly)
+		public static String InspectAssembly (String pathToAssembly)
 		{
 
 			try {
 
 				var inspector = new AssemblyInspector ();
 				inspector.Inspect (pathToAssembly);
-				Console.WriteLine (inspector.DumpToJSON ());
+				return inspector.DumpToJSON();
 
 			} catch (Exception ex) {
 				Console.WriteLine (ex.Message);
 			}
 
+			return "";
 
 		}
 

+ 1 - 1
Build/AtomicNETTest/AtomicEditor/CSComponentInspector.cs → Build/AtomicNET/AtomicNETTools/CSComponentInspector.cs

@@ -31,7 +31,7 @@ using System.Reflection.PortableExecutable;
 // https://github.com/dotnet/roslyn/tree/master/src/Compilers/Core/Portable/MetadataReader
 
 
-namespace AtomicEditor
+namespace AtomicTools
 {
 
 	public class CSComponentInspector

+ 0 - 0
Build/AtomicNETTest/AtomicEditor/MiniJSON.cs → Build/AtomicNET/AtomicNETTools/MiniJSON.cs


+ 14 - 15
Build/AtomicNET/build.sh

@@ -2,22 +2,21 @@
 mcs /out:/Users/josh/Desktop/OSX.x64.Debug/AtomicNETBootstrap.dll /nostdlib /noconfig /t:library /lib:/Users/josh/Desktop/OSX.x64.Debug \
 /r:System.Console.dll /r:System.Runtime.dll /r:System.IO.dll /r:System.IO.FileSystem.dll /r:mscorlib.dll \
 /r:System.Collections.Concurrent.dll \
-/Users/josh/Dev/atomic/AtomicGameEngineSharp/Build/AtomicNET/AtomicNETBootstrap/*.cs
+/Users/josh/Dev/atomic/AtomicGameEngine/Build/AtomicNET/AtomicNETBootstrap/*.cs
 
-mcs /out:/Users/josh/Desktop/AtomicNETRuntime.dll /nostdlib /noconfig /t:library /w:0 /lib:/Users/josh/Desktop/OSX.x64.Debug /r:System.Console.dll /r:System.Runtime.dll /r:System.IO.dll /r:System.IO.FileSystem.dll /r:mscorlib.dll \
-/Users/josh/Dev/atomic/AtomicGameEngineSharp/Build/Source/Generated/MACOSX/CSharp/Packages/Atomic/Managed/*.cs \
-/Users/josh/Dev/atomic/AtomicGameEngineSharp/Build/Source/Generated/MACOSX/CSharp/Packages/AtomicPlayer/Managed/*.cs \
-/Users/josh/Dev/atomic/AtomicGameEngineSharp/Build/AtomicNET/AtomicNETRuntime/*.cs
-
-#mcs /out:/Users/josh/Desktop/AtomicEditor.dll /t:library \
-#/r:/Users/josh/Desktop/AtomicNETRuntime.dll \
-#/Users/josh/Dev/atomic/AtomicGameEngineSharp/Build/AtomicNETTest/AtomicEditor/AtomicEditor.cs
+mcs /out:/Users/josh/Desktop/AtomicNETEngine.dll /nostdlib /noconfig /t:library /w:0 /lib:/Users/josh/Desktop/OSX.x64.Debug \
+/r:System.Console.dll /r:System.Runtime.dll /r:System.IO.dll /r:System.IO.FileSystem.dll /r:mscorlib.dll \
+/Users/josh/Dev/atomic/AtomicGameEngine/Build/Source/Generated/MACOSX/CSharp/Packages/Atomic/Managed/*.cs \
+/Users/josh/Dev/atomic/AtomicGameEngine/Build/Source/Generated/MACOSX/CSharp/Packages/AtomicPlayer/Managed/*.cs \
+/Users/josh/Dev/atomic/AtomicGameEngine/Build/AtomicNET/AtomicNETEngine/*.cs
 
-mcs /unsafe /out:/Users/josh/Desktop/AtomicEditor.dll /nostdlib /noconfig /t:library /w:0 /lib:/Users/josh/Desktop/OSX.x64.Debug /r:System.Console.dll /r:System.Runtime.dll /r:System.IO.dll /r:System.IO.FileSystem.dll /r:mscorlib.dll \
-/r:System.Linq.dll /r:System.Reflection.Primitives.dll /r:System.Reflection.Metadata.dll /r:System.Collections.dll /r:System.Collections.Immutable.dll /r:/Users/josh/Desktop/AtomicNETRuntime.dll \
-/Users/josh/Dev/atomic/AtomicGameEngineSharp/Build/AtomicNETTest/AtomicEditor/*.cs
+mcs /unsafe /out:/Users/josh/Desktop/AtomicNETTools.dll /nostdlib /noconfig /t:library /w:0 /lib:/Users/josh/Desktop/OSX.x64.Debug \
+/r:System.Console.dll /r:System.Runtime.dll /r:System.IO.dll /r:System.IO.FileSystem.dll /r:mscorlib.dll \
+/r:System.Linq.dll /r:System.Reflection.Primitives.dll /r:System.Reflection.Metadata.dll \
+/r:System.Collections.dll /r:System.Collections.Immutable.dll /r:/Users/josh/Desktop/AtomicNETEngine.dll \
+/Users/josh/Dev/atomic/AtomicGameEngine/Build/AtomicNET/AtomicNETTools/*.cs
 
-mcs /out:/Users/josh/Desktop/AtomicNETTest.dll /nostdlib /noconfig /t:library /w:0 /lib:/Users/josh/Desktop/OSX.x64.Debug \
+mcs /out:/Users/josh/Dev/atomic/AtomicExamples/NET/Basic3D/Resources/Assemblies/AtomicNETTest.dll /nostdlib /noconfig /t:library /w:0 /lib:/Users/josh/Desktop/OSX.x64.Debug \
 /r:System.Console.dll /r:System.Runtime.dll /r:System.IO.dll /r:System.IO.FileSystem.dll /r:mscorlib.dll \
-/r:/Users/josh/Desktop/AtomicNETRuntime.dll \
-/Users/josh/Dev/atomic/AtomicGameEngineSharp/Build/AtomicNETTest/MyClass.cs
+/r:/Users/josh/Desktop/AtomicNETEngine.dll \
+/Users/josh/Dev/atomic/AtomicGameEngine/Build/AtomicNETTest/MyClass.cs

+ 6 - 0
Script/AtomicEditor/ui/frames/inspector/ComponentInspector.ts

@@ -145,6 +145,12 @@ class ComponentInspector extends Atomic.UISection {
             this.value = 1;
         }
 
+        if (component.typeName == "CSComponent") {
+            // auto expand CSComponents
+            this.value = 1;
+        }
+
+
         if (component.typeName == "TileMap2D") {
             this.addTilemap2DUI(attrsVerticalLayout);
         }

+ 1 - 0
Script/AtomicEditor/ui/frames/inspector/CreateComponentButton.ts

@@ -42,6 +42,7 @@ geometryCreateSource.addItem(new Atomic.UIMenuItem("Water", "create component"))
 var logicCreateSource = new Atomic.UIMenuItemSource();
 
 logicCreateSource.addItem(new Atomic.UIMenuItem("JSComponent", "JSComponent"));
+logicCreateSource.addItem(new Atomic.UIMenuItem("CSComponent", "CSComponent"));
 logicCreateSource.addItem(new Atomic.UIMenuItem("AnimationController", "create component"));
 logicCreateSource.addItem(new Atomic.UIMenuItem("SplinePath", "create component"));
 

+ 0 - 6
Script/Packages/Atomic/AtomicNET.json

@@ -1,6 +0,0 @@
-{
-	"name" : "AtomicNET",
-	"sources" : ["Source/AtomicNET/NETCore"],
-	"classes" : ["NETCore", "NETManaged", "CSComponent", "CSScriptObject"]
-
-}

+ 1 - 2
Script/Packages/Atomic/Package.json

@@ -5,8 +5,7 @@
 
 	"modules" : ["Container", "Math", "Core", "Scene", "Graphics", "Atomic3D", "Atomic2D", "Audio",
 	"Physics", "Navigation", "Input", "UI", "Resource", "Network", "IO",
-	"Engine", "Javascript", "Environment", "Web", "AtomicNET"],
-	"dotnetModules" : ["AtomicNET"],
+	"Engine", "Script", "Javascript", "Environment", "Web"],
 	"moduleExclude" : {
 		"WEB" : ["Network", "Navigation"]
 	}

+ 6 - 0
Script/Packages/AtomicNET/AtomicNET.json

@@ -0,0 +1,6 @@
+{
+	"name" : "AtomicNET",
+	"sources" : ["Source/AtomicNET/NETCore"],
+	"classes" : ["NETCore", "NETManaged", "NETAssemblyFile", "CSScriptObject", "CSComponent", "CSScriptObject"]
+
+}

+ 7 - 0
Script/Packages/AtomicNET/Package.json

@@ -0,0 +1,7 @@
+
+{
+  "name" : "AtomicNET",
+  "namespace" : "Atomic",
+  "dependencies" : ["Script/Packages/Atomic"],
+  "modules" : ["AtomicNET"]
+}

+ 2 - 1
Script/Packages/ToolCore/ToolCore.json

@@ -7,7 +7,8 @@
 								"Project", "ProjectFile", "Platform", "PlatformMac", "PlatformWeb",
 							 "PlatformWindows", "PlatformAndroid", "PlatformIOS", "Command", "PlayCmd", "OpenAssetImporter",
 							 "Asset", "AssetDatabase", "AssetImporter", "AudioImporter", "ModelImporter", "MaterialImporter", "AnimationImportInfo",
-							 "PrefabImporter", "JavascriptImporter", "TextureImporter", "SpriterImporter", "PEXImporter", "LicenseSystem",
+							 "PrefabImporter", "JavascriptImporter", "TextureImporter", "SpriterImporter", "PEXImporter", "NETAssemblyImporter",
+							 "LicenseSystem",
 						 	 "ProjectUserPrefs", "ProjectBuildSettings",
 						 	 "BuildBase", "BuildSystem", "BuildMac", "BuildWeb", "BuildWindows", "BuildAndroid", "BuildIOS",
 						 	 "ProjectBuildSettings", "MacBuildSettings", "WindowsBuildSettings", "WebBuildSettings", "AndroidBuildSettings", "IOSBuildSettings"],

+ 15 - 0
Source/Atomic/Resource/JSONFile.cpp

@@ -140,6 +140,21 @@ bool JSONFile::BeginLoad(Deserializer& source)
     return true;
 }
 
+bool JSONFile::ParseJSON(const String& json, JSONValue& value)
+{
+    rapidjson::Document document;
+    if (document.Parse<0>(json.CString()).HasParseError())
+    {
+        LOGERROR("Could not parse JSON data from string");
+        return false;
+    }
+
+    ToJSONValue(value, document);
+
+    return true;
+
+}
+
 static void ToRapidjsonValue(rapidjson::Value& rapidjsonValue, const JSONValue& jsonValue, rapidjson::MemoryPoolAllocator<>& allocator)
 {
     switch (jsonValue.GetValueType())

+ 6 - 0
Source/Atomic/Resource/JSONFile.h

@@ -53,6 +53,12 @@ public:
     /// Return root value.
     const JSONValue& GetRoot() const { return root_; }
 
+    // ATOMIC BEGIN
+
+    static bool ParseJSON(const String& json, JSONValue& value);
+
+    // ATOMIC END
+
 private:
     /// JSON root value.
     JSONValue root_;

+ 2 - 2
Source/AtomicEditor/Application/AEEditorApp.cpp

@@ -80,10 +80,10 @@ void AEEditorApp::Start()
 
 void AEEditorApp::Setup()
 {
-    AEEditorCommon::Setup();
-
     context_->SetEditorContext(true);
 
+    AEEditorCommon::Setup();
+
     ToolEnvironment* env = new ToolEnvironment(context_);
     context_->RegisterSubsystem(env);
 

+ 23 - 12
Source/AtomicEditor/Application/AEEditorCommon.cpp

@@ -21,6 +21,11 @@
 
 #include "AEEditorCommon.h"
 
+namespace Atomic
+{
+    void jsapi_init_atomicnet(JSVM* vm);
+}
+
 namespace AtomicEditor
 {
 
@@ -35,6 +40,23 @@ void AEEditorCommon::Start()
     Input* input = GetSubsystem<Input>();
     input->SetMouseVisible(true);
 
+    Javascript* javascript = GetSubsystem<Javascript>();
+    vm_ = javascript->InstantiateVM("MainVM");
+    vm_->InitJSContext();
+
+#ifdef ATOMIC_DOTNET
+    jsapi_init_atomicnet(vm_);
+#endif
+
+}
+
+void AEEditorCommon::Setup()
+{
+
+#ifdef ATOMIC_3D
+    RegisterEnvironmentLibrary(context_);
+#endif
+
     // Register IPC system
     context_->RegisterSubsystem(new IPC(context_));
 
@@ -43,6 +65,7 @@ void AEEditorCommon::Start()
     context_->RegisterSubsystem(javascript);
 
 #ifdef ATOMIC_DOTNET
+
     // Instantiate and register the AtomicNET subsystem
     SharedPtr<NETCore> netCore (new NETCore(context_));
     String netCoreErrorMsg;
@@ -57,18 +80,6 @@ void AEEditorCommon::Start()
 #endif
 
 
-    vm_ = javascript->InstantiateVM("MainVM");
-    vm_->InitJSContext();
-
-}
-
-void AEEditorCommon::Setup()
-{
-
-#ifdef ATOMIC_3D
-    RegisterEnvironmentLibrary(context_);
-#endif
-
 }
 
 void AEEditorCommon::Stop()

+ 1 - 1
Source/AtomicEditor/CMakeLists.txt

@@ -53,7 +53,7 @@ endif(APPLE)
 
 add_executable(AtomicEditor ${EXE_TYPE} ${SOURCE_FILES} ${ATOMIC_EDITOR_ICON})
 
-target_link_libraries(AtomicEditor ToolCore AtomicJS AtomicPlayerJS ToolCoreJS Poco nativefiledialog ${ATOMIC_LINK_LIBRARIES})
+target_link_libraries(AtomicEditor ToolCore AtomicJS AtomicPlayerJS AtomicNETJS ToolCoreJS Poco nativefiledialog ${ATOMIC_LINK_LIBRARIES})
 
 if (APPLE)
     set (TARGET_PROPERTIES MACOSX_BUNDLE_INFO_PLIST MacOSXBundleInfo.plist.template)

+ 0 - 1
Source/AtomicJS/Javascript/JSComponent.cpp

@@ -140,7 +140,6 @@ void JSComponent::RegisterObject(Context* context)
 {
     context->RegisterFactory(new JSComponentFactory(context), LOGIC_CATEGORY);
 
-
     ACCESSOR_ATTRIBUTE("Is Enabled", IsEnabled, SetEnabled, bool, true, AM_DEFAULT);
     ATTRIBUTE("FieldValues", VariantMap, fieldValues_, Variant::emptyVariantMap, AM_FILE);
     MIXED_ACCESSOR_ATTRIBUTE("ComponentFile", GetScriptAttr, SetScriptAttr, ResourceRef, ResourceRef(JSComponentFile::GetTypeStatic()), AM_DEFAULT);

+ 2 - 2
Source/AtomicJS/Javascript/JSComponent.h

@@ -38,6 +38,8 @@ class ATOMIC_API JSComponent : public Component
     friend class JSComponentFactory;
     friend class JSComponentFile;
 
+    OBJECT(JSComponent);
+
     enum EventFlags
     {
         USE_UPDATE = 0x1,
@@ -48,8 +50,6 @@ class ATOMIC_API JSComponent : public Component
 
 public:
 
-    OBJECT(JSComponent);
-
     /// Construct.
     JSComponent(Context* context);
     /// Destruct.

+ 1 - 1
Source/AtomicNET/CMakeLists.txt

@@ -1,3 +1,3 @@
 
 add_subdirectory(NETCore)
-add_subdirectory(NETNative)
+add_subdirectory(NETJS)

+ 22 - 0
Source/AtomicNET/NETCore/CSComponent.cpp

@@ -123,6 +123,11 @@ void CSComponent::RegisterObject(Context* context)
 {
     context->RegisterFactory(new CSComponentFactory(context), LOGIC_CATEGORY);
     ACCESSOR_ATTRIBUTE("Is Enabled", IsEnabled, SetEnabled, bool, true, AM_DEFAULT);
+
+    //ATTRIBUTE("FieldValues", VariantMap, fieldValues_, Variant::emptyVariantMap, AM_FILE);
+
+    MIXED_ACCESSOR_ATTRIBUTE("Assembly", GetAssemblyFileAttr, SetAssemblyFileAttr, ResourceRef, ResourceRef(NETAssemblyFile::GetTypeStatic()), AM_DEFAULT);
+
 }
 
 void CSComponent::OnSetEnabled()
@@ -354,4 +359,21 @@ bool CSComponent::LoadXML(const XMLElement& source, bool setInstanceDefault)
     return success;
 }
 
+void CSComponent::SetAssemblyFile(NETAssemblyFile* assemblyFile)
+{
+    assemblyFile_ = assemblyFile;
+}
+
+ResourceRef CSComponent::GetAssemblyFileAttr() const
+{
+    return GetResourceRef(assemblyFile_, NETAssemblyFile::GetTypeStatic());
+}
+
+void CSComponent::SetAssemblyFileAttr(const ResourceRef& value)
+{
+    ResourceCache* cache = GetSubsystem<ResourceCache>();
+    SetAssemblyFile(cache->GetResource<NETAssemblyFile>(value.name_));
+}
+
+
 }

+ 8 - 0
Source/AtomicNET/NETCore/CSComponent.h

@@ -25,6 +25,8 @@
 
 #include <Atomic/Scene/Component.h>
 
+#include "NETAssemblyFile.h"
+
 namespace Atomic
 {
 
@@ -80,6 +82,10 @@ public:
 
     void SetDestroyed() { destroyed_ = true; }
 
+    void SetAssemblyFile(NETAssemblyFile* assemblyFile);
+    ResourceRef GetAssemblyFileAttr() const;
+    void SetAssemblyFileAttr(const ResourceRef& value);
+
 protected:
     /// Handle scene node being assigned at creation.
     virtual void OnNodeSet(Node* node);
@@ -132,6 +138,8 @@ private:
 
     bool loading_;
 
+    SharedPtr<NETAssemblyFile> assemblyFile_;
+
 };
 
 }

+ 61 - 0
Source/AtomicNET/NETCore/NETAssemblyFile.cpp

@@ -0,0 +1,61 @@
+//
+// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+#include <Atomic/Core/Context.h>
+#include <Atomic/IO/Deserializer.h>
+#include <Atomic/IO/Log.h>
+#include <Atomic/Core/Profiler.h>
+#include <Atomic/Resource/ResourceCache.h>
+#include <Atomic/IO/Serializer.h>
+
+#include "NETAssemblyFile.h"
+
+namespace Atomic
+{
+
+NETAssemblyFile::NETAssemblyFile(Context* context) :
+    Resource(context)
+{
+
+}
+
+NETAssemblyFile::~NETAssemblyFile()
+{
+
+}
+
+void NETAssemblyFile::RegisterObject(Context* context)
+{
+    context->RegisterFactory<NETAssemblyFile>();
+}
+
+bool NETAssemblyFile::BeginLoad(Deserializer& source)
+{
+    return true;
+}
+
+bool NETAssemblyFile::Save(Serializer& dest) const
+{
+    return true;
+}
+
+}

+ 58 - 0
Source/AtomicNET/NETCore/NETAssemblyFile.h

@@ -0,0 +1,58 @@
+//
+// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+#pragma once
+
+#include <Atomic/Resource/Resource.h>
+#include <Atomic/Container/ArrayPtr.h>
+#include <Atomic/Container/List.h>
+
+namespace Atomic
+{
+
+// At runtime we need to load the assembly, in the editor we use metadata
+
+/// NET Assembly resource.
+class ATOMIC_API NETAssemblyFile : public Resource
+{
+    OBJECT(NETAssemblyFile);
+
+public:
+
+    /// Construct.
+    NETAssemblyFile(Context* context);
+    /// Destruct.
+    virtual ~NETAssemblyFile();
+
+    /// Load resource from stream. May be called from a worker thread. Return true if successful.
+    virtual bool BeginLoad(Deserializer& source);
+    /// Save resource
+    virtual bool Save(Serializer& dest) const;
+
+    /// Register object factory.
+    static void RegisterObject(Context* context);
+
+private:
+
+};
+
+}

+ 40 - 10
Source/AtomicNET/NETCore/NETCore.cpp

@@ -10,6 +10,7 @@
 #include "CSComponent.h"
 #include "NETCore.h"
 #include "NETManaged.h"
+#include "NETAssemblyFile.h"
 
 namespace Atomic
 {
@@ -89,8 +90,10 @@ NETCore::NETCore(Context* context) :
     context_->RegisterSubsystem(dispatcher);
     context_->AddGlobalEventListener(dispatcher);
 
-    SubscribeToEvent(E_UPDATE, HANDLER(NETCore, HandleUpdate));
-
+    if (!context_->GetEditorContext())
+    {
+        SubscribeToEvent(E_UPDATE, HANDLER(NETCore, HandleUpdate));
+    }
 }
 
 NETCore::~NETCore()
@@ -237,6 +240,29 @@ void csb_AtomicEngine_ReleaseRef(RefCounted* ref)
 }
 
 
+}
+
+bool NETCore::CreateDelegate(const String& assemblyName, const String& qualifiedClassName, const String& methodName, void** funcOut)
+{
+    if (!sCreateDelegate)
+        return false;
+
+    *funcOut = 0;
+
+    // TODO: wrap in SharedPtr to control delegate lifetime?
+    int st = sCreateDelegate(hostHandle_,
+                    domainId_,
+                    assemblyName.CString(),
+                    qualifiedClassName.CString(),
+                    methodName.CString(),
+                    funcOut);
+
+    // ensure ptr isn't uninitialized
+    if (st < 0)
+        *funcOut = 0;
+
+    return st >= 0;
+
 }
 
 bool NETCore::Initialize(const String &coreCLRFilesAbsPath, String& errorMsg)
@@ -280,8 +306,8 @@ bool NETCore::Initialize(const String &coreCLRFilesAbsPath, String& errorMsg)
     String appPath = "/Users/josh/Desktop/";
     Vector<String> nativeSearch;
     nativeSearch.Push(coreCLRFilesAbsPath_);
-    nativeSearch.Push("/Users/josh/Dev/atomic/AtomicGameEngineSharp-build/Source/AtomicNET/NETNative");
-    nativeSearch.Push("/Users/josh/Dev/atomic/AtomicGameEngineSharp-build/Source/AtomicEditor/AtomicEditor.app/Contents/MacOS");
+    //nativeSearch.Push("/Users/josh/Dev/atomic/AtomicGameEngine-build/Source/AtomicNET/NETNative");
+    //nativeSearch.Push("/Users/josh/Dev/atomic/AtomicGameEngine-build/Source/AtomicEditor/AtomicEditor.app/Contents/MacOS");
 
     String nativeDllSearchDirs;
     nativeDllSearchDirs.Join(nativeSearch, ":");
@@ -340,11 +366,13 @@ bool NETCore::Initialize(const String &coreCLRFilesAbsPath, String& errorMsg)
         startup();
     }
 
+    /*
+
     st = sCreateDelegate(hostHandle_,
                     domainId_,
-                    "AtomicNETRuntime",
-                    "AtomicEngine.AtomicNETRuntime",
-                    "Startup",
+                    "AtomicNETEngine",
+                    "AtomicEngine.Atomic",
+                    "Initialize",
                     (void**) &startup);
 
     if (st >= 0)
@@ -356,7 +384,7 @@ bool NETCore::Initialize(const String &coreCLRFilesAbsPath, String& errorMsg)
 
     st = sCreateDelegate(hostHandle_,
                     domainId_,
-                    "AtomicNETRuntime",
+                    "AtomicNETEngine",
                     "AtomicEngine.NativeCore",
                     "RefCountedDeleted",
                     (void**) &rcdFunction);
@@ -370,7 +398,7 @@ bool NETCore::Initialize(const String &coreCLRFilesAbsPath, String& errorMsg)
 
     st = sCreateDelegate(hostHandle_,
                     domainId_,
-                    "AtomicNETRuntime",
+                    "AtomicNETEngine",
                     "AtomicEngine.NativeCore",
                     "NETUpdate",
                     (void**) &updateFunction);
@@ -393,8 +421,9 @@ bool NETCore::Initialize(const String &coreCLRFilesAbsPath, String& errorMsg)
 
     if (st >= 0)
     {
-        inspectAssembly("/Users/josh/Desktop/AtomicNETTest.dll");
+        //inspectAssembly("/Users/josh/Desktop/AtomicNETTest.dll");
     }
+    */
 
 
     /*
@@ -423,6 +452,7 @@ void NETCore::HandleUpdate(StringHash eventType, VariantMap& eventData)
 
 void RegisterNETCoreLibrary(Context* context)
 {
+    NETAssemblyFile::RegisterObject(context);
     CSComponent::RegisterObject(context);
 }
 

+ 3 - 0
Source/AtomicNET/NETCore/NETCore.h

@@ -42,6 +42,8 @@ public:
     bool Initialize(const String& coreCLRFilesAbsPath, String &errorMsg);
     void Shutdown();
 
+    bool CreateDelegate(const String& assemblyName, const String& qualifiedClassName, const String& methodName, void** funcOut);
+
     /// We access this directly in binding code, where there isn't a context
     /// to get a reference from
     static inline Context* GetContext() { return instance_->csContext_; }
@@ -49,6 +51,7 @@ public:
 private:
 
     void HandleUpdate(StringHash eventType, VariantMap& eventData);
+
     bool InitCoreCLRDLL(String &errorMsg);
     void GenerateTPAList(String& tpaList);
 

+ 47 - 0
Source/AtomicNET/NETJS/AtomicNETJS.cpp

@@ -0,0 +1,47 @@
+//
+// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+#include <AtomicJS/Javascript/JSVM.h>
+#include <AtomicPlayer/Player.h>
+
+using namespace Atomic;
+using namespace AtomicPlayer;
+
+namespace Atomic
+{
+
+extern void jsb_package_atomicnet_init(JSVM* vm);
+
+void jsapi_init_atomicnet(JSVM* vm)
+{
+    duk_context* ctx = vm->GetJSContext();
+
+    jsb_package_atomicnet_init(vm);
+
+    //duk_get_global_string(ctx, "Atomic");
+    //js_push_class_object_instance(ctx, vm->GetSubsystem<Player>(), "Player");
+    //duk_put_prop_string(ctx, -2, "player");
+    //duk_pop(ctx);
+
+}
+
+}

+ 21 - 0
Source/AtomicNET/NETJS/AtomicNETJS.h

@@ -0,0 +1,21 @@
+//
+// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//

+ 26 - 0
Source/AtomicNET/NETJS/CMakeLists.txt

@@ -0,0 +1,26 @@
+include_directories (${CMAKE_SOURCE_DIR}/Source/ThirdParty)
+
+file (GLOB_RECURSE SOURCE_FILES *.cpp *.h)
+
+# Create the JSBind files ahead of time, so they are picked up with glob
+set (JSFILES JSPackageAtomicNET.cpp;JSPackageAtomicNET.cpp)
+
+foreach(JSFILE ${JSFILES})
+
+  set (JSFILEPATH "${CMAKE_SOURCE_DIR}/Build/Source/Generated/${JAVASCRIPT_BINDINGS_PLATFORM}/Javascript/Packages/AtomicNET/${JSFILE}")
+
+  if (NOT EXISTS ${JSFILEPATH})
+    file(WRITE "${JSFILEPATH}" "// will be created by JSBind")
+  endif()
+
+endforeach()
+
+file (GLOB JAVASCRIPT_BINDINGS_SOURCE ${CMAKE_SOURCE_DIR}/Build/Source/Generated/${JAVASCRIPT_BINDINGS_PLATFORM}/Javascript/Packages/AtomicNET/*.cpp)
+
+set (SOURCE_FILES ${SOURCE_FILES} ${JAVASCRIPT_BINDINGS_SOURCE} )
+
+add_library(AtomicNETJS ${SOURCE_FILES})
+
+#target_link_libraries(AtomicPlayerJS AtomicPlayerLib)
+
+add_dependencies(AtomicNETJS AtomicTool)

+ 2 - 1
Source/AtomicTool/CMakeLists.txt

@@ -6,7 +6,7 @@ endif()
 
 add_executable(AtomicTool ${ATOMIC_TOOL_SOURCES})
 
-target_link_libraries(AtomicTool ToolCore Poco ${ATOMIC_LINK_LIBRARIES})
+target_link_libraries(AtomicTool ToolCore NETCore Poco ${ATOMIC_LINK_LIBRARIES})
 
 # add_dependencies(AtomicTool AtomicEditor)
 
@@ -29,4 +29,5 @@ add_custom_command(TARGET AtomicTool POST_BUILD
                    COMMAND $<TARGET_FILE:AtomicTool> bind "\"${CMAKE_SOURCE_DIR}\"" "Script/Packages/AtomicPlayer/" "${JAVASCRIPT_BINDINGS_PLATFORM}"
                    COMMAND $<TARGET_FILE:AtomicTool> bind "\"${CMAKE_SOURCE_DIR}\"" "Script/Packages/ToolCore/" "${JAVASCRIPT_BINDINGS_PLATFORM}"
                    COMMAND $<TARGET_FILE:AtomicTool> bind "\"${CMAKE_SOURCE_DIR}\"" "Script/Packages/Editor/" "${JAVASCRIPT_BINDINGS_PLATFORM}"
+                   COMMAND $<TARGET_FILE:AtomicTool> bind "\"${CMAKE_SOURCE_DIR}\"" "Script/Packages/AtomicNET/" "${JAVASCRIPT_BINDINGS_PLATFORM}"
                    COMMENT "Generating Javascript Bindings")

+ 6 - 0
Source/ToolCore/Assets/Asset.cpp

@@ -25,6 +25,7 @@
 #include "TMXImporter.h"
 #include "PEXImporter.h"
 #include "TextImporter.h"
+#include "NETAssemblyImporter.h"
 
 #include "AssetEvents.h"
 #include "Asset.h"
@@ -291,6 +292,11 @@ bool Asset::CreateImporter()
         {
             importer_ = new TextImporter(context_, this);
         }
+        else if (ext == ".dll")
+        {
+            // TODO: check for native dll
+            importer_ = new NETAssemblyImporter(context_, this);
+        }
         else if (textureFormats.Contains(ext))
         {
             importer_ = new TextureImporter(context_, this);

+ 1 - 0
Source/ToolCore/Assets/AssetDatabase.cpp

@@ -498,6 +498,7 @@ String AssetDatabase::GetResourceImporterName(const String& resourceTypeName)
         resourceTypeToImporterType_["Sprite2D"] = "TextureImporter";
         resourceTypeToImporterType_["AnimatedSprite2D"] = "SpriterImporter";
         resourceTypeToImporterType_["JSComponentFile"] = "JavascriptImporter";
+        resourceTypeToImporterType_["NETAssemblyFile"] = "NETAssemblyImporter";
         resourceTypeToImporterType_["ParticleEffect2D"] = "PEXImporter";
     }
 

+ 105 - 0
Source/ToolCore/Assets/NETAssemblyImporter.cpp

@@ -0,0 +1,105 @@
+//
+// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
+// LICENSE: Atomic Game Engine Editor and Tools EULA
+// Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
+// license information: https://github.com/AtomicGameEngine/AtomicGameEngine
+//
+
+#include <Atomic/IO/Log.h>
+#include <Atomic/IO/File.h>
+#include <Atomic/Resource/ResourceCache.h>
+#include <Atomic/Resource/Image.h>
+
+#include <AtomicNET/NETCore/NETAssemblyFile.h>
+
+#include "../NETTools/NETToolSystem.h"
+
+#include "Asset.h"
+#include "AssetDatabase.h"
+#include "NETAssemblyImporter.h"
+
+namespace ToolCore
+{
+
+NETAssemblyImporter::NETAssemblyImporter(Context* context, Asset *asset) : AssetImporter(context, asset)
+{
+    requiresCacheFile_ = false;
+}
+
+NETAssemblyImporter::~NETAssemblyImporter()
+{
+
+}
+
+void NETAssemblyImporter::SetDefaults()
+{
+    AssetImporter::SetDefaults();
+}
+
+bool NETAssemblyImporter::Import()
+{
+    NETToolSystem* tools = GetSubsystem<NETToolSystem>();
+
+    JSONValue assemblyJSON;
+
+    if (tools->InspectAssembly(asset_->GetPath(), assemblyJSON))
+    {
+        if (assemblyJSON.IsObject())
+        {
+            const JSONValue& enums = assemblyJSON.Get("enums");
+
+            const JSONArray& components = assemblyJSON.Get("components").GetArray();
+
+            for (unsigned i = 0; i < components.Size(); i++)
+            {
+                const JSONValue& c = components.At(i);
+
+                String componentName = c.Get("name").GetString();
+
+                LOGINFOF("Found NET Component %s", componentName.CString());
+            }
+
+        }
+
+    }
+
+    return true;
+}
+
+bool NETAssemblyImporter::LoadSettingsInternal(JSONValue& jsonRoot)
+{
+    if (!AssetImporter::LoadSettingsInternal(jsonRoot))
+        return false;
+
+    JSONValue import = jsonRoot.Get("NETAssemblyImporter");
+
+    //isComponentFile_ = import.Get("IsComponentFile").GetBool();
+
+    return true;
+}
+
+bool NETAssemblyImporter::SaveSettingsInternal(JSONValue& jsonRoot)
+{
+    if (!AssetImporter::SaveSettingsInternal(jsonRoot))
+        return false;
+
+    JSONValue import;
+    //import.Set("IsComponentFile", JSONValue(isComponentFile_));
+    jsonRoot.Set("NETAssemblyImporter", import);
+
+    return true;
+}
+
+Resource* NETAssemblyImporter::GetResource(const String& typeName)
+{
+    ResourceCache* cache = GetSubsystem<ResourceCache>();
+
+    NETAssemblyFile* assemblyFile = cache->GetResource<NETAssemblyFile>(asset_->GetPath());
+
+    return assemblyFile;
+
+}
+
+
+
+}

+ 37 - 0
Source/ToolCore/Assets/NETAssemblyImporter.h

@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
+// LICENSE: Atomic Game Engine Editor and Tools EULA
+// Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
+// license information: https://github.com/AtomicGameEngine/AtomicGameEngine
+//
+
+#pragma once
+
+#include "AssetImporter.h"
+
+namespace ToolCore
+{
+
+class NETAssemblyImporter : public AssetImporter
+{
+    OBJECT(NETAssemblyImporter);
+
+public:
+    /// Construct.
+    NETAssemblyImporter(Context* context, Asset* asset);
+    virtual ~NETAssemblyImporter();
+
+    virtual void SetDefaults();
+
+    Resource* GetResource(const String& typeName = String::EMPTY);
+
+protected:
+
+    bool Import();
+
+    virtual bool LoadSettingsInternal(JSONValue& jsonRoot);
+    virtual bool SaveSettingsInternal(JSONValue& jsonRoot);
+
+};
+
+}

+ 1 - 0
Source/ToolCore/CMakeLists.txt

@@ -22,6 +22,7 @@ add_library(ToolCore ${SOURCE_FILES})
 target_link_libraries(ToolCore Assimp Poco)
 
 GroupSources("Assets")
+GroupSources("AtomicNET")
 GroupSources("Build")
 GroupSources("Command")
 GroupSources("Import")

+ 49 - 0
Source/ToolCore/NETTools/NETToolSystem.cpp

@@ -0,0 +1,49 @@
+//
+// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
+// LICENSE: Atomic Game Engine Editor and Tools EULA
+// Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
+// license information: https://github.com/AtomicGameEngine/AtomicGameEngine
+//
+
+#include <Atomic/IO/Log.h>
+#include <AtomicNET/NETCore/NETCore.h>
+
+#include "NETToolSystem.h"
+
+namespace ToolCore
+{
+
+NETToolSystem::NETToolSystem(Context* context) : Object(context)
+{
+    if (context->GetEditorContext())
+    {
+        NETCore* core = GetSubsystem<NETCore>();
+        if (!core->CreateDelegate("AtomicNETTools", "AtomicTools.AtomicTools", "InspectAssembly", (void**) &inspectAssemblyFunction_))
+        {
+            LOGERROR("NETToolSystem::NETToolSystem - Unable to resolve delagate AtomicNETTools.InspectAssembly");
+        }
+    }
+}
+
+NETToolSystem::~NETToolSystem()
+{
+
+}
+
+bool NETToolSystem::InspectAssembly(const String& pathToAssembly, JSONValue &json)
+{
+    json.SetType(JSON_NULL);
+
+    if (!inspectAssemblyFunction_)
+        return false;
+
+    String jsonString = inspectAssemblyFunction_(pathToAssembly.CString());
+
+    if (!jsonString.Length())
+        return false;
+
+    return JSONFile::ParseJSON(jsonString, json);
+
+}
+
+}

+ 37 - 0
Source/ToolCore/NETTools/NETToolSystem.h

@@ -0,0 +1,37 @@
+//
+// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
+// LICENSE: Atomic Game Engine Editor and Tools EULA
+// Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
+// license information: https://github.com/AtomicGameEngine/AtomicGameEngine
+//
+
+
+#pragma once
+
+#include <Atomic/Core/Object.h>
+#include <Atomic/Resource/JSONFile.h>
+
+using namespace Atomic;
+
+namespace ToolCore
+{
+
+class NETToolSystem : public Object
+{
+    OBJECT(NETToolSystem);
+
+public:
+
+    NETToolSystem(Context* context);
+    virtual ~NETToolSystem();
+
+    bool InspectAssembly(const String& pathToAssembly, JSONValue& json);
+
+private:
+
+    typedef const char* (*InpectAssemblyFuctionPtr)(const char* path);
+    InpectAssemblyFuctionPtr inspectAssemblyFunction_;
+
+};
+
+}

+ 2 - 0
Source/ToolCore/ToolSystem.cpp

@@ -20,6 +20,7 @@
 #include "License/LicenseSystem.h"
 #include "Build/BuildSystem.h"
 #include "Subprocess/SubprocessSystem.h"
+#include "NETTools/NETToolSystem.h"
 
 
 #include "ToolSystem.h"
@@ -40,6 +41,7 @@ ToolSystem::ToolSystem(Context* context) : Object(context),
     context_->RegisterSubsystem(new LicenseSystem(context_));
     context_->RegisterSubsystem(new BuildSystem(context_));
     context_->RegisterSubsystem(new SubprocessSystem(context_));
+    context_->RegisterSubsystem(new NETToolSystem(context_));
 
     // platform registration
     RegisterPlatform(new PlatformMac(context));