Просмотр исходного кода

Use separate debug and release assemblies when building
Updated editor build script accordingly
Don't generate debug information when building managed code in release mode

BearishSun 10 лет назад
Родитель
Сommit
ab1231720c

+ 2 - 1
BansheeEditor/Include/BsBuildManager.h

@@ -36,7 +36,8 @@ namespace BansheeEngine
 		SourceRoot, /**< Absolute path to the root folder where all the prebuilt binaries and data exist. */
 		SourceRoot, /**< Absolute path to the root folder where all the prebuilt binaries and data exist. */
 		DestinationRoot, /**< Absolute path to the root folder for a build for a specific platform. */
 		DestinationRoot, /**< Absolute path to the root folder for a build for a specific platform. */
 		NativeBinaries, /**< Folder where native binaries are stored. Relative to root. */
 		NativeBinaries, /**< Folder where native binaries are stored. Relative to root. */
-		BansheeAssemblies, /**< Folder where Banshee specific assemblies are stored. Relative to root. */
+		BansheeReleaseAssemblies, /**< Folder where Banshee specific release assemblies are stored. Relative to root. */
+		BansheeDebugAssemblies, /**< Folder where Banshee specific debug assemblies are stored. Relative to root. */
 		Data /**< Folder where builtin data is stored. Relative to root. */
 		Data /**< Folder where builtin data is stored. Relative to root. */
 	};
 	};
 
 

+ 4 - 2
BansheeEditor/Source/BsBuildManager.cpp

@@ -122,8 +122,10 @@ namespace BansheeEngine
 
 
 			return binariesPath.makeRelative(sourceRoot);
 			return binariesPath.makeRelative(sourceRoot);
 		}
 		}
-		case BuildFolder::BansheeAssemblies:
-			return Paths::ASSEMBLY_PATH;
+		case BuildFolder::BansheeDebugAssemblies:
+			return Paths::DEBUG_ASSEMBLY_PATH;
+		case BuildFolder::BansheeReleaseAssemblies:
+			return Paths::RELEASE_ASSEMBLY_PATH;
 		case BuildFolder::Data:
 		case BuildFolder::Data:
 			return Paths::ENGINE_DATA_PATH;
 			return Paths::ENGINE_DATA_PATH;
 		}
 		}

+ 5 - 5
BansheeEngine/Include/BsApplication.h

@@ -54,11 +54,6 @@ namespace BansheeEngine
 		 */
 		 */
 		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.
 		 * @brief	Returns the absolute path to the folder where script assemblies are located in.
 		 */
 		 */
@@ -100,6 +95,11 @@ namespace BansheeEngine
 		 */
 		 */
 		virtual void unloadScriptSystem();
 		virtual void unloadScriptSystem();
 
 
+		/**
+		 * @brief	Returns the absolute path to the folder where built-in assemblies are located in.
+		 */
+		virtual Path getBuiltinAssemblyFolder() const;
+
 	protected:
 	protected:
 		/**
 		/**
 		 * @brief	Translates render system type into library name.
 		 * @brief	Translates render system type into library name.

+ 9 - 3
BansheeEngine/Include/BsPaths.h

@@ -15,9 +15,14 @@ namespace BansheeEngine
 	{
 	{
 	public:
 	public:
 		/**
 		/**
-		 * @brief	Returns a path where the managed assemblies are located. Relative to working directory.
+		 * @brief	Returns a path where the managed release assemblies are located. Relative to working directory.
 		 */
 		 */
-		static const Path& getAssemblyPath();
+		static const Path& getReleaseAssemblyPath();
+
+		/**
+		 * @brief	Returns a path where the managed debug assemblies are located. Relative to working directory.
+		 */
+		static const Path& getDebugAssemblyPath();
 
 
 		/**
 		/**
 		 * @brief	Returns a path where the builtin assets are located. Relative to working directory.
 		 * @brief	Returns a path where the builtin assets are located. Relative to working directory.
@@ -49,7 +54,8 @@ namespace BansheeEngine
 		 */
 		 */
 		static Path findPath(const Path& path);
 		static Path findPath(const Path& path);
 
 
