diff options
author | onefang | 2020-09-08 21:17:45 +1000 |
---|---|---|
committer | onefang | 2020-09-08 21:17:45 +1000 |
commit | dcfd54b7608093d509cd045a152a4cde7317f66f (patch) | |
tree | 593eb822c05a6d209707593732e7e0fac4984663 /OpenSim/Region | |
parent | Various database fixups. (diff) | |
download | opensim-SC-dcfd54b7608093d509cd045a152a4cde7317f66f.zip opensim-SC-dcfd54b7608093d509cd045a152a4cde7317f66f.tar.gz opensim-SC-dcfd54b7608093d509cd045a152a4cde7317f66f.tar.bz2 opensim-SC-dcfd54b7608093d509cd045a152a4cde7317f66f.tar.xz |
Move various paths out of the bin directory.
Diffstat (limited to 'OpenSim/Region')
8 files changed, 16 insertions, 11 deletions
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index 66e46cb..02a9941 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -153,15 +153,14 @@ namespace OpenSim | |||
153 | } | 153 | } |
154 | 154 | ||
155 | // Override distro settings with contents of inidirectory | 155 | // Override distro settings with contents of inidirectory |
156 | string iniDirName = startupConfig.GetString("inidirectory", "config"); | 156 | string iniDirPath = startupConfig.GetString("inidirectory", Util.configDir()); |
157 | string iniDirPath = Path.Combine(Util.configDir(), iniDirName); | ||
158 | 157 | ||
159 | if (Directory.Exists(iniDirPath)) | 158 | if (Directory.Exists(iniDirPath)) |
160 | { | 159 | { |
161 | m_log.InfoFormat("[CONFIG]: Searching folder {0} for config ini files", iniDirPath); | 160 | m_log.InfoFormat("[CONFIG]: Searching folder {0} for config ini files", iniDirPath); |
162 | List<string> overrideSources = new List<string>(); | 161 | List<string> overrideSources = new List<string>(); |
163 | 162 | ||
164 | string[] fileEntries = Directory.GetFiles(iniDirName); | 163 | string[] fileEntries = Directory.GetFiles(iniDirPath); |
165 | foreach (string filePath in fileEntries) | 164 | foreach (string filePath in fileEntries) |
166 | { | 165 | { |
167 | if (Path.GetExtension(filePath).ToLower() == ".ini") | 166 | if (Path.GetExtension(filePath).ToLower() == ".ini") |
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index bbf7be7..238fbab 100755 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Asset | |||
66 | private bool m_cleanupRunning; | 66 | private bool m_cleanupRunning; |
67 | 67 | ||
68 | private const string m_ModuleName = "FlotsamAssetCache"; | 68 | private const string m_ModuleName = "FlotsamAssetCache"; |
69 | private const string m_DefaultCacheDirectory = "./assetcache"; | 69 | private const string m_DefaultCacheDirectory = "assetcache"; |
70 | private string m_CacheDirectory = m_DefaultCacheDirectory; | 70 | private string m_CacheDirectory = m_DefaultCacheDirectory; |
71 | 71 | ||
72 | private readonly List<char> m_InvalidChars = new List<char>(); | 72 | private readonly List<char> m_InvalidChars = new List<char>(); |
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index 4c922ba..ce5e167 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | |||
@@ -83,6 +83,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
83 | private bool m_texturePrims = true; // true if should texture the rendered prims | 83 | private bool m_texturePrims = true; // true if should texture the rendered prims |
84 | private float m_texturePrimSize = 48f; // size of prim before we consider texturing it | 84 | private float m_texturePrimSize = 48f; // size of prim before we consider texturing it |
85 | private bool m_renderMeshes = false; // true if to render meshes rather than just bounding boxes | 85 | private bool m_renderMeshes = false; // true if to render meshes rather than just bounding boxes |
86 | private String m_cacheDirectory = ""; | ||
86 | private float m_renderMinHeight = -100f; | 87 | private float m_renderMinHeight = -100f; |
87 | private float m_renderMaxHeight = 4096f; | 88 | private float m_renderMaxHeight = 4096f; |
88 | 89 | ||
@@ -119,6 +120,11 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
119 | Util.GetConfigVarFromSections<float>(m_config, "TexturePrimSize", configSections, m_texturePrimSize); | 120 | Util.GetConfigVarFromSections<float>(m_config, "TexturePrimSize", configSections, m_texturePrimSize); |
120 | m_renderMeshes = | 121 | m_renderMeshes = |
121 | Util.GetConfigVarFromSections<bool>(m_config, "RenderMeshes", configSections, m_renderMeshes); | 122 | Util.GetConfigVarFromSections<bool>(m_config, "RenderMeshes", configSections, m_renderMeshes); |
123 | m_cacheDirectory | ||
124 | = Util.GetConfigVarFromSections<string>(m_config, "CacheDirectory", configSections, System.IO.Path.Combine(Util.cacheDir(), "MapImageCache")); | ||
125 | |||
126 | if (!Directory.Exists(m_cacheDirectory)) | ||
127 | Directory.CreateDirectory(m_cacheDirectory); | ||
122 | 128 | ||
123 | m_renderMaxHeight = Util.GetConfigVarFromSections<float>(m_config, "RenderMaxHeight", configSections, m_renderMaxHeight); | 129 | m_renderMaxHeight = Util.GetConfigVarFromSections<float>(m_config, "RenderMaxHeight", configSections, m_renderMaxHeight); |
124 | m_renderMinHeight = Util.GetConfigVarFromSections<float>(m_config, "RenderMinHeight", configSections, m_renderMinHeight); | 130 | m_renderMinHeight = Util.GetConfigVarFromSections<float>(m_config, "RenderMinHeight", configSections, m_renderMinHeight); |
@@ -210,7 +216,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
210 | 216 | ||
211 | Bitmap tile = GenImage(); | 217 | Bitmap tile = GenImage(); |
212 | // image may be reloaded elsewhere, so no compression format | 218 | // image may be reloaded elsewhere, so no compression format |
213 | string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png"; | 219 | string filename = System.IO.Path.Combine(m_cacheDirectory,"MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png"); |
214 | tile.Save(filename, ImageFormat.Png); | 220 | tile.Save(filename, ImageFormat.Png); |
215 | m_primMesher = null; | 221 | m_primMesher = null; |
216 | return tile; | 222 | return tile; |
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs index c15b194..f76b057 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Region.UserStatistics | |||
96 | 96 | ||
97 | //IConfig startupConfig = config.Configs["Startup"]; | 97 | //IConfig startupConfig = config.Configs["Startup"]; |
98 | 98 | ||
99 | dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3"); | 99 | dbConn = new SqliteConnection("URI=file:" + Util.dbDir() + "/LocalUserStatistics.db,version=3"); |
100 | dbConn.Open(); | 100 | dbConn.Open(); |
101 | CreateTables(dbConn); | 101 | CreateTables(dbConn); |
102 | 102 | ||
@@ -1200,4 +1200,4 @@ VALUES | |||
1200 | m_scriptLinesPerSecond = stats.ExtraStatsBlock[0].StatValue; | 1200 | m_scriptLinesPerSecond = stats.ExtraStatsBlock[0].StatValue; |
1201 | } | 1201 | } |
1202 | } | 1202 | } |
1203 | } \ No newline at end of file | 1203 | } |
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs index de39d0e..93c2986 100644 --- a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs | |||
@@ -99,7 +99,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing | |||
99 | 99 | ||
100 | IConfig mesh_config = source.Configs["Mesh"]; | 100 | IConfig mesh_config = source.Configs["Mesh"]; |
101 | 101 | ||
102 | decodedSculptMapPath = config.GetString("DecodedSculptMapPath", "j2kDecodeCache"); | 102 | decodedSculptMapPath = config.GetString("DecodedSculptMapPath", System.IO.Path.Combine(Util.cacheDir(), "j2kDecodeCache")); |
103 | cacheSculptMaps = config.GetBoolean("CacheSculptMaps", cacheSculptMaps); | 103 | cacheSculptMaps = config.GetBoolean("CacheSculptMaps", cacheSculptMaps); |
104 | if (mesh_config != null) | 104 | if (mesh_config != null) |
105 | { | 105 | { |
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs index ac32f75..66c376c 100644 --- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | |||
@@ -64,7 +64,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
64 | 64 | ||
65 | public bool doMeshFileCache = true; | 65 | public bool doMeshFileCache = true; |
66 | public bool doCacheExpire = true; | 66 | public bool doCacheExpire = true; |
67 | public string cachePath = "MeshCache"; | 67 | public string cachePath = System.IO.Path.Combine(Util.cacheDir(), "MeshCache"); |
68 | public TimeSpan CacheExpire; | 68 | public TimeSpan CacheExpire; |
69 | 69 | ||
70 | // const string baseDir = "rawFiles"; | 70 | // const string baseDir = "rawFiles"; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/AssemblyResolver.cs b/OpenSim/Region/ScriptEngine/Shared/AssemblyResolver.cs index e35f79f..6c42e2e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/AssemblyResolver.cs +++ b/OpenSim/Region/ScriptEngine/Shared/AssemblyResolver.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
44 | string dirName = myDomain.FriendlyName; | 44 | string dirName = myDomain.FriendlyName; |
45 | string ScriptEnginesPath = myDomain.SetupInformation.PrivateBinPath; | 45 | string ScriptEnginesPath = myDomain.SetupInformation.PrivateBinPath; |
46 | 46 | ||
47 | string[] pathList = new string[] {"", "bin", ScriptEnginesPath, | 47 | string[] pathList = new string[] {"", "caches", ScriptEnginesPath, |
48 | Path.Combine(ScriptEnginesPath, dirName)}; | 48 | Path.Combine(ScriptEnginesPath, dirName)}; |
49 | 49 | ||
50 | string assemblyName = args.Name; | 50 | string assemblyName = args.Name; |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 9e47530..b225aad 100755 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -315,7 +315,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
315 | m_WaitForEventCompletionOnScriptStop | 315 | m_WaitForEventCompletionOnScriptStop |
316 | = m_ScriptConfig.GetInt("WaitForEventCompletionOnScriptStop", m_WaitForEventCompletionOnScriptStop); | 316 | = m_ScriptConfig.GetInt("WaitForEventCompletionOnScriptStop", m_WaitForEventCompletionOnScriptStop); |
317 | 317 | ||
318 | m_ScriptEnginesPath = m_ScriptConfig.GetString("ScriptEnginesPath", "ScriptEngines"); | 318 | m_ScriptEnginesPath = m_ScriptConfig.GetString("ScriptEnginesPath", Path.Combine(Util.cacheDir(), "ScriptEngines")); |
319 | 319 | ||
320 | m_Prio = ThreadPriority.BelowNormal; | 320 | m_Prio = ThreadPriority.BelowNormal; |
321 | switch (priority) | 321 | switch (priority) |