Browse Source

Merge remote-tracking branch 'origin/master' into EGS-AssetBuildConfiguration

Eugene 9 years ago
parent
commit
1effb68ec8
100 changed files with 1928 additions and 5 deletions
  1. 2 2
      .gitignore
  2. 4 2
      AUTHORS.md
  3. 6 1
      Attic/AtomicEditorReference/Source/UI/Modal/UIBuildSettingsAndroid.cpp
  4. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicNETTest/MyClass.cs
  5. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicEditor/AtomicEditor.csproj
  6. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicEditor/MyClass.cs
  7. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicEditor/Properties/AssemblyInfo.cs
  8. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicEngine.cs
  9. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicInterop.cs
  10. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharp.csproj
  11. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharp.sln
  12. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTest/AtomicSharpTest.csproj
  13. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTest/Program.cs
  14. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTest/Properties/AssemblyInfo.cs
  15. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTool/AtomicSharpTool.csproj
  16. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTool/Program.cs
  17. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTool/Properties/AssemblyInfo.cs
  18. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/CSComponent.cs
  19. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/ComponentCore.cs
  20. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/EventCore.cs
  21. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/Math.cs
  22. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/NativeCore.cs
  23. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/Properties/AssemblyInfo.cs
  24. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/SDLConsts.cs
  25. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/ScriptObject.cs
  26. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/NETNative/AtomicSharpAPI.cpp
  27. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/NETNative/AtomicSharpAPI.h
  28. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/NETNative/AtomicSharpApp.cpp
  29. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/NETNative/AtomicSharpApp.h
  30. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto1/NETNative/CMakeLists.txt
  31. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Build/CMake/Modules/AtomicNET.cmake
  32. 84 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicEditor/ui/frames/inspector/AssemblyInspector.ts
  33. 101 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicEditor/ui/frames/inspector/CSComponentClassSelector.ts
  34. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETBootstrap/AssemblyLoaderCache.cs
  35. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETBootstrap/Bootstrap.cs
  36. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETBootstrap/IAssemblyLoadContext.cs
  37. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETBootstrap/LoadContext.cs
  38. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/AtomicNET.cs
  39. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/CSComponent.cs
  40. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/ComponentCore.cs
  41. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/Constants.cs
  42. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/InspectorAttribute.cs
  43. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/Math.cs
  44. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/NativeCore.cs
  45. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/RefCounted.cs
  46. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/SDLConsts.cs
  47. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETTools/AssemblyInspector.cs
  48. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETTools/AtomicTools.cs
  49. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETTools/CSComponentInspector.cs
  50. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETTools/MiniJSON.cs
  51. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/build.cmd
  52. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/build.sh
  53. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNETProjects.json
  54. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/Packages/AtomicNET/NETCore.json
  55. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/Packages/AtomicNET/NETScript.json
  56. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Script/Packages/AtomicNET/Package.json
  57. 5 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/CMakeLists.txt
  58. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/CMakeLists.txt
  59. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETCore.cpp
  60. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETCore.h
  61. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETHost.cpp
  62. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETHost.h
  63. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETVariant.cpp
  64. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETVariant.h
  65. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Unix/NETHostUnix.cpp
  66. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Unix/NETHostUnix.h
  67. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Unix/NetCoreUnixCommon.cpp
  68. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Unix/NetCoreUnixCommon.h
  69. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/NETHostWindows.cpp
  70. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/NETHostWindows.h
  71. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/mscoree.h
  72. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/palclr.h
  73. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/palclr_win.h
  74. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/staticcontract.h
  75. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETJS/AtomicNETJS.cpp
  76. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETJS/AtomicNETJS.h
  77. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETJS/CMakeLists.txt
  78. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETRun/CMakeLists.txt
  79. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETRun/NETRunApp.cpp
  80. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETRun/NETRunApp.h
  81. 7 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CMakeLists.txt
  82. 231 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSComponent.cpp
  83. 103 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSComponent.h
  84. 248 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSComponentAssembly.cpp
  85. 81 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSComponentAssembly.h
  86. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSEventHelper.cpp
  87. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSEventHelper.h
  88. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSManaged.cpp
  89. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSManaged.h
  90. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSScriptObject.cpp
  91. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSScriptObject.h
  92. 113 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/NETScript.cpp
  93. 36 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/NETScript.h
  94. 37 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/NETScriptEvents.h
  95. 128 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/Assets/NETAssemblyImporter.cpp
  96. 54 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/Assets/NETAssemblyImporter.h
  97. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/Command/NETProjectGenCmd.cpp
  98. 0 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/Command/NETProjectGenCmd.h
  99. 531 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/NETTools/NETProjectGen.cpp
  100. 157 0
      Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/NETTools/NETProjectGen.h

+ 2 - 2
.gitignore

