Browse Source

Build: Updated 'bsf' version

BearishSun 6 years ago
parent
commit
ea12a0b0ea

+ 1 - 17
Source/EditorCore/BsEditorApplication.cpp

@@ -67,7 +67,7 @@ namespace bs
 
 	Path getEditorSettingsPath()
 	{
-		return gEditorApplication().getDataPath() + "Settings.asset";
+		return Paths::getEditorDataPath() + "Settings.asset";
 	}
 
 	EditorApplication::EditorApplication()
@@ -84,22 +84,6 @@ namespace bs
 
 	void EditorApplication::onStartUp()
 	{
-		// Find the path to data files
-		//// First, look for EditorData folder in the direct descendant of the working directory 
-		if (FileSystem::exists("EditorData"))
-		{
-			mBuiltinDataPath = FileSystem::getWorkingDirectoryPath();
-			mBuiltinDataPath.append("EditorData/");
-		}
-		else
-		{
-			// Then check the source distribution itself, in case we're running directly from the build directory
-			mBuiltinDataPath = Path(RAW_APP_ROOT) + Path("Data/");
-
-			if (!FileSystem::exists(mBuiltinDataPath))
-				LOGERR("Cannot find builtin assets for the editor at path '" + mBuiltinDataPath.toString() + "'.");
-		}
-
 		Application::onStartUp();
 
 		// In editor we render game on a separate surface, handled in Game window

+ 0 - 5
Source/EditorCore/BsEditorApplication.h

@@ -31,9 +31,6 @@ namespace bs
 		/**	Returns the name of the currently loaded project. */
 		const String& getProjectName() const { return mProjectName; }
 
-		/**	Returns the absolute path where the builtin editor assets are located. */
-		Path getDataPath() const { return mBuiltinDataPath; }
-
 		/** Returns a set of serializable editor settings that contain every globally customizable editor property. */
 		SPtr<EditorSettings> getEditorSettings() const { return mEditorSettings; }
 
@@ -136,8 +133,6 @@ namespace bs
 		SPtr<EditorSettings> mEditorSettings;
 		SPtr<ProjectSettings> mProjectSettings;
 
-		Path mBuiltinDataPath;
-
 		bool mIsProjectLoaded;
 		Path mProjectPath;
 		String mProjectName;

+ 1 - 1
Source/EditorCore/Build/BsBuildManager.cpp

@@ -143,7 +143,7 @@ namespace bs
 		{
 		case PlatformType::Windows:
 		{
-			Path output = gEditorApplication().getDataPath() + "Binaries/Win64/Game.exe";
+			Path output = Paths::getEditorDataPath() + "Binaries/Win64/Game.exe";
 			return output;
 		}
 		default:

+ 4 - 9
Source/EditorCore/Build/BsBuiltinEditorResources.cpp

@@ -104,13 +104,13 @@ namespace bs
 	BuiltinEditorResources::BuiltinEditorResources()
 	{
 		// Set up paths
-		BuiltinRawDataFolder = gEditorApplication().getDataPath() + "Raw/";
+		BuiltinRawDataFolder = Paths::getEditorDataPath() + "Raw/";
 		EditorRawSkinFolder = BuiltinRawDataFolder + SkinFolder;
 		EditorRawIconsFolder = BuiltinRawDataFolder + IconFolder;
 		EditorRawShaderFolder = BuiltinRawDataFolder + ShaderFolder;
 		EditorRawShaderIncludeFolder = BuiltinRawDataFolder + ShaderIncludeFolder;
 
-		BuiltinDataFolder = gEditorApplication().getDataPath();
+		BuiltinDataFolder = Paths::getEditorDataPath();
 		EditorSkinFolder = BuiltinDataFolder + SkinFolder;
 		EditorSkinSpritesFolder = EditorSkinFolder + SpriteSubFolder;
 		EditorIconFolder = BuiltinDataFolder + IconFolder;
@@ -692,7 +692,7 @@ namespace bs
 
 	SPtr<PixelData> BuiltinEditorResources::getSplashScreen()
 	{
-		Path splashScreenPath = gEditorApplication().getDataPath() + (String(SplashScreenName) + ".asset");
+		Path splashScreenPath = Paths::getEditorDataPath() + (String(SplashScreenName) + ".asset");
 		FileDecoder fd(splashScreenPath);
 
 		return std::static_pointer_cast<PixelData>(fd.decode());
@@ -722,13 +722,8 @@ namespace bs
 		return StringUtil::BLANK;
 	}
 
-	Path BuiltinEditorResources::getShaderIncludeFolder()
-	{
-		return gEditorApplication().getDataPath() + ShaderIncludeFolder;
-	}
-
 	Path BuiltinEditorResources::getDefaultWidgetLayoutPath()
 	{
-		return gEditorApplication().getDataPath() + "Layout.asset";
+		return Paths::getEditorDataPath() + "Layout.asset";
 	}
 }

+ 1 - 1
Source/EditorCore/Library/BsEditorShaderIncludeHandler.cpp

@@ -61,7 +61,7 @@ namespace bs
 		{
 			if (name.size() > 8)
 			{
-				Path fullPath = BuiltinEditorResources::getShaderIncludeFolder();
+				Path fullPath = BuiltinResources::getEditorShaderIncludeFolder();
 				Path includePath = name.substr(9, name.size() - 9);
 
 				fullPath.append(includePath);

+ 0 - 3
Source/EditorCore/Utility/BsBuiltinEditorResources.h

@@ -205,9 +205,6 @@ namespace bs
 		/**	Returns image data the Banshee Engine splash screen. */
 		static SPtr<PixelData> getSplashScreen();
 
-		/**	Returns absolute path to the builtin shader include folder. */
-		static Path getShaderIncludeFolder();
-
 		/**	Returns absolute path to the default widget layout file. */
 		static Path getDefaultWidgetLayoutPath();
 

+ 1 - 1
Source/bsf

@@ -1 +1 @@
-Subproject commit 21384816ad626895b1898a7a7f9e18a11e1f0761
+Subproject commit f5b1445f99a86c840ad86210360ab4e1b6c58bf7