-		static const Path ASSEMBLY_PATH;
+		static const Path RELEASE_ASSEMBLY_PATH;
+		static const Path DEBUG_ASSEMBLY_PATH;
 		static const Path RUNTIME_DATA_PATH;
 		static const Path RUNTIME_DATA_PATH;
 		static const Path ENGINE_DATA_PATH;
 		static const Path ENGINE_DATA_PATH;
 	};
 	};

+ 17 - 7
BansheeEngine/Source/BsApplication.cpp

@@ -159,18 +159,28 @@ namespace BansheeEngine
 
 
 	Path Application::getBuiltinAssemblyFolder() const
 	Path Application::getBuiltinAssemblyFolder() const
 	{
 	{
-		Path assemblyFolder = FileSystem::getWorkingDirectoryPath();
-		assemblyFolder.append(Paths::getAssemblyPath());
+		Path releaseAssemblyFolder = FileSystem::getWorkingDirectoryPath();
+		releaseAssemblyFolder.append(Paths::getReleaseAssemblyPath());
 
 
-		return assemblyFolder;
+		Path debugAssemblyFolder = FileSystem::getWorkingDirectoryPath();
+		debugAssemblyFolder.append(Paths::getDebugAssemblyPath());
+
+#if BS_DEBUG_MODE == 0
+		if (FileSystem::exists(releaseAssemblyFolder))
+			return releaseAssemblyFolder;
+
+		return debugAssemblyFolder;
+#else
+		if (FileSystem::exists(debugAssemblyFolder))
+			return debugAssemblyFolder;
+
+		return releaseAssemblyFolder;
+#endif
 	}
 	}
 
 
 	Path Application::getScriptAssemblyFolder() const
 	Path Application::getScriptAssemblyFolder() const
 	{
 	{
-		Path assemblyFolder = FileSystem::getWorkingDirectoryPath();
-		assemblyFolder.append(Paths::getAssemblyPath());
-
-		return assemblyFolder;
+		return getBuiltinAssemblyFolder();
 	}
 	}
 
 
 	String Application::getLibNameForRenderAPI(RenderAPIPlugin plugin)
 	String Application::getLibNameForRenderAPI(RenderAPIPlugin plugin)

+ 10 - 3
BansheeEngine/Source/BsPaths.cpp