@@ -18,6 +18,6 @@ Data/AtomicEditor/Deployment/Web/AtomicPlayer.html.mem
 Data/AtomicEditor/Deployment/IOS/AtomicPlayer.app/AtomicPlayer
 node_modules/*
 /.project
-Script/TypeScript/*
-!Script/TypeScript/AtomicWork.d.ts
+Script/TypeScript/**/*.d.ts
+!Script/TypeScript/**/*Work.d.ts
 Script/Haxe/*

+ 4 - 2
AUTHORS.md

@@ -3,9 +3,9 @@
 
 #### THUNDERBEAST GAMES LLC:
 
-- Josh Engebretson (Technical Director)
+- Josh Engebretson (https://github.com/JoshEngebretson)
 
-- Lara Engebretson
+- Lara Engebretson (https://github.com/LaraEngebretson)
 
 ### Contributors:
 
@@ -31,6 +31,8 @@
 
 - Johnny Wahib (https://github.com/JohnnyWahib)
 
+- JimMarlowe (https://github.com/JimMarlowe)
+
 ### Contribution Copyright and Licensing
 
 Atomic Game Engine contribution copyrights are held by their authors.  Each author retains the copyright to their contribution and agrees to irrevocably license the contribution under the Atomic Game Engine Contribution License `CONTRIBUTION_LICENSE.md`.  Please see `CONTRIBUTING.md` for more details.

+ 6 - 1
Attic/AtomicEditorReference/Source/UI/Modal/UIBuildSettingsAndroid.cpp

@@ -146,7 +146,8 @@ void UIBuildSettingsAndroid::RefreshAndroidTargets()
 #ifdef ATOMIC_PLATFORM_OSX
     Vector<String> args = String("list targets").Split(' ');
     androidCommand += "tools/android";
-#else
+#endif
+#ifdef ATOMIC_PLATFORM_WINDOWS
     Vector<String> args;
     // android is a batch file on windows, so have to run with cmd /c
     args.Push("/c");
@@ -155,6 +156,10 @@ void UIBuildSettingsAndroid::RefreshAndroidTargets()
     args.Push("targets");
     androidCommand = "cmd";
 #endif
+#ifdef ATOMIC_PLATFORM_LINUX
+    Vector<String> args = String("list targets").Split(' ');
+    androidCommand += "tools/android";
+#endif
 
     targetOutput_.Clear();
     targetLookup_.Clear();

+ 0 - 0
Attic/AtomicNETTest/MyClass.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicNETTest/MyClass.cs


+ 0 - 0
Attic/AtomicSharp/AtomicEditor/AtomicEditor.csproj → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicEditor/AtomicEditor.csproj


+ 0 - 0
Attic/AtomicSharp/AtomicEditor/MyClass.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicEditor/MyClass.cs


+ 0 - 0
Attic/AtomicSharp/AtomicEditor/Properties/AssemblyInfo.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicEditor/Properties/AssemblyInfo.cs


+ 0 - 0
Attic/AtomicSharp/AtomicEngine.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicEngine.cs


+ 0 - 0
Attic/AtomicSharp/AtomicInterop.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicInterop.cs


+ 0 - 0
Attic/AtomicSharp/AtomicSharp.csproj → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharp.csproj


+ 0 - 0
Attic/AtomicSharp/AtomicSharp.sln → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharp.sln


+ 0 - 0
Attic/AtomicSharp/AtomicSharpTest/AtomicSharpTest.csproj → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTest/AtomicSharpTest.csproj


+ 0 - 0
Attic/AtomicSharp/AtomicSharpTest/Program.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTest/Program.cs


+ 0 - 0
Attic/AtomicSharp/AtomicSharpTest/Properties/AssemblyInfo.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTest/Properties/AssemblyInfo.cs


+ 0 - 0
Attic/AtomicSharp/AtomicSharpTool/AtomicSharpTool.csproj → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTool/AtomicSharpTool.csproj


+ 0 - 0
Attic/AtomicSharp/AtomicSharpTool/Program.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTool/Program.cs


+ 0 - 0
Attic/AtomicSharp/AtomicSharpTool/Properties/AssemblyInfo.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/AtomicSharpTool/Properties/AssemblyInfo.cs


+ 0 - 0
Attic/AtomicSharp/CSComponent.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/CSComponent.cs


+ 0 - 0
Attic/AtomicSharp/ComponentCore.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/ComponentCore.cs


+ 0 - 0
Attic/AtomicSharp/EventCore.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/EventCore.cs


+ 0 - 0
Attic/AtomicSharp/Math.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/Math.cs


+ 0 - 0
Attic/AtomicSharp/NativeCore.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/NativeCore.cs


+ 0 - 0
Attic/AtomicSharp/Properties/AssemblyInfo.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/Properties/AssemblyInfo.cs


+ 0 - 0
Attic/AtomicSharp/SDLConsts.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/SDLConsts.cs


+ 0 - 0
Attic/AtomicSharp/ScriptObject.cs → Attic/AtomicNETPrototypes/AtomicNETProto1/AtomicSharp/ScriptObject.cs


+ 0 - 0
Attic/NETNative/AtomicSharpAPI.cpp → Attic/AtomicNETPrototypes/AtomicNETProto1/NETNative/AtomicSharpAPI.cpp


+ 0 - 0
Attic/NETNative/AtomicSharpAPI.h → Attic/AtomicNETPrototypes/AtomicNETProto1/NETNative/AtomicSharpAPI.h


+ 0 - 0
Attic/NETNative/AtomicSharpApp.cpp → Attic/AtomicNETPrototypes/AtomicNETProto1/NETNative/AtomicSharpApp.cpp


+ 0 - 0
Attic/NETNative/AtomicSharpApp.h → Attic/AtomicNETPrototypes/AtomicNETProto1/NETNative/AtomicSharpApp.h


+ 0 - 0
Attic/NETNative/CMakeLists.txt → Attic/AtomicNETPrototypes/AtomicNETProto1/NETNative/CMakeLists.txt


+ 0 - 0
Build/CMake/Modules/AtomicNET.cmake → Attic/AtomicNETPrototypes/AtomicNETProto2/Build/CMake/Modules/AtomicNET.cmake


+ 84 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicEditor/ui/frames/inspector/AssemblyInspector.ts

@@ -0,0 +1,84 @@
+//
+// Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
+//
+// 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.
+//
+
+import InspectorWidget = require("./InspectorWidget");
+import ArrayEditWidget = require("./ArrayEditWidget");
+import InspectorUtils = require("./InspectorUtils");
+
+class AssemblyInspector extends InspectorWidget {
+
+    constructor() {
+
+        super();
+
+        this.subscribeToEvent(this, "WidgetEvent", (data) => this.handleWidgetEvent(data));
+
+    }
+
+    handleWidgetEvent(ev: Atomic.UIWidgetEvent):boolean {
+
+      return false;
+
+    }
+
+    inspect(asset: ToolCore.Asset) {
+
+        this.asset = asset;
+        this.importer = <ToolCore.NETAssemblyImporter> asset.importer;
+
+        // node attr layout
+        var rootLayout = this.rootLayout;
+
+        // Assembly Section
+        var assemblyLayout = this.createSection(rootLayout, "NETAssembly", 1);
+
+        var assemblyFile = <AtomicNET.CSComponentAssembly> asset.importer.getResource();
+
+        var container = InspectorUtils.createContainer();
+        container.gravity = Atomic.UI_GRAVITY_ALL;
+        assemblyLayout.addChild(container);
+
+        var panel = new Atomic.UILayout();
+        panel.axis = Atomic.UI_AXIS_Y;
+        panel.layoutSize = Atomic.UI_LAYOUT_SIZE_PREFERRED;
+        panel.layoutPosition = Atomic.UI_LAYOUT_POSITION_LEFT_TOP;
+        container.addChild(panel);
+
+        var label = InspectorUtils.createAttrName("CSComponents:");
+        panel.addChild(label);
+
+        for (var index in assemblyFile.classNames) {
+            var classname = assemblyFile.classNames[index];
+
+            label = InspectorUtils.createAttrName(classname);
+            panel.addChild(label);
+        }
+
+    }
+
+
+    asset: ToolCore.Asset;
+    importer:ToolCore.NETAssemblyImporter;
+
+}
+
+export = AssemblyInspector;

+ 101 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicEditor/ui/frames/inspector/CSComponentClassSelector.ts

@@ -0,0 +1,101 @@
+//
+// Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
+//
+// 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.
+//
+
+import EditorUI = require("ui/EditorUI");
+
+class CSComponentClassSelector extends Atomic.UIWindow {
+
+    constructor(editField: Atomic.UIEditField, component: AtomicNET.CSComponent) {
+
+        super();
+
+        var assemblyFile = component.assemblyFile;
+
+        this.text = "Select Class: " + assemblyFile.name;
+
+        this.rect = [0, 0, 400, 512];
+
+        var mainLayout = new Atomic.UILayout();
+        mainLayout.gravity = Atomic.UI_GRAVITY_ALL;
+        mainLayout.layoutDistribution = Atomic.UI_LAYOUT_DISTRIBUTION_AVAILABLE;
+        mainLayout.axis = Atomic.UI_AXIS_Y;
+        this.contentRoot.addChild(mainLayout);
+
+        // really want a grid container
+        var scrollContainer = new Atomic.UIScrollContainer();
+        scrollContainer.gravity = Atomic.UI_GRAVITY_ALL;
+        scrollContainer.scrollMode = Atomic.UI_SCROLL_MODE_Y_AUTO;
+        scrollContainer.adaptContentSize = true;
+
+        var scrollLayout = new Atomic.UILayout();
+        scrollLayout.layoutPosition = Atomic.UI_LAYOUT_POSITION_LEFT_TOP;
+        scrollLayout.layoutDistributionPosition = Atomic.UI_LAYOUT_DISTRIBUTION_POSITION_LEFT_TOP;
+        scrollLayout.axis = Atomic.UI_AXIS_Y;
+
+        scrollContainer.contentRoot.addChild(scrollLayout);
+
+        var window = this;
+
+        for (var i in assemblyFile.classNames) {
+
+            var classname = assemblyFile.classNames[i];
+            var button = new Atomic.UIButton();
+            button.text = classname;
+
+            button.onClick = function() {
+                editField.text = this.text;
+                component.componentClassName = this.text;
+                window.close();
+            }.bind(button);
+
+            scrollLayout.addChild(button);
+        }
+
+        mainLayout.addChild(scrollContainer);
+
+        EditorUI.getMainFrame().addChild(this);
+
+        this.center();
+
+        this.subscribeToEvent("WidgetEvent", (data) => this.handleWidgetEvent(data));
+
+    }
+
+    handleWidgetEvent(ev: Atomic.UIWidgetEvent) {
+
+        if (ev.type == Atomic.UI_EVENT_TYPE_CLICK) {
+
+            if (ev.target != this && !this.isAncestorOf(ev.target)) {
+
+                //this.close();
+
+            }
+
+        }
+
+        return false;
+
+    }
+
+}
+
+export = CSComponentClassSelector;

+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETBootstrap/AssemblyLoaderCache.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETBootstrap/AssemblyLoaderCache.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETBootstrap/Bootstrap.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETBootstrap/Bootstrap.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETBootstrap/IAssemblyLoadContext.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETBootstrap/IAssemblyLoadContext.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETBootstrap/LoadContext.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETBootstrap/LoadContext.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETEngine/AtomicNET.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/AtomicNET.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETEngine/CSComponent.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/CSComponent.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETEngine/ComponentCore.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/ComponentCore.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETEngine/Constants.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/Constants.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETEngine/InspectorAttribute.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/InspectorAttribute.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETEngine/Math.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/Math.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETEngine/NativeCore.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/NativeCore.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETEngine/RefCounted.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/RefCounted.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETEngine/SDLConsts.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETEngine/SDLConsts.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETTools/AssemblyInspector.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETTools/AssemblyInspector.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETTools/AtomicTools.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETTools/AtomicTools.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETTools/CSComponentInspector.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETTools/CSComponentInspector.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/AtomicNETTools/MiniJSON.cs → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/AtomicNETTools/MiniJSON.cs


+ 0 - 0
Script/AtomicNET/AtomicNET/build.cmd → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/build.cmd


+ 0 - 0
Script/AtomicNET/AtomicNET/build.sh → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNET/build.sh


+ 0 - 0
Script/AtomicNET/AtomicNETProjects.json → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/AtomicNET/AtomicNETProjects.json


+ 0 - 0
Script/Packages/AtomicNET/NETCore.json → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/Packages/AtomicNET/NETCore.json


+ 0 - 0
Script/Packages/AtomicNET/NETScript.json → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/Packages/AtomicNET/NETScript.json


+ 0 - 0
Script/Packages/AtomicNET/Package.json → Attic/AtomicNETPrototypes/AtomicNETProto2/Script/Packages/AtomicNET/Package.json


+ 5 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/CMakeLists.txt

@@ -0,0 +1,5 @@
+
+add_subdirectory(NETCore)
+add_subdirectory(NETScript)
+add_subdirectory(NETJS)
+add_subdirectory(NETRun)

+ 0 - 0
Source/AtomicNET/NETCore/CMakeLists.txt → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/CMakeLists.txt


+ 0 - 0
Source/AtomicNET/NETCore/NETCore.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETCore.cpp


+ 0 - 0
Source/AtomicNET/NETCore/NETCore.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETCore.h


+ 0 - 0
Source/AtomicNET/NETCore/NETHost.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETHost.cpp


+ 0 - 0
Source/AtomicNET/NETCore/NETHost.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETHost.h


+ 0 - 0
Source/AtomicNET/NETCore/NETVariant.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETVariant.cpp


+ 0 - 0
Source/AtomicNET/NETCore/NETVariant.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/NETVariant.h


+ 0 - 0
Source/AtomicNET/NETCore/Platforms/Unix/NETHostUnix.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Unix/NETHostUnix.cpp


+ 0 - 0
Source/AtomicNET/NETCore/Platforms/Unix/NETHostUnix.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Unix/NETHostUnix.h


+ 0 - 0
Source/AtomicNET/NETCore/Platforms/Unix/NetCoreUnixCommon.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Unix/NetCoreUnixCommon.cpp


+ 0 - 0
Source/AtomicNET/NETCore/Platforms/Unix/NetCoreUnixCommon.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Unix/NetCoreUnixCommon.h


+ 0 - 0
Source/AtomicNET/NETCore/Platforms/Windows/NETHostWindows.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/NETHostWindows.cpp


+ 0 - 0
Source/AtomicNET/NETCore/Platforms/Windows/NETHostWindows.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/NETHostWindows.h


+ 0 - 0
Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/mscoree.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/mscoree.h


+ 0 - 0
Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/palclr.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/palclr.h


+ 0 - 0
Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/palclr_win.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/palclr_win.h


+ 0 - 0
Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/staticcontract.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETCore/Platforms/Windows/prebuilt/staticcontract.h


+ 0 - 0
Source/AtomicNET/NETJS/AtomicNETJS.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETJS/AtomicNETJS.cpp


+ 0 - 0
Source/AtomicNET/NETJS/AtomicNETJS.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETJS/AtomicNETJS.h


+ 0 - 0
Source/AtomicNET/NETJS/CMakeLists.txt → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETJS/CMakeLists.txt


+ 0 - 0
Source/AtomicNET/NETRun/CMakeLists.txt → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETRun/CMakeLists.txt


+ 0 - 0
Source/AtomicNET/NETRun/NETRunApp.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETRun/NETRunApp.cpp


+ 0 - 0
Source/AtomicNET/NETRun/NETRunApp.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETRun/NETRunApp.h


+ 7 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CMakeLists.txt

@@ -0,0 +1,7 @@
+
+include_directories (${CMAKE_SOURCE_DIR}/Source/ThirdParty/rapidjson/include
+                     ${CMAKE_SOURCE_DIR}/Source/ThirdParty )
+
+file (GLOB SOURCE_FILES *.cpp *.h)
+
+add_library(NETScript ${SOURCE_FILES})

+ 231 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSComponent.cpp

@@ -0,0 +1,231 @@
+//
+// Copyright (c) 2008-2014 the Urho3D project.
+// 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/IO/Log.h>
+#include <Atomic/IO/FileSystem.h>
+#include <Atomic/Core/Context.h>
+#include <Atomic/Resource/ResourceCache.h>
+
+#ifdef ATOMIC_PHYSICS
+#include <Atomic/Physics/PhysicsEvents.h>
+#include <Atomic/Physics/PhysicsWorld.h>
+#endif
+#include <Atomic/Scene/Scene.h>
+#include <Atomic/Scene/SceneEvents.h>
+
+#include "../NETCore/NETVariant.h"
+#include "NETScriptEvents.h"
+#include "CSManaged.h"
+#include "CSComponent.h"
+
+namespace Atomic
+{
+
+extern const char* LOGIC_CATEGORY;
+
+class CSComponentFactory : public ObjectFactory
+{
+public:
+    /// Construct.
+    CSComponentFactory(Context* context) :
+        ObjectFactory(context)
+    {
+        type_ = CSComponent::GetTypeStatic();
+        baseType_ = CSComponent::GetBaseTypeStatic();
+        typeName_ = CSComponent::GetTypeNameStatic();
+    }
+
+    /// Create an object of the specific type.
+    SharedPtr<Object> CreateObject(const XMLElement& source = XMLElement::EMPTY)
+    {
+
+        // if in editor, just create the CSComponent
+        if (context_->GetEditorContext())
+        {
+            return SharedPtr<Object>(new CSComponent(context_));
+        }
+
+        // At runtime, a XML CSComponent may refer to a managed component
+
+        String managedClass;
+        String assemblyRef;
+
+        if (source != XMLElement::EMPTY)
+        {
+            XMLElement attrElem = source.GetChild("attribute");
+
+            while (attrElem)
+            {
+                if (attrElem.GetAttribute("name") == "Assembly")
+                {
+                    assemblyRef = attrElem.GetAttribute("value");
+                }
+                else if (attrElem.GetAttribute("name") == "Class")
+                {
+                    managedClass = attrElem.GetAttribute("value");
+                }
+
+                if (assemblyRef.Length() && managedClass.Length())
+                    break;
+
+                attrElem = attrElem.GetNext("attribute");
+            }
+        }               
+
+        SharedPtr<Object> ptr;
+
+        if (assemblyRef.Length())
+        {
+            Vector<String> split = assemblyRef.Split(';');
+
+            if (split.Size() == 2)
+            {
+                ResourceCache* cache = context_->GetSubsystem<ResourceCache>();
+                CSComponentAssembly* componentFile = cache->GetResource<CSComponentAssembly>(split[1]);
+                if (componentFile)
+                    ptr = componentFile->CreateCSComponent(managedClass);
+                else
+                {
+                    LOGERRORF("Unable to load component file %s", split[1].CString());
+                }
+            }
+
+        }
+
+        if (ptr.Null())
+        {
+            ptr = new CSComponent(context_);
+        }
+
+        return ptr;    }
+};
+
+
+CSComponent::CSComponent(Context* context) :
+    ScriptComponent(context)
+{
+
+}
+
+CSComponent::~CSComponent()
+{
+
+}
+
+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(CSComponentAssembly::GetTypeStatic()), AM_DEFAULT);
+
+    ACCESSOR_ATTRIBUTE("Class", GetComponentClassName, SetComponentClassName, String, String::EMPTY, AM_DEFAULT);
+
+}
+
+void CSComponent::OnSetEnabled()
+{
+}
+
+void CSComponent::ApplyAttributes()
+{
+}
+
+void CSComponent::ApplyFieldValues()
+{
+    if (!fieldValues_.Size())
+        return;
+
+    SharedPtr<NETVariantMap> vmap(new NETVariantMap());
+    vmap->CopySourceVariantMap(fieldValues_);
+
+    CSManaged* managed = GetSubsystem<CSManaged>();
+
+    managed->CSComponentApplyFields(this, vmap);
+
+}
+
+void CSComponent::SetComponentClassName(const String& name)
+{
+    componentClassName_ = name;
+
+    if (assemblyFile_ && assemblyFile_->GetClassNames().Contains(name))
+    {
+        using namespace CSComponentClassChanged;
+        VariantMap eventData;
+        eventData[P_CSCOMPONENT] = this;
+        eventData[P_CLASSNAME] = name;
+        SendEvent(E_CSCOMPONENTCLASSCHANGED, eventData);
+    }
+}
+
+void CSComponent::OnNodeSet(Node* node)
+{
+    if (node)
+    {
+        //UpdateReferences();
+    }
+    else
+    {
+        // We are being detached from a node: execute user-defined stop function and prepare for destruction
+        //UpdateReferences(true);
+        //Stop();
+    }
+}
+
+void CSComponent::OnSceneSet(Scene* scene)
+{
+}
+
+bool CSComponent::Load(Deserializer& source, bool setInstanceDefault)
+{
+    bool success = Component::Load(source, setInstanceDefault);
+    return success;
+}
+
+bool CSComponent::LoadXML(const XMLElement& source, bool setInstanceDefault)
+{
+    bool success = Component::LoadXML(source, setInstanceDefault);
+    return success;
+}
+
+void CSComponent::SetAssemblyFile(CSComponentAssembly* assemblyFile)
+{
+    assemblyFile_ = assemblyFile;
+}
+
+ResourceRef CSComponent::GetAssemblyFileAttr() const
+{
+    return GetResourceRef(assemblyFile_, CSComponentAssembly::GetTypeStatic());
+}
+
+void CSComponent::SetAssemblyFileAttr(const ResourceRef& value)
+{
+    ResourceCache* cache = GetSubsystem<ResourceCache>();
+    SetAssemblyFile(cache->GetResource<CSComponentAssembly>(value.name_));
+}
+
+
+}

+ 103 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSComponent.h

@@ -0,0 +1,103 @@
+//
+// Copyright (c) 2008-2014 the Urho3D project.
+// 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/Script/ScriptComponent.h>
+
+#include "CSComponentAssembly.h"
+
+namespace Atomic
+{
+
+enum CSComponentMethod
+{
+    CSComponentMethod_Start,
+    CSComponentMethod_DelayedStart,
+    CSComponentMethod_Update,
+    CSComponentMethod_PostUpdate,
+    CSComponentMethod_FixedUpdate,
+    CSComponentMethod_PostFixedUpdate
+};
+
+/// Helper base class for user-defined game logic components that hooks up to update events and forwards them to virtual functions similar to ScriptInstance class.
+class ATOMIC_API CSComponent : public ScriptComponent
+{
+    friend class CSComponentFactory;
+
+    enum EventFlags
+    {
+        USE_UPDATE = 0x1,
+        USE_POSTUPDATE = 0x2,
+        USE_FIXEDUPDATE = 0x4,
+        USE_FIXEDPOSTUPDATE = 0x8
+    };
+
+    OBJECT(CSComponent);
+    BASEOBJECT(ScriptComponent);
+
+public:
+
+    /// Construct.
+    CSComponent(Context* context);
+    /// Destruct.
+    virtual ~CSComponent();
+
+    /// Register object factory.
+    static void RegisterObject(Context* context);
+
+    bool Load(Deserializer& source, bool setInstanceDefault);
+    bool LoadXML(const XMLElement& source, bool setInstanceDefault);
+    void ApplyAttributes();
+
+    /// Handle enabled/disabled state change. Changes update event subscription.
+    virtual void OnSetEnabled();
+
+    void ApplyFieldValues();
+    VariantMap& GetFieldValues() { return fieldValues_; }
+
+    void SetComponentClassName(const String& name);
+    const String& GetComponentClassName() const { return componentClassName_; }
+
+    virtual ScriptComponentFile* GetComponentFile() { return assemblyFile_; }
+
+    CSComponentAssembly* GetAssemblyFile() { return assemblyFile_; }
+    void SetAssemblyFile(CSComponentAssembly* assemblyFile);
+
+    ResourceRef GetAssemblyFileAttr() const;
+    void SetAssemblyFileAttr(const ResourceRef& value);
+
+protected:
+    /// Handle scene node being assigned at creation.
+    virtual void OnNodeSet(Node* node);
+    /// Handle scene being assigned.
+    virtual void OnSceneSet(Scene* scene);
+
+private:
+
+    String componentClassName_;
+    SharedPtr<CSComponentAssembly> assemblyFile_;
+
+};
+
+}

+ 248 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSComponentAssembly.cpp

@@ -0,0 +1,248 @@
+//
+// 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/IO/FileSystem.h>
+#include <Atomic/Core/Profiler.h>
+#include <Atomic/Resource/ResourceCache.h>
+#include <Atomic/IO/Serializer.h>
+
+#include "CSManaged.h"
+#include "CSComponentAssembly.h"
+
+namespace Atomic
+{
+
+HashMap<StringHash, VariantType> CSComponentAssembly::typeMap_;
+
+CSComponentAssembly::CSComponentAssembly(Context* context) :
+    ScriptComponentFile(context)
+{
+
+}
+
+CSComponentAssembly::~CSComponentAssembly()
+{
+
+}
+
+void CSComponentAssembly::InitTypeMap()
+{
+    typeMap_["Boolean"] = VAR_BOOL;
+    typeMap_["Int32"] = VAR_INT;
+    typeMap_["Single"] = VAR_FLOAT;
+    typeMap_["Double"] = VAR_DOUBLE;
+    typeMap_["String"] = VAR_STRING;
+    typeMap_["Vector2"] = VAR_VECTOR2;
+    typeMap_["Vector3"] = VAR_VECTOR3;
+    typeMap_["Vector4"] = VAR_VECTOR4;
+    typeMap_["Quaternion"] = VAR_QUATERNION;
+
+}
+
+CSComponent* CSComponentAssembly::CreateCSComponent(const String& classname)
+{
+    const String& name = GetName();
+
+    // TODO: cache this
+    String pathName, fileName, ext;
+    SplitPath(name, pathName, fileName, ext);
+
+    CSManaged* managed = GetSubsystem<CSManaged>();
+
+    return managed->CSComponentCreate(fileName, classname);
+}
+
+bool CSComponentAssembly::ParseComponentClassJSON(const JSONValue& json)
+{
+    if (!typeMap_.Size())
+        InitTypeMap();
+
+    String className = json.Get("name").GetString();
+
+    classNames_.Push(className);
+
+    const JSONValue& jfields = json.Get("fields");
+
+    PODVector<StringHash> enumsAdded;
+
+    if (jfields.IsArray())
+    {
+        for (unsigned i = 0; i < jfields.GetArray().Size(); i++)
+        {
+            const JSONValue& jfield = jfields.GetArray().At(i);
+
+            VariantType varType = VAR_NONE;
+
+            bool isEnum = jfield.Get("isEnum").GetBool();
+            String typeName = jfield.Get("typeName").GetString();
+            String fieldName = jfield.Get("name").GetString();
+            String defaultValue = jfield.Get("defaultValue").GetString();
+
+            if (!defaultValue.Length())
+            {
+                JSONArray caPos = jfield.Get("caPos").GetArray();
+                if (caPos.Size())
+                    defaultValue = caPos[0].GetString();
+            }
+
+            if (!defaultValue.Length())
+            {
+                JSONObject caNamed = jfield.Get("caNamed").GetObject();
+                if (caNamed.Contains("DefaultValue"))
+                    defaultValue = caNamed["DefaultValue"].GetString();
+            }
+
+            if (isEnum && assemblyEnums_.Contains(typeName) && !enumsAdded.Contains(fieldName))
+            {
+                varType = VAR_INT;
+                enumsAdded.Push(fieldName);
+                const Vector<EnumInfo>& einfos = assemblyEnums_[typeName];
+                for (unsigned i = 0; i < einfos.Size(); i++)
+                    AddEnum(/*typeName*/fieldName, einfos[i], className);
+            }
+
+            if (varType == VAR_NONE && typeMap_.Contains(typeName))
+                varType = typeMap_[typeName];
+
+            if (varType == VAR_NONE)
+            {
+                // FIXME: We need to be able to test if a type is a ResourceRef, this isn't really the way to achieve that
+                const HashMap<StringHash, SharedPtr<ObjectFactory>>& factories = context_->GetObjectFactories();
+                HashMap<StringHash, SharedPtr<ObjectFactory>>::ConstIterator itr = factories.Begin();
+
+                while (itr != factories.End())
+                {
+                    if ( itr->second_->GetTypeName() == typeName)
+                    {
+                        varType = VAR_RESOURCEREF;
+                        break;
+                    }
+
+                    itr++;
+                }
+
+                if (varType == VAR_NONE)
+                {
+                    LOGERRORF("Component Class %s contains unmappable type %s in field %s",
+                          className.CString(), typeName.CString(), fieldName.CString());
+
+                    continue;
+                }
+
+            }
+
+            if (!defaultValue.Length() && varType == VAR_RESOURCEREF)
+            {
+                // We still need a default value for ResourceRef's so we know the classtype
+                AddDefaultValue(fieldName, ResourceRef(typeName), className);
+            }
+            else
+            {
+                Variant value;
+
+                if (varType == VAR_RESOURCEREF)
+                {
+                    ResourceRef rref(typeName);
+                    rref.name_ = defaultValue;
+                    value = rref;
+                }
+                else
+                {
+                    value.FromString(varType, defaultValue);
+                }
+
+                AddDefaultValue(fieldName, value, className);
+            }
+
+            AddField(fieldName, varType, className);
+
+        }
+
+    }
+
+    return true;
+}
+
+bool CSComponentAssembly::ParseAssemblyJSON(const JSONValue& json)
+{
+    Clear();
+    assemblyEnums_.Clear();
+    classNames_.Clear();
+
+    const JSONArray& enums = json.Get("enums").GetArray();
+
+    // parse to all enums hash
+    for (unsigned i = 0; i < enums.Size(); i++)
+    {
+        const JSONValue& ejson = enums.At(i);
+
+        String enumName = ejson.Get("name").GetString();
+
+        const JSONObject& evalues = ejson.Get("values").GetObject();
+
+        JSONObject::ConstIterator itr = evalues.Begin();
+
+        Vector<EnumInfo> values;
+
+        while(itr != evalues.End())
+        {
+            EnumInfo info;
+            info.name_ = itr->first_;
+            info.value_ = itr->second_.GetInt();
+            values.Push(info);
+            itr++;
+        }
+
+        assemblyEnums_[enumName] = values;
+    }
+
+    const JSONArray& components = json.Get("components").GetArray();
+
+    for (unsigned i = 0; i < components.Size(); i++)
+    {
+        const JSONValue& cjson = components.At(i);
+
+        ParseComponentClassJSON(cjson);
+    }
+
+    return true;
+}
+
+void CSComponentAssembly::RegisterObject(Context* context)
+{
+    context->RegisterFactory<CSComponentAssembly>();
+}
+
+bool CSComponentAssembly::BeginLoad(Deserializer& source)
+{
+    return true;
+}
+
+bool CSComponentAssembly::Save(Serializer& dest) const
+{
+    return true;
+}
+
+}

