Przeglądaj źródła

Added runtime script compiling (untested)
Added build manager for handling platform specific information and publishing

Marko Pintera 11 lat temu
rodzic
commit
558bba0c05
34 zmienionych plików z 1364 dodań i 37 usunięć
  1. 6 0
      BansheeEditor/BansheeEditor.vcxproj
  2. 21 0
      BansheeEditor/BansheeEditor.vcxproj.filters
  3. 45 0
      BansheeEditor/Include/BsBuildDataRTTI.h
  4. 49 0
      BansheeEditor/Include/BsBuildManager.h
  5. 1 1
      BansheeEditor/Include/BsCodeEditor.h
  6. 3 2
      BansheeEditor/Include/BsEditorApplication.h
  7. 4 1
      BansheeEditor/Include/BsEditorPrerequisites.h
  8. 45 0
      BansheeEditor/Include/BsPlatformInfo.h
  9. 68 0
      BansheeEditor/Include/BsPlatformInfoRTTI.h
  10. 107 0
      BansheeEditor/Source/BsBuildManager.cpp
  11. 12 5
      BansheeEditor/Source/BsCodeEditor.cpp
  12. 14 9
      BansheeEditor/Source/BsEditorApplication.cpp
  13. 36 0
      BansheeEditor/Source/BsPlatformInfo.cpp
  14. 1 2
      BansheeEditor/Source/Win32/BsVSCodeEditor.cpp
  15. 11 1
      BansheeEngine/Include/BsApplication.h
  16. 18 4
      BansheeEngine/Source/BsApplication.cpp
  17. 19 3
      BansheeMono/Include/BsMonoManager.h
  18. 41 3
      BansheeMono/Source/BsMonoManager.cpp
  19. 1 1
      BansheeUtility/Source/BsFileSerializer.cpp
  20. 122 0
      MBansheeEditor/BuildManager.cs
  21. 52 0
      MBansheeEditor/EditorApplication.cs
  22. 2 0
      MBansheeEditor/MBansheeEditor.csproj
  23. 1 1
      MBansheeEditor/ProjectLibrary.cs
  24. 280 0
      MBansheeEditor/ScriptCompiler.cs
  25. 26 0
      SBansheeEditor/Include/BsScriptBuildManager.h
  26. 27 0
      SBansheeEditor/Include/BsScriptEditorApplication.h
  27. 49 0
      SBansheeEditor/Include/BsScriptPlatformInfo.h
  28. 6 0
      SBansheeEditor/SBansheeEditor.vcxproj
  29. 18 0
      SBansheeEditor/SBansheeEditor.vcxproj.filters
  30. 79 0
      SBansheeEditor/Source/BsScriptBuildManager.cpp
  31. 89 0
      SBansheeEditor/Source/BsScriptEditorApplication.cpp
  32. 90 0
      SBansheeEditor/Source/BsScriptPlatformInfo.cpp
  33. 6 2
      SBansheeEditor/Source/BsScriptProjectLibrary.cpp
  34. 15 2
      TODO.txt

+ 6 - 0
BansheeEditor/BansheeEditor.vcxproj

@@ -268,6 +268,8 @@
     <Text Include="ReadMe.txt" />
   </ItemGroup>
   <ItemGroup>
+    <ClInclude Include="Include\BsBuildDataRTTI.h" />
+    <ClInclude Include="Include\BsBuildManager.h" />
     <ClInclude Include="Include\BsCmdEditPlainFieldGO.h" />
     <ClInclude Include="Include\BsCmdInputFieldValueChange.h" />
     <ClInclude Include="Include\BsCmdRecordSO.h" />
@@ -308,6 +310,8 @@
     <ClInclude Include="Include\BsHandleSliderPlane.h" />
     <ClInclude Include="Include\BsEditorSettings.h" />
     <ClInclude Include="Include\BsModalWindow.h" />
+    <ClInclude Include="Include\BsPlatformInfo.h" />
+    <ClInclude Include="Include\BsPlatformInfoRTTI.h" />
     <ClInclude Include="Include\BsScenePicking.h" />
     <ClInclude Include="Include\BsProjectLibraryEntriesRTTI.h" />
     <ClInclude Include="Include\BsEditorPrerequisites.h" />
@@ -344,6 +348,7 @@
     <ClInclude Include="Include\Win32\BsVSCodeEditor.h" />
   </ItemGroup>
   <ItemGroup>
+    <ClCompile Include="Source\BsBuildManager.cpp" />
     <ClCompile Include="Source\BsCmdRecordSO.cpp" />
     <ClCompile Include="Source\BsCmdReparentSO.cpp" />
     <ClCompile Include="Source\BsDbgTestGameObjectRef.cpp" />
@@ -396,6 +401,7 @@
     <ClCompile Include="Source\BsMainEditorWindow.cpp" />
     <ClCompile Include="Source\BsEditorSettings.cpp" />
     <ClCompile Include="Source\BsModalWindow.cpp" />
+    <ClCompile Include="Source\BsPlatformInfo.cpp" />
     <ClCompile Include="Source\BsScenePicking.cpp" />
     <ClCompile Include="Source\BsProjectLibrary.cpp" />
     <ClCompile Include="Source\BsProjectLibraryEntries.cpp" />

+ 21 - 0
BansheeEditor/BansheeEditor.vcxproj.filters

@@ -31,6 +31,9 @@
     <Filter Include="Header Files\Editor\Win32">
       <UniqueIdentifier>{ee1257c5-4335-401a-938c-adc62b074503}</UniqueIdentifier>
     </Filter>
+    <Filter Include="Header Files\Editor\RTTI">
+      <UniqueIdentifier>{24ec8e18-6fa3-44c2-a6a5-04d811e55169}</UniqueIdentifier>
+    </Filter>
   </ItemGroup>
   <ItemGroup>
     <Text Include="ReadMe.txt" />
@@ -258,6 +261,18 @@
     <ClInclude Include="Include\Win32\BsVSCodeEditor.h">
       <Filter>Header Files\Editor\Win32</Filter>
     </ClInclude>
+    <ClInclude Include="Include\BsBuildManager.h">
+      <Filter>Header Files\Editor</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\BsPlatformInfo.h">
+      <Filter>Header Files\Editor</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\BsPlatformInfoRTTI.h">
+      <Filter>Header Files\Editor\RTTI</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\BsBuildDataRTTI.h">
+      <Filter>Header Files\Editor\RTTI</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Source\BsEditorWidgetContainer.cpp">
@@ -458,5 +473,11 @@
     <ClCompile Include="Source\Win32\BsVSCodeEditor.cpp">
       <Filter>Source Files\Editor\Win32</Filter>
     </ClCompile>
+    <ClCompile Include="Source\BsBuildManager.cpp">
+      <Filter>Source Files\Editor</Filter>
+    </ClCompile>
+    <ClCompile Include="Source\BsPlatformInfo.cpp">
+      <Filter>Source Files\Editor</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>

+ 45 - 0
BansheeEditor/Include/BsBuildDataRTTI.h

@@ -0,0 +1,45 @@
+#pragma once
+
+#include "BsEditorPrerequisites.h"
+#include "BsRTTIType.h"
+#include "BsBuildManager.h"
+
+namespace BansheeEngine
+{
+	class BuildDataRTTI : public RTTIType <BuildData, IReflectable, BuildDataRTTI>
+	{
+	private:
+		SPtr<PlatformInfo> getPlatformInfo(BuildData* obj, UINT32 idx) { return obj->platformData[idx]; }
+		void setPlatformInfo(BuildData* obj, UINT32 idx, SPtr<PlatformInfo> val) { obj->platformData[idx] = val; }
+		UINT32 getPlatformInfoArraySize(BuildData* obj) { return (UINT32)obj->platformData.size(); }
+		void setPlatformInfoArraySize(BuildData* obj, UINT32 size) { obj->platformData.resize(size); }
+
+		PlatformType& getActivePlatform(BuildData* obj) { return obj->activePlatform; }
+		void setActivePlatform(BuildData* obj, PlatformType& val) { obj->activePlatform = val; }
+
+	public:
+		BuildDataRTTI()
+		{
+			addReflectablePtrArrayField("platformData", 0, &BuildDataRTTI::getPlatformInfo, &BuildDataRTTI::getPlatformInfoArraySize,
+				&BuildDataRTTI::setPlatformInfo, &BuildDataRTTI::setPlatformInfoArraySize);
+
+			addPlainField("activePlatform", 1, &BuildDataRTTI::getActivePlatform, &BuildDataRTTI::setActivePlatform);
+		}
+
+		virtual const String& getRTTIName()
+		{
+			static String name = "BuildData";
+			return name;
+		}
+
+		virtual UINT32 getRTTIId()
+		{
+			return TID_BuildData;
+		}
+
+		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		{
+			return bs_shared_ptr<BuildData>();
+		}
+	};
+}

+ 49 - 0
BansheeEditor/Include/BsBuildManager.h

