aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Console/LocalConsole.cs4
-rw-r--r--OpenSim/Framework/Util.cs15
-rw-r--r--OpenSim/Region/Application/ConfigurationLoader.cs5
-rw-r--r--OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs4
-rw-r--r--OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/AssemblyResolver.cs2
-rw-r--r--[-rwxr-xr-x]OpenSim/Region/ScriptEngine/XEngine/XEngine.cs4
-rw-r--r--OpenSim/Server/Base/ServicesServerBase.cs2
-rw-r--r--OpenSim/Server/Handlers/BakedTextures/XBakes.cs7
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs3
-rw-r--r--OpenSim/Services/MapImageService/MapImageService.cs2
-rw-r--r--OpenSim/Tests/Robust/Server/DemonServer.cs4
13 files changed, 31 insertions, 25 deletions
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs
index 73f0323..fac346a 100644
--- a/OpenSim/Framework/Console/LocalConsole.cs
+++ b/OpenSim/Framework/Console/LocalConsole.cs
@@ -95,9 +95,9 @@ namespace OpenSim.Framework.Console
95 return; 95 return;
96 } 96 }
97 97
98 string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", "OpenSimConsoleHistory.txt"); 98 string m_historyFile = startupConfig.GetString("ConsoleHistoryFile", Path.Combine(Util.logsDir(), "OpenSimConsoleHistory.txt"));
99 int m_historySize = startupConfig.GetInt("ConsoleHistoryFileLines", 100); 99 int m_historySize = startupConfig.GetInt("ConsoleHistoryFileLines", 100);
100 m_historyPath = Path.GetFullPath(Path.Combine(Util.configDir(), m_historyFile)); 100 m_historyPath = Path.GetFullPath(m_historyFile);
101 m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1}", m_historySize, m_historyPath); 101 m_log.InfoFormat("[LOCAL CONSOLE]: Persistent command line history is Enabled, up to {0} lines from file {1}", m_historySize, m_historyPath);
102 102
103 if (File.Exists(m_historyPath)) 103 if (File.Exists(m_historyPath))
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 2f65f3c..a448b31 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1282,8 +1282,14 @@ namespace OpenSim.Framework
1282 return Path.Combine("..", Path.Combine("..", "db")); 1282 return Path.Combine("..", Path.Combine("..", "db"));
1283 } 1283 }
1284 1284
1285 public static string cacheDir()
1286 {
1287 return Path.Combine("..", Path.Combine("..", "caches"));
1288 }
1289
1285 public static string configDir() 1290 public static string configDir()
1286 { 1291 {
1292// return Path.Combine("..", Path.Combine("..", "config"));
1287 return "."; 1293 return ".";
1288 } 1294 }
1289 1295
@@ -1292,6 +1298,11 @@ namespace OpenSim.Framework
1292 return "."; 1298 return ".";
1293 } 1299 }
1294 1300
1301 public static string logsDir()
1302 {
1303 return Path.Combine("..", "logs");
1304 }
1305
1295 public static string logFile() 1306 public static string logFile()
1296 { 1307 {
1297 foreach (IAppender appender in LogManager.GetRepository().GetAppenders()) 1308 foreach (IAppender appender in LogManager.GetRepository().GetAppenders())
@@ -1302,7 +1313,7 @@ namespace OpenSim.Framework
1302 } 1313 }
1303 } 1314 }
1304 1315
1305 return "./OpenSim.log"; 1316 return Path.Combine(logsDir(), "OpenSim.log");
1306 } 1317 }
1307 1318
1308 public static string statsLogFile() 1319 public static string statsLogFile()
@@ -1315,7 +1326,7 @@ namespace OpenSim.Framework
1315 } 1326 }
1316 } 1327 }
1317 1328
1318 return "./OpenSimStats.log"; 1329 return Path.Combine(logsDir(), "OpenSimStats.log");
1319 } 1330 }
1320 1331
1321 public static string logDir() 1332 public static string logDir()
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs
index 62bd4f4..19db7a9 100644
--- a/OpenSim/Region/Application/ConfigurationLoader.cs
+++ b/OpenSim/Region/Application/ConfigurationLoader.cs
@@ -154,15 +154,14 @@ namespace OpenSim
154 } 154 }
155 155
156 // Override distro settings with contents of inidirectory 156 // Override distro settings with contents of inidirectory
157 string iniDirName = startupConfig.GetString("inidirectory", "config"); 157 string iniDirPath = startupConfig.GetString("inidirectory", Util.configDir());
158 string iniDirPath = Path.Combine(Util.configDir(), iniDirName);
159 158
160 if (Directory.Exists(iniDirPath)) 159 if (Directory.Exists(iniDirPath))
161 { 160 {
162 m_log.InfoFormat("[CONFIG]: Searching folder {0} for config ini files", iniDirPath); 161 m_log.InfoFormat("[CONFIG]: Searching folder {0} for config ini files", iniDirPath);
163 List<string> overrideSources = new List<string>(); 162 List<string> overrideSources = new List<string>();
164 163
165 string[] fileEntries = Directory.GetFiles(iniDirName); 164 string[] fileEntries = Directory.GetFiles(iniDirPath);
166 foreach (string filePath in fileEntries) 165 foreach (string filePath in fileEntries)
167 { 166 {
168 if (Path.GetExtension(filePath).ToLower() == ".ini") 167 if (Path.GetExtension(filePath).ToLower() == ".ini")
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs
index c1bf544..bb0f424 100644
--- 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>();
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Asset
159 else 159 else
160 { 160 {
161 m_FileCacheEnabled = assetConfig.GetBoolean("FileCacheEnabled", m_FileCacheEnabled); 161 m_FileCacheEnabled = assetConfig.GetBoolean("FileCacheEnabled", m_FileCacheEnabled);
162 m_CacheDirectory = assetConfig.GetString("CacheDirectory", m_DefaultCacheDirectory); 162 m_CacheDirectory = assetConfig.GetString("CacheDirectory", Path.Combine(Util.cacheDir(), m_DefaultCacheDirectory));
163 163
164 m_MemoryCacheEnabled = assetConfig.GetBoolean("MemoryCacheEnabled", m_MemoryCacheEnabled); 164 m_MemoryCacheEnabled = assetConfig.GetBoolean("MemoryCacheEnabled", m_MemoryCacheEnabled);
165 m_MemoryExpiration = assetConfig.GetDouble("MemoryCacheTimeout", m_MemoryExpiration); 165 m_MemoryExpiration = assetConfig.GetDouble("MemoryCacheTimeout", m_MemoryExpiration);
diff --git a/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/Meshing/Meshmerizer/Meshmerizer.cs
index 0d4b6b9..a90ef3b 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 032d4ed..c34c9fa 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
63 63
64 public bool doMeshFileCache = true; 64 public bool doMeshFileCache = true;
65 public bool doCacheExpire = true; 65 public bool doCacheExpire = true;
66 public string cachePath = "MeshCache"; 66 public string cachePath = System.IO.Path.Combine(Util.cacheDir(), "MeshCache");
67 public TimeSpan CacheExpire; 67 public TimeSpan CacheExpire;
68 68
69// const string baseDir = "rawFiles"; 69// 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 05124fc..da5b77a 100755..100644
--- 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)
@@ -1874,7 +1874,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1874 if (!(sender is System.AppDomain)) 1874 if (!(sender is System.AppDomain))
1875 return null; 1875 return null;
1876 1876
1877 string[] pathList = new string[] {"bin", m_ScriptEnginesPath, 1877 string[] pathList = new string[] {"caches", m_ScriptEnginesPath,
1878 Path.Combine(m_ScriptEnginesPath, 1878 Path.Combine(m_ScriptEnginesPath,
1879 m_Scene.RegionInfo.RegionID.ToString())}; 1879 m_Scene.RegionInfo.RegionID.ToString())};
1880 1880
diff --git a/OpenSim/Server/Base/ServicesServerBase.cs b/OpenSim/Server/Base/ServicesServerBase.cs
index 176e876..1484ee0 100644
--- a/OpenSim/Server/Base/ServicesServerBase.cs
+++ b/OpenSim/Server/Base/ServicesServerBase.cs
@@ -85,7 +85,7 @@ namespace OpenSim.Server.Base
85 string fileName = ""; 85 string fileName = "";
86 if (Assembly.GetEntryAssembly() != null) 86 if (Assembly.GetEntryAssembly() != null)
87 fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location); 87 fileName = Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location);
88 string iniFile = fileName + ".ini"; 88 string iniFile = Util.configDir() + fileName + ".ini";
89 string logConfig = null; 89 string logConfig = null;
90 90
91 IConfig startupConfig = argvConfig.Configs["Startup"]; 91 IConfig startupConfig = argvConfig.Configs["Startup"];
diff --git a/OpenSim/Server/Handlers/BakedTextures/XBakes.cs b/OpenSim/Server/Handlers/BakedTextures/XBakes.cs
index 4e55433..0c74564 100644
--- a/OpenSim/Server/Handlers/BakedTextures/XBakes.cs
+++ b/OpenSim/Server/Handlers/BakedTextures/XBakes.cs
@@ -67,12 +67,7 @@ namespace OpenSim.Server.Handlers.BakedTextures
67 throw new Exception("No BakedTextureService configuration"); 67 throw new Exception("No BakedTextureService configuration");
68 } 68 }
69 69
70 m_FSBase = assetConfig.GetString("BaseDirectory", String.Empty); 70 m_FSBase = assetConfig.GetString("BaseDirectory", Util.cacheDir() + "/bakes");
71 if (m_FSBase == String.Empty)
72 {
73 m_log.ErrorFormat("[BAKES]: BaseDirectory not specified");
74 throw new Exception("Configuration error");
75 }
76 71
77 m_log.Info("[BAKES]: XBakes service enabled"); 72 m_log.Info("[BAKES]: XBakes service enabled");
78 } 73 }
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index dabfd3b..67114ef 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -122,7 +122,8 @@ namespace OpenSim.Services.GridService
122 122
123// m_Check4096 = gridConfig.GetBoolean("Check4096", true); 123// m_Check4096 = gridConfig.GetBoolean("Check4096", true);
124 124
125 m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); 125//// TODO OpenSim is crazy, this is called from Robust and OpenSim, Robust needs the ../caches bit, OpenSim somehow adds a path already. I can't tell why. So strip the path.
126 m_MapTileDirectory = Path.Combine(Util.cacheDir(), Path.GetFileName(gridConfig.GetString("MapTileDirectory", "maptiles")));
126 127
127 m_ThisGatekeeper = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI", 128 m_ThisGatekeeper = Util.GetConfigVarFromSections<string>(config, "GatekeeperURI",
128 new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty); 129 new string[] { "Startup", "Hypergrid", "GridService" }, String.Empty);
diff --git a/OpenSim/Services/MapImageService/MapImageService.cs b/OpenSim/Services/MapImageService/MapImageService.cs
index c90f5bd..e9db41d 100644
--- a/OpenSim/Services/MapImageService/MapImageService.cs
+++ b/OpenSim/Services/MapImageService/MapImageService.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Services.MapImageService
63 private const int HALF_WIDTH = 128; 63 private const int HALF_WIDTH = 128;
64 private const int JPEG_QUALITY = 80; 64 private const int JPEG_QUALITY = 80;
65 65
66 private static string m_TilesStoragePath = "maptiles"; 66 private static string m_TilesStoragePath = Path.Combine(Util.cacheDir(), "/maptiles");
67 67
68 private static object m_Sync = new object(); 68 private static object m_Sync = new object();
69 private static bool m_Initialized = false; 69 private static bool m_Initialized = false;
diff --git a/OpenSim/Tests/Robust/Server/DemonServer.cs b/OpenSim/Tests/Robust/Server/DemonServer.cs
index 1e0797e..41c2185 100644
--- a/OpenSim/Tests/Robust/Server/DemonServer.cs
+++ b/OpenSim/Tests/Robust/Server/DemonServer.cs
@@ -48,8 +48,8 @@ namespace Robust.Tests
48 [SetUp] 48 [SetUp]
49 public void StartDemon() 49 public void StartDemon()
50 { 50 {
51 if (File.Exists("Robust.Tests.log")) 51 if (File.Exists("../../logs/Robust.Tests.log"))
52 File.Delete("Robust.Tests.log"); 52 File.Delete("../../logs/Robust.Tests.log");
53 53
54 Console.WriteLine("**** Starting demon Robust server ****"); 54 Console.WriteLine("**** Starting demon Robust server ****");
55 m_demon = new Thread( () => Main(new string[] {"-inifile=Robust.Tests.ini"})); 55 m_demon = new Thread( () => Main(new string[] {"-inifile=Robust.Tests.ini"}));