+ 81 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSComponentAssembly.h

@@ -0,0 +1,81 @@
+//
+// 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/Resource/JSONValue.h>
+#include <Atomic/Container/ArrayPtr.h>
+#include <Atomic/Container/List.h>
+
+#include <Atomic/Script/ScriptComponentFile.h>
+
+namespace Atomic
+{
+
+class CSComponent;
+class NETVariantMap;
+
+// At runtime we need to load the assembly, in the editor we use metadata
+/// NET Assembly resource.
+class ATOMIC_API CSComponentAssembly : public ScriptComponentFile
+{
+    OBJECT(CSComponentAssembly);
+    BASEOBJECT(CSComponentAssembly);
+
+public:
+
+    /// Construct.
+    CSComponentAssembly(Context* context);
+    /// Destruct.
+    virtual ~CSComponentAssembly();
+
+    bool ParseAssemblyJSON(const JSONValue& json);
+
+    CSComponent* CreateCSComponent(const String& classname);
+
+    /// 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);
+
+    /// Only valid in editor, as we don't inspect assembly at runtime
+    const Vector<String>& GetClassNames() { return classNames_; }
+
+private:
+
+    static void InitTypeMap();
+
+    bool ParseComponentClassJSON(const JSONValue& json);
+
+    // only valid in editor
+    Vector<String> classNames_;
+
+    HashMap<String, Vector<EnumInfo>> assemblyEnums_;
+    static HashMap<StringHash, VariantType> typeMap_;
+
+};
+
+}

