1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#pragma once
4
5namespace bs
6{
7 /** @addtogroup Utility-Engine-Internal
8 * @{
9 */
10
11#if BS_IS_BANSHEE3D || defined BS_IS_ASSET_TOOL
12 #define BS_INCLUDE_B3D_PATHS 1
13#else
14 #define BS_INCLUDE_B3D_PATHS 0
15#endif
16
17#if BS_INCLUDE_B3D_PATHS
18 constexpr const char* GAME_RESOURCES_FOLDER_NAME = "Resources/";
19 constexpr const char* GAME_SETTINGS_NAME = "GameSettings.asset";
20 constexpr const char* GAME_RESOURCE_MANIFEST_NAME = "ResourceManifest.asset";
21 constexpr const char* GAME_RESOURCE_MAPPING_NAME = "ResourceMapping.asset";
22#endif
23
24 /** Contains common engine paths and utility method for searching for paths. */
25 class BS_EXPORT Paths
26 {
27 public:
28 /** Returns the absolute path where the builtin framework-specific assets are located. */
29 static const Path& getDataPath();
30
31 /** Returns the absolute path where the engine binaries are located in. */
32 static const Path& getBinariesPath();
33
34#if BS_INCLUDE_B3D_PATHS
35 /** Returns the absolute path where the builtin editor-specific assets are located. */
36 static const Path& getEditorDataPath();
37
38 /** Returns the absolute path to the game settings file used by editor-built executables. */
39 static const Path& getGameSettingsPath();
40
41 /** Returns the absolute path to the game resources folder used by editor-built executables. */
42 static const Path& getGameResourcesPath();
43#endif
44
45 /**
46 * Searches common locations for a specified path by querying if the file/directory exists and returns the found
47 * path.
48 *
49 * @param[in] path Relative path to search for (for example "Data\").
50 * @return Path at which the relative path was found at. This path will be relative to the working
51 * directory.
52 */
53 static Path findPath(const Path& path);
54
55 /** Path to the root data directory. Relative to working directory, or RAW_APP_ROOT. */
56 static const Path FRAMEWORK_DATA_PATH;
57
58 /** Path where the release configuration managed assemblies are located at, relative to the working directory. */
59 static const Path RELEASE_ASSEMBLY_PATH;
60
61 /** Path where the debug configuration managed assemblies are located at, relative to the working directory. */
62 static const Path DEBUG_ASSEMBLY_PATH;;
63
64#if BS_INCLUDE_B3D_PATHS
65 /** Path to the root editor data directory. Relative to working directory, or RAW_APP_ROOT. */
66 static const Path EDITOR_DATA_PATH;
67#endif
68 };
69
70 /** @} */
71}