@@ -0,0 +1,49 @@
+#pragma once
+
+#include "BsEditorPrerequisites.h"
+#include "BsIReflectable.h"
+#include "BsModule.h"
+#include "BsPlatformInfo.h"
+
+namespace BansheeEngine
+{
+	class BS_ED_EXPORT BuildData : public IReflectable
+	{
+	public:
+		BuildData();
+
+		PlatformType activePlatform;
+		Vector<SPtr<PlatformInfo>> platformData;
+
+		/************************************************************************/
+		/* 								RTTI		                     		*/
+		/************************************************************************/
+	public:
+		friend class BuildDataRTTI;
+		static RTTITypeBase* getRTTIStatic();
+		virtual RTTITypeBase* getRTTI() const;
+	};
+
+	class BS_ED_EXPORT BuildManager : public Module<BuildManager>
+	{
+	public:
+		BuildManager();
+
+		const Vector<PlatformType>& getAvailablePlatforms() const;
+		PlatformType getActivePlatform() const;
+		void setActivePlatform(PlatformType type);
+
+		SPtr<PlatformInfo> getActivePlatformInfo() const;
+		SPtr<PlatformInfo> getPlatformInfo(PlatformType type) const;
+
+		Vector<WString> getFrameworkAssemblies(PlatformType type) const;
+		Path getMainExecutable(PlatformType type) const;
+		WString getDefines(PlatformType type) const;
+
+		void save(const Path& outFile);
+		void load(const Path& inFile);
+
+	private:
+		SPtr<BuildData> mBuildData;
+	};
+}

+ 1 - 1
BansheeEditor/Include/BsCodeEditor.h

@@ -19,7 +19,7 @@ namespace BansheeEngine
 		WString name;
 		Vector<Path> codeFiles;
 		Vector<Path> nonCodeFiles;
-		Vector<WString> defines;
+		WString defines;
 		Vector<CodeProjectReference> assemblyReferences;
 		Vector<CodeProjectReference> projectReferences;
 	};

+ 3 - 2
BansheeEditor/Include/BsEditorApplication.h

@@ -30,9 +30,9 @@ namespace BansheeEngine
 		Path getEditorScriptAssemblyPath() const;
 
 		/**
-		 * @copydoc	Application::getGameAssemblyPath
+		 * @copydoc	Application::getScriptAssemblyFolder
 		 */
-		Path getGameAssemblyPath() const override;
+		Path getScriptAssemblyFolder() const override;
 
 		EditorSettingsPtr getEditorSettings() const { return mEditorSettings; }
 
@@ -48,6 +48,7 @@ namespace BansheeEngine
 
 	private:
 		static const Path WIDGET_LAYOUT_PATH;
+		static const Path BUILD_DATA_PATH;
 		RenderSystemPlugin mActiveRSPlugin;
 		EditorSettingsPtr mEditorSettings;
 

+ 4 - 1
BansheeEditor/Include/BsEditorPrerequisites.h

@@ -103,6 +103,9 @@ namespace BansheeEngine
 		TID_EditorWidgetLayout = 40006,
 		TID_EditorWidgetLayoutEntry = 40007,
 		TID_TestComponentA = 40008,
-		TID_TestComponentB = 40009
+		TID_TestComponentB = 40009,
+		TID_PlatformInfo = 40010,
+		TID_WinPlatformInfo = 40011,
+		TID_BuildData = 40012
 	};
 }

+ 45 - 0
BansheeEditor/Include/BsPlatformInfo.h

@@ -0,0 +1,45 @@
+#pragma once
+
+#include "BsEditorPrerequisites.h"
+#include "BsIReflectable.h"
+
+namespace BansheeEngine
+{
+	enum class PlatformType
+	{
+		Windows,
+		Count // Keep at end
+	};
+
+	struct BS_ED_EXPORT PlatformInfo : public IReflectable
+	{
+		PlatformInfo();
+		virtual ~PlatformInfo();
+
+		PlatformType type;
+		WString defines;
+
+		/************************************************************************/
+		/* 								RTTI		                     		*/
+		/************************************************************************/
+	public:
+		friend class PlatformInfoRTTI;
+		static RTTITypeBase* getRTTIStatic();
+		virtual RTTITypeBase* getRTTI() const;
+	};
+
+	struct BS_ED_EXPORT WinPlatformInfo : public PlatformInfo
+	{
+		WinPlatformInfo();
+
+		bool is32bit;
+
+		/************************************************************************/
+		/* 								RTTI		                     		*/
+		/************************************************************************/
+	public:
+		friend class WinPlatformInfoRTTI;
+		static RTTITypeBase* getRTTIStatic();
+		virtual RTTITypeBase* getRTTI() const;
+	};
+}

+ 68 - 0
BansheeEditor/Include/BsPlatformInfoRTTI.h

@@ -0,0 +1,68 @@
+#pragma once
+
+#include "BsEditorPrerequisites.h"
+#include "BsRTTIType.h"
+#include "BsPlatformInfo.h"
+
+namespace BansheeEngine
+{
+	class BS_ED_EXPORT PlatformInfoRTTI : public RTTIType <PlatformInfo, IReflectable, PlatformInfoRTTI>
+	{
+	private:
+		WString& getDefines(PlatformInfo* obj) { return obj->defines; }
+		void setDefines(PlatformInfo* obj, WString& val) { obj->defines = val; }
+
+		PlatformType& getType(PlatformInfo* obj) { return obj->type; }
+		void setType(PlatformInfo* obj, PlatformType& val) { obj->type = val; }
+	public:
+		PlatformInfoRTTI()
+		{
+			addPlainField("defines", 0, &PlatformInfoRTTI::getDefines, &PlatformInfoRTTI::setDefines);
+			addPlainField("type", 1, &PlatformInfoRTTI::getType, &PlatformInfoRTTI::setType);
+		}
+
+		virtual const String& getRTTIName()
+		{
+			static String name = "PlatformInfo";
+			return name;
+		}
+
+		virtual UINT32 getRTTIId()
+		{
+			return TID_PlatformInfo;
+		}
+
+		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		{
+			return bs_shared_ptr<PlatformInfo>();
+		}
+	};
+
+	class BS_ED_EXPORT WinPlatformInfoRTTI : public RTTIType <WinPlatformInfo, PlatformInfo, WinPlatformInfoRTTI>
+	{
+	private:
+		bool& getIs32Bit(WinPlatformInfo* obj) { return obj->is32bit; }
+		void setIs32Bit(WinPlatformInfo* obj, bool& val) { obj->is32bit = val; }
+	public:
+		WinPlatformInfoRTTI()
+		{
+			addPlainField("is32bit", 0, &WinPlatformInfoRTTI::getIs32Bit, &WinPlatformInfoRTTI::setIs32Bit);
+		}
+
+		virtual const String& getRTTIName()
+		{
+			static String name = "WinPlatformInfo";
+			return name;
+		}
+
+		virtual UINT32 getRTTIId()
+		{
+			return TID_WinPlatformInfo;
+		}
+
+		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		{
+			return bs_shared_ptr<WinPlatformInfo>();
+		}
+	};
+}

+ 107 - 0
BansheeEditor/Source/BsBuildManager.cpp

@@ -0,0 +1,107 @@
+#include "BsBuildManager.h"
+#include "BsBuildDataRTTI.h"
+#include "BsFileSerializer.h"
+#include "BsFileSystem.h"
+
+namespace BansheeEngine
+{
+	BuildData::BuildData()
+		:activePlatform(PlatformType::Windows)
+	{
+		platformData.resize((UINT32)PlatformType::Count);
+	}
+
+	RTTITypeBase* BuildData::getRTTIStatic()
+	{
+		return BuildDataRTTI::instance();
+	}
+
+	RTTITypeBase* BuildData::getRTTI() const
+	{
+		return BuildData::getRTTIStatic();
+	}
+
+	BuildManager::BuildManager()
+	{
+		mBuildData = bs_shared_ptr<BuildData>();
+	}
+
+	const Vector<PlatformType>& BuildManager::getAvailablePlatforms() const
+	{
+		static const Vector<PlatformType> PLATFORMS = { PlatformType::Windows };
+
+		return PLATFORMS;
+	}
+
+	PlatformType BuildManager::getActivePlatform() const
+	{
+		return mBuildData->activePlatform;
+	}
+
+	void BuildManager::setActivePlatform(PlatformType type)
+	{
+		if ((UINT32)type < (UINT32)PlatformType::Count)
+			mBuildData->activePlatform = type;
+	}
+
+	SPtr<PlatformInfo> BuildManager::getActivePlatformInfo() const
+	{
+		return mBuildData->platformData[(UINT32)mBuildData->activePlatform];
+	}
+
+	SPtr<PlatformInfo> BuildManager::getPlatformInfo(PlatformType type) const
+	{
+		if ((UINT32)type < (UINT32)mBuildData->platformData.size())
+			return mBuildData->platformData[(UINT32)type];
+
+		return nullptr;
+	}
+
+	Vector<WString> BuildManager::getFrameworkAssemblies(PlatformType type) const
+	{
+		switch (type)
+		{
+		case PlatformType::Windows:
+		default:
+			return { L"System", L"System.Core" };
+		}
+	}
+
+	Path BuildManager::getMainExecutable(PlatformType type) const
+	{
+		switch (type)
+		{
+		case PlatformType::Windows:
+		{
+			SPtr<WinPlatformInfo> winPlatformInfo = std::static_pointer_cast<WinPlatformInfo>(getPlatformInfo(type));
+
+			if (winPlatformInfo->is32bit)
+				return "Prebuilt\\Win32\\Game.exe";
+			else
+				return "Prebuilt\\Win64\\Game.exe";
+		}
+		}
+
+		return Path::BLANK;
+	}
+
+	WString BuildManager::getDefines(PlatformType type) const
+	{
+		return getPlatformInfo(type)->defines;
+	}
+
+	void BuildManager::save(const Path& outFile)
+	{
+		FileEncoder fe(outFile);
+		fe.encode(mBuildData.get());
+	}
+
+	void BuildManager::load(const Path& inFile)
+	{
+		if (!FileSystem::exists(inFile))
+			return;
+
+		FileDecoder fd(inFile);
+		mBuildData = std::static_pointer_cast<BuildData>(fd.decode());
+	}
+}