+ 0 - 0
Source/AtomicNET/NETScript/CSEventHelper.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSEventHelper.cpp


+ 0 - 0
Source/AtomicNET/NETScript/CSEventHelper.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSEventHelper.h


+ 0 - 0
Source/AtomicNET/NETScript/CSManaged.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSManaged.cpp


+ 0 - 0
Source/AtomicNET/NETScript/CSManaged.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSManaged.h


+ 0 - 0
Source/AtomicNET/NETScript/CSScriptObject.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSScriptObject.cpp


+ 0 - 0
Source/AtomicNET/NETScript/CSScriptObject.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/CSScriptObject.h


+ 113 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/NETScript.cpp

@@ -0,0 +1,113 @@
+
+#include "../NETCore/NETCore.h"
+
+#include "CSComponent.h"
+#include "CSComponentAssembly.h"
+#include "CSManaged.h"
+#include "NETScript.h"
+
+namespace Atomic
+{
+
+void RegisterNETScriptLibrary(Context* context);
+
+NETScript::NETScript(Context* context) :
+    Object(context)
+{
+    // NETScript subsystem should not be instantiated in editor context
+    assert(!context->GetEditorContext());
+
+    netCore_ = GetSubsystem<NETCore>();
+
+    assert(netCore_.NotNull());
+}
+
+NETScript::~NETScript()
+{
+    //context_->RemoveGlobalEventListener(context_->GetSubsystem<CSEventDispatcher>());
+    //context_->RemoveSubsystem(CSEventDispatcher::GetTypeStatic());
+
+    context_->RemoveSubsystem(CSManaged::GetTypeStatic());
+
+}
+
+bool NETScript::ExecMainAssembly()
+{
+    typedef void (*StartFunction)();
+    StartFunction start;
+
+    bool result = netCore_->CreateDelegate(
+                "AtomicNETEngine",
+                "AtomicEngine.Atomic",
+                "Start",
+                (void**) &start);
+
+    if (!result)
+        return false;
+
+    if (result)
+    {
+        start();
+
+        // Load Project Assemblies
+
+        typedef void (*ExecMainAssemblyFunction)();
+        ExecMainAssemblyFunction execMainAssembly;
+
+        result = netCore_->CreateDelegate(
+                    "AtomicNETEngine",
+                    "AtomicEngine.Atomic",
+                    "ExecMainAssembly",
+                    (void**) &execMainAssembly);
+
+        if (!result)
+            return false;
+
+        execMainAssembly();
+
+    }
+
+    return true;
+
+}
+
+bool NETScript::Initialize()
+{
+    // MOVE THIS!
+    typedef void (*InitializeFunction)();
+    InitializeFunction init;
+
+    bool result = netCore_->CreateDelegate(
+                "AtomicNETEngine",
+                "AtomicEngine.Atomic",
+                "Initialize",
+                (void**) &init);
+
+    if (!result)
+        return false;
+
+    init();
+
+    csManaged_ = new CSManaged(context_);
+    context_->RegisterSubsystem(csManaged_);
+
+    //SharedPtr<CSEventDispatcher> dispatcher(new CSEventDispatcher(context_));
+    //context_->RegisterSubsystem(dispatcher);
+    //context_->AddGlobalEventListener(dispatcher);
+
+    //if (!context_->GetEditorContext())
+    //{
+    //SubscribeToEvent(E_UPDATE, HANDLER(NETCore, HandleUpdate));
+    //}
+
+    return csManaged_->Initialize();
+
+}
+
+void RegisterNETScriptLibrary(Context* context)
+{
+    CSComponentAssembly::RegisterObject(context);
+    CSComponent::RegisterObject(context);
+}
+
+}