@@ -5,13 +5,20 @@ namespace BansheeEngine
 {
 {
 	static const Path RAW_APP_ROOT = "..\\..\\..\\"; // Path to the application root when files haven't been packaged yet (e.g. running from debugger)
 	static const Path RAW_APP_ROOT = "..\\..\\..\\"; // Path to the application root when files haven't been packaged yet (e.g. running from debugger)
 
 
-	const Path Paths::ASSEMBLY_PATH = "bin\\Assemblies\\";
+	const Path Paths::RELEASE_ASSEMBLY_PATH = "bin\\Assemblies\\Release\\";
+	const Path Paths::DEBUG_ASSEMBLY_PATH = "bin\\Assemblies\\Debug\\";
 	const Path Paths::RUNTIME_DATA_PATH = "Data\\";
 	const Path Paths::RUNTIME_DATA_PATH = "Data\\";
 	const Path Paths::ENGINE_DATA_PATH = RUNTIME_DATA_PATH + "Engine\\";
 	const Path Paths::ENGINE_DATA_PATH = RUNTIME_DATA_PATH + "Engine\\";
 
 
-	const Path& Paths::getAssemblyPath()
+	const Path& Paths::getReleaseAssemblyPath()
 	{
 	{
-		static Path path = findPath(ASSEMBLY_PATH);
+		static Path path = findPath(RELEASE_ASSEMBLY_PATH);
+		return path;
+	}
+
+	const Path& Paths::getDebugAssemblyPath()
+	{
+		static Path path = findPath(DEBUG_ASSEMBLY_PATH);
 		return path;
 		return path;
 	}
 	}
 
 

+ 6 - 3
ExampleProject/Main/Main.cpp

@@ -80,7 +80,7 @@ namespace BansheeEngine
 	/**
 	/**
 	 * Called when the selected video mode changes in the video mode list box.
 	 * Called when the selected video mode changes in the video mode list box.
 	 */
 	 */
-	void videoModeChanged(UINT32 idx);
+	void videoModeChanged(UINT32 idx, bool enabled);
 
 
 	/**
 	/**
 	 * Triggered whenever a virtual button is released.
 	 * Triggered whenever a virtual button is released.
@@ -133,7 +133,7 @@ int CALLBACK WinMain(
 
 
 namespace BansheeEngine
 namespace BansheeEngine
 {
 {
-	Path dataPath = Application::findPath(RUNTIME_DATA_PATH);
+	Path dataPath = Paths::getRuntimeDataPath();
 	Path exampleModelPath = dataPath + "Examples\\Dragon.fbx";
 	Path exampleModelPath = dataPath + "Examples\\Dragon.fbx";
 	Path exampleTexturePath = dataPath + "Examples\\Dragon.tga";
 	Path exampleTexturePath = dataPath + "Examples\\Dragon.tga";
 	Path exampleShaderPath = dataPath + "Examples\\Example.bsl";
 	Path exampleShaderPath = dataPath + "Examples\\Example.bsl";
@@ -370,7 +370,7 @@ namespace BansheeEngine
 		rightLayout->addNewElement<GUIFixedSpace>(30);
 		rightLayout->addNewElement<GUIFixedSpace>(30);
 
 
 		// Add a profiler overlay object that is responsible for displaying CPU and GPU profiling GUI
 		// Add a profiler overlay object that is responsible for displaying CPU and GPU profiling GUI
-		profilerOverlay = guiSO->addComponent<ProfilerOverlay>(guiCamera.getInternalPtr());
+		profilerOverlay = guiSO->addComponent<ProfilerOverlay>(guiCamera->_getCamera());
 
 
 		// Set up video mode list box
 		// Set up video mode list box
 		// First get a list of output devices
 		// First get a list of output devices
@@ -455,6 +455,9 @@ namespace BansheeEngine
 
 
 	void videoModeChanged(UINT32 idx, bool enabled)
 	void videoModeChanged(UINT32 idx, bool enabled)
 	{
 	{
+		if (!enabled)
+			return;
+
 		selectedVideoMode = videoModes[idx];
 		selectedVideoMode = videoModes[idx];
 
 
 		if (fullscreen)
 		if (fullscreen)

+ 10 - 4
MBansheeEditor/BuildManager.cs

@@ -283,7 +283,12 @@ namespace BansheeEditor
             Directory.CreateDirectory(destRoot);
             Directory.CreateDirectory(destRoot);
 
 
             // Compile game assembly
             // Compile game assembly
-            string bansheeAssemblyFolder = GetBuildFolder(BuildFolder.BansheeAssemblies, activePlatform);
+            string bansheeAssemblyFolder;
+            if(platformInfo.Debug)
+                bansheeAssemblyFolder = GetBuildFolder(BuildFolder.BansheeDebugAssemblies, activePlatform);
+            else
+                bansheeAssemblyFolder = GetBuildFolder(BuildFolder.BansheeReleaseAssemblies, activePlatform);
+
             string srcBansheeAssemblyFolder = Path.Combine(srcRoot, bansheeAssemblyFolder);
             string srcBansheeAssemblyFolder = Path.Combine(srcRoot, bansheeAssemblyFolder);
             string destBansheeAssemblyFolder = Path.Combine(destRoot, bansheeAssemblyFolder);
             string destBansheeAssemblyFolder = Path.Combine(destRoot, bansheeAssemblyFolder);
 
 
@@ -291,7 +296,6 @@ namespace BansheeEditor
             CompilerInstance ci = ScriptCompiler.CompileAsync(ScriptAssemblyType.Game, ActivePlatform, platformInfo.Debug, destBansheeAssemblyFolder);
             CompilerInstance ci = ScriptCompiler.CompileAsync(ScriptAssemblyType.Game, ActivePlatform, platformInfo.Debug, destBansheeAssemblyFolder);
 
 
             // Copy engine assembly
             // Copy engine assembly
-            // TODO - Copy Release version of engine assembly if not in debug mode, and Debug otherwise
             {
             {
                 string srcFile = Path.Combine(srcBansheeAssemblyFolder, EditorApplication.EngineAssemblyName);
                 string srcFile = Path.Combine(srcBansheeAssemblyFolder, EditorApplication.EngineAssemblyName);
                 string destFile = Path.Combine(destBansheeAssemblyFolder, EditorApplication.EngineAssemblyName);
                 string destFile = Path.Combine(destBansheeAssemblyFolder, EditorApplication.EngineAssemblyName);
@@ -455,8 +459,10 @@ namespace BansheeEditor
             DestinationRoot,
             DestinationRoot,
             /// <summary>Folder where native binaries are stored. Relative to root.</summary>
             /// <summary>Folder where native binaries are stored. Relative to root.</summary>
             NativeBinaries,
             NativeBinaries,
-            /// <summary>Folder where Banshee specific assemblies are stored. Relative to root.</summary>
-            BansheeAssemblies,
+            /// <summary>Folder where Banshee specific debug assemblies are stored. Relative to root.</summary>
+            BansheeDebugAssemblies,
+            /// <summary>Folder where Banshee specific release assemblies are stored. Relative to root.</summary>
+            BansheeReleaseAssemblies,
             /// <summary>Folder where .NET framework assemblies are stored. Relative to root.</summary>
             /// <summary>Folder where .NET framework assemblies are stored. Relative to root.</summary>
             FrameworkAssemblies,
             FrameworkAssemblies,
             /// <summary>Folder where miscelaneous Mono files are stored. Relative to root.</summary>
             /// <summary>Folder where miscelaneous Mono files are stored. Relative to root.</summary>

+ 14 - 6
MBansheeEditor/EditorApplication.cs

@@ -141,11 +141,6 @@ namespace BansheeEditor
         /// </summary>
         /// </summary>
         internal static string CompilerPath { get { return Internal_GetCompilerPath(); } }
         internal static string CompilerPath { get { return Internal_GetCompilerPath(); } }
 
 
-        /// <summary>
-        /// Returns the path to the folder where the builtin script assemblies are located at.
-        /// </summary>
-        internal static string BuiltinAssemblyPath { get { return Internal_GetBuiltinAssemblyPath(); } }
-
         /// <summary>
         /// <summary>
         /// Returns the path to the folder where the custom script assemblies are located at.
         /// Returns the path to the folder where the custom script assemblies are located at.
         /// </summary>
         /// </summary>
@@ -176,6 +171,16 @@ namespace BansheeEditor
         /// </summary>
         /// </summary>
         internal static string ScriptEditorAssemblyName { get { return Internal_GetScriptEditorAssemblyName(); } }
         internal static string ScriptEditorAssemblyName { get { return Internal_GetScriptEditorAssemblyName(); } }
 
 
+        /// <summary>
+        /// Returns the path to the folder where the builtin release script assemblies are located at.
+        /// </summary>
+        internal static string BuiltinReleaseAssemblyPath { get { return Internal_GetBuiltinReleaseAssemblyPath(); } }
+
+        /// <summary>
+        /// Returns the path to the folder where the builtin debug script assemblies are located at.
+        /// </summary>
+        internal static string BuiltinDebugAssemblyPath { get { return Internal_GetBuiltinDebugAssemblyPath(); } }
+
         private static EditorApplication instance;
         private static EditorApplication instance;
         private static FolderMonitor monitor;
         private static FolderMonitor monitor;
         private static ScriptCodeManager codeManager;
         private static ScriptCodeManager codeManager;
@@ -738,7 +743,10 @@ namespace BansheeEditor
         private static extern string Internal_GetCompilerPath();
         private static extern string Internal_GetCompilerPath();
 
 
         [MethodImpl(MethodImplOptions.InternalCall)]
         [MethodImpl(MethodImplOptions.InternalCall)]
-        private static extern string Internal_GetBuiltinAssemblyPath();
+        private static extern string Internal_GetBuiltinReleaseAssemblyPath();
+
+        [MethodImpl(MethodImplOptions.InternalCall)]
+        private static extern string Internal_GetBuiltinDebugAssemblyPath();
 
 
         [MethodImpl(MethodImplOptions.InternalCall)]
         [MethodImpl(MethodImplOptions.InternalCall)]
         private static extern string Internal_GetScriptAssemblyPath();
         private static extern string Internal_GetScriptAssemblyPath();

+ 4 - 4
MBansheeEditor/MBansheeEditor.csproj

@@ -16,15 +16,15 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
-    <OutputPath>..\bin\Assemblies\</OutputPath>
+    <OutputPath>..\bin\Assemblies\Debug\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
+    <DebugType>none</DebugType>
     <Optimize>true</Optimize>
     <Optimize>true</Optimize>
-    <OutputPath>..\bin\Assemblies\</OutputPath>
+    <OutputPath>..\bin\Assemblies\Release\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
@@ -166,7 +166,7 @@
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
   <PropertyGroup>
-    <PostBuildEvent>$(SolutionDir)Dependencies\tools\pdb2mdb.bat "$(TargetPath)"</PostBuildEvent>
+    <PostBuildEvent>$(SolutionDir)Dependencies\tools\pdb2mdb.bat "$(TargetPath)" "$(ConfigurationName)"</PostBuildEvent>
   </PropertyGroup>
   </PropertyGroup>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
        Other similar extension points exist, see Microsoft.Common.targets.

+ 6 - 2
MBansheeEditor/ScriptCompiler.cs

@@ -66,12 +66,16 @@ namespace BansheeEditor
             string[] assemblies;
             string[] assemblies;
             string outputFile;
             string outputFile;
 
 
+            string builtinAssemblyPath = debug
+                    ? EditorApplication.BuiltinDebugAssemblyPath
+                    : EditorApplication.BuiltinReleaseAssemblyPath;
+
             string[] frameworkAssemblies = BuildManager.GetFrameworkAssemblies(platform);
             string[] frameworkAssemblies = BuildManager.GetFrameworkAssemblies(platform);
             if (type == ScriptAssemblyType.Game)
             if (type == ScriptAssemblyType.Game)
             {
             {
                 assemblyFolders = new string[]
                 assemblyFolders = new string[]
                 {
                 {
-                    EditorApplication.BuiltinAssemblyPath, 
+                    builtinAssemblyPath, 
                     EditorApplication.FrameworkAssemblyPath
                     EditorApplication.FrameworkAssemblyPath
                 };
                 };
 
 
@@ -84,7 +88,7 @@ namespace BansheeEditor
             {
             {
                 assemblyFolders = new string[]
                 assemblyFolders = new string[]
                 {
                 {
-                    EditorApplication.BuiltinAssemblyPath, 
+                    builtinAssemblyPath, 
                     EditorApplication.FrameworkAssemblyPath,
                     EditorApplication.FrameworkAssemblyPath,
                     EditorApplication.ScriptAssemblyPath
                     EditorApplication.ScriptAssemblyPath
                 };
                 };

+ 4 - 4
MBansheeEngine/MBansheeEngine.csproj

@@ -19,15 +19,15 @@
     <DebugSymbols>true</DebugSymbols>
     <DebugSymbols>true</DebugSymbols>
     <DebugType>full</DebugType>
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
     <Optimize>false</Optimize>
-    <OutputPath>..\bin\Assemblies\</OutputPath>
+    <OutputPath>..\bin\Assemblies\Debug\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
+    <DebugType>none</DebugType>
     <Optimize>true</Optimize>
     <Optimize>true</Optimize>
-    <OutputPath>..\bin\Assemblies\</OutputPath>
+    <OutputPath>..\bin\Assemblies\Release\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
@@ -155,7 +155,7 @@
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
   <PropertyGroup>
-    <PostBuildEvent>$(SolutionDir)Dependencies\tools\pdb2mdb.bat "$(TargetPath)"</PostBuildEvent>
+    <PostBuildEvent>$(SolutionDir)Dependencies\tools\pdb2mdb.bat "$(TargetPath)" "$(ConfigurationName)"</PostBuildEvent>
   </PropertyGroup>
   </PropertyGroup>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
        Other similar extension points exist, see Microsoft.Common.targets.

+ 2 - 1
SBansheeEditor/Include/BsScriptBuildManager.h

@@ -14,7 +14,8 @@ namespace BansheeEngine
 		SourceRoot, /**< Absolute path to the root folder where all the prebuilt binaries and data exist. */
 		SourceRoot, /**< Absolute path to the root folder where all the prebuilt binaries and data exist. */
 		DestinationRoot, /**< Absolute path to the root folder for a build for a specific platform. */
 		DestinationRoot, /**< Absolute path to the root folder for a build for a specific platform. */
 		NativeBinaries, /**< Folder where native binaries are stored. Relative to root. */
 		NativeBinaries, /**< Folder where native binaries are stored. Relative to root. */
-		BansheeAssemblies, /**< Folder where Banshee specific assemblies are stored. Relative to root. */
+		BansheeDebugAssemblies, /**< Folder where Banshee specific debug assemblies are stored. Relative to root. */
+		BansheeReleaseAssemblies, /**< Folder where Banshee specific release assemblies are stored. Relative to root. */
 		FrameworkAssemblies, /**< Folder where .NET framework assemblies are stored. Relative to root. */
 		FrameworkAssemblies, /**< Folder where .NET framework assemblies are stored. Relative to root. */
 		Mono, /**< Folder where miscelaneous Mono files are stored. Relative to root. */
 		Mono, /**< Folder where miscelaneous Mono files are stored. Relative to root. */
 		Data /**< Folder where builtin data is stored. Relative to root. */
 		Data /**< Folder where builtin data is stored. Relative to root. */

+ 2 - 1
SBansheeEditor/Include/BsScriptEditorApplication.h

@@ -51,7 +51,8 @@ namespace BansheeEngine
 		static MonoString* internal_GetProjectName();
 		static MonoString* internal_GetProjectName();
 		static bool internal_GetProjectLoaded();
 		static bool internal_GetProjectLoaded();
 		static MonoString* internal_GetCompilerPath();
 		static MonoString* internal_GetCompilerPath();
-		static MonoString* internal_GetBuiltinAssemblyPath();
+		static MonoString* internal_GetBuiltinReleaseAssemblyPath();
+		static MonoString* internal_GetBuiltinDebugAssemblyPath();
 		static MonoString* internal_GetScriptAssemblyPath();
 		static MonoString* internal_GetScriptAssemblyPath();
 		static MonoString* internal_GetFrameworkAssemblyPath();
 		static MonoString* internal_GetFrameworkAssemblyPath();
 		static MonoString* internal_GetEngineAssemblyName();
 		static MonoString* internal_GetEngineAssemblyName();

+ 5 - 2
SBansheeEditor/Source/BsScriptBuildManager.cpp

@@ -144,8 +144,11 @@ namespace BansheeEngine
 			case ScriptBuildFolder::NativeBinaries:
 			case ScriptBuildFolder::NativeBinaries:
 				nativeFolderType = BuildFolder::NativeBinaries;
 				nativeFolderType = BuildFolder::NativeBinaries;
 				break;
 				break;
-			case ScriptBuildFolder::BansheeAssemblies:
-				nativeFolderType = BuildFolder::BansheeAssemblies;
+			case ScriptBuildFolder::BansheeDebugAssemblies:
+				nativeFolderType = BuildFolder::BansheeDebugAssemblies;
+				break;
+			case ScriptBuildFolder::BansheeReleaseAssemblies:
+				nativeFolderType = BuildFolder::BansheeReleaseAssemblies;
 				break;
 				break;
 			case ScriptBuildFolder::Data:
 			case ScriptBuildFolder::Data:
 				nativeFolderType = BuildFolder::Data;
 				nativeFolderType = BuildFolder::Data;

+ 14 - 4
SBansheeEditor/Source/BsScriptEditorApplication.cpp

@@ -42,7 +42,8 @@ namespace BansheeEngine
 		metaData.scriptClass->addInternalCall("Internal_GetProjectName", &ScriptEditorApplication::internal_GetProjectName);
 		metaData.scriptClass->addInternalCall("Internal_GetProjectName", &ScriptEditorApplication::internal_GetProjectName);
 		metaData.scriptClass->addInternalCall("Internal_GetProjectLoaded", &ScriptEditorApplication::internal_GetProjectLoaded);
 		metaData.scriptClass->addInternalCall("Internal_GetProjectLoaded", &ScriptEditorApplication::internal_GetProjectLoaded);
 		metaData.scriptClass->addInternalCall("Internal_GetCompilerPath", &ScriptEditorApplication::internal_GetCompilerPath);
 		metaData.scriptClass->addInternalCall("Internal_GetCompilerPath", &ScriptEditorApplication::internal_GetCompilerPath);
-		metaData.scriptClass->addInternalCall("Internal_GetBuiltinAssemblyPath", &ScriptEditorApplication::internal_GetBuiltinAssemblyPath);
+		metaData.scriptClass->addInternalCall("Internal_GetBuiltinReleaseAssemblyPath", &ScriptEditorApplication::internal_GetBuiltinReleaseAssemblyPath);
+		metaData.scriptClass->addInternalCall("Internal_GetBuiltinDebugAssemblyPath", &ScriptEditorApplication::internal_GetBuiltinDebugAssemblyPath);
 		metaData.scriptClass->addInternalCall("Internal_GetScriptAssemblyPath", &ScriptEditorApplication::internal_GetScriptAssemblyPath);
 		metaData.scriptClass->addInternalCall("Internal_GetScriptAssemblyPath", &ScriptEditorApplication::internal_GetScriptAssemblyPath);
 		metaData.scriptClass->addInternalCall("Internal_GetFrameworkAssemblyPath", &ScriptEditorApplication::internal_GetFrameworkAssemblyPath);
 		metaData.scriptClass->addInternalCall("Internal_GetFrameworkAssemblyPath", &ScriptEditorApplication::internal_GetFrameworkAssemblyPath);
 		metaData.scriptClass->addInternalCall("Internal_GetEngineAssemblyName", &ScriptEditorApplication::internal_GetEngineAssemblyName);
 		metaData.scriptClass->addInternalCall("Internal_GetEngineAssemblyName", &ScriptEditorApplication::internal_GetEngineAssemblyName);
@@ -157,11 +158,20 @@ namespace BansheeEngine
 		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), compilerPath.toWString());
 		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), compilerPath.toWString());
 	}
 	}
 
 
