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

Merge branch 'master' of /media/bearishsun/FastData/FromLinux/Banshee/BansheeEngineSrv

Marko Pintera 8 лет назад
Родитель
Сommit
c88de0a52e

+ 1 - 1
Documentation/GitHub/features.md

@@ -110,7 +110,7 @@ All features listed here are the ones currently available (implemented). If you
 	* Collision filtering
 	* Discrete or continuous collision detection
 * __Scripting__
-  * C# 6.0
+  * C# 7.0
   * Separate high level engine API
   * Integrated runtime for maximum performance
   * Full access to .NET framework

+ 1 - 0
Documentation/MonoIntegrationGuide.txt

@@ -1,6 +1,7 @@
 ---------------------------------Compiling runtime-------------------------------------
  - Grab Mono 5.4 (or newer) source code
   - From tarball: https://download.mono-project.com/sources/mono/
+   - If on Windows, get the release from GitHub instead as tarballs don't seem to be configured for Windows builds
   - Optionally check it out from git repository: https://github.com/mono/mono
    - If on Windows, make sure your git client has this set: "git config --global core.autocrlf input" as otherwise you'll have problems with line endings during later steps
 

+ 5 - 0
Source/BansheeEditor/Library/BsProjectLibrary.cpp

@@ -596,7 +596,12 @@ namespace bs
 		WString replace(L"\\\\&");
 		WString escapedPattern = std::regex_replace(pattern, escape, replace, std::regex_constants::match_default | std::regex_constants::format_sed);
 
+		// For some reason MSVC stdlib implementation requires a different pattern than stdlib one
+#if BS_PLATFORM == BS_PLATFORM_WIN32
+		std::wregex wildcard(L"\\\\\\*");
+#else
 		std::wregex wildcard(L"\\\\\\\\\\*");
+#endif
 		WString wildcardReplace(L".*");
 		WString searchPattern = std::regex_replace(escapedPattern, wildcard, L".*");
 

+ 1 - 1
Source/BansheeEngine/Utility/BsPaths.cpp

@@ -61,7 +61,7 @@ namespace bs
 			Path anchorFile = path;
 			anchorFile.setFilename("BansheeEngine" + String(DynLib::EXTENSION));
 
-			if (!FileSystem::exists(path))
+			if (!FileSystem::exists(anchorFile))
 			{
 				path = BINARIES_PATH;
 				if (!FileSystem::exists(path))

+ 0 - 1
Source/BansheeGLRenderAPI/Win32/BsWin32GLSupport.cpp

@@ -126,7 +126,6 @@ namespace bs { namespace ct
 		}
 		else
 		{
-			rapi->_getMainContext()->setCurrent();
 			glrc = wglGetCurrentContext();
 		}
 

+ 2 - 1
Source/BansheeGLRenderAPI/Win32/BsWin32RenderWindow.cpp

@@ -32,7 +32,6 @@ namespace bs
 
 	Win32RenderWindow::~Win32RenderWindow()
 	{
-		Platform::resetNonClientAreas(*this);
 	}
 
 	void Win32RenderWindow::getCustomAttribute(const String& name, void* pData) const
@@ -109,6 +108,8 @@ namespace bs
 			bs_free(mDeviceName);
 			mDeviceName = nullptr;
 		}
+
+		Platform::resetNonClientAreas(*this);
 	}
 
 	void Win32RenderWindow::initialize()

+ 1 - 0
Source/BansheeMono/BsMonoExec.cpp

@@ -1,6 +1,7 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2017 Marko Pintera ([email protected]). All rights reserved. **********************//
 #ifdef _WIN32
+	#define _CRT_SECURE_NO_WARNINGS 1
 	#include <direct.h>
 	#define getcwd _getcwd
 #else

+ 2 - 8
Source/BansheeUtility/Utility/BsAny.h

@@ -76,19 +76,13 @@ namespace bs
 		template <typename ValueType>
 		Any& operator= (const ValueType& rhs)
 		{
-			if(mData)
-				bs_delete(mData);
-
-			mData = bs_new<Data<ValueType>>(rhs);
+			Any(rhs).swap(*this);
 			return *this;
 		}
 
 		Any& operator= (const Any& rhs)
 		{
-			if(mData)
-				bs_delete(mData);
-
-			mData = rhs.mData != nullptr ? rhs.mData->clone() : nullptr;
+			Any(rhs).swap(*this);
 			return *this;
 		}
 

+ 0 - 6
Source/BansheeVulkanRenderAPI/CMakeLists.txt

@@ -14,12 +14,6 @@ set(BansheeVulkanRenderAPI_INC
 	"../BansheeCore"
 )
 
-if(WIN32)
-	set(BansheeVulkanRenderAPI_INC ${BansheeVulkanRenderAPI_INC} "Source/Win32")
-else()
-# TODO_OTHER_PLATFORMS_GO_HERE
-endif()	
-	
 include_directories(${BansheeVulkanRenderAPI_INC})	
 	
 # Target

+ 2 - 2
Source/CMake/Modules/FindBansheeSBGen.cmake

@@ -4,10 +4,10 @@
 #  BansheeSBGen_EXECUTABLE_PATH
 #  BansheeSBGen_FOUND
 
-set(BansheeSBGen_INSTALL_DIRS ${PROJECT_SOURCE_DIR}/../Dependencies/tools/BansheeSBGen CACHE PATH "")
+set(BansheeSBGen_INSTALL_DIRS ${PROJECT_SOURCE_DIR}/../Dependencies/tools/BansheeSBGen/bin CACHE PATH "")
 
 message(STATUS "Looking for BansheeSBGen installation...")
-find_program(BansheeSBGen_EXECUTABLE NAMES BansheeSBGen BansheeSBGen_v1.0.0 PATHS ${BansheeSBGen_INSTALL_DIRS})
+find_program(BansheeSBGen_EXECUTABLE NAMES BansheeSBGen PATHS ${BansheeSBGen_INSTALL_DIRS})
 
 if(BansheeSBGen_EXECUTABLE)
 	set(BansheeSBGen_FOUND TRUE)

+ 1 - 1
Source/CMakeLists.txt

@@ -5,7 +5,7 @@ project (Banshee)
 set (BS_VERSION_MAJOR 0)
 set (BS_VERSION_MINOR 4)
 
-set (BS_PREBUILT_DEPENDENCIES_VERSION 13)
+set (BS_PREBUILT_DEPENDENCIES_VERSION 14)
 set (BS_SRC_DEPENDENCIES_VERSION 15)
 set (BS_BUILTIN_ASSETS_VERSION 3)
 

+ 5 - 2
Source/SBansheeEngine/Wrappers/BsScriptSceneObject.cpp

@@ -405,8 +405,11 @@ namespace bs
 			ScriptGameObjectManager::instance().destroyScriptSceneObject(this);
 		else
 		{
-			MonoUtil::freeGCHandle(mManagedHandle);
-			mManagedHandle = 0;
+			if (mManagedHandle != 0)
+			{
+				MonoUtil::freeGCHandle(mManagedHandle);
+				mManagedHandle = 0;
+			}
 		}
 	}