+ 36 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/NETScript.h

@@ -0,0 +1,36 @@
+#pragma once
+
+#include <Atomic/Core/Context.h>
+#include <Atomic/Core/Object.h>
+
+namespace Atomic
+{
+
+class NETCore;
+class CSManaged;
+
+class ATOMIC_API NETScript : public Object
+{
+
+    OBJECT(NETScript);
+
+public:
+    /// Construct.
+    NETScript(Context* context);
+    /// Destruct.
+    virtual ~NETScript();
+
+    bool Initialize();
+
+    bool ExecMainAssembly();
+
+private:
+
+    WeakPtr<NETCore> netCore_;
+    WeakPtr<CSManaged> csManaged_;
+
+};
+
+void RegisterNETScriptLibrary(Context* context);
+
+}

+ 37 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/AtomicNET/NETScript/NETScriptEvents.h

@@ -0,0 +1,37 @@
+//
+// 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/Core/Object.h>
+
+namespace Atomic
+{
+
+/// Frame begin event.
+EVENT(E_CSCOMPONENTCLASSCHANGED, CSComponentClassChanged)
+{
+    PARAM(P_CSCOMPONENT, CSComponent);      // CSComponent Ptr
+    PARAM(P_CLASSNAME, Classname);          // String
+}
+
+}