-	MonoString* ScriptEditorApplication::internal_GetBuiltinAssemblyPath()
+	MonoString* ScriptEditorApplication::internal_GetBuiltinReleaseAssemblyPath()
 	{
 	{
-		Path assemblyFolder = gEditorApplication().getBuiltinAssemblyFolder();
+		Path releaseAssemblyFolder = FileSystem::getWorkingDirectoryPath();
+		releaseAssemblyFolder.append(Paths::getReleaseAssemblyPath());
 
 
-		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), assemblyFolder.toWString());
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), releaseAssemblyFolder.toWString());
+	}
+
+	MonoString* ScriptEditorApplication::internal_GetBuiltinDebugAssemblyPath()
+	{
+		Path debugAssemblyFolder = FileSystem::getWorkingDirectoryPath();
+		debugAssemblyFolder.append(Paths::getDebugAssemblyPath());
+
+		return MonoUtil::wstringToMono(MonoManager::instance().getDomain(), debugAssemblyFolder.toWString());
 	}
 	}
 
 
 	MonoString* ScriptEditorApplication::internal_GetScriptAssemblyPath()
 	MonoString* ScriptEditorApplication::internal_GetScriptAssemblyPath()

+ 1 - 1
SBansheeEditor/Source/BsScriptPlatformInfo.cpp