+ 12 - 5
BansheeEditor/Source/BsCodeEditor.cpp

@@ -3,6 +3,7 @@
 #include "BsProjectLibrary.h"
 #include "BsProjectResourceMeta.h"
 #include "BsScriptCodeImportOptions.h"
+#include "BsBuildManager.h"
 
 #if BS_PLATFORM == BS_PLATFORM_WIN32
 #include "Win32/BsVSCodeEditor.h"
@@ -81,25 +82,31 @@ namespace BansheeEngine
 
 		Vector<ProjectLibrary::LibraryEntry*> libraryEntries = ProjectLibrary::instance().search(L"*", scriptTypeIds);
 		
+		PlatformType activePlatform = BuildManager::instance().getActivePlatform();
+		Vector<WString> frameworkAssemblies = BuildManager::instance().getFrameworkAssemblies(activePlatform);
+
 		slnData.projects.push_back(CodeProjectData());
 		slnData.projects.push_back(CodeProjectData());
 
 		// Game project
 		CodeProjectData& gameProject = slnData.projects[0];
 		gameProject.name = toWString(SCRIPT_GAME_ASSEMBLY);
+		gameProject.defines = BuildManager::instance().getDefines(activePlatform);
 		
 		//// Add references
-		gameProject.assemblyReferences.push_back(CodeProjectReference{ L"System", Path::BLANK });
-		gameProject.assemblyReferences.push_back(CodeProjectReference{ L"BansheeEngine", gApplication().getEngineAssemblyPath() });
+		gameProject.assemblyReferences.push_back(CodeProjectReference{ toWString(ENGINE_ASSEMBLY), gApplication().getEngineAssemblyPath() });
+		for (auto& assemblyName : frameworkAssemblies)
+			gameProject.assemblyReferences.push_back(CodeProjectReference{ assemblyName, Path::BLANK });
 
 		// Editor project
 		CodeProjectData& editorProject = slnData.projects[1];
 		editorProject.name = toWString(SCRIPT_EDITOR_ASSEMBLY);
 
 		//// Add references
-		editorProject.assemblyReferences.push_back(CodeProjectReference{ L"System", Path::BLANK });
-		editorProject.assemblyReferences.push_back(CodeProjectReference{ L"BansheeEngine", gApplication().getEngineAssemblyPath() });
-		editorProject.assemblyReferences.push_back(CodeProjectReference{ L"BansheeEditor", gEditorApplication().getEditorAssemblyPath() });
+		editorProject.assemblyReferences.push_back(CodeProjectReference{ toWString(ENGINE_ASSEMBLY), gApplication().getEngineAssemblyPath() });
+		editorProject.assemblyReferences.push_back(CodeProjectReference{ toWString(EDITOR_ASSEMBLY), gEditorApplication().getEditorAssemblyPath() });
+		for (auto& assemblyName : frameworkAssemblies)
+			gameProject.assemblyReferences.push_back(CodeProjectReference{ assemblyName, Path::BLANK });
 
 		editorProject.projectReferences.push_back(CodeProjectReference{ gameProject.name, Path::BLANK });
 

+ 14 - 9
BansheeEditor/Source/BsEditorApplication.cpp

@@ -13,6 +13,7 @@
 #include "BsSelection.h"
 #include "BsGizmoManager.h"
 #include "BsCodeEditor.h"
+#include "BsBuildManager.h"
 
 // DEBUG ONLY
 #include "DbgEditorWidget1.h"