+ 128 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/Assets/NETAssemblyImporter.cpp

@@ -0,0 +1,128 @@
+//
+// Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
+//
+// 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/IO/Log.h>
+#include <Atomic/IO/File.h>
+#include <Atomic/Resource/ResourceCache.h>
+#include <Atomic/Resource/Image.h>
+
+#include <AtomicNET/NETScript/CSComponentAssembly.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>();
+
+    assemblyJSON_.SetType(JSON_NULL);
+
+    if (tools->InspectAssembly(asset_->GetPath(), assemblyJSON_))
+    {
+        if (!assemblyJSON_.IsObject())
+        {
+            assemblyJSON_.SetType(JSON_NULL);
+        }
+        else
+        {
+            ResourceCache* cache = GetSubsystem<ResourceCache>();
+            CSComponentAssembly* assemblyFile = cache->GetResource<CSComponentAssembly>(asset_->GetPath());
+            if (assemblyFile)
+                assemblyFile->ParseAssemblyJSON(assemblyJSON_);
+        }
+
+    }
+
+    return true;
+}
+
+bool NETAssemblyImporter::LoadSettingsInternal(JSONValue& jsonRoot)
+{
+    if (!AssetImporter::LoadSettingsInternal(jsonRoot))
+        return false;
+
+    JSONValue import = jsonRoot.Get("NETAssemblyImporter");
+
+    assemblyJSON_.SetType(JSON_NULL);
+
+    const JSONValue& ajson = import.Get("AssemblyJSON");
+
+    if (ajson.IsObject())
+    {
+        assemblyJSON_ = ajson.GetObject();
+
+        ResourceCache* cache = GetSubsystem<ResourceCache>();
+        CSComponentAssembly* assemblyFile = cache->GetResource<CSComponentAssembly>(asset_->GetPath());
+        if (assemblyFile)
+            assemblyFile->ParseAssemblyJSON(assemblyJSON_);
+    }
+
+    return true;
+}
+
+bool NETAssemblyImporter::SaveSettingsInternal(JSONValue& jsonRoot)
+{
+    if (!AssetImporter::SaveSettingsInternal(jsonRoot))
+        return false;
+
+    JSONValue import;
+    import.SetType(JSON_OBJECT);
+    import.Set("AssemblyJSON", assemblyJSON_);
+    jsonRoot.Set("NETAssemblyImporter", import);
+
+    return true;
+}
+
+Resource* NETAssemblyImporter::GetResource(const String& typeName)
+{
+    ResourceCache* cache = GetSubsystem<ResourceCache>();
+
+    CSComponentAssembly* assemblyFile = cache->GetResource<CSComponentAssembly>(asset_->GetPath());
+
+    return assemblyFile;
+
+}
+
+
+
+}

+ 54 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/Assets/NETAssemblyImporter.h

@@ -0,0 +1,54 @@
+//
+// Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
+//
+// 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 "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);
+
+    JSONValue assemblyJSON_;
+
+};
+
+}

+ 0 - 0
Source/ToolCore/Command/NETProjectGenCmd.cpp → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/Command/NETProjectGenCmd.cpp


+ 0 - 0
Source/ToolCore/Command/NETProjectGenCmd.h → Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/Command/NETProjectGenCmd.h


+ 531 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/NETTools/NETProjectGen.cpp