@@ -66,7 +66,7 @@ namespace BansheeEngine
 	MonoObject* ScriptPlatformInfo::internal_GetMainScene(ScriptPlatformInfoBase* thisPtr)
 	MonoObject* ScriptPlatformInfo::internal_GetMainScene(ScriptPlatformInfoBase* thisPtr)
 	{
 	{
 		HPrefab prefab = thisPtr->getPlatformInfo()->mainScene;
 		HPrefab prefab = thisPtr->getPlatformInfo()->mainScene;
-
+		
 		if (prefab != nullptr)
 		if (prefab != nullptr)
 		{
 		{
 			ScriptPrefab* scriptPrefab;
 			ScriptPrefab* scriptPrefab;

+ 22 - 0
Scripts/build_editor_win_x64.py

@@ -0,0 +1,22 @@
+#!/usr/bin/python
+
+# Builds and packages the editor. Make sure you have MSBuild
+# installed and the path is valid.
+
+# Usage: "build_editor_win_x64 $Configuration"
+# Where: $Configuration - e.g. DebugRelease, Release
+
+import os
+
+msbuildPath = "C:\\Program Files (x86)\\MSBuild\\12.0\\Bin\\amd64"
+configuration = 'DebugRelease' #sys.argv[1]
+solutionPath = "..\\BansheeEngine.sln"
+
+if not os.path.exists(msbuildPath):
+    print("MSBuild path is not valid. Used path {0}: ".format(msbuildPath))
+    exit;
+
+os.environ["PATH"] += os.pathsep + msbuildPath
+os.system("msbuild {0} /p:Configuration=DebugRelease;Platform=x64".format(solutionPath))
+os.system("msbuild {0} /p:Configuration=Release;Platform=x64".format(solutionPath))
+os.system("package_editor.py " + configuration)

+ 15 - 12
Scripts/package_editor.py

@@ -38,15 +38,18 @@ def ignore_data(path, entries):
 
 
     return list(set(dataFoldersToIgnore) & set(entries))    
     return list(set(dataFoldersToIgnore) & set(entries))    
 
 
-if os.path.exists(outputBaseFolder):
-    shutil.rmtree(outputBaseFolder)
-
-os.makedirs(outputBaseFolder)
-shutil.copytree(inputDataFolder, outputDataFolder, False, ignore_data)
-shutil.copytree(inputAssembliesFolder, outputAssembliesFolder)
-shutil.copytree(inputMonoFolder, outputMonoFolder)
-
-for root, dirs, files in os.walk(inputLibFolder):
-    for file in files:
-        filePath = os.path.join(root, file)
-        shutil.copy(filePath, outputLibFolder)
+def package_editor():
+    if os.path.exists(outputBaseFolder):
+        shutil.rmtree(outputBaseFolder)
+
+    os.makedirs(outputBaseFolder)
+    shutil.copytree(inputDataFolder, outputDataFolder, False, ignore_data)
+    shutil.copytree(inputAssembliesFolder, outputAssembliesFolder)
+    shutil.copytree(inputMonoFolder, outputMonoFolder)
+
+    for root, dirs, files in os.walk(inputLibFolder):
+        for file in files:
+            filePath = os.path.join(root, file)
+            shutil.copy(filePath, outputLibFolder)
+
+package_editor()