@@ -46,6 +47,7 @@
 namespace BansheeEngine
 {
 	const Path EditorApplication::WIDGET_LAYOUT_PATH = L"Internal\\Layout.asset";
+	const Path EditorApplication::BUILD_DATA_PATH = L"Internal\\BuildData.asset";
 
 	RENDER_WINDOW_DESC createRenderWindowDesc()
 	{
@@ -91,12 +93,16 @@ namespace BansheeEngine
 		ScenePicking::startUp();
 		Selection::startUp();
 		GizmoManager::startUp();
+		BuildManager::startUp();
 		CodeEditorManager::startUp();
 	}
 
 	EditorApplication::~EditorApplication()
 	{
+		BuildManager::instance().save(BUILD_DATA_PATH);
+
 		CodeEditorManager::shutDown();
+		BuildManager::shutDown();
 		GizmoManager::shutDown();
 		Selection::shutDown();
 		ScenePicking::shutDown();
@@ -159,6 +165,8 @@ namespace BansheeEngine
 		if (layout != nullptr)
 			EditorWidgetManager::instance().setLayout(layout);
 
+		BuildManager::instance().load(BUILD_DATA_PATH);
+
 		/************************************************************************/
 		/* 								DEBUG CODE                      		*/
 		/************************************************************************/
@@ -428,8 +436,7 @@ namespace BansheeEngine
 
 	Path EditorApplication::getEditorAssemblyPath() const
 	{
-		Path assemblyPath = FileSystem::getWorkingDirectoryPath();
-		assemblyPath.append(ASSEMBLY_PATH);
+		Path assemblyPath = getBuiltinAssemblyFolder();
 		assemblyPath.append(toWString(EDITOR_ASSEMBLY) + L".dll");
 
 		return assemblyPath;
@@ -437,20 +444,18 @@ namespace BansheeEngine
 
 	Path EditorApplication::getEditorScriptAssemblyPath() const
 	{
-		Path assemblyPath = getProjectPath();
-		assemblyPath.append(INTERNAL_ASSEMBLY_PATH);
+		Path assemblyPath = getScriptAssemblyFolder();
 		assemblyPath.append(toWString(SCRIPT_EDITOR_ASSEMBLY) + L".dll");
 
 		return assemblyPath;
 	}
 
-	Path EditorApplication::getGameAssemblyPath() const
+	Path EditorApplication::getScriptAssemblyFolder() const
 	{
-		Path assemblyPath = getProjectPath();
-		assemblyPath.append(INTERNAL_ASSEMBLY_PATH);
-		assemblyPath.append(toWString(SCRIPT_GAME_ASSEMBLY) + L".dll");
+		Path assemblyFolder = getProjectPath();
+		assemblyFolder.append(INTERNAL_ASSEMBLY_PATH);
 
-		return assemblyPath;
+		return assemblyFolder;
 	}
 
 	EditorWidgetLayoutPtr EditorApplication::loadWidgetLayout()

+ 36 - 0
BansheeEditor/Source/BsPlatformInfo.cpp

@@ -0,0 +1,36 @@
+#include "BsPlatformInfo.h"
+#include "BsPlatformInfoRTTI.h"
+
+namespace BansheeEngine
+{
+	PlatformInfo::PlatformInfo()
+		:type(PlatformType::Windows)
+	{ }
+
+	PlatformInfo::~PlatformInfo()
+	{ }
+
+	RTTITypeBase* PlatformInfo::getRTTIStatic()
+	{
+		return PlatformInfoRTTI::instance();
+	}
+
+	RTTITypeBase* PlatformInfo::getRTTI() const
+	{
+		return PlatformInfo::getRTTIStatic();
+	}
+
+	WinPlatformInfo::WinPlatformInfo()
+		:is32bit(true)
+	{ }
+
+	RTTITypeBase* WinPlatformInfo::getRTTIStatic()
+	{
+		return WinPlatformInfoRTTI::instance();
+	}
+
+	RTTITypeBase* WinPlatformInfo::getRTTI() const
+	{
+		return WinPlatformInfo::getRTTIStatic();
+	}
+}

+ 1 - 2
BansheeEditor/Source/Win32/BsVSCodeEditor.cpp

@@ -275,8 +275,7 @@ namespace BansheeEngine
 			tempStream.str("");
 			tempStream.clear();
 
-			for (auto& define : projectData.defines)
-				tempStream << toString(define) << ";";
+			tempStream << toString(projectData.defines);
 
 			String defines = tempStream.str();
 			String projectGUID = getProjectGUID(projectData.name);

+ 11 - 1
BansheeEngine/Include/BsApplication.h

@@ -57,7 +57,17 @@ namespace BansheeEngine
 		/**
 		 * @brief	Returns the absolute path to the game managed assembly file.
 		 */
-		virtual Path getGameAssemblyPath() const;
+		Path getGameAssemblyPath() const;
+
+		/**
+		 * @brief	Returns the absolute path to the folder where built-in assemblies are located in.
+		 */
+		virtual Path getBuiltinAssemblyFolder() const;
+
+		/**
+		 * @brief	Returns the absolute path to the folder where script assemblies are located in.
+		 */
+		virtual Path getScriptAssemblyFolder() const;
 
 	protected:
 		/**

+ 18 - 4
BansheeEngine/Source/BsApplication.cpp

@@ -108,8 +108,7 @@ namespace BansheeEngine
 
 	Path Application::getEngineAssemblyPath() const
 	{
-		Path assemblyPath = FileSystem::getWorkingDirectoryPath();
-		assemblyPath.append(ASSEMBLY_PATH);
+		Path assemblyPath = getBuiltinAssemblyFolder();
 		assemblyPath.append(toWString(String(ENGINE_ASSEMBLY)) + L".dll");
 		
 		return assemblyPath;
@@ -117,13 +116,28 @@ namespace BansheeEngine
 
 	Path Application::getGameAssemblyPath() const
 	{
-		Path assemblyPath = FileSystem::getWorkingDirectoryPath();
-		assemblyPath.append(ASSEMBLY_PATH);
+		Path assemblyPath = getScriptAssemblyFolder();
 		assemblyPath.append(toWString(String(SCRIPT_GAME_ASSEMBLY)) + L".dll");
 
 		return assemblyPath;
 	}
 
+	Path Application::getBuiltinAssemblyFolder() const
+	{
+		Path assemblyFolder = FileSystem::getWorkingDirectoryPath();
+		assemblyFolder.append(ASSEMBLY_PATH);
+
+		return assemblyFolder;
+	}
+
+	Path Application::getScriptAssemblyFolder() const
+	{
+		Path assemblyFolder = FileSystem::getWorkingDirectoryPath();
+		assemblyFolder.append(ASSEMBLY_PATH);
+
+		return assemblyFolder;
+	}	
+
 	const String& Application::getLibNameForRenderSystem(RenderSystemPlugin plugin)
 	{
 		static String DX11Name = "BansheeD3D11RenderSystem";

+ 19 - 3
BansheeMono/Include/BsMonoManager.h

@@ -7,6 +7,15 @@
 
 namespace BansheeEngine
 {
+	/**
+	 * @brief	Available Mono versions
+	 */
+	enum class MonoVersion
+	{
+		v4_0,
+		v4_5
+	};
+
 	/**
 	 * @brief	Loads Mono script assemblies and manages script objects.
 	 */
@@ -64,6 +73,16 @@ namespace BansheeEngine
 		 */
 		void loadScriptDomain();
 
+		/**
+		 * @brief	Returns the absolute location of the folder where Mono framework assemblies are located.
+		 */
+		Path getFrameworkAssembliesFolder() const;
+
+		/**
+		 * @brief	Returns the absolute path to the Mono compiler.
+		 */
+		Path getCompilerPath() const;
+
 		/**
 		 * @brief	Registers a new script type. This should be done before any assembly loading is done.
 		 *			Upon assembly load these script types will be initialized with necessary information about their
@@ -86,9 +105,6 @@ namespace BansheeEngine
 			return mTypesToInitialize;
 		}
 
-		static const String MONO_LIB_DIR;
-		static const String MONO_ETC_DIR;
-
 		UnorderedMap<String, MonoAssembly*> mAssemblies;
 		MonoDomain* mScriptDomain;
 		MonoDomain* mRootDomain;

+ 41 - 3
BansheeMono/Source/BsMonoManager.cpp

@@ -4,6 +4,7 @@
 #include "BsMonoAssembly.h"
 #include "BsMonoClass.h"
 #include "BsMonoUtil.h"
+#include "BsFileSystem.h"
 
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/mono-config.h>
@@ -12,13 +13,28 @@
 
 namespace BansheeEngine
 {
-	const String MonoManager::MONO_LIB_DIR = "..\\..\\Mono\\lib";
-	const String MonoManager::MONO_ETC_DIR = "..\\..\\Mono\\etc";
+	const String MONO_LIB_DIR = "..\\..\\Mono\\lib\\";
+	const String MONO_ETC_DIR = "..\\..\\Mono\\etc\\";
+	const String MONO_COMPILER_DIR = "..\\..\\Mono\\compiler\\";
+	const MonoVersion MONO_VERSION = MonoVersion::v4_5;
+	
+	struct MonoVersionData
+	{
+		String path;
+		String version;
+	};
+
+	static const MonoVersionData MONO_VERSION_DATA[2] =
+	{
+		{ MONO_LIB_DIR + "mono\\4.0", "v4.0.30128" },
+		{ MONO_LIB_DIR + "mono\\4.5", "v4.0.30319" }
+	};
 
 	MonoManager::MonoManager()
 		:mRootDomain(nullptr), mScriptDomain(nullptr), mIsCoreLoaded(false)
 	{
 		mono_set_dirs(MONO_LIB_DIR.c_str(), MONO_ETC_DIR.c_str());
+		mono_set_assemblies_path(MONO_VERSION_DATA[(int)MONO_VERSION].path.c_str());
 
 #if BS_DEBUG_MODE
 		mono_set_signal_chaining(true);
@@ -27,7 +43,7 @@ namespace BansheeEngine
 
 		mono_config_parse(nullptr);
 
-		mRootDomain = mono_jit_init_version("BansheeMono", "v4.0.30319"); // TODO: Allow user-defined version here?
+		mRootDomain = mono_jit_init_version("BansheeMono", MONO_VERSION_DATA[(int)MONO_VERSION].version.c_str());
 		if (mRootDomain == nullptr)
 			BS_EXCEPT(InternalErrorException, "Cannot initialize Mono runtime.");
 	}
@@ -221,4 +237,26 @@ namespace BansheeEngine
 				initializeAssembly(*assemblyEntry.second);
 		}
 	}
+
+	Path MonoManager::getFrameworkAssembliesFolder() const
+	{
+		Path assembliesFolder = FileSystem::getWorkingDirectoryPath();
+		assembliesFolder.append(MONO_VERSION_DATA[(int)MONO_VERSION].path);
+
+		return assembliesFolder;
+	}
+
+	Path MonoManager::getCompilerPath() const
+	{
+		Path assembliesFolder = FileSystem::getWorkingDirectoryPath();
+		assembliesFolder.append(MONO_COMPILER_DIR);
+
+#if BS_PLATFORM == BS_PLATFORM_WIN32
+		assembliesFolder.append("mcs.exe");
+#else
+		static_assert("Not implemented");
+#endif
+
+		return assembliesFolder;
+	}
 }

+ 1 - 1
BansheeUtility/Source/BsFileSerializer.cpp

@@ -74,7 +74,7 @@ namespace BansheeEngine
 
 	std::shared_ptr<IReflectable> FileDecoder::decode()
 	{
-		if (mInputStream.eof())
+		if (mInputStream.fail() || mInputStream.eof())
 			return nullptr;
 
 		UINT32 objectSize = 0;

+ 122 - 0
MBansheeEditor/BuildManager.cs

@@ -0,0 +1,122 @@
+using System;
+using System.Runtime.CompilerServices;
+using BansheeEngine;
+
+namespace BansheeEditor
+{
+    // Note: Must match C++ enum PlatformType
+    public enum PlatformType
+    {
+        Windows,
+        Count // Keep at end
+    }
+
+    public abstract class PlatformInfo : ScriptObject
+    {
+        protected PlatformInfo()
+        { }
+
+        public PlatformType Type
+        {
+            get { return Internal_GetType(mCachedPtr); }
+        }
+
+        public string Defines
+        {
+            get { return Internal_GetDefines(mCachedPtr); }
+            set { Internal_SetDefines(mCachedPtr, value); }
+        }
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern PlatformType Internal_GetType(IntPtr thisPtr);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetDefines(IntPtr thisPtr);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_SetDefines(IntPtr thisPtr, string value);
+    }
+
+    public class WinPlatformInfo : PlatformInfo
+    {
+        public bool Is32Bit
+        {
+            get { return Internal_GetIs32Bit(mCachedPtr); }
+            set { Internal_SetIs32Bit(mCachedPtr, value); }
+        }
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern bool Internal_GetIs32Bit(IntPtr thisPtr);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_SetIs32Bit(IntPtr thisPtr, bool value);
+    }
+
+    public static class BuildManager
+    {
+        public static PlatformType[] AvailablePlatforms
+        {
+            get { return Internal_GetAvailablePlatforms(); }
+        }
+
+        public static PlatformType ActivePlatform
+        {
+            get { return Internal_GetActivePlatform(); }
+            set { Internal_SetActivePlatform(value); }
+        }
+
+        public static PlatformInfo ActivePlatformInfo
+        {
+            get { return Internal_GetActivePlatformInfo(); }
+        }
+
+        public static void Build()
+        {
+            // TODO
+        }
+
+        internal static string[] GetFrameworkAssemblies(PlatformType type)
+        {
+            return Internal_GetFrameworkAssemblies(type);
+        }
+
+        internal static string GetMainExecutable(PlatformType type)
+        {
+            return Internal_GetMainExecutable(type);
+        }
+
+        internal static string GetDefines(PlatformType type)
+        {
+            return Internal_GetDefines(type);
+        }
+
+        internal static PlatformInfo GetPlatformInfo(PlatformType type)
+        {
+            return Internal_GetPlatformInfo(type);
+        }
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern PlatformType[] Internal_GetAvailablePlatforms();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern PlatformType Internal_GetActivePlatform();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern void Internal_SetActivePlatform(PlatformType value);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern PlatformInfo Internal_GetActivePlatformInfo();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern PlatformInfo Internal_GetPlatformInfo(PlatformType type);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string[] Internal_GetFrameworkAssemblies(PlatformType type);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetMainExecutable(PlatformType type);
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetDefines(PlatformType type);
+    }
+}

+ 52 - 0
MBansheeEditor/EditorApplication.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Runtime.CompilerServices;
 using BansheeEngine;
 
 namespace BansheeEditor
@@ -24,6 +25,11 @@ namespace BansheeEditor
         World
     }
 
+    public enum EditorPlatformType
+    {
+        Windows
+    }
+
     public class EditorApplication
     {
         public static SceneViewTool ActiveSceneTool
@@ -49,6 +55,22 @@ namespace BansheeEditor
             get { return instance.scene.GetCamera(); }
         }
 
+        public static EditorPlatformType EditorPlatform
+        {
+            get { return EditorPlatformType.Windows; } // TODO - Set this properly once we have support for more platforms
+        }
+
+        public static string ProjectPath { get { return Internal_GetProjectPath(); } }
+        public static string ProjectName { get { return Internal_GetProjectName(); } }
+        internal static string CompilerPath { get { return Internal_GetCompilerPath(); } }
+        internal static string BuiltinAssemblyPath { get { return Internal_GetBuiltinAssemblyPath(); } }
+        internal static string ScriptAssemblyPath { get { return Internal_GetScriptAssemblyPath(); } }
+        internal static string FrameworkAssemblyPath { get { return Internal_GetFrameworkAssemblyPath(); } }
+        internal static string EngineAssembly { get { return Internal_GetEngineAssemblyName(); } }
+        internal static string EditorAssembly { get { return Internal_GetEditorAssemblyName(); } }
+        internal static string ScriptGameAssembly { get { return Internal_GetScriptGameAssemblyName(); } }
+        internal static string ScriptEditorAssembly { get { return Internal_GetScriptEditorAssemblyName(); } }
+
         private static EditorApplication instance;
 
         private InspectorWindow inspector;
@@ -110,5 +132,35 @@ namespace BansheeEditor
 
             // DEBUG ONLY END
         }
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetProjectPath();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetProjectName();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetCompilerPath();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetBuiltinAssemblyPath();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetScriptAssemblyPath();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetFrameworkAssemblyPath();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetEngineAssemblyName();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetEditorAssemblyName();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetScriptGameAssemblyName();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetScriptEditorAssemblyName();
     }
 }

+ 2 - 0
MBansheeEditor/MBansheeEditor.csproj

@@ -40,6 +40,7 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="BrowseDialog.cs" />
+    <Compile Include="BuildManager.cs" />
     <Compile Include="CodeEditor.cs" />
     <Compile Include="ColorPicker.cs" />
     <Compile Include="DbgCustomInspector.cs" />
@@ -114,6 +115,7 @@
     <Compile Include="Scene\Handle.cs" />
     <Compile Include="Scene\RotateHandle.cs" />
     <Compile Include="Scene\ScaleHandle.cs" />
+    <Compile Include="ScriptCompiler.cs" />
     <Compile Include="Selection.cs" />
   </ItemGroup>
   <ItemGroup>

+ 1 - 1
MBansheeEditor/ProjectLibrary.cs

@@ -48,7 +48,7 @@ namespace BansheeEditor
             return Internal_GetEntry(path);
         }
 
-        public LibraryEntry[] Search(string pattern, ResourceType[] types = null)
+        public static LibraryEntry[] Search(string pattern, ResourceType[] types = null)
         {
             return Internal_Search(pattern, types);
         }

+ 280 - 0
MBansheeEditor/ScriptCompiler.cs

@@ -0,0 +1,280 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace BansheeEditor
+{
+//MonoCompiler::StartCompile
+// - Finds all code files for the specified assembly using ProjectLibrary
+// - Starts a Process with specified parameters:
+//  - default: -target:library -out: [name]
+//  - references: -r: [filename]
+//  - library folder: -lib: [path], [path2]
+//  - defines: -d: [define]
+//  - optimization: -o [+/-]
+//  - debug: -debug [+/-]
+//  - followed by a list of files (space separated I guess)
+
+    public enum ScriptAssemblyType
+    {
+        Game, Editor
+    }
+
+    public struct CompileData
+    {
+        public string[] files;
+        public string defines;
+    }
+
+    public class CompilerInstance
+    {
+        private Process process;
+        private Thread readErrorsThread;
+
+        private List<CompilerMessage> errors = new List<CompilerMessage>();
+        private List<CompilerMessage> warnings = new List<CompilerMessage>();
+
+        private Regex messageParseRegex = new Regex(@"\s*(?<file>.*)\(\s*(?<line>\d+)\s*,\s*(?<column>\d+)\s*\)\s*:\s*(?<type>warning|error)\s+(.*):\s*(?<message>.*)");
+
+        internal CompilerInstance(string[] files, string defines, string[] assemblyFolders, string[] assemblies,
+            bool debugBuild, string outputFile)
+        {
+            ProcessStartInfo procStartInfo = new ProcessStartInfo();
+
+            String executable;
+            switch (EditorApplication.EditorPlatform)
+            {
+                case EditorPlatformType.Windows:
+                    executable = Path.Combine(EditorApplication.CompilerPath, "mcs.exe");
+                    break;
+                default:
+                    throw new NotImplementedException("Mono compilation not supported on this platform.");
+            }
+
+            StringBuilder argumentsBuilder = new StringBuilder();
+            argumentsBuilder.Append(executable);
+
+            if (!string.IsNullOrEmpty(defines))
+                argumentsBuilder.Append(" -d:" + defines);
+
+            if (assemblyFolders != null && assemblyFolders.Length > 0)
+            {
+                argumentsBuilder.Append(" -lib:");
+
+                for (int i = 0; i < assemblyFolders.Length - 1; i++)
+                    argumentsBuilder.Append(assemblyFolders[i] + ",");
+
+                argumentsBuilder.Append(assemblyFolders[assemblyFolders.Length - 1]);
+            }
+
+            if (assemblies != null && assemblies.Length > 0)
+            {
+                argumentsBuilder.Append(" -r:");
+
+                for (int i = 0; i < assemblies.Length - 1; i++)
+                    argumentsBuilder.Append(assemblies[i] + ",");
+
+                argumentsBuilder.Append(assemblies[assemblies.Length - 1]);
+            }
+
+            if (debugBuild)
+                argumentsBuilder.Append(" -debug+ -o-");
+            else
+                argumentsBuilder.Append(" -debug- -o+");
+
+            argumentsBuilder.Append(" -target:library -out:" + outputFile);
+
+            for (int i = 0; i < files.Length; i++)
+                argumentsBuilder.Append(" \"" + files[i] + "\"");
+
+            procStartInfo.Arguments = argumentsBuilder.ToString();
+            procStartInfo.CreateNoWindow = true;
+            procStartInfo.FileName = executable;
+            procStartInfo.RedirectStandardError = true;
+            procStartInfo.RedirectStandardOutput = false;
+            procStartInfo.UseShellExecute = false;
+            procStartInfo.WorkingDirectory = EditorApplication.ProjectPath;
+
+            process = new Process();
+            process.StartInfo = procStartInfo;
+            process.Start();
+
+            readErrorsThread = new Thread(ReadErrorStream);
+        }
+
+        private void ReadErrorStream()
+        {
+            while (true)
+            {
+                if (process == null || process.HasExited)
+                    return;
+
+                string line = process.StandardOutput.ReadLine();
+                if (line == null)
+                    continue;
+
+                CompilerMessage message;
+                if (TryParseCompilerMessage(line, out message))
+                {
+                    if (message.type == CompilerMessageType.Warning)
+                    {
+                        lock (warnings)
+                            warnings.Add(message);
+                    }
+                    else if (message.type == CompilerMessageType.Error)
+                    {
+                        lock (errors)
+                            errors.Add(message);
+                    }
+                }
+            }
+        }
+
+        private bool TryParseCompilerMessage(string messageText, out CompilerMessage message)
+        {
+            message = new CompilerMessage();
+
+            Match match = messageParseRegex.Match(messageText);
+            if (!match.Success)
+                return false;
+
+            message.file = match.Groups["file"].Value;
+            message.line = Int32.Parse(match.Groups["line"].Value);
+            message.column = Int32.Parse(match.Groups["column"].Value);
+            message.type = match.Groups["type"].Value == "error" ? CompilerMessageType.Error : CompilerMessageType.Warning;
+            message.message = match.Groups["message"].Value;
+
+            return true;
+        }
+
+        public bool IsDone
+        {
+            get { return process.HasExited; }
+        }
+
+        public bool HasErrors
+        {
+            get { return IsDone && process.ExitCode != 0; }
+        }
+
+        public CompilerMessage[] WarningMessages
+        {
+            get
+            {
+                lock (warnings)
+                {
+                    return warnings.ToArray();
+                }
+            }
+        }
+
+        public CompilerMessage[] ErrorMessages
+        {
+            get
+            {
+                lock (errors)
+                {
+                    return errors.ToArray();
+                }
+            }
+        }
+
+        public void Dispose()
+        {
+            if (process == null)
+                return;
+
+            if (!process.HasExited)
+            {
+                process.Kill();
+                process.WaitForExit();
+            }
+
+            process.Dispose();
+        }
+    }
+
+    public static class ScriptCompiler
+    {
+        public static CompilerInstance CompileAsync(ScriptAssemblyType type, PlatformType platform, bool debug, string outputDir)
+        {
+            LibraryEntry[] scriptEntries = ProjectLibrary.Search("*", new ResourceType[] { ResourceType.ScriptCode });
+
+            List<string> scriptFiles = new List<string>();
+            for (int i = 0; i < scriptEntries.Length; i++)
+            {
+                if(scriptEntries[i].Type != LibraryEntryType.File)
+                    continue;
+
+                FileEntry fileEntry = (FileEntry)scriptEntries[i];
+
+                ScriptCodeImportOptions io = (ScriptCodeImportOptions) fileEntry.Options;
+                if (io.EditorScript && type == ScriptAssemblyType.Editor ||
+                    !io.EditorScript && type == ScriptAssemblyType.Game)
+                {
+                    scriptFiles.Add(scriptEntries[i].Path);
+                }
+            }
+
+            string[] assemblyFolders;
+            string[] assemblies;
+            string outputFile;
+
+            string[] frameworkAssemblies = BuildManager.GetFrameworkAssemblies(platform);
+            if (type == ScriptAssemblyType.Game)
+            {
+                assemblyFolders = new string[]
+                {
+                    EditorApplication.BuiltinAssemblyPath, 
+                    EditorApplication.FrameworkAssemblyPath
+                };
+
+                assemblies = new string[frameworkAssemblies.Length + 1];
+                assemblies[assemblies.Length - 1] = EditorApplication.EngineAssembly;
+
+                outputFile = Path.Combine(outputDir, EditorApplication.ScriptGameAssembly);
+            }
+            else
+            {
+                assemblyFolders = new string[]
+                {
+                    EditorApplication.BuiltinAssemblyPath, 
+                    EditorApplication.FrameworkAssemblyPath,
+                    EditorApplication.ScriptAssemblyPath
+                };
+
+                assemblies = new string[frameworkAssemblies.Length + 3];
+                assemblies[assemblies.Length - 1] = EditorApplication.EngineAssembly;
+                assemblies[assemblies.Length - 2] = EditorApplication.EditorAssembly;
+                assemblies[assemblies.Length - 3] = EditorApplication.ScriptGameAssembly;
+
+                outputFile = Path.Combine(outputDir, EditorApplication.ScriptEditorAssembly);
+            }
+
+            Array.Copy(frameworkAssemblies, assemblies, frameworkAssemblies.Length);
+
+            string defines = BuildManager.GetDefines(platform);
+            return new CompilerInstance(scriptFiles.ToArray(), defines, assemblyFolders, assemblies, debug, outputFile);
+        }
+    }
+
+    public enum CompilerMessageType
+    {
+        Warning, Error
+    }
+
+    public struct CompilerMessage
+    {
+        public CompilerMessageType type;
+        public string message;
+        public string file;
+        public int line;
+        public int column;
+    }
+}

+ 26 - 0
SBansheeEditor/Include/BsScriptBuildManager.h

@@ -0,0 +1,26 @@
+#pragma once
+
+#include "BsScriptEditorPrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsBuildManager.h"
+
+namespace BansheeEngine
+{
+	class BS_SCR_BED_EXPORT ScriptBuildManager : public ScriptObject <ScriptBuildManager>
+	{
+	public:
+		SCRIPT_OBJ(EDITOR_ASSEMBLY, "BansheeEditor", "BuildManager")
+
+	private:
+		ScriptBuildManager(MonoObject* instance);
+
+		static MonoArray* internal_GetAvailablePlatforms();
+		static PlatformType internal_GetActivePlatform();
+		static void internal_SetActivePlatform(PlatformType value);
+		static MonoObject* internal_GetActivePlatformInfo();
+		static MonoObject* internal_GetPlatformInfo(PlatformType type);
+		static MonoArray* internal_GetFrameworkAssemblies(PlatformType type);
+		static MonoString* internal_GetMainExecutable(PlatformType type);
+		static MonoString* internal_GetDefines(PlatformType type);
+	};
+}

+ 27 - 0
SBansheeEditor/Include/BsScriptEditorApplication.h

@@ -0,0 +1,27 @@
+#pragma once
+
+#include "BsScriptEditorPrerequisites.h"
+#include "BsScriptObject.h"
+
+namespace BansheeEngine
+{
+	class BS_SCR_BED_EXPORT ScriptEditorApplication : public ScriptObject <ScriptEditorApplication>
+	{
+	public:
+		SCRIPT_OBJ(EDITOR_ASSEMBLY, "BansheeEditor", "EditorApplication")
+
+	private:
+		ScriptEditorApplication(MonoObject* instance);
+
+		static MonoString* internal_GetProjectPath();
+		static MonoString* internal_GetProjectName();
+		static MonoString* internal_GetCompilerPath();
+		static MonoString* internal_GetBuiltinAssemblyPath();
+		static MonoString* internal_GetScriptAssemblyPath();
+		static MonoString* internal_GetFrameworkAssemblyPath();
+		static MonoString* internal_GetEngineAssemblyName();
+		static MonoString* internal_GetEditorAssemblyName();
+		static MonoString* internal_GetScriptGameAssemblyName();
+		static MonoString* internal_GetScriptEditorAssemblyName();
+	};
+}

+ 49 - 0
SBansheeEditor/Include/BsScriptPlatformInfo.h

@@ -0,0 +1,49 @@
+#pragma once
+
+#include "BsScriptEditorPrerequisites.h"
+#include "BsScriptObject.h"
+#include "BsPlatformInfo.h"
+
+namespace BansheeEngine
+{
+	class BS_SCR_BED_EXPORT ScriptPlatformInfoBase : public ScriptObjectBase
+	{
+	public:
+		SPtr<PlatformInfo> getPlatformInfo() const { return mPlatformInfo; }
+
+	protected:
+		ScriptPlatformInfoBase(MonoObject* instance);
+		virtual ~ScriptPlatformInfoBase() {}
+
+		SPtr<PlatformInfo> mPlatformInfo;
+	};
+
+	class BS_SCR_BED_EXPORT ScriptPlatformInfo : public ScriptObject <ScriptPlatformInfo, ScriptPlatformInfoBase>
+	{
+	public:
+		SCRIPT_OBJ(EDITOR_ASSEMBLY, "BansheeEditor", "PlatformInfo")
+
+		static MonoObject* create(const SPtr<PlatformInfo>& platformInfo);
+	private:
+		ScriptPlatformInfo(MonoObject* instance);
+
+		static PlatformType internal_GetType(ScriptPlatformInfoBase* thisPtr);
+		static MonoString* internal_GetDefines(ScriptPlatformInfoBase* thisPtr);
+		static void internal_SetDefines(ScriptPlatformInfoBase* thisPtr, MonoString* value);
+	};
+
+	class BS_SCR_BED_EXPORT ScriptWinPlatformInfo : public ScriptObject <ScriptWinPlatformInfo, ScriptPlatformInfoBase>
+	{
+	public:
+		SCRIPT_OBJ(EDITOR_ASSEMBLY, "BansheeEditor", "WinPlatformInfo")
+
+		static MonoObject* create(const SPtr<WinPlatformInfo>& platformInfo);
+
+	private:
+		ScriptWinPlatformInfo(MonoObject* instance);
+		SPtr<WinPlatformInfo> getWinPlatformInfo() const;
+
+		static bool internal_GetIs32Bit(ScriptWinPlatformInfo* thisPtr);
+		static void internal_SetIs32Bit(ScriptWinPlatformInfo* thisPtr, bool value);
+	};
+}

+ 6 - 0
SBansheeEditor/SBansheeEditor.vcxproj

@@ -237,8 +237,10 @@
     <ClInclude Include="Include\BsGUIPanelContainer.h" />
     <ClInclude Include="Include\BsGUIResourceField.h" />
     <ClInclude Include="Include\BsScriptBrowseDialog.h" />
+    <ClInclude Include="Include\BsScriptBuildManager.h" />
     <ClInclude Include="Include\BsScriptCodeEditor.h" />
     <ClInclude Include="Include\BsScriptDragDropManager.h" />
+    <ClInclude Include="Include\BsScriptEditorApplication.h" />
     <ClInclude Include="Include\BsScriptEditorPrerequisites.h" />
     <ClInclude Include="Include\BsScriptEditorSettings.h" />
     <ClInclude Include="Include\BsScriptEditorUtility.h" />
@@ -267,11 +269,13 @@
     <ClInclude Include="Include\BsScriptHandleSliderPlane.h" />
     <ClInclude Include="Include\BsScriptImportOptions.h" />
     <ClInclude Include="Include\BsScriptModalWindow.h" />
+    <ClInclude Include="Include\BsScriptPlatformInfo.h" />
     <ClInclude Include="Include\BsScriptProjectLibrary.h" />
     <ClInclude Include="Include\BsScriptSceneViewHandler.h" />
     <ClInclude Include="Include\BsScriptSelection.h" />
   </ItemGroup>
   <ItemGroup>
+    <ClCompile Include="Source\BsScriptBuildManager.cpp" />
     <ClCompile Include="Source\BsScriptCodeEditor.cpp" />
     <ClCompile Include="Source\BsScriptDragDropManager.cpp" />
     <ClCompile Include="Source\BsEditorScriptManager.cpp" />
@@ -279,6 +283,7 @@
     <ClCompile Include="Source\BsGUIPanelContainer.cpp" />
     <ClCompile Include="Source\BsGUIResourceField.cpp" />
     <ClCompile Include="Source\BsScriptBrowseDialog.cpp" />
+    <ClCompile Include="Source\BsScriptEditorApplication.cpp" />
     <ClCompile Include="Source\BsScriptEditorPlugin.cpp" />
     <ClCompile Include="Source\BsScriptEditorSettings.cpp" />
     <ClCompile Include="Source\BsScriptEditorUtility.cpp" />
@@ -307,6 +312,7 @@
     <ClCompile Include="Source\BsScriptHandleSliderPlane.cpp" />
     <ClCompile Include="Source\BsScriptImportOptions.cpp" />
     <ClCompile Include="Source\BsScriptModalWindow.cpp" />
+    <ClCompile Include="Source\BsScriptPlatformInfo.cpp" />
     <ClCompile Include="Source\BsScriptProjectLibrary.cpp" />
     <ClCompile Include="Source\BsScriptSceneViewHandler.cpp" />
     <ClCompile Include="Source\BsScriptSelection.cpp" />

+ 18 - 0
SBansheeEditor/SBansheeEditor.vcxproj.filters

@@ -129,6 +129,15 @@
     <ClInclude Include="Include\BsScriptCodeEditor.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="Include\BsScriptEditorApplication.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\BsScriptPlatformInfo.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="Include\BsScriptBuildManager.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="Source\BsScriptEditorPlugin.cpp">
@@ -245,5 +254,14 @@
     <ClCompile Include="Source\BsScriptCodeEditor.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="Source\BsScriptEditorApplication.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Source\BsScriptPlatformInfo.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="Source\BsScriptBuildManager.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
 </Project>

+ 79 - 0
SBansheeEditor/Source/BsScriptBuildManager.cpp

@@ -0,0 +1,79 @@
+#include "BsScriptBuildManager.h"
+#include "BsMonoManager.h"
+#include "BsMonoClass.h"
+#include "BsMonoMethod.h"
+#include "BsMonoUtil.h"
+#include "BsScriptPlatformInfo.h"
+
+namespace BansheeEngine
+{
+	ScriptBuildManager::ScriptBuildManager(MonoObject* instance)
+		:ScriptObject(instance)
+	{ }
+
+	void ScriptBuildManager::initRuntimeData()
+	{
+		metaData.scriptClass->addInternalCall("internal_GetAvailablePlatforms", &ScriptBuildManager::internal_GetAvailablePlatforms);
+		metaData.scriptClass->addInternalCall("internal_GetActivePlatform", &ScriptBuildManager::internal_GetActivePlatform);
+		metaData.scriptClass->addInternalCall("internal_SetActivePlatform", &ScriptBuildManager::internal_SetActivePlatform);
+		metaData.scriptClass->addInternalCall("internal_GetActivePlatformInfo", &ScriptBuildManager::internal_GetActivePlatformInfo);
+		metaData.scriptClass->addInternalCall("internal_GetPlatformInfo", &ScriptBuildManager::internal_GetPlatformInfo);
+		metaData.scriptClass->addInternalCall("internal_GetFrameworkAssemblies", &ScriptBuildManager::internal_GetFrameworkAssemblies);
+		metaData.scriptClass->addInternalCall("internal_GetMainExecutable", &ScriptBuildManager::internal_GetMainExecutable);
+		metaData.scriptClass->addInternalCall("internal_GetDefines", &ScriptBuildManager::internal_GetDefines);
+	}
+
+	MonoArray* ScriptBuildManager::internal_GetAvailablePlatforms()
+	{
+		const Vector<PlatformType>& availableType = BuildManager::instance().getAvailablePlatforms();
+
+		ScriptArray outArray = ScriptArray::create<UINT32>((UINT32)availableType.size());
+		UINT32 idx = 0;
+		for (auto& type : availableType)
+			outArray.set(idx++, type);
+
+		return outArray.getInternal();
+	}
+
+	PlatformType ScriptBuildManager::internal_GetActivePlatform()
+	{
+		return BuildManager::instance().getActivePlatform();
+	}
+
+	void ScriptBuildManager::internal_SetActivePlatform(PlatformType value)
+	{
+		BuildManager::instance().setActivePlatform(value);
+	}
+
+	MonoObject* ScriptBuildManager::internal_GetActivePlatformInfo()
+	{
+		return ScriptPlatformInfo::create(BuildManager::instance().getActivePlatformInfo());
+	}
+
+	MonoObject* ScriptBuildManager::internal_GetPlatformInfo(PlatformType type)
+	{
+		return ScriptPlatformInfo::create(BuildManager::instance().getPlatformInfo(type));
+	}
+
+	MonoArray* ScriptBuildManager::internal_GetFrameworkAssemblies(PlatformType type)
+	{
+		Vector<WString> frameworkAssemblies = BuildManager::instance().getFrameworkAssemblies(type);
+
+		ScriptArray outArray = ScriptArray::create<WString>((UINT32)frameworkAssemblies.size());
+		UINT32 idx = 0;
+		for (auto& assemblyName : frameworkAssemblies)
+			outArray.set(idx++, assemblyName);
+
+		return outArray.getInternal();
+	}
+
+	MonoString* ScriptBuildManager::internal_GetMainExecutable(PlatformType type)
+	{
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), BuildManager::instance().getMainExecutable(type).toWString());
+	}
+
+	MonoString* ScriptBuildManager::internal_GetDefines(PlatformType type)
+	{
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), BuildManager::instance().getDefines(type));
+	}
+}

+ 89 - 0
SBansheeEditor/Source/BsScriptEditorApplication.cpp

@@ -0,0 +1,89 @@
+#include "BsScriptEditorApplication.h"
+#include "BsMonoManager.h"
+#include "BsMonoClass.h"
+#include "BsMonoMethod.h"
+#include "BsMonoUtil.h"
+#include "BsEditorApplication.h"
+
+namespace BansheeEngine
+{
+	ScriptEditorApplication::ScriptEditorApplication(MonoObject* instance)
+		:ScriptObject(instance)
+	{ }
+
+	void ScriptEditorApplication::initRuntimeData()
+	{
+		metaData.scriptClass->addInternalCall("Internal_GetProjectPath", &ScriptEditorApplication::internal_GetProjectPath);
+		metaData.scriptClass->addInternalCall("Internal_GetProjectName", &ScriptEditorApplication::internal_GetProjectName);
+		metaData.scriptClass->addInternalCall("Internal_GetCompilerPath", &ScriptEditorApplication::internal_GetCompilerPath);
+		metaData.scriptClass->addInternalCall("Internal_GetBuiltinAssemblyPath", &ScriptEditorApplication::internal_GetBuiltinAssemblyPath);
+		metaData.scriptClass->addInternalCall("Internal_GetScriptAssemblyPath", &ScriptEditorApplication::internal_GetScriptAssemblyPath);
+		metaData.scriptClass->addInternalCall("Internal_GetFrameworkAssemblyPath", &ScriptEditorApplication::internal_GetFrameworkAssemblyPath);
+		metaData.scriptClass->addInternalCall("Internal_GetEngineAssemblyName", &ScriptEditorApplication::internal_GetEngineAssemblyName);
+		metaData.scriptClass->addInternalCall("Internal_GetEditorAssemblyName", &ScriptEditorApplication::internal_GetEditorAssemblyName);
+		metaData.scriptClass->addInternalCall("Internal_GetScriptGameAssemblyName", &ScriptEditorApplication::internal_GetScriptGameAssemblyName);
+		metaData.scriptClass->addInternalCall("Internal_GetScriptEditorAssemblyName", &ScriptEditorApplication::internal_GetScriptEditorAssemblyName);
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetProjectPath()
+	{
+		Path projectPath = gEditorApplication().getProjectPath();
+
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), projectPath.toWString());
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetProjectName()
+	{
+		WString projectName = gEditorApplication().getProjectName();
+
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), projectName);
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetCompilerPath()
+	{
+		Path compilerPath = MonoManager::instance().getCompilerPath();
+
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), compilerPath.toWString());
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetBuiltinAssemblyPath()
+	{
+		Path assemblyFolder = gEditorApplication().getBuiltinAssemblyFolder();
+
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), assemblyFolder.toWString());
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetScriptAssemblyPath()
+	{
+		Path assemblyFolder = gEditorApplication().getScriptAssemblyFolder();
+
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), assemblyFolder.toWString());
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetFrameworkAssemblyPath()
+	{
+		Path assemblyFolder = MonoManager::instance().getFrameworkAssembliesFolder();
+
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), assemblyFolder.toWString());
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetEngineAssemblyName()
+	{
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), toWString(ENGINE_ASSEMBLY) + L".dll");
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetEditorAssemblyName()
+	{
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), toWString(EDITOR_ASSEMBLY) + L".dll");
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetScriptGameAssemblyName()
+	{
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), toWString(SCRIPT_GAME_ASSEMBLY) + L".dll");
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetScriptEditorAssemblyName()
+	{
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), toWString(SCRIPT_EDITOR_ASSEMBLY) + L".dll");
+	}
+}

+ 90 - 0
SBansheeEditor/Source/BsScriptPlatformInfo.cpp

@@ -0,0 +1,90 @@
+#include "BsScriptPlatformInfo.h"
+#include "BsScriptMeta.h"
+#include "BsMonoField.h"
+#include "BsMonoClass.h"
+#include "BsMonoManager.h"
+#include "BsMonoMethod.h"
+#include "BsMonoUtil.h"
+
+namespace BansheeEngine
+{
+	ScriptPlatformInfoBase::ScriptPlatformInfoBase(MonoObject* instance)
+		:ScriptObjectBase(instance)
+	{ }
+
+	ScriptPlatformInfo::ScriptPlatformInfo(MonoObject* instance)
+		: ScriptObject(instance)
+	{
+
+	}
+
+	void ScriptPlatformInfo::initRuntimeData()
+	{
+		metaData.scriptClass->addInternalCall("internal_GetType", &ScriptPlatformInfo::internal_GetType);
+		metaData.scriptClass->addInternalCall("internal_GetDefines", &ScriptPlatformInfo::internal_GetDefines);
+		metaData.scriptClass->addInternalCall("internal_SetDefines", &ScriptPlatformInfo::internal_SetDefines);
+	}
+
+	MonoObject* ScriptPlatformInfo::create(const SPtr<PlatformInfo>& platformInfo)
+	{
+		switch (platformInfo->type)
+		{
+		case PlatformType::Windows:
+			return ScriptWinPlatformInfo::create(std::static_pointer_cast<WinPlatformInfo>(platformInfo));
+			break;
+		}
+
+		return nullptr;
+	}
+
+	PlatformType ScriptPlatformInfo::internal_GetType(ScriptPlatformInfoBase* thisPtr)
+	{
+		return thisPtr->getPlatformInfo()->type;
+	}
+
+	MonoString* ScriptPlatformInfo::internal_GetDefines(ScriptPlatformInfoBase* thisPtr)
+	{
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), thisPtr->getPlatformInfo()->defines);
+	}
+
+	void ScriptPlatformInfo::internal_SetDefines(ScriptPlatformInfoBase* thisPtr, MonoString* value)
+	{
+		thisPtr->getPlatformInfo()->defines = MonoUtil::monoToWString(value);
+	}
+
+	ScriptWinPlatformInfo::ScriptWinPlatformInfo(MonoObject* instance)
+		:ScriptObject(instance)
+	{
+		mPlatformInfo = bs_shared_ptr<WinPlatformInfo>();
+	}
+
+	void ScriptWinPlatformInfo::initRuntimeData()
+	{
+		metaData.scriptClass->addInternalCall("internal_GetIs32Bit", &ScriptWinPlatformInfo::internal_GetIs32Bit);
+		metaData.scriptClass->addInternalCall("internal_SetIs32Bit", &ScriptWinPlatformInfo::internal_SetIs32Bit);
+	}
+
+	SPtr<WinPlatformInfo> ScriptWinPlatformInfo::getWinPlatformInfo() const
+	{
+		return std::static_pointer_cast<WinPlatformInfo>(mPlatformInfo);
+	}
+
+	MonoObject* ScriptWinPlatformInfo::create(const SPtr<WinPlatformInfo>& platformInfo)
+	{
+		MonoObject* managedInstance = metaData.scriptClass->createInstance();
+		ScriptWinPlatformInfo* scriptObj = ScriptWinPlatformInfo::toNative(managedInstance);
+		scriptObj->mPlatformInfo = platformInfo;
+
+		return managedInstance;
+	}
+
+	bool ScriptWinPlatformInfo::internal_GetIs32Bit(ScriptWinPlatformInfo* thisPtr)
+	{
+		return thisPtr->getWinPlatformInfo()->is32bit;
+	}
+
+	void ScriptWinPlatformInfo::internal_SetIs32Bit(ScriptWinPlatformInfo* thisPtr, bool value)
+	{
+		thisPtr->getWinPlatformInfo()->is32bit = value;
+	}
+}

+ 6 - 2
SBansheeEditor/Source/BsScriptProjectLibrary.cpp

@@ -14,6 +14,7 @@
 #include "BsScriptSpriteTexture.h"
 #include "BsScriptFont.h"
 #include "BsScriptImportOptions.h"
+#include "BsEditorApplication.h"
 
 using namespace std::placeholders;
 
@@ -131,7 +132,7 @@ namespace BansheeEngine
 		if (srcResource != nullptr)
 		{
 			Path nativePath = ProjectLibrary::instance().uuidToPath(srcResource->getNativeHandle().getUUID());
-			nativePath.getRelative(ProjectLibrary::instance().getResourcesFolder());
+			nativePath.getRelative(gEditorApplication().getProjectPath());
 
 			return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), nativePath.toWString());
 		}
@@ -257,7 +258,10 @@ namespace BansheeEngine
 		if (entry == nullptr)
 			return nullptr;
 
-		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), entry->path.toWString());
+		Path relativePath = entry->path;
+		relativePath.makeRelative(gEditorApplication().getProjectPath());
+
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), relativePath.toWString());
 	}
 
 	MonoString* ScriptLibraryEntry::internal_GetName(ScriptLibraryEntryBase* thisPtr)

+ 15 - 2
TODO.txt

@@ -26,7 +26,16 @@ VS integration will likely not work with VSExpress or Community edition
  - Community edition should work similarily to Pro, but might have a different executable and/or registry paths
 
 For later:
- - Make sure that 3rd party assemblies can be imported in the project, and that they are properly referenced in VS project generation
+ - Make sure that 3rd party assemblies can be imported in the project, and that they are properly referenced in VS project generation and compilation
+
+----------------------------------------------------------------------
+Script compilation
+
+For later:
+ - I need to hook up script compilation with assembly refresh, and the build system.
+   - e.g. when recompiling inside the editor it should automatically start compiling when changes are detected,
+     show some kind of visual indicator and refresh assemblies when its done. When publishing it should recompile
+	 assemblies for release. Also hook up console to compiler output?
 
 ----------------------------------------------------------------------
 BuiltinResources
@@ -78,10 +87,14 @@ ColorPicker
  - Sliders don't show up
 
 Other simple stuff:
- - VS integration (open VS project on doubleclick, generate project files, open on specific line)
+ - Inject an icon into an .exe (Win32 specific)
+ - Use Mono compiler to compile the C# scripts
  - C# wrapper for GUISkin (and a way to assign the current skin to a window)
  - Need to add IsPointerDoubleClicked to Input (C++ and C#)
+ - A way to add menu items from C#
  - Move all the code files into subfolders so their hierarchy is similar to VS filters
+ - Font doesn't have a C# interface
+ - Material/Shader/Technique/Pass don't have a C# interface
  - Get rid of PoolAlloc and other unused allocators (plus fix bs_new and others which have weird overloads)
 
 ----------------------------------------------------------------------