@@ -0,0 +1,531 @@
+//
+// Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
+//
+// 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 <Poco/UUID.h>
+#include <Poco/UUIDGenerator.h>
+
+#include <Atomic/IO/Log.h>
+#include <Atomic/IO/File.h>
+#include <Atomic/IO/FileSystem.h>
+
+#include "../ToolEnvironment.h"
+#include "../ToolSystem.h"
+#include "../Project/Project.h"
+#include "NETProjectGen.h"
+
+namespace ToolCore
+{
+
+NETProjectBase::NETProjectBase(Context* context, NETProjectGen* projectGen):
+    Object(context), xmlFile_(new XMLFile(context)), projectGen_(projectGen)
+{
+
+}
+
+NETProjectBase::~NETProjectBase()
+{
+
+}
+
+void NETProjectBase::ReplacePathStrings(String& path)
+{
+    ToolEnvironment* tenv = GetSubsystem<ToolEnvironment>();
+    ToolSystem* tsys = GetSubsystem<ToolSystem>();
+
+    const String& atomicRoot = tenv->GetRootSourceDir();
+    const String& scriptPlatform = projectGen_->GetScriptPlatform();
+
+    path.Replace("$ATOMIC_ROOT$", atomicRoot, false);
+    path.Replace("$SCRIPT_PLATFORM$", scriptPlatform, false);
+
+    Project* project = tsys->GetProject();
+    if (project)
+    {
+        path.Replace("$PROJECT_ROOT$", project->GetProjectPath(), false);
+    }
+
+}
+
+NETCSProject::NETCSProject(Context* context, NETProjectGen* projectGen) : NETProjectBase(context, projectGen)
+{
+
+}
+
+NETCSProject::~NETCSProject()
+{
+
+}
+
+void NETCSProject::CreateCompileItemGroup(XMLElement &projectRoot)
+{
+    FileSystem* fs = GetSubsystem<FileSystem>();
+
+    XMLElement igroup = projectRoot.CreateChild("ItemGroup");
+
+    for (unsigned i = 0; i < sourceFolders_.Size(); i++)
+    {
+        const String& sourceFolder = sourceFolders_[i];
+
+        Vector<String> result;
+        fs->ScanDir(result, sourceFolder, "*.cs", SCAN_FILES, true);
+
+        for (unsigned j = 0; j < result.Size(); j++)
+        {
+            XMLElement compile = igroup.CreateChild("Compile");
+
+            compile.SetAttribute("Include", sourceFolder + result[j]);
+
+            // put generated files into generated folder
+            if (sourceFolder.Contains("Generated") && sourceFolder.Contains("CSharp") && sourceFolder.Contains("Packages") )
+            {
+                compile.CreateChild("Link").SetValue("Generated\\" + result[j]);
+            }
+
+        }
+
+    }
+
+}
+
+void NETCSProject::CreateReferencesItemGroup(XMLElement &projectRoot)
+{
+    ToolEnvironment* tenv = GetSubsystem<ToolEnvironment>();
+    FileSystem* fs = GetSubsystem<FileSystem>();
+
+    const String& coreCLRAbsPath = tenv->GetNETCoreCLRAbsPath();
+
+    XMLElement igroup = projectRoot.CreateChild("ItemGroup");
+
+    XMLElement mscorlibref = igroup.CreateChild("Reference");
+    mscorlibref.SetAttribute("Include", "mscorlib");
+    mscorlibref.CreateChild("HintPath").SetValue(coreCLRAbsPath + "mscorlib.dll");
+    mscorlibref.CreateChild("Private").SetValue("False");
+
+    for (unsigned i = 0; i < references_.Size(); i++)
+    {
+        String ref = references_[i];
+        String refpath = ref + ".dll";
+
+        // we explicitly add mscorlib
+        if (ref == "mscorlib")
+            continue;
+
+        XMLElement xref = igroup.CreateChild("Reference");
+        xref.SetAttribute("Include", ref);
+
+        // if we're a coreclr assembly, qualify it
+        if (fs->FileExists(coreCLRAbsPath + refpath))
+        {
+            refpath = coreCLRAbsPath + refpath;
+        }
+
+        xref.CreateChild("HintPath").SetValue(refpath);
+        xref.CreateChild("Private").SetValue("False");
+
+    }
+}
+
+void NETCSProject::GetAssemblySearchPaths(String& paths)
+{
+    paths.Clear();
+
+    ToolEnvironment* tenv = GetSubsystem<ToolEnvironment>();
+    const String& coreCLRAbsPath = tenv->GetNETCoreCLRAbsPath();
+
+    Vector<String> searchPaths;
+    searchPaths.Push(coreCLRAbsPath);
+
+    if (assemblySearchPaths_.Length())
+        searchPaths.Push(assemblySearchPaths_);
+
+    paths.Join(searchPaths, ";");
+}
+
+void NETCSProject::CreateReleasePropertyGroup(XMLElement &projectRoot)
+{
+    XMLElement pgroup = projectRoot.CreateChild("PropertyGroup");
+    pgroup.SetAttribute("Condition", " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ");
+
+    pgroup.CreateChild("DebugType").SetValue("full");
+    pgroup.CreateChild("Optimize").SetValue("true");
+    pgroup.CreateChild("OutputPath").SetValue(assemblyOutputPath_);
+    pgroup.CreateChild("ErrorReport").SetValue("prompt");
+    pgroup.CreateChild("WarningLevel").SetValue("4");
+    pgroup.CreateChild("ConsolePause").SetValue("false");
+    pgroup.CreateChild("AllowUnsafeBlocks").SetValue("true");
+    pgroup.CreateChild("NoStdLib").SetValue("true");
+    pgroup.CreateChild("NoConfig").SetValue("true");
+    pgroup.CreateChild("NoCompilerStandardLib").SetValue("true");
+
+    String assemblySearchPaths;
+    GetAssemblySearchPaths(assemblySearchPaths);
+    pgroup.CreateChild("AssemblySearchPaths").SetValue(assemblySearchPaths);
+
+    ToolEnvironment* tenv = GetSubsystem<ToolEnvironment>();
+    const String& editorBinary = tenv->GetEditorBinary();
+
+    if (!projectGen_->GetGameBuild())
+    {
+        XMLElement command = pgroup.CreateChild("CustomCommands").CreateChild("CustomCommands").CreateChild("Command");
+        command.SetAttribute("type", "Execute");
+        command.SetAttribute("command", editorBinary.CString());
+    }
+}
+
+void NETCSProject::CreateDebugPropertyGroup(XMLElement &projectRoot)
+{
+    XMLElement pgroup = projectRoot.CreateChild("PropertyGroup");
+    pgroup.SetAttribute("Condition", " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ");
+
+    pgroup.CreateChild("DebugSymbols").SetValue("true");
+    pgroup.CreateChild("DebugType").SetValue("full");
+    pgroup.CreateChild("Optimize").SetValue("false");
+    pgroup.CreateChild("OutputPath").SetValue(assemblyOutputPath_);
+    pgroup.CreateChild("DefineConstants").SetValue("DEBUG;");
+    pgroup.CreateChild("ErrorReport").SetValue("prompt");
+    pgroup.CreateChild("WarningLevel").SetValue("4");
+    pgroup.CreateChild("ConsolePause").SetValue("false");
+    pgroup.CreateChild("AllowUnsafeBlocks").SetValue("true");
+    pgroup.CreateChild("NoStdLib").SetValue("true");
+    pgroup.CreateChild("NoConfig").SetValue("true");
+    pgroup.CreateChild("NoCompilerStandardLib").SetValue("true");
+
+    String assemblySearchPaths;
+    GetAssemblySearchPaths(assemblySearchPaths);
+    pgroup.CreateChild("AssemblySearchPaths").SetValue(assemblySearchPaths);
+
+    ToolEnvironment* tenv = GetSubsystem<ToolEnvironment>();
+    const String& editorBinary = tenv->GetEditorBinary();
+
+    if (!projectGen_->GetGameBuild())
+    {
+        XMLElement command = pgroup.CreateChild("CustomCommands").CreateChild("CustomCommands").CreateChild("Command");
+        command.SetAttribute("type", "Execute");
+        command.SetAttribute("command", editorBinary.CString());
+    }
+
+}
+
+void NETCSProject::CreateMainPropertyGroup(XMLElement& projectRoot)
+{
+    XMLElement pgroup = projectRoot.CreateChild("PropertyGroup");
+
+    // Configuration
+    XMLElement config = pgroup.CreateChild("Configuration");
+    config.SetAttribute("Condition", " '$(Configuration)' == '' ");
+    config.SetValue("Debug");
+
+    // Platform
+    XMLElement platform = pgroup.CreateChild("Platform");
+    platform.SetAttribute("Condition", " '$(Platform)' == '' ");
+    platform.SetValue("AnyCPU");
+
+    // ProjectGuid
+    XMLElement guid = pgroup.CreateChild("ProjectGuid");
+    guid.SetValue(projectGuid_);
+
+    // OutputType
+    XMLElement outputType = pgroup.CreateChild("OutputType");
+    outputType.SetValue(outputType_);
+
+    // RootNamespace
+    XMLElement rootNamespace = pgroup.CreateChild("RootNamespace");
+    rootNamespace.SetValue(rootNamespace_);
+
+    // AssemblyName
+    XMLElement assemblyName = pgroup.CreateChild("AssemblyName");
+    assemblyName.SetValue(assemblyName_);
+
+    // TargetFrameworkVersion
+    XMLElement targetFrameWork = pgroup.CreateChild("TargetFrameworkVersion");
+    targetFrameWork.SetValue("4.5");
+
+}
+
+bool NETCSProject::Generate()
+{
+    XMLElement project = xmlFile_->CreateRoot("Project");
+
+    project.SetAttribute("DefaultTargets", "Build");
+    project.SetAttribute("ToolsVersion", "4.0");
+    project.SetAttribute("xmlns", "http://schemas.microsoft.com/developer/msbuild/2003");
+
+    CreateMainPropertyGroup(project);
+    CreateDebugPropertyGroup(project);
+    CreateReleasePropertyGroup(project);
+    CreateReferencesItemGroup(project);
+    CreateCompileItemGroup(project);
+
+    project.CreateChild("Import").SetAttribute("Project", "$(MSBuildBinPath)\\Microsoft.CSharp.targets");
+
+    // on msbuild this seems to stop referencing of framework assemblies
+    project.CreateChild("Target").SetAttribute("Name", "GetReferenceAssemblyPaths");
+    project.CreateChild("Target").SetAttribute("Name", "GetFrameworkPaths");
+
+    String projectSource = xmlFile_->ToString();
+
+    NETSolution* solution = projectGen_->GetSolution();
+
+    String projectPath = solution->GetOutputPath() + name_ + ".csproj";
+
+    SharedPtr<File> output(new File(context_, projectPath, FILE_WRITE));
+    output->Write(projectSource.CString(), projectSource.Length());
+
+    return true;
+}
+
+bool NETCSProject::Load(const JSONValue& root)
+{
+    bool gameBuild = projectGen_->GetGameBuild();
+
+    name_ = root["name"].GetString();
+
+    projectGuid_ = projectGen_->GenerateUUID();
+
+    if (gameBuild)
+        outputType_ = "Library";
+    else
+        outputType_ = root["outputType"].GetString();
+
+    rootNamespace_ = root["rootNamespace"].GetString();
+    assemblyName_ = root["assemblyName"].GetString();
+    assemblyOutputPath_ = root["assemblyOutputPath"].GetString();
+    ReplacePathStrings(assemblyOutputPath_);
+
+    assemblySearchPaths_ = root["assemblySearchPaths"].GetString();
+
+    if (gameBuild)
+    {
+        ToolEnvironment* tenv = GetSubsystem<ToolEnvironment>();
+        const String& engineAssemblyPath = tenv->GetAtomicNETEngineAssemblyPath();
+        if (assemblySearchPaths_.Length())
+        {
+            assemblySearchPaths_ += ";";
+            assemblySearchPaths_ += engineAssemblyPath;
+        }
+        else
+        {
+            assemblySearchPaths_ = engineAssemblyPath;
+        }
+
+    }
+
+    ReplacePathStrings(assemblySearchPaths_);
+
+    const JSONArray& references = root["references"].GetArray();
+
+    for (unsigned i = 0; i < references.Size(); i++)
+    {
+        String reference = references[i].GetString();
+        ReplacePathStrings(reference);
+        references_.Push(reference);
+    }
+
+    if (gameBuild)
+    {
+        references_.Push("AtomicNETEngine");
+    }
+
+    // msvc doesn't like including these
+    if (projectGen_->GetMonoBuild())
+    {
+        references_.Push("System.Console");
+        references_.Push("System.IO");
+        references_.Push("System.IO.FileSystem");
+    }
+
+    const JSONArray& sources = root["sources"].GetArray();
+
+    for (unsigned i = 0; i < sources.Size(); i++)
+    {
+        String source = sources[i].GetString();
+        ReplacePathStrings(source);
+        sourceFolders_.Push(AddTrailingSlash(source));
+    }
+
+    return true;
+}
+
+NETSolution::NETSolution(Context* context, NETProjectGen* projectGen) : NETProjectBase(context, projectGen)
+{
+
+}
+
+NETSolution::~NETSolution()
+{
+
+}
+
+bool NETSolution::Generate()
+{
+
+    String slnPath = outputPath_ + name_ + ".sln";
+
+    GenerateXamarinStudio(slnPath);
+
+    return true;
+}
+
+void NETSolution::GenerateXamarinStudio(const String &slnPath)
+{
+    String source = "Microsoft Visual Studio Solution File, Format Version 12.00\n";
+    source += "# Visual Studio 2012\n";
+
+    const Vector<SharedPtr<NETCSProject>>& projects = projectGen_->GetCSProjects();
+    for (unsigned i = 0; i < projects.Size(); i++)
+    {
+        NETCSProject* p = projects.At(i);
+
+        source += ToString("Project(\"{%s}\") = \"%s\", \"%s.csproj\", \"{%s}\"\n",
+                           p->GetProjectGUID().CString(), p->GetName().CString(), p->GetName().CString(),
+                           p->GetProjectGUID().CString());
+
+        source += "EndProject\n";
+    }
+
+    source += "Global\n";
+    source += "    GlobalSection(SolutionConfigurationPlatforms) = preSolution\n";
+    source += "        Debug|Any CPU = Debug|Any CPU\n";
+    source += "        Release|Any CPU = Release|Any CPU\n";
+    source += "    EndGlobalSection\n";
+    source += "    GlobalSection(ProjectConfigurationPlatforms) = postSolution\n";
+
+    for (unsigned i = 0; i < projects.Size(); i++)
+    {
+        NETCSProject* p = projects.At(i);
+
+        source += ToString("        {%s}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n",  p->GetProjectGUID().CString());
+        source += ToString("        {%s}.Debug|Any CPU.Build.0 = Debug|Any CPU\n",  p->GetProjectGUID().CString());
+        source += ToString("        {%s}.Release|Any CPU.ActiveCfg = Release|Any CPU\n",  p->GetProjectGUID().CString());
+        source += ToString("        {%s}.Release|Any CPU.Build.0 = Release|Any CPU\n",  p->GetProjectGUID().CString());
+    }
+
+    source += "    EndGlobalSection\n";
+
+    source += "EndGlobal\n";
+
+    SharedPtr<File> output(new File(context_, slnPath, FILE_WRITE));
+    output->Write(source.CString(), source.Length());
+    output->Close();
+}
+
+bool NETSolution::Load(const JSONValue& root)
+{
+    FileSystem* fs = GetSubsystem<FileSystem>();
+
+    name_ = root["name"].GetString();
+
+    outputPath_ = AddTrailingSlash(root["outputPath"].GetString());
+    ReplacePathStrings(outputPath_);
+
+    // TODO: use poco mkdirs
+    if (!fs->DirExists(outputPath_))
+        fs->CreateDir(outputPath_);
+
+    return true;
+}
+
+NETProjectGen::NETProjectGen(Context* context) : Object(context),
+    monoBuild_(false), gameBuild_(false)
+{
+
+#ifndef ATOMIC_PLATFORM_WINDOWS
+    monoBuild_ = true;
+#endif
+
+}
+
+NETProjectGen::~NETProjectGen()
+{
+
+}
+
+bool NETProjectGen::Generate()
+{
+    solution_->Generate();
+
+    for (unsigned i = 0; i < projects_.Size(); i++)
+    {
+        if (!projects_[i]->Generate())
+            return false;
+    }
+    return true;
+}
+
+bool NETProjectGen::LoadProject(const JSONValue &root, bool gameBuild)
+{
+
+    gameBuild_ = gameBuild;
+    solution_ = new NETSolution(context_, this);
+
+    solution_->Load(root["solution"]);
+
+    const JSONValue& jprojects = root["projects"];
+
+    if (!jprojects.IsArray() || ! jprojects.Size())
+        return false;
+
+    for (unsigned i = 0; i < jprojects.Size(); i++)
+    {
+        const JSONValue& jproject = jprojects[i];
+
+        if (!jproject.IsObject())
+            return false;
+
+        SharedPtr<NETCSProject> csProject(new NETCSProject(context_, this));
+
+        if (!csProject->Load(jproject))
+            return false;
+
+        projects_.Push(csProject);
+
+    }
+
+    return true;
+}
+
+bool NETProjectGen::LoadProject(const String& projectPath, bool gameBuild)
+{
+    SharedPtr<File> file(new File(context_));
+
+    if (!file->Open(projectPath))
+        return false;
+
+    String json;
+    file->ReadText(json);
+
+    JSONValue jvalue;
+
+    if (!JSONFile::ParseJSON(json, jvalue))
+        return false;
+
+    return LoadProject(jvalue, gameBuild);
+}
+
+String NETProjectGen::GenerateUUID()
+{
+    Poco::UUIDGenerator& generator = Poco::UUIDGenerator::defaultGenerator();
+    Poco::UUID uuid(generator.create()); // time based
+    return String(uuid.toString().c_str()).ToUpper();
+}
+
+}

+ 157 - 0
Attic/AtomicNETPrototypes/AtomicNETProto2/Source/ToolCore/NETTools/NETProjectGen.h

@@ -0,0 +1,157 @@
+//
+// Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
+//
+// 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/Core/Object.h>
+
+#include <Atomic/Resource/XMLFile.h>
+#include <Atomic/Resource/JSONFile.h>
+
+using namespace Atomic;
+
+namespace ToolCore
+{
+
+class NETProjectGen;
+
+class NETProjectBase : public Object
+{
+    OBJECT(NETProjectBase);
+
+public:
+
+    NETProjectBase(Context* context, NETProjectGen* projectGen);
+    virtual ~NETProjectBase();
+
+    void ReplacePathStrings(String& path);
+
+protected:
+
+    SharedPtr<XMLFile> xmlFile_;
+    WeakPtr<NETProjectGen> projectGen_;
+
+};
+
+class NETCSProject : public NETProjectBase
+{
+    OBJECT(NETCSProject);
+
+public:
+
+    NETCSProject(Context* context, NETProjectGen* projectGen);
+    virtual ~NETCSProject();
+
+    bool Load(const JSONValue& root);
+
+    const String& GetName() { return name_; }
+    const String& GetProjectGUID() { return projectGuid_; }
+
+    bool Generate();
+
+private:
+
+    void CreateCompileItemGroup(XMLElement &projectRoot);
+    void CreateReferencesItemGroup(XMLElement &projectRoot);
+    void CreateMainPropertyGroup(XMLElement &projectRoot);
+    void CreateDebugPropertyGroup(XMLElement &projectRoot);
+    void CreateReleasePropertyGroup(XMLElement &projectRoot);
+    void GetAssemblySearchPaths(String& paths);
+
+    String name_;
+    String projectGuid_;
+    String outputType_;
+    String rootNamespace_;
+    String assemblyName_;
+    String assemblyOutputPath_;
+    String assemblySearchPaths_;
+
+    XMLElement xmlRoot_;
+
+    Vector<String> references_;
+    Vector<String> sourceFolders_;
+};
+
+class NETSolution : public NETProjectBase
+{
+    OBJECT(NETSolution);
+
+public:
+
+    NETSolution(Context* context, NETProjectGen* projectGen);
+    virtual ~NETSolution();
+
+    bool Load(const JSONValue& root);
+
+    bool Generate();
+
+    const String& GetOutputPath() { return outputPath_; }
+
+private:
+
+    void GenerateXamarinStudio(const String& slnPath);
+
+    String name_;
+    String outputPath_;
+
+};
+
+class NETProjectGen : public Object
+{
+    OBJECT(NETProjectGen);
+
+public:
+
+    NETProjectGen(Context* context);
+    virtual ~NETProjectGen();
+
+    const String& GetScriptPlatform() { return scriptPlatform_; }
+
+    NETSolution* GetSolution() { return solution_; }
+
+    bool GetMonoBuild() { return monoBuild_; }
+    bool GetGameBuild() { return gameBuild_; }
+
+    const Vector<SharedPtr<NETCSProject>>& GetCSProjects() { return projects_; }
+
+    void SetScriptPlatform(const String& platform) { scriptPlatform_ = platform; }
+
+    bool Generate();
+
+    String GenerateUUID();
+
+    bool LoadProject(const JSONValue& root, bool gameBuild = false);
+    bool LoadProject(const String& projectPath, bool gameBuild = false);
+
+private:
+
+    String scriptPlatform_;
+
+    bool monoBuild_;
+    bool gameBuild_;
+
+    SharedPtr<NETSolution> solution_;
+    Vector<SharedPtr<NETCSProject>> projects_;
+
+};
+
+}

Some files were not shown because too many files changed in this diff