diff options
216 files changed, 6590 insertions, 4488 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 0608f66..a47fc01 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -756,7 +756,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
756 | // Set the estate | 756 | // Set the estate |
757 | 757 | ||
758 | // Check for an existing estate | 758 | // Check for an existing estate |
759 | List<int> estateIDs = m_application.StorageManager.EstateDataStore.GetEstates((string) requestData["estate_name"]); | 759 | List<int> estateIDs = m_application.EstateDataService.GetEstates((string) requestData["estate_name"]); |
760 | if (estateIDs.Count < 1) | 760 | if (estateIDs.Count < 1) |
761 | { | 761 | { |
762 | UUID userID = UUID.Zero; | 762 | UUID userID = UUID.Zero; |
@@ -784,7 +784,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
784 | } | 784 | } |
785 | 785 | ||
786 | // Create a new estate with the name provided | 786 | // Create a new estate with the name provided |
787 | region.EstateSettings = m_application.StorageManager.EstateDataStore.LoadEstateSettings(region.RegionID, true); | 787 | region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(region.RegionID, true); |
788 | 788 | ||
789 | region.EstateSettings.EstateName = (string) requestData["estate_name"]; | 789 | region.EstateSettings.EstateName = (string) requestData["estate_name"]; |
790 | region.EstateSettings.EstateOwner = userID; | 790 | region.EstateSettings.EstateOwner = userID; |
@@ -794,10 +794,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
794 | else | 794 | else |
795 | { | 795 | { |
796 | int estateID = estateIDs[0]; | 796 | int estateID = estateIDs[0]; |
797 | 797 | ||
798 | region.EstateSettings = m_application.StorageManager.EstateDataStore.LoadEstateSettings(estateID); | 798 | region.EstateSettings = m_application.EstateDataService.LoadEstateSettings(estateID); |
799 | 799 | ||
800 | if (!m_application.StorageManager.EstateDataStore.LinkRegion(region.RegionID, estateID)) | 800 | if (!m_application.EstateDataService.LinkRegion(region.RegionID, estateID)) |
801 | throw new Exception("Failed to join estate."); | 801 | throw new Exception("Failed to join estate."); |
802 | } | 802 | } |
803 | 803 | ||
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index 4369216..8271d76 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs | |||
@@ -384,7 +384,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
384 | // } | 384 | // } |
385 | // | 385 | // |
386 | // rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method)); | 386 | // rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method)); |
387 | // | 387 | // |
388 | // } | 388 | // } |
389 | 389 | ||
390 | /// <summary> | 390 | /// <summary> |
@@ -449,7 +449,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
449 | // rdata.userAppearance = new AvatarAppearance(); | 449 | // rdata.userAppearance = new AvatarAppearance(); |
450 | // rdata.userAppearance.Owner = old.Owner; | 450 | // rdata.userAppearance.Owner = old.Owner; |
451 | // adata = new AvatarData(rdata.userAppearance); | 451 | // adata = new AvatarData(rdata.userAppearance); |
452 | // | 452 | // |
453 | // Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); | 453 | // Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata); |
454 | // | 454 | // |
455 | // rdata.Complete(); | 455 | // rdata.Complete(); |
diff --git a/OpenSim/Data/DBGuids.cs b/OpenSim/Data/DBGuids.cs index fb6832b..ad1c19c 100644 --- a/OpenSim/Data/DBGuids.cs +++ b/OpenSim/Data/DBGuids.cs | |||
@@ -1,4 +1,31 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
2 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
3 | using System.Text; | 30 | using System.Text; |
4 | using OpenMetaverse; | 31 | using OpenMetaverse; |
@@ -17,7 +44,7 @@ namespace OpenSim.Data | |||
17 | /// <returns></returns> | 44 | /// <returns></returns> |
18 | public static UUID FromDB(object id) | 45 | public static UUID FromDB(object id) |
19 | { | 46 | { |
20 | if( (id == null) || (id == DBNull.Value)) | 47 | if ((id == null) || (id == DBNull.Value)) |
21 | return UUID.Zero; | 48 | return UUID.Zero; |
22 | 49 | ||
23 | if (id.GetType() == typeof(Guid)) | 50 | if (id.GetType() == typeof(Guid)) |
diff --git a/OpenSim/Data/IAssetData.cs b/OpenSim/Data/IAssetData.cs index 065d3a5..0c8eadd 100644 --- a/OpenSim/Data/IAssetData.cs +++ b/OpenSim/Data/IAssetData.cs | |||
@@ -40,15 +40,4 @@ namespace OpenSim.Data | |||
40 | void Initialise(string connect); | 40 | void Initialise(string connect); |
41 | bool Delete(string id); | 41 | bool Delete(string id); |
42 | } | 42 | } |
43 | |||
44 | public class AssetDataInitialiser : PluginInitialiserBase | ||
45 | { | ||
46 | private string connect; | ||
47 | public AssetDataInitialiser (string s) { connect = s; } | ||
48 | public override void Initialise (IPlugin plugin) | ||
49 | { | ||
50 | IAssetDataPlugin p = plugin as IAssetDataPlugin; | ||
51 | p.Initialise (connect); | ||
52 | } | ||
53 | } | ||
54 | } | 43 | } |
diff --git a/OpenSim/Data/IInventoryData.cs b/OpenSim/Data/IInventoryData.cs index 90f74b7..74d5d37 100644 --- a/OpenSim/Data/IInventoryData.cs +++ b/OpenSim/Data/IInventoryData.cs | |||
@@ -155,15 +155,4 @@ namespace OpenSim.Data | |||
155 | /// </returns> | 155 | /// </returns> |
156 | List<InventoryItemBase> fetchActiveGestures(UUID avatarID); | 156 | List<InventoryItemBase> fetchActiveGestures(UUID avatarID); |
157 | } | 157 | } |
158 | |||
159 | public class InventoryDataInitialiser : PluginInitialiserBase | ||
160 | { | ||
161 | private string connect; | ||
162 | public InventoryDataInitialiser (string s) { connect = s; } | ||
163 | public override void Initialise (IPlugin plugin) | ||
164 | { | ||
165 | IInventoryDataPlugin p = plugin as IInventoryDataPlugin; | ||
166 | p.Initialise (connect); | ||
167 | } | ||
168 | } | ||
169 | } | 158 | } |
diff --git a/OpenSim/Data/MSSQL/MSSQLEstateData.cs b/OpenSim/Data/MSSQL/MSSQLEstateData.cs index 80bf106..e9a0935 100644 --- a/OpenSim/Data/MSSQL/MSSQLEstateData.cs +++ b/OpenSim/Data/MSSQL/MSSQLEstateData.cs | |||
@@ -50,6 +50,15 @@ namespace OpenSim.Data.MSSQL | |||
50 | 50 | ||
51 | #region Public methods | 51 | #region Public methods |
52 | 52 | ||
53 | public MSSQLEstateStore() | ||
54 | { | ||
55 | } | ||
56 | |||
57 | public MSSQLEstateStore(string connectionString) | ||
58 | { | ||
59 | Initialise(connectionString); | ||
60 | } | ||
61 | |||
53 | /// <summary> | 62 | /// <summary> |
54 | /// Initialises the estatedata class. | 63 | /// Initialises the estatedata class. |
55 | /// </summary> | 64 | /// </summary> |
diff --git a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index 77b8a10..8eae0a2 100644 --- a/OpenSim/Data/MSSQL/MSSQLLegacyRegionData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Data.MSSQL | |||
43 | /// <summary> | 43 | /// <summary> |
44 | /// A MSSQL Interface for the Region Server. | 44 | /// A MSSQL Interface for the Region Server. |
45 | /// </summary> | 45 | /// </summary> |
46 | public class MSSQLRegionDataStore : IRegionDataStore | 46 | public class MSSQLSimulationData : ISimulationDataStore |
47 | { | 47 | { |
48 | private const string _migrationStore = "RegionStore"; | 48 | private const string _migrationStore = "RegionStore"; |
49 | 49 | ||
@@ -55,6 +55,16 @@ namespace OpenSim.Data.MSSQL | |||
55 | /// </summary> | 55 | /// </summary> |
56 | private MSSQLManager _Database; | 56 | private MSSQLManager _Database; |
57 | private string m_connectionString; | 57 | private string m_connectionString; |
58 | |||
59 | public MSSQLSimulationData() | ||
60 | { | ||
61 | } | ||
62 | |||
63 | public MSSQLSimulationData(string connectionString) | ||
64 | { | ||
65 | Initialise(connectionString); | ||
66 | } | ||
67 | |||
58 | /// <summary> | 68 | /// <summary> |
59 | /// Initialises the region datastore | 69 | /// Initialises the region datastore |
60 | /// </summary> | 70 | /// </summary> |
@@ -1126,7 +1136,7 @@ VALUES | |||
1126 | prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]); | 1136 | prim.LinkNum = Convert.ToInt32(primRow["LinkNumber"]); |
1127 | 1137 | ||
1128 | if (!(primRow["MediaURL"] is System.DBNull)) | 1138 | if (!(primRow["MediaURL"] is System.DBNull)) |
1129 | prim.MediaUrl = (string)primRow["MediaURL"]; | 1139 | prim.MediaUrl = (string)primRow["MediaURL"]; |
1130 | 1140 | ||
1131 | return prim; | 1141 | return prim; |
1132 | } | 1142 | } |
@@ -1180,7 +1190,7 @@ VALUES | |||
1180 | { | 1190 | { |
1181 | } | 1191 | } |
1182 | 1192 | ||
1183 | if (!(shapeRow["Media"] is System.DBNull)) | 1193 | if (!(shapeRow["Media"] is System.DBNull)) |
1184 | baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); | 1194 | baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); |
1185 | 1195 | ||
1186 | return baseShape; | 1196 | return baseShape; |
@@ -1511,7 +1521,7 @@ VALUES | |||
1511 | parameters.Add(_Database.CreateParameter("PassTouches", 1)); | 1521 | parameters.Add(_Database.CreateParameter("PassTouches", 1)); |
1512 | else | 1522 | else |
1513 | parameters.Add(_Database.CreateParameter("PassTouches", 0)); | 1523 | parameters.Add(_Database.CreateParameter("PassTouches", 0)); |
1514 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); | 1524 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); |
1515 | parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); | 1525 | parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); |
1516 | 1526 | ||
1517 | return parameters.ToArray(); | 1527 | return parameters.ToArray(); |
diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 86531d9..fc9a142 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs | |||
@@ -122,7 +122,7 @@ namespace OpenSim.Data | |||
122 | int ver = FindVersion(_conn, "migrations"); | 122 | int ver = FindVersion(_conn, "migrations"); |
123 | if (ver <= 0) // -1 = no table, 0 = no version record | 123 | if (ver <= 0) // -1 = no table, 0 = no version record |
124 | { | 124 | { |
125 | if( ver < 0 ) | 125 | if (ver < 0) |
126 | ExecuteScript("create table migrations(name varchar(100), version int)"); | 126 | ExecuteScript("create table migrations(name varchar(100), version int)"); |
127 | InsertVersion("migrations", 1); | 127 | InsertVersion("migrations", 1); |
128 | } | 128 | } |
@@ -288,7 +288,7 @@ namespace OpenSim.Data | |||
288 | SortedList<int, string[]> migrations = new SortedList<int, string[]>(); | 288 | SortedList<int, string[]> migrations = new SortedList<int, string[]>(); |
289 | 289 | ||
290 | string[] names = _assem.GetManifestResourceNames(); | 290 | string[] names = _assem.GetManifestResourceNames(); |
291 | if( names.Length == 0 ) // should never happen | 291 | if (names.Length == 0) // should never happen |
292 | return migrations; | 292 | return migrations; |
293 | 293 | ||
294 | Array.Sort(names); // we want all the migrations ordered | 294 | Array.Sort(names); // we want all the migrations ordered |
@@ -297,7 +297,7 @@ namespace OpenSim.Data | |||
297 | Match m = null; | 297 | Match m = null; |
298 | string sFile = Array.FindLast(names, nm => { m = _match_new.Match(nm); return m.Success; }); // ; nm.StartsWith(sPrefix, StringComparison.InvariantCultureIgnoreCase | 298 | string sFile = Array.FindLast(names, nm => { m = _match_new.Match(nm); return m.Success; }); // ; nm.StartsWith(sPrefix, StringComparison.InvariantCultureIgnoreCase |
299 | 299 | ||
300 | if( (m != null) && !String.IsNullOrEmpty(sFile) ) | 300 | if ((m != null) && !String.IsNullOrEmpty(sFile)) |
301 | { | 301 | { |
302 | /* The filename should be '<StoreName>.migrations[.NNN]' where NNN | 302 | /* The filename should be '<StoreName>.migrations[.NNN]' where NNN |
303 | * is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip | 303 | * is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip |
@@ -312,7 +312,7 @@ namespace OpenSim.Data | |||
312 | 312 | ||
313 | if (m.Groups.Count > 1 && int.TryParse(m.Groups[1].Value, out nLastVerFound)) | 313 | if (m.Groups.Count > 1 && int.TryParse(m.Groups[1].Value, out nLastVerFound)) |
314 | { | 314 | { |
315 | if( nLastVerFound <= after ) | 315 | if (nLastVerFound <= after) |
316 | goto scan_old_style; | 316 | goto scan_old_style; |
317 | } | 317 | } |
318 | 318 | ||
@@ -329,7 +329,7 @@ namespace OpenSim.Data | |||
329 | sb.Length = 0; | 329 | sb.Length = 0; |
330 | } | 330 | } |
331 | 331 | ||
332 | if ( (nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list | 332 | if ((nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list |
333 | { | 333 | { |
334 | migrations[nVersion] = script.ToArray(); | 334 | migrations[nVersion] = script.ToArray(); |
335 | } | 335 | } |
@@ -345,7 +345,7 @@ namespace OpenSim.Data | |||
345 | string sLine = resourceReader.ReadLine(); | 345 | string sLine = resourceReader.ReadLine(); |
346 | nLineNo++; | 346 | nLineNo++; |
347 | 347 | ||
348 | if( String.IsNullOrEmpty(sLine) || sLine.StartsWith("#") ) // ignore a comment or empty line | 348 | if (String.IsNullOrEmpty(sLine) || sLine.StartsWith("#")) // ignore a comment or empty line |
349 | continue; | 349 | continue; |
350 | 350 | ||
351 | if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase)) | 351 | if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase)) |
@@ -392,7 +392,7 @@ scan_old_style: | |||
392 | if (m.Success) | 392 | if (m.Success) |
393 | { | 393 | { |
394 | int version = int.Parse(m.Groups[1].ToString()); | 394 | int version = int.Parse(m.Groups[1].ToString()); |
395 | if ( (version > after) && !migrations.ContainsKey(version) ) | 395 | if ((version > after) && !migrations.ContainsKey(version)) |
396 | { | 396 | { |
397 | using (Stream resource = _assem.GetManifestResourceStream(s)) | 397 | using (Stream resource = _assem.GetManifestResourceStream(s)) |
398 | { | 398 | { |
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index f9ce3d9..0b0a638 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -216,9 +216,6 @@ namespace OpenSim.Data.MySQL | |||
216 | 216 | ||
217 | private void UpdateAccessTime(AssetBase asset) | 217 | private void UpdateAccessTime(AssetBase asset) |
218 | { | 218 | { |
219 | // Writing to the database every time Get() is called on an asset is killing us. Seriously. -jph | ||
220 | return; | ||
221 | |||
222 | lock (m_dbLock) | 219 | lock (m_dbLock) |
223 | { | 220 | { |
224 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | 221 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) |
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 9158f7a..c42c687 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs | |||
@@ -54,6 +54,15 @@ namespace OpenSim.Data.MySQL | |||
54 | private Dictionary<string, FieldInfo> m_FieldMap = | 54 | private Dictionary<string, FieldInfo> m_FieldMap = |
55 | new Dictionary<string, FieldInfo>(); | 55 | new Dictionary<string, FieldInfo>(); |
56 | 56 | ||
57 | public MySQLEstateStore() | ||
58 | { | ||
59 | } | ||
60 | |||
61 | public MySQLEstateStore(string connectionString) | ||
62 | { | ||
63 | Initialise(connectionString); | ||
64 | } | ||
65 | |||
57 | public void Initialise(string connectionString) | 66 | public void Initialise(string connectionString) |
58 | { | 67 | { |
59 | m_connectionString = connectionString; | 68 | m_connectionString = connectionString; |
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 0aea30f..2dca3eb 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -286,7 +286,7 @@ namespace OpenSim.Data.MySQL | |||
286 | InventoryItemBase item = new InventoryItemBase(); | 286 | InventoryItemBase item = new InventoryItemBase(); |
287 | 287 | ||
288 | // TODO: this is to handle a case where NULLs creep in there, which we are not sure is endemic to the system, or legacy. It would be nice to live fix these. | 288 | // TODO: this is to handle a case where NULLs creep in there, which we are not sure is endemic to the system, or legacy. It would be nice to live fix these. |
289 | // ( DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero ) | 289 | // (DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero) |
290 | item.CreatorId = reader["creatorID"].ToString(); | 290 | item.CreatorId = reader["creatorID"].ToString(); |
291 | 291 | ||
292 | // Be a bit safer in parsing these because the | 292 | // Be a bit safer in parsing these because the |
diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index a39e68d..87f6d07 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -45,13 +45,22 @@ namespace OpenSim.Data.MySQL | |||
45 | /// <summary> | 45 | /// <summary> |
46 | /// A MySQL Interface for the Region Server | 46 | /// A MySQL Interface for the Region Server |
47 | /// </summary> | 47 | /// </summary> |
48 | public class MySQLDataStore : IRegionDataStore | 48 | public class MySQLSimulationData : ISimulationDataStore |
49 | { | 49 | { |
50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
51 | 51 | ||
52 | private string m_connectionString; | 52 | private string m_connectionString; |
53 | private object m_dbLock = new object(); | 53 | private object m_dbLock = new object(); |
54 | 54 | ||
55 | public MySQLSimulationData() | ||
56 | { | ||
57 | } | ||
58 | |||
59 | public MySQLSimulationData(string connectionString) | ||
60 | { | ||
61 | Initialise(connectionString); | ||
62 | } | ||
63 | |||
55 | public void Initialise(string connectionString) | 64 | public void Initialise(string connectionString) |
56 | { | 65 | { |
57 | m_connectionString = connectionString; | 66 | m_connectionString = connectionString; |
@@ -680,7 +689,7 @@ namespace OpenSim.Data.MySQL | |||
680 | "UserLocationX, UserLocationY, UserLocationZ, " + | 689 | "UserLocationX, UserLocationY, UserLocationZ, " + |
681 | "UserLookAtX, UserLookAtY, UserLookAtZ, " + | 690 | "UserLookAtX, UserLookAtY, UserLookAtZ, " + |
682 | "AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " + | 691 | "AuthbuyerID, OtherCleanTime, MediaType, MediaDescription, " + |
683 | "MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" + | 692 | "MediaSize, MediaLoop, ObscureMusic, ObscureMedia) values (" + |
684 | "?UUID, ?RegionUUID, " + | 693 | "?UUID, ?RegionUUID, " + |
685 | "?LocalLandID, ?Bitmap, ?Name, ?Description, " + | 694 | "?LocalLandID, ?Bitmap, ?Name, ?Description, " + |
686 | "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " + | 695 | "?OwnerUUID, ?IsGroupOwned, ?Area, ?AuctionID, " + |
@@ -691,7 +700,7 @@ namespace OpenSim.Data.MySQL | |||
691 | "?UserLocationX, ?UserLocationY, ?UserLocationZ, " + | 700 | "?UserLocationX, ?UserLocationY, ?UserLocationZ, " + |
692 | "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + | 701 | "?UserLookAtX, ?UserLookAtY, ?UserLookAtZ, " + |
693 | "?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+ | 702 | "?AuthbuyerID, ?OtherCleanTime, ?MediaType, ?MediaDescription, "+ |
694 | "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)"; | 703 | "CONCAT(?MediaWidth, ',', ?MediaHeight), ?MediaLoop, ?ObscureMusic, ?ObscureMedia)"; |
695 | 704 | ||
696 | FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID); | 705 | FillLandCommand(cmd, parcel.LandData, parcel.RegionUUID); |
697 | 706 | ||
@@ -728,7 +737,7 @@ namespace OpenSim.Data.MySQL | |||
728 | 737 | ||
729 | string command = "select * from `regionwindlight` where region_id = ?regionID"; | 738 | string command = "select * from `regionwindlight` where region_id = ?regionID"; |
730 | 739 | ||
731 | using(MySqlCommand cmd = new MySqlCommand(command)) | 740 | using (MySqlCommand cmd = new MySqlCommand(command)) |
732 | { | 741 | { |
733 | cmd.Connection = dbcon; | 742 | cmd.Connection = dbcon; |
734 | 743 | ||
@@ -1350,13 +1359,13 @@ namespace OpenSim.Data.MySQL | |||
1350 | m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); | 1359 | m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); |
1351 | } | 1360 | } |
1352 | 1361 | ||
1353 | newData.MediaDescription = (string) row["MediaDescription"]; | 1362 | newData.MediaDescription = (string) row["MediaDescription"]; |
1354 | newData.MediaType = (string) row["MediaType"]; | 1363 | newData.MediaType = (string) row["MediaType"]; |
1355 | newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]); | 1364 | newData.MediaWidth = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[0]); |
1356 | newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]); | 1365 | newData.MediaHeight = Convert.ToInt32((((string) row["MediaSize"]).Split(','))[1]); |
1357 | newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]); | 1366 | newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]); |
1358 | newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); | 1367 | newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); |
1359 | newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); | 1368 | newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); |
1360 | 1369 | ||
1361 | newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); | 1370 | newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); |
1362 | 1371 | ||
@@ -1724,7 +1733,7 @@ namespace OpenSim.Data.MySQL | |||
1724 | 1733 | ||
1725 | s.State = (byte)(int)row["State"]; | 1734 | s.State = (byte)(int)row["State"]; |
1726 | 1735 | ||
1727 | if (!(row["Media"] is System.DBNull)) | 1736 | if (!(row["Media"] is System.DBNull)) |
1728 | s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); | 1737 | s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); |
1729 | 1738 | ||
1730 | return s; | 1739 | return s; |
diff --git a/OpenSim/Data/Null/NullInventoryData.cs b/OpenSim/Data/Null/NullInventoryData.cs index 8f196e2..fe9ed01 100644 --- a/OpenSim/Data/Null/NullInventoryData.cs +++ b/OpenSim/Data/Null/NullInventoryData.cs | |||
@@ -1,4 +1,31 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
2 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
3 | 30 | ||
4 | using OpenMetaverse; | 31 | using OpenMetaverse; |
diff --git a/OpenSim/Data/Null/NullDataStore.cs b/OpenSim/Data/Null/NullSimulationData.cs index 3ba44bb..34d3a4e 100644 --- a/OpenSim/Data/Null/NullDataStore.cs +++ b/OpenSim/Data/Null/NullSimulationData.cs | |||
@@ -36,7 +36,7 @@ namespace OpenSim.Data.Null | |||
36 | /// <summary> | 36 | /// <summary> |
37 | /// NULL DataStore, do not store anything | 37 | /// NULL DataStore, do not store anything |
38 | /// </summary> | 38 | /// </summary> |
39 | public class NullDataStore : IRegionDataStore | 39 | public class NullSimulationData : ISimulationDataStore |
40 | { | 40 | { |
41 | public void Initialise(string dbfile) | 41 | public void Initialise(string dbfile) |
42 | { | 42 | { |
@@ -73,7 +73,6 @@ namespace OpenSim.Data.Null | |||
73 | { | 73 | { |
74 | } | 74 | } |
75 | 75 | ||
76 | // see IRegionDatastore | ||
77 | public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) | 76 | public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) |
78 | { | 77 | { |
79 | } | 78 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs index fcf041e..d1d67eb 100644 --- a/OpenSim/Data/SQLite/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs | |||
@@ -49,6 +49,15 @@ namespace OpenSim.Data.SQLite | |||
49 | private Dictionary<string, FieldInfo> m_FieldMap = | 49 | private Dictionary<string, FieldInfo> m_FieldMap = |
50 | new Dictionary<string, FieldInfo>(); | 50 | new Dictionary<string, FieldInfo>(); |
51 | 51 | ||
52 | public SQLiteEstateStore() | ||
53 | { | ||
54 | } | ||
55 | |||
56 | public SQLiteEstateStore(string connectionString) | ||
57 | { | ||
58 | Initialise(connectionString); | ||
59 | } | ||
60 | |||
52 | public void Initialise(string connectionString) | 61 | public void Initialise(string connectionString) |
53 | { | 62 | { |
54 | m_connectionString = connectionString; | 63 | m_connectionString = connectionString; |
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index ece2495..ecf8e02 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs | |||
@@ -731,12 +731,12 @@ namespace OpenSim.Data.SQLite | |||
731 | **********************************************************************/ | 731 | **********************************************************************/ |
732 | 732 | ||
733 | protected void CreateDataSetMapping(IDataAdapter da, string tableName) | 733 | protected void CreateDataSetMapping(IDataAdapter da, string tableName) |
734 | { | 734 | { |
735 | ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName); | 735 | ITableMapping dbMapping = da.TableMappings.Add(tableName, tableName); |
736 | foreach (DataColumn col in ds.Tables[tableName].Columns) | 736 | foreach (DataColumn col in ds.Tables[tableName].Columns) |
737 | { | 737 | { |
738 | dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName); | 738 | dbMapping.ColumnMappings.Add(col.ColumnName, col.ColumnName); |
739 | } | 739 | } |
740 | } | 740 | } |
741 | 741 | ||
742 | /// <summary> | 742 | /// <summary> |
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 88699a7..3e9bc3f 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Data.SQLite | |||
44 | /// <summary> | 44 | /// <summary> |
45 | /// A RegionData Interface to the SQLite database | 45 | /// A RegionData Interface to the SQLite database |
46 | /// </summary> | 46 | /// </summary> |
47 | public class SQLiteRegionData : IRegionDataStore | 47 | public class SQLiteSimulationData : ISimulationDataStore |
48 | { | 48 | { |
49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
50 | 50 | ||
@@ -70,6 +70,15 @@ namespace OpenSim.Data.SQLite | |||
70 | 70 | ||
71 | private String m_connectionString; | 71 | private String m_connectionString; |
72 | 72 | ||
73 | public SQLiteSimulationData() | ||
74 | { | ||
75 | } | ||
76 | |||
77 | public SQLiteSimulationData(string connectionString) | ||
78 | { | ||
79 | Initialise(connectionString); | ||
80 | } | ||
81 | |||
73 | // Temporary attribute while this is experimental | 82 | // Temporary attribute while this is experimental |
74 | 83 | ||
75 | /*********************************************************************** | 84 | /*********************************************************************** |
@@ -79,7 +88,6 @@ namespace OpenSim.Data.SQLite | |||
79 | **********************************************************************/ | 88 | **********************************************************************/ |
80 | 89 | ||
81 | /// <summary> | 90 | /// <summary> |
82 | /// See IRegionDataStore | ||
83 | /// <list type="bullet"> | 91 | /// <list type="bullet"> |
84 | /// <item>Initialises RegionData Interface</item> | 92 | /// <item>Initialises RegionData Interface</item> |
85 | /// <item>Loads and initialises a new SQLite connection and maintains it.</item> | 93 | /// <item>Loads and initialises a new SQLite connection and maintains it.</item> |
@@ -177,7 +185,7 @@ namespace OpenSim.Data.SQLite | |||
177 | { | 185 | { |
178 | m_log.Info("[SQLITE REGION DB]: Caught fill error on primitems table"); | 186 | m_log.Info("[SQLITE REGION DB]: Caught fill error on primitems table"); |
179 | } | 187 | } |
180 | 188 | ||
181 | try | 189 | try |
182 | { | 190 | { |
183 | terrainDa.Fill(ds.Tables["terrain"]); | 191 | terrainDa.Fill(ds.Tables["terrain"]); |
@@ -511,7 +519,7 @@ namespace OpenSim.Data.SQLite | |||
511 | "[SQLITE REGION DB]: No shape found for prim in storage, so setting default box shape"); | 519 | "[SQLITE REGION DB]: No shape found for prim in storage, so setting default box shape"); |
512 | prim.Shape = PrimitiveBaseShape.Default; | 520 | prim.Shape = PrimitiveBaseShape.Default; |
513 | } | 521 | } |
514 | 522 | ||
515 | createdObjects[new UUID(objID)].AddPart(prim); | 523 | createdObjects[new UUID(objID)].AddPart(prim); |
516 | LoadItems(prim); | 524 | LoadItems(prim); |
517 | } | 525 | } |
@@ -535,17 +543,17 @@ namespace OpenSim.Data.SQLite | |||
535 | /// </summary> | 543 | /// </summary> |
536 | /// <param name="prim">the prim</param> | 544 | /// <param name="prim">the prim</param> |
537 | private void LoadItems(SceneObjectPart prim) | 545 | private void LoadItems(SceneObjectPart prim) |
538 | { | 546 | { |
539 | // m_log.DebugFormat("[SQLITE REGION DB]: Loading inventory for {0} {1}", prim.Name, prim.UUID); | 547 | // m_log.DebugFormat("[SQLITE REGION DB]: Loading inventory for {0} {1}", prim.Name, prim.UUID); |
540 | 548 | ||
541 | DataTable dbItems = ds.Tables["primitems"]; | 549 | DataTable dbItems = ds.Tables["primitems"]; |
542 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); | 550 | String sql = String.Format("primID = '{0}'", prim.UUID.ToString()); |
543 | DataRow[] dbItemRows = dbItems.Select(sql); | 551 | DataRow[] dbItemRows = dbItems.Select(sql); |
544 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); | 552 | IList<TaskInventoryItem> inventory = new List<TaskInventoryItem>(); |
545 | 553 | ||
546 | // m_log.DebugFormat( | 554 | // m_log.DebugFormat( |
547 | // "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID); | 555 | // "[SQLITE REGION DB]: Found {0} items for {1} {2}", dbItemRows.Length, prim.Name, prim.UUID); |
548 | 556 | ||
549 | foreach (DataRow row in dbItemRows) | 557 | foreach (DataRow row in dbItemRows) |
550 | { | 558 | { |
551 | TaskInventoryItem item = buildItem(row); | 559 | TaskInventoryItem item = buildItem(row); |
@@ -694,8 +702,6 @@ namespace OpenSim.Data.SQLite | |||
694 | { | 702 | { |
695 | landaccesslist.Rows.Remove(rowsToDelete[iter]); | 703 | landaccesslist.Rows.Remove(rowsToDelete[iter]); |
696 | } | 704 | } |
697 | |||
698 | |||
699 | } | 705 | } |
700 | Commit(); | 706 | Commit(); |
701 | } | 707 | } |
@@ -805,7 +811,7 @@ namespace OpenSim.Data.SQLite | |||
805 | try | 811 | try |
806 | { | 812 | { |
807 | regionSettingsDa.Update(ds, "regionsettings"); | 813 | regionSettingsDa.Update(ds, "regionsettings"); |
808 | } | 814 | } |
809 | catch (SqliteException SqlEx) | 815 | catch (SqliteException SqlEx) |
810 | { | 816 | { |
811 | throw new Exception( | 817 | throw new Exception( |
@@ -975,7 +981,7 @@ namespace OpenSim.Data.SQLite | |||
975 | createCol(prims, "CollisionSoundVolume", typeof(Double)); | 981 | createCol(prims, "CollisionSoundVolume", typeof(Double)); |
976 | 982 | ||
977 | createCol(prims, "VolumeDetect", typeof(Int16)); | 983 | createCol(prims, "VolumeDetect", typeof(Int16)); |
978 | 984 | ||
979 | createCol(prims, "MediaURL", typeof(String)); | 985 | createCol(prims, "MediaURL", typeof(String)); |
980 | 986 | ||
981 | // Add in contraints | 987 | // Add in contraints |
@@ -1192,10 +1198,10 @@ namespace OpenSim.Data.SQLite | |||
1192 | private SceneObjectPart buildPrim(DataRow row) | 1198 | private SceneObjectPart buildPrim(DataRow row) |
1193 | { | 1199 | { |
1194 | // Code commented. Uncomment to test the unit test inline. | 1200 | // Code commented. Uncomment to test the unit test inline. |
1195 | 1201 | ||
1196 | // The unit test mentions this commented code for the purposes | 1202 | // The unit test mentions this commented code for the purposes |
1197 | // of debugging a unit test failure | 1203 | // of debugging a unit test failure |
1198 | 1204 | ||
1199 | // SceneObjectGroup sog = new SceneObjectGroup(); | 1205 | // SceneObjectGroup sog = new SceneObjectGroup(); |
1200 | // SceneObjectPart sop = new SceneObjectPart(); | 1206 | // SceneObjectPart sop = new SceneObjectPart(); |
1201 | // sop.LocalId = 1; | 1207 | // sop.LocalId = 1; |
@@ -1212,7 +1218,7 @@ namespace OpenSim.Data.SQLite | |||
1212 | // TODO: this doesn't work yet because something more | 1218 | // TODO: this doesn't work yet because something more |
1213 | // interesting has to be done to actually get these values | 1219 | // interesting has to be done to actually get these values |
1214 | // back out. Not enough time to figure it out yet. | 1220 | // back out. Not enough time to figure it out yet. |
1215 | 1221 | ||
1216 | SceneObjectPart prim = new SceneObjectPart(); | 1222 | SceneObjectPart prim = new SceneObjectPart(); |
1217 | prim.UUID = new UUID((String) row["UUID"]); | 1223 | prim.UUID = new UUID((String) row["UUID"]); |
1218 | // explicit conversion of integers is required, which sort | 1224 | // explicit conversion of integers is required, which sort |
@@ -1342,7 +1348,7 @@ namespace OpenSim.Data.SQLite | |||
1342 | 1348 | ||
1343 | if (Convert.ToInt16(row["VolumeDetect"]) != 0) | 1349 | if (Convert.ToInt16(row["VolumeDetect"]) != 0) |
1344 | prim.VolumeDetectActive = true; | 1350 | prim.VolumeDetectActive = true; |
1345 | 1351 | ||
1346 | if (!(row["MediaURL"] is System.DBNull)) | 1352 | if (!(row["MediaURL"] is System.DBNull)) |
1347 | { | 1353 | { |
1348 | //m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType()); | 1354 | //m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType()); |
@@ -1681,7 +1687,7 @@ namespace OpenSim.Data.SQLite | |||
1681 | row["VolumeDetect"] = 1; | 1687 | row["VolumeDetect"] = 1; |
1682 | else | 1688 | else |
1683 | row["VolumeDetect"] = 0; | 1689 | row["VolumeDetect"] = 0; |
1684 | 1690 | ||
1685 | row["MediaURL"] = prim.MediaUrl; | 1691 | row["MediaURL"] = prim.MediaUrl; |
1686 | } | 1692 | } |
1687 | 1693 | ||
@@ -1759,12 +1765,12 @@ namespace OpenSim.Data.SQLite | |||
1759 | row["UserLookAtZ"] = land.UserLookAt.Z; | 1765 | row["UserLookAtZ"] = land.UserLookAt.Z; |
1760 | row["AuthbuyerID"] = land.AuthBuyerID.ToString(); | 1766 | row["AuthbuyerID"] = land.AuthBuyerID.ToString(); |
1761 | row["OtherCleanTime"] = land.OtherCleanTime; | 1767 | row["OtherCleanTime"] = land.OtherCleanTime; |
1762 | row["MediaType"] = land.MediaType; | 1768 | row["MediaType"] = land.MediaType; |
1763 | row["MediaDescription"] = land.MediaDescription; | 1769 | row["MediaDescription"] = land.MediaDescription; |
1764 | row["MediaSize"] = land.MediaWidth.ToString() + "," + land.MediaHeight.ToString(); | 1770 | row["MediaSize"] = land.MediaWidth.ToString() + "," + land.MediaHeight.ToString(); |
1765 | row["MediaLoop"] = land.MediaLoop.ToString(); | 1771 | row["MediaLoop"] = land.MediaLoop.ToString(); |
1766 | row["ObscureMusic"] = land.ObscureMusic.ToString(); | 1772 | row["ObscureMusic"] = land.ObscureMusic.ToString(); |
1767 | row["ObscureMedia"] = land.ObscureMedia.ToString(); | 1773 | row["ObscureMedia"] = land.ObscureMedia.ToString(); |
1768 | } | 1774 | } |
1769 | 1775 | ||
1770 | /// <summary> | 1776 | /// <summary> |
@@ -1862,10 +1868,10 @@ namespace OpenSim.Data.SQLite | |||
1862 | s.TextureEntry = textureEntry; | 1868 | s.TextureEntry = textureEntry; |
1863 | 1869 | ||
1864 | s.ExtraParams = (byte[]) row["ExtraParams"]; | 1870 | s.ExtraParams = (byte[]) row["ExtraParams"]; |
1865 | 1871 | ||
1866 | if (!(row["Media"] is System.DBNull)) | 1872 | if (!(row["Media"] is System.DBNull)) |
1867 | s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); | 1873 | s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); |
1868 | 1874 | ||
1869 | return s; | 1875 | return s; |
1870 | } | 1876 | } |
1871 | 1877 | ||
@@ -1909,7 +1915,7 @@ namespace OpenSim.Data.SQLite | |||
1909 | 1915 | ||
1910 | row["Texture"] = s.TextureEntry; | 1916 | row["Texture"] = s.TextureEntry; |
1911 | row["ExtraParams"] = s.ExtraParams; | 1917 | row["ExtraParams"] = s.ExtraParams; |
1912 | 1918 | ||
1913 | if (s.Media != null) | 1919 | if (s.Media != null) |
1914 | row["Media"] = s.Media.ToXml(); | 1920 | row["Media"] = s.Media.ToXml(); |
1915 | } | 1921 | } |
@@ -1951,7 +1957,6 @@ namespace OpenSim.Data.SQLite | |||
1951 | } | 1957 | } |
1952 | 1958 | ||
1953 | /// <summary> | 1959 | /// <summary> |
1954 | /// see IRegionDatastore | ||
1955 | /// </summary> | 1960 | /// </summary> |
1956 | /// <param name="primID"></param> | 1961 | /// <param name="primID"></param> |
1957 | /// <param name="items"></param> | 1962 | /// <param name="items"></param> |
@@ -2248,7 +2253,6 @@ namespace OpenSim.Data.SQLite | |||
2248 | delete.Parameters.Add(createSqliteParameter("AccessUUID", typeof(String))); | 2253 | delete.Parameters.Add(createSqliteParameter("AccessUUID", typeof(String))); |
2249 | da.DeleteCommand = delete; | 2254 | da.DeleteCommand = delete; |
2250 | da.DeleteCommand.Connection = conn; | 2255 | da.DeleteCommand.Connection = conn; |
2251 | |||
2252 | } | 2256 | } |
2253 | 2257 | ||
2254 | private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn) | 2258 | private void setupRegionSettingsCommands(SqliteDataAdapter da, SqliteConnection conn) |
@@ -2320,7 +2324,7 @@ namespace OpenSim.Data.SQLite | |||
2320 | return DbType.String; | 2324 | return DbType.String; |
2321 | } | 2325 | } |
2322 | } | 2326 | } |
2323 | 2327 | ||
2324 | static void PrintDataSet(DataSet ds) | 2328 | static void PrintDataSet(DataSet ds) |
2325 | { | 2329 | { |
2326 | // Print out any name and extended properties. | 2330 | // Print out any name and extended properties. |
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs index bf8ee14..547ea6b 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs | |||
@@ -49,6 +49,15 @@ namespace OpenSim.Data.SQLiteLegacy | |||
49 | private Dictionary<string, FieldInfo> m_FieldMap = | 49 | private Dictionary<string, FieldInfo> m_FieldMap = |
50 | new Dictionary<string, FieldInfo>(); | 50 | new Dictionary<string, FieldInfo>(); |
51 | 51 | ||
52 | public SQLiteEstateStore() | ||
53 | { | ||
54 | } | ||
55 | |||
56 | public SQLiteEstateStore(string connectionString) | ||
57 | { | ||
58 | Initialise(connectionString); | ||
59 | } | ||
60 | |||
52 | public void Initialise(string connectionString) | 61 | public void Initialise(string connectionString) |
53 | { | 62 | { |
54 | m_connectionString = connectionString; | 63 | m_connectionString = connectionString; |
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteRegionData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs index b5ce4c0..2dde926 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Data.SQLiteLegacy | |||
43 | /// <summary> | 43 | /// <summary> |
44 | /// A RegionData Interface to the SQLite database | 44 | /// A RegionData Interface to the SQLite database |
45 | /// </summary> | 45 | /// </summary> |
46 | public class SQLiteRegionData : IRegionDataStore | 46 | public class SQLiteSimulationData : ISimulationDataStore |
47 | { | 47 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
@@ -69,6 +69,15 @@ namespace OpenSim.Data.SQLiteLegacy | |||
69 | 69 | ||
70 | private String m_connectionString; | 70 | private String m_connectionString; |
71 | 71 | ||
72 | public SQLiteSimulationData() | ||
73 | { | ||
74 | } | ||
75 | |||
76 | public SQLiteSimulationData(string connectionString) | ||
77 | { | ||
78 | Initialise(connectionString); | ||
79 | } | ||
80 | |||
72 | // Temporary attribute while this is experimental | 81 | // Temporary attribute while this is experimental |
73 | 82 | ||
74 | /*********************************************************************** | 83 | /*********************************************************************** |
@@ -78,7 +87,6 @@ namespace OpenSim.Data.SQLiteLegacy | |||
78 | **********************************************************************/ | 87 | **********************************************************************/ |
79 | 88 | ||
80 | /// <summary> | 89 | /// <summary> |
81 | /// See IRegionDataStore | ||
82 | /// <list type="bullet"> | 90 | /// <list type="bullet"> |
83 | /// <item>Initialises RegionData Interface</item> | 91 | /// <item>Initialises RegionData Interface</item> |
84 | /// <item>Loads and initialises a new SQLite connection and maintains it.</item> | 92 | /// <item>Loads and initialises a new SQLite connection and maintains it.</item> |
@@ -1888,7 +1896,6 @@ namespace OpenSim.Data.SQLiteLegacy | |||
1888 | } | 1896 | } |
1889 | 1897 | ||
1890 | /// <summary> | 1898 | /// <summary> |
1891 | /// see IRegionDatastore | ||
1892 | /// </summary> | 1899 | /// </summary> |
1893 | /// <param name="primID"></param> | 1900 | /// <param name="primID"></param> |
1894 | /// <param name="items"></param> | 1901 | /// <param name="items"></param> |
diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs index c261126..7d85f0c 100644 --- a/OpenSim/Data/Tests/BasicDataServiceTest.cs +++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs | |||
@@ -1,4 +1,31 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
2 | using System.IO; | 29 | using System.IO; |
3 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
4 | using log4net.Config; | 31 | using log4net.Config; |
@@ -41,13 +68,13 @@ namespace OpenSim.Data.Tests | |||
41 | { | 68 | { |
42 | m_connStr = !String.IsNullOrEmpty(conn) ? conn : DefaultTestConns.Get(typeof(TConn)); | 69 | m_connStr = !String.IsNullOrEmpty(conn) ? conn : DefaultTestConns.Get(typeof(TConn)); |
43 | 70 | ||
44 | m_log = LogManager.GetLogger(this.GetType()); | 71 | m_log = LogManager.GetLogger(this.GetType()); |
45 | OpenSim.Tests.Common.TestLogging.LogToConsole(); // TODO: Is that right? | 72 | OpenSim.Tests.Common.TestLogging.LogToConsole(); // TODO: Is that right? |
46 | } | 73 | } |
47 | 74 | ||
48 | /// <summary> | 75 | /// <summary> |
49 | /// To be overridden in derived classes. Do whatever init with the m_service, like setting the conn string to it. | 76 | /// To be overridden in derived classes. Do whatever init with the m_service, like setting the conn string to it. |
50 | /// You'd probably want to to cast the 'service' to a more specific type and store it in a member var. | 77 | /// You'd probably want to to cast the 'service' to a more specific type and store it in a member var. |
51 | /// This framework takes care of disposing it, if it's disposable. | 78 | /// This framework takes care of disposing it, if it's disposable. |
52 | /// </summary> | 79 | /// </summary> |
53 | /// <param name="service">The service being tested</param> | 80 | /// <param name="service">The service being tested</param> |
@@ -118,12 +145,12 @@ namespace OpenSim.Data.Tests | |||
118 | { | 145 | { |
119 | if (m_service != null) | 146 | if (m_service != null) |
120 | { | 147 | { |
121 | if( m_service is IDisposable) | 148 | if (m_service is IDisposable) |
122 | ((IDisposable)m_service).Dispose(); | 149 | ((IDisposable)m_service).Dispose(); |
123 | m_service = null; | 150 | m_service = null; |
124 | } | 151 | } |
125 | 152 | ||
126 | if( !String.IsNullOrEmpty(m_file) && File.Exists(m_file) ) | 153 | if (!String.IsNullOrEmpty(m_file) && File.Exists(m_file)) |
127 | File.Delete(m_file); | 154 | File.Delete(m_file); |
128 | } | 155 | } |
129 | 156 | ||
@@ -204,7 +231,7 @@ namespace OpenSim.Data.Tests | |||
204 | lst += ", " + s; | 231 | lst += ", " + s; |
205 | } | 232 | } |
206 | 233 | ||
207 | string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst); | 234 | string sCond = stores.Length > 1 ? ("in (" + lst + ")") : ("=" + lst); |
208 | try | 235 | try |
209 | { | 236 | { |
210 | ExecuteSql("DELETE FROM migrations where name " + sCond); | 237 | ExecuteSql("DELETE FROM migrations where name " + sCond); |
diff --git a/OpenSim/Data/Tests/DefaultTestConns.cs b/OpenSim/Data/Tests/DefaultTestConns.cs index 7b52af5..7c47bdd 100644 --- a/OpenSim/Data/Tests/DefaultTestConns.cs +++ b/OpenSim/Data/Tests/DefaultTestConns.cs | |||
@@ -1,4 +1,31 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
2 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
3 | using System.Linq; | 30 | using System.Linq; |
4 | using System.Text; | 31 | using System.Text; |
diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs index 29bf5a3..a081462 100644 --- a/OpenSim/Data/Tests/RegionTests.cs +++ b/OpenSim/Data/Tests/RegionTests.cs | |||
@@ -61,17 +61,17 @@ namespace OpenSim.Data.Tests | |||
61 | #else | 61 | #else |
62 | 62 | ||
63 | [TestFixture(Description = "Region store tests (SQLite)")] | 63 | [TestFixture(Description = "Region store tests (SQLite)")] |
64 | public class SQLiteRegionTests : RegionTests<SqliteConnection, SQLiteRegionData> | 64 | public class SQLiteRegionTests : RegionTests<SqliteConnection, SQLiteSimulationData> |
65 | { | 65 | { |
66 | } | 66 | } |
67 | 67 | ||
68 | [TestFixture(Description = "Region store tests (MySQL)")] | 68 | [TestFixture(Description = "Region store tests (MySQL)")] |
69 | public class MySqlRegionTests : RegionTests<MySqlConnection, MySQLDataStore> | 69 | public class MySqlRegionTests : RegionTests<MySqlConnection, MySQLSimulationData> |
70 | { | 70 | { |
71 | } | 71 | } |
72 | 72 | ||
73 | [TestFixture(Description = "Region store tests (MS SQL Server)")] | 73 | [TestFixture(Description = "Region store tests (MS SQL Server)")] |
74 | public class MSSQLRegionTests : RegionTests<SqlConnection, MSSQLRegionDataStore> | 74 | public class MSSQLRegionTests : RegionTests<SqlConnection, MSSQLSimulationData> |
75 | { | 75 | { |
76 | } | 76 | } |
77 | 77 | ||
@@ -79,11 +79,11 @@ namespace OpenSim.Data.Tests | |||
79 | 79 | ||
80 | public class RegionTests<TConn, TRegStore> : BasicDataServiceTest<TConn, TRegStore> | 80 | public class RegionTests<TConn, TRegStore> : BasicDataServiceTest<TConn, TRegStore> |
81 | where TConn : DbConnection, new() | 81 | where TConn : DbConnection, new() |
82 | where TRegStore : class, IRegionDataStore, new() | 82 | where TRegStore : class, ISimulationDataStore, new() |
83 | { | 83 | { |
84 | bool m_rebuildDB; | 84 | bool m_rebuildDB; |
85 | 85 | ||
86 | public IRegionDataStore db; | 86 | public ISimulationDataStore db; |
87 | public UUID zero = UUID.Zero; | 87 | public UUID zero = UUID.Zero; |
88 | public UUID region1 = UUID.Random(); | 88 | public UUID region1 = UUID.Random(); |
89 | public UUID region2 = UUID.Random(); | 89 | public UUID region2 = UUID.Random(); |
@@ -122,7 +122,7 @@ namespace OpenSim.Data.Tests | |||
122 | protected override void InitService(object service) | 122 | protected override void InitService(object service) |
123 | { | 123 | { |
124 | ClearDB(); | 124 | ClearDB(); |
125 | db = (IRegionDataStore)service; | 125 | db = (ISimulationDataStore)service; |
126 | db.Initialise(m_connStr); | 126 | db.Initialise(m_connStr); |
127 | } | 127 | } |
128 | 128 | ||
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index 8a339fe..6f32adf 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs | |||
@@ -760,7 +760,7 @@ namespace OpenSim.Framework.Capabilities | |||
760 | string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); | 760 | string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); |
761 | 761 | ||
762 | BakedTextureUploader uploader = | 762 | BakedTextureUploader uploader = |
763 | new BakedTextureUploader( capsBase + uploaderPath, | 763 | new BakedTextureUploader(capsBase + uploaderPath, |
764 | m_httpListener); | 764 | m_httpListener); |
765 | uploader.OnUpLoad += BakedTextureUploaded; | 765 | uploader.OnUpLoad += BakedTextureUploaded; |
766 | 766 | ||
diff --git a/OpenSim/Framework/ConfigSettings.cs b/OpenSim/Framework/ConfigSettings.cs index 8feaa37..be77341 100644 --- a/OpenSim/Framework/ConfigSettings.cs +++ b/OpenSim/Framework/ConfigSettings.cs | |||
@@ -124,22 +124,6 @@ namespace OpenSim.Framework | |||
124 | set { m_standaloneUserSource = value; } | 124 | set { m_standaloneUserSource = value; } |
125 | } | 125 | } |
126 | 126 | ||
127 | protected string m_storageConnectionString; | ||
128 | |||
129 | public string StorageConnectionString | ||
130 | { | ||
131 | get { return m_storageConnectionString; } | ||
132 | set { m_storageConnectionString = value; } | ||
133 | } | ||
134 | |||
135 | protected string m_estateConnectionString; | ||
136 | |||
137 | public string EstateConnectionString | ||
138 | { | ||
139 | get { return m_estateConnectionString; } | ||
140 | set { m_estateConnectionString = value; } | ||
141 | } | ||
142 | |||
143 | protected string m_librariesXMLFile; | 127 | protected string m_librariesXMLFile; |
144 | public string LibrariesXMLFile | 128 | public string LibrariesXMLFile |
145 | { | 129 | { |
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index b17dbc0..52bcd55 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs | |||
@@ -151,7 +151,7 @@ namespace OpenSim.Framework.Console | |||
151 | help.Add(commandInfo.descriptive_help); | 151 | help.Add(commandInfo.descriptive_help); |
152 | 152 | ||
153 | if (descriptiveHelp != string.Empty) | 153 | if (descriptiveHelp != string.Empty) |
154 | help.Add(string.Empty); | 154 | help.Add(string.Empty); |
155 | } | 155 | } |
156 | else | 156 | else |
157 | { | 157 | { |
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index aab920b..22ce880 100755 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs | |||
@@ -89,6 +89,57 @@ namespace OpenSim.Framework.Console | |||
89 | 89 | ||
90 | return ret; | 90 | return ret; |
91 | } | 91 | } |
92 | |||
93 | public string CmdPrompt(string p, List<char> excludedCharacters) | ||
94 | { | ||
95 | bool itisdone = false; | ||
96 | string ret = String.Empty; | ||
97 | while (!itisdone) | ||
98 | { | ||
99 | itisdone = true; | ||
100 | ret = CmdPrompt(p); | ||
101 | |||
102 | foreach (char c in excludedCharacters) | ||
103 | { | ||
104 | if (ret.Contains(c.ToString())) | ||
105 | { | ||
106 | System.Console.WriteLine("The character \"" + c.ToString() + "\" is not permitted."); | ||
107 | itisdone = false; | ||
108 | } | ||
109 | } | ||
110 | } | ||
111 | |||
112 | return ret; | ||
113 | } | ||
114 | |||
115 | public string CmdPrompt(string p, string def, List<char> excludedCharacters) | ||
116 | { | ||
117 | bool itisdone = false; | ||
118 | string ret = String.Empty; | ||
119 | while (!itisdone) | ||
120 | { | ||
121 | itisdone = true; | ||
122 | ret = CmdPrompt(p, def); | ||
123 | |||
124 | if (ret == String.Empty) | ||
125 | { | ||
126 | ret = def; | ||
127 | } | ||
128 | else | ||
129 | { | ||
130 | foreach (char c in excludedCharacters) | ||
131 | { | ||
132 | if (ret.Contains(c.ToString())) | ||
133 | { | ||
134 | System.Console.WriteLine("The character \"" + c.ToString() + "\" is not permitted."); | ||
135 | itisdone = false; | ||
136 | } | ||
137 | } | ||
138 | } | ||
139 | } | ||
140 | |||
141 | return ret; | ||
142 | } | ||
92 | 143 | ||
93 | // Displays a command prompt and returns a default value, user may only enter 1 of 2 options | 144 | // Displays a command prompt and returns a default value, user may only enter 1 of 2 options |
94 | public string CmdPrompt(string prompt, string defaultresponse, List<string> options) | 145 | public string CmdPrompt(string prompt, string defaultresponse, List<string> options) |
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index a3036d0..6043094 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs | |||
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Console | |||
38 | { | 38 | { |
39 | /// <summary> | 39 | /// <summary> |
40 | /// A console that uses cursor control and color | 40 | /// A console that uses cursor control and color |
41 | /// </summary> | 41 | /// </summary> |
42 | public class LocalConsole : CommandConsole | 42 | public class LocalConsole : CommandConsole |
43 | { | 43 | { |
44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -100,8 +100,8 @@ namespace OpenSim.Framework.Console | |||
100 | private int SetCursorTop(int top) | 100 | private int SetCursorTop(int top) |
101 | { | 101 | { |
102 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try | 102 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try |
103 | // to set a cursor row position with a currently invalid column, mono will throw an exception. | 103 | // to set a cursor row position with a currently invalid column, mono will throw an exception. |
104 | // Therefore, we need to make sure that the column position is valid first. | 104 | // Therefore, we need to make sure that the column position is valid first. |
105 | int left = System.Console.CursorLeft; | 105 | int left = System.Console.CursorLeft; |
106 | 106 | ||
107 | if (left < 0) | 107 | if (left < 0) |
@@ -121,7 +121,7 @@ namespace OpenSim.Framework.Console | |||
121 | { | 121 | { |
122 | top = 0; | 122 | top = 0; |
123 | } | 123 | } |
124 | else | 124 | else |
125 | { | 125 | { |
126 | int bh = System.Console.BufferHeight; | 126 | int bh = System.Console.BufferHeight; |
127 | 127 | ||
@@ -133,7 +133,7 @@ namespace OpenSim.Framework.Console | |||
133 | System.Console.CursorTop = top; | 133 | System.Console.CursorTop = top; |
134 | 134 | ||
135 | return top; | 135 | return top; |
136 | } | 136 | } |
137 | 137 | ||
138 | /// <summary> | 138 | /// <summary> |
139 | /// Set the cursor column. | 139 | /// Set the cursor column. |
@@ -145,12 +145,12 @@ namespace OpenSim.Framework.Console | |||
145 | /// </param> | 145 | /// </param> |
146 | /// <returns> | 146 | /// <returns> |
147 | /// The new cursor column. | 147 | /// The new cursor column. |
148 | /// </returns> | 148 | /// </returns> |
149 | private int SetCursorLeft(int left) | 149 | private int SetCursorLeft(int left) |
150 | { | 150 | { |
151 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try | 151 | // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try |
152 | // to set a cursor column position with a currently invalid row, mono will throw an exception. | 152 | // to set a cursor column position with a currently invalid row, mono will throw an exception. |
153 | // Therefore, we need to make sure that the row position is valid first. | 153 | // Therefore, we need to make sure that the row position is valid first. |
154 | int top = System.Console.CursorTop; | 154 | int top = System.Console.CursorTop; |
155 | 155 | ||
156 | if (top < 0) | 156 | if (top < 0) |
@@ -214,7 +214,7 @@ namespace OpenSim.Framework.Console | |||
214 | System.Console.Write("{0}", prompt); | 214 | System.Console.Write("{0}", prompt); |
215 | 215 | ||
216 | SetCursorTop(new_y); | 216 | SetCursorTop(new_y); |
217 | SetCursorLeft(new_x); | 217 | SetCursorLeft(new_x); |
218 | } | 218 | } |
219 | } | 219 | } |
220 | 220 | ||
@@ -461,7 +461,8 @@ namespace OpenSim.Framework.Console | |||
461 | SetCursorLeft(0); | 461 | SetCursorLeft(0); |
462 | y = SetCursorTop(y); | 462 | y = SetCursorTop(y); |
463 | 463 | ||
464 | System.Console.WriteLine("{0}{1}", prompt, cmdline); | 464 | System.Console.WriteLine(); |
465 | //Show(); | ||
465 | 466 | ||
466 | lock (cmdline) | 467 | lock (cmdline) |
467 | { | 468 | { |
@@ -486,7 +487,7 @@ namespace OpenSim.Framework.Console | |||
486 | } | 487 | } |
487 | } | 488 | } |
488 | 489 | ||
489 | AddToHistory(cmdline.ToString()); | 490 | //AddToHistory(cmdline.ToString()); |
490 | return cmdline.ToString(); | 491 | return cmdline.ToString(); |
491 | default: | 492 | default: |
492 | break; | 493 | break; |
diff --git a/OpenSim/Framework/Console/MockConsole.cs b/OpenSim/Framework/Console/MockConsole.cs index 9eb1977..a29b370 100644 --- a/OpenSim/Framework/Console/MockConsole.cs +++ b/OpenSim/Framework/Console/MockConsole.cs | |||
@@ -1,4 +1,31 @@ | |||
1 | using System; | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
2 | using System.Threading; | 29 | using System.Threading; |
3 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
4 | using System.Text; | 31 | using System.Text; |
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index 5bb0413..3fb2fd6 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs | |||
@@ -89,13 +89,13 @@ namespace OpenSim.Framework | |||
89 | private Vector3 _userLocation = new Vector3(); | 89 | private Vector3 _userLocation = new Vector3(); |
90 | private Vector3 _userLookAt = new Vector3(); | 90 | private Vector3 _userLookAt = new Vector3(); |
91 | private int _otherCleanTime = 0; | 91 | private int _otherCleanTime = 0; |
92 | private string _mediaType = "none/none"; | 92 | private string _mediaType = "none/none"; |
93 | private string _mediaDescription = ""; | 93 | private string _mediaDescription = ""; |
94 | private int _mediaHeight = 0; | 94 | private int _mediaHeight = 0; |
95 | private int _mediaWidth = 0; | 95 | private int _mediaWidth = 0; |
96 | private bool _mediaLoop = false; | 96 | private bool _mediaLoop = false; |
97 | private bool _obscureMusic = false; | 97 | private bool _obscureMusic = false; |
98 | private bool _obscureMedia = false; | 98 | private bool _obscureMedia = false; |
99 | 99 | ||
100 | /// <summary> | 100 | /// <summary> |
101 | /// Whether to obscure parcel media URL | 101 | /// Whether to obscure parcel media URL |
@@ -690,13 +690,13 @@ namespace OpenSim.Framework | |||
690 | landData._userLocation = _userLocation; | 690 | landData._userLocation = _userLocation; |
691 | landData._userLookAt = _userLookAt; | 691 | landData._userLookAt = _userLookAt; |
692 | landData._otherCleanTime = _otherCleanTime; | 692 | landData._otherCleanTime = _otherCleanTime; |
693 | landData._mediaType = _mediaType; | 693 | landData._mediaType = _mediaType; |
694 | landData._mediaDescription = _mediaDescription; | 694 | landData._mediaDescription = _mediaDescription; |
695 | landData._mediaWidth = _mediaWidth; | 695 | landData._mediaWidth = _mediaWidth; |
696 | landData._mediaHeight = _mediaHeight; | 696 | landData._mediaHeight = _mediaHeight; |
697 | landData._mediaLoop = _mediaLoop; | 697 | landData._mediaLoop = _mediaLoop; |
698 | landData._obscureMusic = _obscureMusic; | 698 | landData._obscureMusic = _obscureMusic; |
699 | landData._obscureMedia = _obscureMedia; | 699 | landData._obscureMedia = _obscureMedia; |
700 | 700 | ||
701 | landData._parcelAccessList.Clear(); | 701 | landData._parcelAccessList.Clear(); |
702 | foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList) | 702 | foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList) |
diff --git a/OpenSim/Framework/LandUpdateArgs.cs b/OpenSim/Framework/LandUpdateArgs.cs index ed496a1..7d6c4f2 100644 --- a/OpenSim/Framework/LandUpdateArgs.cs +++ b/OpenSim/Framework/LandUpdateArgs.cs | |||
@@ -49,12 +49,12 @@ namespace OpenSim.Framework | |||
49 | public UUID SnapshotID; | 49 | public UUID SnapshotID; |
50 | public Vector3 UserLocation; | 50 | public Vector3 UserLocation; |
51 | public Vector3 UserLookAt; | 51 | public Vector3 UserLookAt; |
52 | public string MediaType; | 52 | public string MediaType; |
53 | public string MediaDescription; | 53 | public string MediaDescription; |
54 | public int MediaHeight; | 54 | public int MediaHeight; |
55 | public int MediaWidth; | 55 | public int MediaWidth; |
56 | public bool MediaLoop; | 56 | public bool MediaLoop; |
57 | public bool ObscureMusic; | 57 | public bool ObscureMusic; |
58 | public bool ObscureMedia; | 58 | public bool ObscureMedia; |
59 | } | 59 | } |
60 | } | 60 | } |
diff --git a/OpenSim/Framework/Lazy.cs b/OpenSim/Framework/Lazy.cs index 8a417ac..91de4bd 100644 --- a/OpenSim/Framework/Lazy.cs +++ b/OpenSim/Framework/Lazy.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | // | 1 | // |
2 | // Lazy.cs | 2 | // Lazy.cs |
3 | // | 3 | // |
4 | // Authors: | 4 | // Authors: |
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index a4587d8..f07ab7c 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -175,7 +175,7 @@ namespace OpenSim.Framework | |||
175 | } | 175 | } |
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
179 | /// <summary> | 179 | /// <summary> |
180 | /// Entries to store media textures on each face | 180 | /// Entries to store media textures on each face |
181 | /// </summary> | 181 | /// </summary> |
@@ -1216,28 +1216,28 @@ namespace OpenSim.Framework | |||
1216 | prim.Properties.Permissions = new Permissions(); | 1216 | prim.Properties.Permissions = new Permissions(); |
1217 | prim.Properties.SalePrice = 10; | 1217 | prim.Properties.SalePrice = 10; |
1218 | prim.Properties.SaleType = new SaleType(); | 1218 | prim.Properties.SaleType = new SaleType(); |
1219 | 1219 | ||
1220 | return prim; | 1220 | return prim; |
1221 | } | 1221 | } |
1222 | 1222 | ||
1223 | /// <summary> | 1223 | /// <summary> |
1224 | /// Encapsulates a list of media entries. | 1224 | /// Encapsulates a list of media entries. |
1225 | /// </summary> | 1225 | /// </summary> |
1226 | /// This class is necessary because we want to replace auto-serialization of MediaEntry with something more | 1226 | /// This class is necessary because we want to replace auto-serialization of MediaEntry with something more |
1227 | /// OSD like and less vulnerable to change. | 1227 | /// OSD like and less vulnerable to change. |
1228 | public class MediaList : List<MediaEntry>, IXmlSerializable | 1228 | public class MediaList : List<MediaEntry>, IXmlSerializable |
1229 | { | 1229 | { |
1230 | public const string MEDIA_TEXTURE_TYPE = "sl"; | 1230 | public const string MEDIA_TEXTURE_TYPE = "sl"; |
1231 | 1231 | ||
1232 | public MediaList() : base() {} | 1232 | public MediaList() : base() {} |
1233 | public MediaList(IEnumerable<MediaEntry> collection) : base(collection) {} | 1233 | public MediaList(IEnumerable<MediaEntry> collection) : base(collection) {} |
1234 | public MediaList(int capacity) : base(capacity) {} | 1234 | public MediaList(int capacity) : base(capacity) {} |
1235 | 1235 | ||
1236 | public XmlSchema GetSchema() | 1236 | public XmlSchema GetSchema() |
1237 | { | 1237 | { |
1238 | return null; | 1238 | return null; |
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | public string ToXml() | 1241 | public string ToXml() |
1242 | { | 1242 | { |
1243 | lock (this) | 1243 | lock (this) |
@@ -1245,78 +1245,78 @@ namespace OpenSim.Framework | |||
1245 | using (StringWriter sw = new StringWriter()) | 1245 | using (StringWriter sw = new StringWriter()) |
1246 | { | 1246 | { |
1247 | using (XmlTextWriter xtw = new XmlTextWriter(sw)) | 1247 | using (XmlTextWriter xtw = new XmlTextWriter(sw)) |
1248 | { | 1248 | { |
1249 | xtw.WriteStartElement("OSMedia"); | 1249 | xtw.WriteStartElement("OSMedia"); |
1250 | xtw.WriteAttributeString("type", MEDIA_TEXTURE_TYPE); | 1250 | xtw.WriteAttributeString("type", MEDIA_TEXTURE_TYPE); |
1251 | xtw.WriteAttributeString("version", "0.1"); | 1251 | xtw.WriteAttributeString("version", "0.1"); |
1252 | 1252 | ||
1253 | OSDArray meArray = new OSDArray(); | 1253 | OSDArray meArray = new OSDArray(); |
1254 | foreach (MediaEntry me in this) | 1254 | foreach (MediaEntry me in this) |
1255 | { | 1255 | { |
1256 | OSD osd = (null == me ? new OSD() : me.GetOSD()); | 1256 | OSD osd = (null == me ? new OSD() : me.GetOSD()); |
1257 | meArray.Add(osd); | 1257 | meArray.Add(osd); |
1258 | } | 1258 | } |
1259 | 1259 | ||
1260 | xtw.WriteStartElement("OSData"); | 1260 | xtw.WriteStartElement("OSData"); |
1261 | xtw.WriteRaw(OSDParser.SerializeLLSDXmlString(meArray)); | 1261 | xtw.WriteRaw(OSDParser.SerializeLLSDXmlString(meArray)); |
1262 | xtw.WriteEndElement(); | 1262 | xtw.WriteEndElement(); |
1263 | 1263 | ||
1264 | xtw.WriteEndElement(); | 1264 | xtw.WriteEndElement(); |
1265 | 1265 | ||
1266 | xtw.Flush(); | 1266 | xtw.Flush(); |
1267 | return sw.ToString(); | 1267 | return sw.ToString(); |
1268 | } | 1268 | } |
1269 | } | 1269 | } |
1270 | } | 1270 | } |
1271 | } | 1271 | } |
1272 | 1272 | ||
1273 | public void WriteXml(XmlWriter writer) | 1273 | public void WriteXml(XmlWriter writer) |
1274 | { | 1274 | { |
1275 | writer.WriteRaw(ToXml()); | 1275 | writer.WriteRaw(ToXml()); |
1276 | } | 1276 | } |
1277 | 1277 | ||
1278 | public static MediaList FromXml(string rawXml) | 1278 | public static MediaList FromXml(string rawXml) |
1279 | { | 1279 | { |
1280 | MediaList ml = new MediaList(); | 1280 | MediaList ml = new MediaList(); |
1281 | ml.ReadXml(rawXml); | 1281 | ml.ReadXml(rawXml); |
1282 | return ml; | 1282 | return ml; |
1283 | } | 1283 | } |
1284 | 1284 | ||
1285 | public void ReadXml(string rawXml) | 1285 | public void ReadXml(string rawXml) |
1286 | { | 1286 | { |
1287 | using (StringReader sr = new StringReader(rawXml)) | 1287 | using (StringReader sr = new StringReader(rawXml)) |
1288 | { | 1288 | { |
1289 | using (XmlTextReader xtr = new XmlTextReader(sr)) | 1289 | using (XmlTextReader xtr = new XmlTextReader(sr)) |
1290 | { | 1290 | { |
1291 | xtr.MoveToContent(); | 1291 | xtr.MoveToContent(); |
1292 | 1292 | ||
1293 | string type = xtr.GetAttribute("type"); | 1293 | string type = xtr.GetAttribute("type"); |
1294 | //m_log.DebugFormat("[MOAP]: Loaded media texture entry with type {0}", type); | 1294 | //m_log.DebugFormat("[MOAP]: Loaded media texture entry with type {0}", type); |
1295 | 1295 | ||
1296 | if (type != MEDIA_TEXTURE_TYPE) | 1296 | if (type != MEDIA_TEXTURE_TYPE) |
1297 | return; | 1297 | return; |
1298 | 1298 | ||
1299 | xtr.ReadStartElement("OSMedia"); | 1299 | xtr.ReadStartElement("OSMedia"); |
1300 | 1300 | ||
1301 | OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml()); | 1301 | OSDArray osdMeArray = (OSDArray)OSDParser.DeserializeLLSDXml(xtr.ReadInnerXml()); |
1302 | foreach (OSD osdMe in osdMeArray) | 1302 | foreach (OSD osdMe in osdMeArray) |
1303 | { | 1303 | { |
1304 | MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry()); | 1304 | MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry()); |
1305 | Add(me); | 1305 | Add(me); |
1306 | } | 1306 | } |
1307 | 1307 | ||
1308 | xtr.ReadEndElement(); | 1308 | xtr.ReadEndElement(); |
1309 | } | 1309 | } |
1310 | } | 1310 | } |
1311 | } | 1311 | } |
1312 | 1312 | ||
1313 | public void ReadXml(XmlReader reader) | 1313 | public void ReadXml(XmlReader reader) |
1314 | { | 1314 | { |
1315 | if (reader.IsEmptyElement) | 1315 | if (reader.IsEmptyElement) |
1316 | return; | 1316 | return; |
1317 | 1317 | ||
1318 | ReadXml(reader.ReadInnerXml()); | 1318 | ReadXml(reader.ReadInnerXml()); |
1319 | } | 1319 | } |
1320 | } | 1320 | } |
1321 | } | 1321 | } |
1322 | } \ No newline at end of file | 1322 | } |
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index e36a72b..a006f3e 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -98,9 +98,9 @@ namespace OpenSim.Framework | |||
98 | 98 | ||
99 | [Serializable] | 99 | [Serializable] |
100 | public class SimpleRegionInfo | 100 | public class SimpleRegionInfo |
101 | { | 101 | { |
102 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 102 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
103 | 103 | ||
104 | /// <summary> | 104 | /// <summary> |
105 | /// The port by which http communication occurs with the region (most noticeably, CAPS communication) | 105 | /// The port by which http communication occurs with the region (most noticeably, CAPS communication) |
106 | /// </summary> | 106 | /// </summary> |
@@ -345,7 +345,7 @@ namespace OpenSim.Framework | |||
345 | public string proxyUrl = ""; | 345 | public string proxyUrl = ""; |
346 | public int ProxyOffset = 0; | 346 | public int ProxyOffset = 0; |
347 | public string regionSecret = UUID.Random().ToString(); | 347 | public string regionSecret = UUID.Random().ToString(); |
348 | 348 | ||
349 | public string osSecret; | 349 | public string osSecret; |
350 | 350 | ||
351 | public UUID lastMapUUID = UUID.Zero; | 351 | public UUID lastMapUUID = UUID.Zero; |
@@ -700,7 +700,7 @@ namespace OpenSim.Framework | |||
700 | 700 | ||
701 | RegionID = new UUID(regionUUID); | 701 | RegionID = new UUID(regionUUID); |
702 | originRegionID = RegionID; // What IS this?! | 702 | originRegionID = RegionID; // What IS this?! |
703 | 703 | ||
704 | RegionName = name; | 704 | RegionName = name; |
705 | string location = config.GetString("Location", String.Empty); | 705 | string location = config.GetString("Location", String.Empty); |
706 | 706 | ||
@@ -721,7 +721,7 @@ namespace OpenSim.Framework | |||
721 | 721 | ||
722 | // Internal IP | 722 | // Internal IP |
723 | IPAddress address; | 723 | IPAddress address; |
724 | 724 | ||
725 | if (config.Contains("InternalAddress")) | 725 | if (config.Contains("InternalAddress")) |
726 | { | 726 | { |
727 | address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty)); | 727 | address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty)); |
@@ -775,7 +775,7 @@ namespace OpenSim.Framework | |||
775 | { | 775 | { |
776 | m_externalHostName = Util.GetLocalHost().ToString(); | 776 | m_externalHostName = Util.GetLocalHost().ToString(); |
777 | m_log.InfoFormat( | 777 | m_log.InfoFormat( |
778 | "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}", | 778 | "[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}", |
779 | m_externalHostName, name); | 779 | m_externalHostName, name); |
780 | } | 780 | } |
781 | else | 781 | else |
@@ -910,16 +910,16 @@ namespace OpenSim.Framework | |||
910 | 910 | ||
911 | configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, | 911 | configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, |
912 | "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true); | 912 | "Maximum size for nonphysical prims", m_nonphysPrimMax.ToString(), true); |
913 | 913 | ||
914 | configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, | 914 | configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, |
915 | "Maximum size for physical prims", m_physPrimMax.ToString(), true); | 915 | "Maximum size for physical prims", m_physPrimMax.ToString(), true); |
916 | 916 | ||
917 | configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, | 917 | configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, |
918 | "Clamp prims to max size", m_clampPrimSize.ToString(), true); | 918 | "Clamp prims to max size", m_clampPrimSize.ToString(), true); |
919 | 919 | ||
920 | configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, | 920 | configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, |
921 | "Max objects this sim will hold", m_objectCapacity.ToString(), true); | 921 | "Max objects this sim will hold", m_objectCapacity.ToString(), true); |
922 | 922 | ||
923 | configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, | 923 | configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID, |
924 | "Scope ID for this region", ScopeID.ToString(), true); | 924 | "Scope ID for this region", ScopeID.ToString(), true); |
925 | 925 | ||
@@ -957,16 +957,16 @@ namespace OpenSim.Framework | |||
957 | 957 | ||
958 | configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 958 | configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
959 | "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true); | 959 | "Last Map Refresh", Util.UnixTimeSinceEpoch().ToString(), true); |
960 | 960 | ||
961 | configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, | 961 | configMember.addConfigurationOption("nonphysical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, |
962 | "Maximum size for nonphysical prims", "0", true); | 962 | "Maximum size for nonphysical prims", "0", true); |
963 | 963 | ||
964 | configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, | 964 | configMember.addConfigurationOption("physical_prim_max", ConfigurationOption.ConfigurationTypes.TYPE_INT32, |
965 | "Maximum size for physical prims", "0", true); | 965 | "Maximum size for physical prims", "0", true); |
966 | 966 | ||
967 | configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, | 967 | configMember.addConfigurationOption("clamp_prim_size", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, |
968 | "Clamp prims to max size", "false", true); | 968 | "Clamp prims to max size", "false", true); |
969 | 969 | ||
970 | configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, | 970 | configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32, |
971 | "Max objects this sim will hold", "0", true); | 971 | "Max objects this sim will hold", "0", true); |
972 | 972 | ||
diff --git a/OpenSim/Framework/SLUtil.cs b/OpenSim/Framework/SLUtil.cs index a489806..9941a7f 100644 --- a/OpenSim/Framework/SLUtil.cs +++ b/OpenSim/Framework/SLUtil.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Framework | |||
46 | case AssetType.Texture: | 46 | case AssetType.Texture: |
47 | return "image/x-j2c"; | 47 | return "image/x-j2c"; |
48 | case AssetType.Sound: | 48 | case AssetType.Sound: |
49 | return "application/ogg"; | 49 | return "audio/ogg"; |
50 | case AssetType.CallingCard: | 50 | case AssetType.CallingCard: |
51 | return "application/vnd.ll.callingcard"; | 51 | return "application/vnd.ll.callingcard"; |
52 | case AssetType.Landmark: | 52 | case AssetType.Landmark: |
@@ -98,8 +98,6 @@ namespace OpenSim.Framework | |||
98 | return "application/vnd.ll.outfitfolder"; | 98 | return "application/vnd.ll.outfitfolder"; |
99 | case AssetType.MyOutfitsFolder: | 99 | case AssetType.MyOutfitsFolder: |
100 | return "application/vnd.ll.myoutfitsfolder"; | 100 | return "application/vnd.ll.myoutfitsfolder"; |
101 | case AssetType.InboxFolder: | ||
102 | return "application/vnd.ll.inboxfolder"; | ||
103 | case AssetType.Unknown: | 101 | case AssetType.Unknown: |
104 | default: | 102 | default: |
105 | return "application/octet-stream"; | 103 | return "application/octet-stream"; |
@@ -128,7 +126,7 @@ namespace OpenSim.Framework | |||
128 | case InventoryType.Object: | 126 | case InventoryType.Object: |
129 | return "application/vnd.ll.primitive"; | 127 | return "application/vnd.ll.primitive"; |
130 | case InventoryType.Sound: | 128 | case InventoryType.Sound: |
131 | return "application/ogg"; | 129 | return "audio/ogg"; |
132 | case InventoryType.Snapshot: | 130 | case InventoryType.Snapshot: |
133 | case InventoryType.Texture: | 131 | case InventoryType.Texture: |
134 | return "image/x-j2c"; | 132 | return "image/x-j2c"; |
@@ -147,6 +145,7 @@ namespace OpenSim.Framework | |||
147 | case "image/jp2": | 145 | case "image/jp2": |
148 | return (sbyte)AssetType.Texture; | 146 | return (sbyte)AssetType.Texture; |
149 | case "application/ogg": | 147 | case "application/ogg": |
148 | case "audio/ogg": | ||
150 | return (sbyte)AssetType.Sound; | 149 | return (sbyte)AssetType.Sound; |
151 | case "application/vnd.ll.callingcard": | 150 | case "application/vnd.ll.callingcard": |
152 | case "application/x-metaverse-callingcard": | 151 | case "application/x-metaverse-callingcard": |
@@ -209,8 +208,6 @@ namespace OpenSim.Framework | |||
209 | return (sbyte)AssetType.OutfitFolder; | 208 | return (sbyte)AssetType.OutfitFolder; |
210 | case "application/vnd.ll.myoutfitsfolder": | 209 | case "application/vnd.ll.myoutfitsfolder": |
211 | return (sbyte)AssetType.MyOutfitsFolder; | 210 | return (sbyte)AssetType.MyOutfitsFolder; |
212 | case "application/vnd.ll.inboxfolder": | ||
213 | return (sbyte)AssetType.InboxFolder; | ||
214 | case "application/octet-stream": | 211 | case "application/octet-stream": |
215 | default: | 212 | default: |
216 | return (sbyte)AssetType.Unknown; | 213 | return (sbyte)AssetType.Unknown; |
@@ -227,6 +224,7 @@ namespace OpenSim.Framework | |||
227 | case "image/jpeg": | 224 | case "image/jpeg": |
228 | return (sbyte)InventoryType.Texture; | 225 | return (sbyte)InventoryType.Texture; |
229 | case "application/ogg": | 226 | case "application/ogg": |
227 | case "audio/ogg": | ||
230 | case "audio/x-wav": | 228 | case "audio/x-wav": |
231 | return (sbyte)InventoryType.Sound; | 229 | return (sbyte)InventoryType.Sound; |
232 | case "application/vnd.ll.callingcard": | 230 | case "application/vnd.ll.callingcard": |
diff --git a/OpenSim/Framework/Serialization/ArchiveConstants.cs b/OpenSim/Framework/Serialization/ArchiveConstants.cs index 3143e3b..7a9b33d 100644 --- a/OpenSim/Framework/Serialization/ArchiveConstants.cs +++ b/OpenSim/Framework/Serialization/ArchiveConstants.cs | |||
@@ -157,9 +157,9 @@ namespace OpenSim.Framework.Serialization | |||
157 | public static string CreateOarObjectFilename(string objectName, UUID uuid, Vector3 pos) | 157 | public static string CreateOarObjectFilename(string objectName, UUID uuid, Vector3 pos) |
158 | { | 158 | { |
159 | return string.Format( | 159 | return string.Format( |
160 | OAR_OBJECT_FILENAME_TEMPLATE, objectName, | 160 | OAR_OBJECT_FILENAME_TEMPLATE, objectName, |
161 | Math.Round(pos.X), Math.Round(pos.Y), Math.Round(pos.Z), | 161 | Math.Round(pos.X), Math.Round(pos.Y), Math.Round(pos.Z), |
162 | uuid); | 162 | uuid); |
163 | } | 163 | } |
164 | 164 | ||
165 | /// <summary> | 165 | /// <summary> |
@@ -171,9 +171,9 @@ namespace OpenSim.Framework.Serialization | |||
171 | /// <returns></returns> | 171 | /// <returns></returns> |
172 | public static string CreateOarObjectPath(string objectName, UUID uuid, Vector3 pos) | 172 | public static string CreateOarObjectPath(string objectName, UUID uuid, Vector3 pos) |
173 | { | 173 | { |
174 | return OBJECTS_PATH + CreateOarObjectFilename(objectName, uuid, pos); | 174 | return OBJECTS_PATH + CreateOarObjectFilename(objectName, uuid, pos); |
175 | } | 175 | } |
176 | 176 | ||
177 | /// <summary> | 177 | /// <summary> |
178 | /// Extract a plain path from an IAR path | 178 | /// Extract a plain path from an IAR path |
179 | /// </summary> | 179 | /// </summary> |
@@ -184,18 +184,18 @@ namespace OpenSim.Framework.Serialization | |||
184 | List<string> plainDirs = new List<string>(); | 184 | List<string> plainDirs = new List<string>(); |
185 | 185 | ||
186 | string[] iarDirs = iarPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); | 186 | string[] iarDirs = iarPath.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries); |
187 | 187 | ||
188 | foreach (string iarDir in iarDirs) | 188 | foreach (string iarDir in iarDirs) |
189 | { | 189 | { |
190 | if (!iarDir.Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR)) | 190 | if (!iarDir.Contains(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR)) |
191 | plainDirs.Add(iarDir); | 191 | plainDirs.Add(iarDir); |
192 | 192 | ||
193 | int i = iarDir.LastIndexOf(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR); | 193 | int i = iarDir.LastIndexOf(ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR); |
194 | 194 | ||
195 | plainDirs.Add(iarDir.Remove(i)); | 195 | plainDirs.Add(iarDir.Remove(i)); |
196 | } | 196 | } |
197 | 197 | ||
198 | return string.Join("/", plainDirs.ToArray()); | 198 | return string.Join("/", plainDirs.ToArray()); |
199 | } | 199 | } |
200 | } | 200 | } |
201 | } \ No newline at end of file | 201 | } |
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index d20f8c9..452df38 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
51 | { | 51 | { |
52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
53 | private HttpServerLogWriter httpserverlog = new HttpServerLogWriter(); | 53 | private HttpServerLogWriter httpserverlog = new HttpServerLogWriter(); |
54 | 54 | ||
55 | private volatile int NotSocketErrors = 0; | 55 | private volatile int NotSocketErrors = 0; |
56 | public volatile bool HTTPDRunning = false; | 56 | public volatile bool HTTPDRunning = false; |
57 | 57 | ||
@@ -160,7 +160,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
160 | m_rpcHandlers[method] = handler; | 160 | m_rpcHandlers[method] = handler; |
161 | m_rpcHandlersKeepAlive[method] = keepAlive; // default | 161 | m_rpcHandlersKeepAlive[method] = keepAlive; // default |
162 | } | 162 | } |
163 | 163 | ||
164 | return true; | 164 | return true; |
165 | } | 165 | } |
166 | 166 | ||
@@ -182,7 +182,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
182 | public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler) | 182 | public bool AddHTTPHandler(string methodName, GenericHTTPMethod handler) |
183 | { | 183 | { |
184 | //m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName); | 184 | //m_log.DebugFormat("[BASE HTTP SERVER]: Registering {0}", methodName); |
185 | 185 | ||
186 | lock (m_HTTPHandlers) | 186 | lock (m_HTTPHandlers) |
187 | { | 187 | { |
188 | if (!m_HTTPHandlers.ContainsKey(methodName)) | 188 | if (!m_HTTPHandlers.ContainsKey(methodName)) |
@@ -204,14 +204,14 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
204 | if (!m_pollHandlers.ContainsKey(methodName)) | 204 | if (!m_pollHandlers.ContainsKey(methodName)) |
205 | { | 205 | { |
206 | m_pollHandlers.Add(methodName,args); | 206 | m_pollHandlers.Add(methodName,args); |
207 | pollHandlerResult = true; | 207 | pollHandlerResult = true; |
208 | } | 208 | } |
209 | } | 209 | } |
210 | 210 | ||
211 | if (pollHandlerResult) | 211 | if (pollHandlerResult) |
212 | return AddHTTPHandler(methodName, handler); | 212 | return AddHTTPHandler(methodName, handler); |
213 | 213 | ||
214 | return false; | 214 | return false; |
215 | } | 215 | } |
216 | 216 | ||
217 | // Note that the agent string is provided simply to differentiate | 217 | // Note that the agent string is provided simply to differentiate |
@@ -257,51 +257,51 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
257 | { | 257 | { |
258 | IHttpClientContext context = (IHttpClientContext)source; | 258 | IHttpClientContext context = (IHttpClientContext)source; |
259 | IHttpRequest request = args.Request; | 259 | IHttpRequest request = args.Request; |
260 | 260 | ||
261 | PollServiceEventArgs psEvArgs; | 261 | PollServiceEventArgs psEvArgs; |
262 | 262 | ||
263 | if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs)) | 263 | if (TryGetPollServiceHTTPHandler(request.UriPath.ToString(), out psEvArgs)) |
264 | { | 264 | { |
265 | PollServiceHttpRequest psreq = new PollServiceHttpRequest(psEvArgs, context, request); | 265 | PollServiceHttpRequest psreq = new PollServiceHttpRequest(psEvArgs, context, request); |
266 | 266 | ||
267 | if (psEvArgs.Request != null) | 267 | if (psEvArgs.Request != null) |
268 | { | 268 | { |
269 | OSHttpRequest req = new OSHttpRequest(context, request); | 269 | OSHttpRequest req = new OSHttpRequest(context, request); |
270 | 270 | ||
271 | Stream requestStream = req.InputStream; | 271 | Stream requestStream = req.InputStream; |
272 | 272 | ||
273 | Encoding encoding = Encoding.UTF8; | 273 | Encoding encoding = Encoding.UTF8; |
274 | StreamReader reader = new StreamReader(requestStream, encoding); | 274 | StreamReader reader = new StreamReader(requestStream, encoding); |
275 | 275 | ||
276 | string requestBody = reader.ReadToEnd(); | 276 | string requestBody = reader.ReadToEnd(); |
277 | 277 | ||
278 | Hashtable keysvals = new Hashtable(); | 278 | Hashtable keysvals = new Hashtable(); |
279 | Hashtable headervals = new Hashtable(); | 279 | Hashtable headervals = new Hashtable(); |
280 | 280 | ||
281 | string[] querystringkeys = req.QueryString.AllKeys; | 281 | string[] querystringkeys = req.QueryString.AllKeys; |
282 | string[] rHeaders = req.Headers.AllKeys; | 282 | string[] rHeaders = req.Headers.AllKeys; |
283 | 283 | ||
284 | keysvals.Add("body", requestBody); | 284 | keysvals.Add("body", requestBody); |
285 | keysvals.Add("uri", req.RawUrl); | 285 | keysvals.Add("uri", req.RawUrl); |
286 | keysvals.Add("content-type", req.ContentType); | 286 | keysvals.Add("content-type", req.ContentType); |
287 | keysvals.Add("http-method", req.HttpMethod); | 287 | keysvals.Add("http-method", req.HttpMethod); |
288 | 288 | ||
289 | foreach (string queryname in querystringkeys) | 289 | foreach (string queryname in querystringkeys) |
290 | { | 290 | { |
291 | keysvals.Add(queryname, req.QueryString[queryname]); | 291 | keysvals.Add(queryname, req.QueryString[queryname]); |
292 | } | 292 | } |
293 | 293 | ||
294 | foreach (string headername in rHeaders) | 294 | foreach (string headername in rHeaders) |
295 | { | 295 | { |
296 | headervals[headername] = req.Headers[headername]; | 296 | headervals[headername] = req.Headers[headername]; |
297 | } | 297 | } |
298 | 298 | ||
299 | keysvals.Add("headers", headervals); | 299 | keysvals.Add("headers", headervals); |
300 | keysvals.Add("querystringkeys", querystringkeys); | 300 | keysvals.Add("querystringkeys", querystringkeys); |
301 | 301 | ||
302 | psEvArgs.Request(psreq.RequestID, keysvals); | 302 | psEvArgs.Request(psreq.RequestID, keysvals); |
303 | } | 303 | } |
304 | 304 | ||
305 | m_PollServiceManager.Enqueue(psreq); | 305 | m_PollServiceManager.Enqueue(psreq); |
306 | } | 306 | } |
307 | else | 307 | else |
@@ -348,10 +348,10 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
348 | { | 348 | { |
349 | try | 349 | try |
350 | { | 350 | { |
351 | // m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); | 351 | // m_log.Debug("[BASE HTTP SERVER]: Handling request to " + request.RawUrl); |
352 | 352 | ||
353 | Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); | 353 | Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true); |
354 | 354 | ||
355 | // This is the REST agent interface. We require an agent to properly identify | 355 | // This is the REST agent interface. We require an agent to properly identify |
356 | // itself. If the REST handler recognizes the prefix it will attempt to | 356 | // itself. If the REST handler recognizes the prefix it will attempt to |
357 | // satisfy the request. If it is not recognizable, and no damage has occurred | 357 | // satisfy the request. If it is not recognizable, and no damage has occurred |
@@ -456,7 +456,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
456 | } | 456 | } |
457 | 457 | ||
458 | request.InputStream.Close(); | 458 | request.InputStream.Close(); |
459 | 459 | ||
460 | // HTTP IN support. The script engine taes it from here | 460 | // HTTP IN support. The script engine taes it from here |
461 | // Nothing to worry about for us. | 461 | // Nothing to worry about for us. |
462 | // | 462 | // |
@@ -540,7 +540,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
540 | HandleLLSDRequests(request, response); | 540 | HandleLLSDRequests(request, response); |
541 | return; | 541 | return; |
542 | } | 542 | } |
543 | 543 | ||
544 | // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); | 544 | // m_log.DebugFormat("[BASE HTTP SERVER]: Checking for HTTP Handler for request {0}", request.RawUrl); |
545 | if (DoWeHaveAHTTPHandler(request.RawUrl)) | 545 | if (DoWeHaveAHTTPHandler(request.RawUrl)) |
546 | { | 546 | { |
@@ -594,7 +594,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
594 | } | 594 | } |
595 | } | 595 | } |
596 | } | 596 | } |
597 | 597 | ||
598 | if (String.IsNullOrEmpty(bestMatch)) | 598 | if (String.IsNullOrEmpty(bestMatch)) |
599 | { | 599 | { |
600 | streamHandler = null; | 600 | streamHandler = null; |
@@ -641,7 +641,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
641 | private bool TryGetHTTPHandler(string handlerKey, out GenericHTTPMethod HTTPHandler) | 641 | private bool TryGetHTTPHandler(string handlerKey, out GenericHTTPMethod HTTPHandler) |
642 | { | 642 | { |
643 | // m_log.DebugFormat("[BASE HTTP HANDLER]: Looking for HTTP handler for {0}", handlerKey); | 643 | // m_log.DebugFormat("[BASE HTTP HANDLER]: Looking for HTTP handler for {0}", handlerKey); |
644 | 644 | ||
645 | string bestMatch = null; | 645 | string bestMatch = null; |
646 | 646 | ||
647 | lock (m_HTTPHandlers) | 647 | lock (m_HTTPHandlers) |
@@ -727,14 +727,14 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
727 | { | 727 | { |
728 | xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); // Param[1] | 728 | xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); // Param[1] |
729 | XmlRpcResponse xmlRpcResponse; | 729 | XmlRpcResponse xmlRpcResponse; |
730 | 730 | ||
731 | XmlRpcMethod method; | 731 | XmlRpcMethod method; |
732 | bool methodWasFound; | 732 | bool methodWasFound; |
733 | lock (m_rpcHandlers) | 733 | lock (m_rpcHandlers) |
734 | { | 734 | { |
735 | methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method); | 735 | methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method); |
736 | } | 736 | } |
737 | 737 | ||
738 | if (methodWasFound) | 738 | if (methodWasFound) |
739 | { | 739 | { |
740 | xmlRprcRequest.Params.Add(request.Url); // Param[2] | 740 | xmlRprcRequest.Params.Add(request.Url); // Param[2] |
@@ -766,10 +766,10 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
766 | else | 766 | else |
767 | { | 767 | { |
768 | xmlRpcResponse = new XmlRpcResponse(); | 768 | xmlRpcResponse = new XmlRpcResponse(); |
769 | 769 | ||
770 | // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php | 770 | // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php |
771 | xmlRpcResponse.SetFault( | 771 | xmlRpcResponse.SetFault( |
772 | XmlRpcErrorCodes.SERVER_ERROR_METHOD, | 772 | XmlRpcErrorCodes.SERVER_ERROR_METHOD, |
773 | String.Format("Requested method [{0}] not found", methodName)); | 773 | String.Format("Requested method [{0}] not found", methodName)); |
774 | } | 774 | } |
775 | 775 | ||
@@ -786,11 +786,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
786 | response.KeepAlive = false; | 786 | response.KeepAlive = false; |
787 | 787 | ||
788 | m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl); | 788 | m_log.ErrorFormat("[BASE HTTP SERVER]: Handler not found for http request {0}", request.RawUrl); |
789 | 789 | ||
790 | response.SendChunked = false; | 790 | response.SendChunked = false; |
791 | response.ContentLength64 = buf.Length; | 791 | response.ContentLength64 = buf.Length; |
792 | response.ContentEncoding = Encoding.UTF8; | 792 | response.ContentEncoding = Encoding.UTF8; |
793 | 793 | ||
794 | try | 794 | try |
795 | { | 795 | { |
796 | response.OutputStream.Write(buf, 0, buf.Length); | 796 | response.OutputStream.Write(buf, 0, buf.Length); |
@@ -872,13 +872,13 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
872 | 872 | ||
873 | OSD llsdRequest = null; | 873 | OSD llsdRequest = null; |
874 | OSD llsdResponse = null; | 874 | OSD llsdResponse = null; |
875 | 875 | ||
876 | bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest")); | 876 | bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest")); |
877 | 877 | ||
878 | if (requestBody.Length == 0) | 878 | if (requestBody.Length == 0) |
879 | // Get Request | 879 | // Get Request |
880 | { | 880 | { |
881 | requestBody = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><llsd><map><key>request</key><string>get</string></map></llsd>"; | 881 | requestBody = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><llsd><map><key>request</key><string>get</string></map></llsd>"; |
882 | } | 882 | } |
883 | try | 883 | try |
884 | { | 884 | { |
@@ -1090,7 +1090,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1090 | string bestMatch = null; | 1090 | string bestMatch = null; |
1091 | 1091 | ||
1092 | //m_log.DebugFormat("[BASE HTTP HANDLER]: Checking if we have an HTTP handler for {0}", searchquery); | 1092 | //m_log.DebugFormat("[BASE HTTP HANDLER]: Checking if we have an HTTP handler for {0}", searchquery); |
1093 | 1093 | ||
1094 | lock (m_HTTPHandlers) | 1094 | lock (m_HTTPHandlers) |
1095 | { | 1095 | { |
1096 | foreach (string pattern in m_HTTPHandlers.Keys) | 1096 | foreach (string pattern in m_HTTPHandlers.Keys) |
@@ -1156,7 +1156,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1156 | // You have to specifically register for '/' and to get it, you must specificaly request it | 1156 | // You have to specifically register for '/' and to get it, you must specificaly request it |
1157 | // | 1157 | // |
1158 | if (pattern == "/" && searchquery == "/" || pattern != "/") | 1158 | if (pattern == "/" && searchquery == "/" || pattern != "/") |
1159 | bestMatch = pattern; | 1159 | bestMatch = pattern; |
1160 | } | 1160 | } |
1161 | } | 1161 | } |
1162 | } | 1162 | } |
@@ -1236,11 +1236,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1236 | } | 1236 | } |
1237 | 1237 | ||
1238 | public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) | 1238 | public void HandleHTTPRequest(OSHttpRequest request, OSHttpResponse response) |
1239 | { | 1239 | { |
1240 | // m_log.DebugFormat( | 1240 | // m_log.DebugFormat( |
1241 | // "[BASE HTTP SERVER]: HandleHTTPRequest for request to {0}, method {1}", | 1241 | // "[BASE HTTP SERVER]: HandleHTTPRequest for request to {0}, method {1}", |
1242 | // request.RawUrl, request.HttpMethod); | 1242 | // request.RawUrl, request.HttpMethod); |
1243 | 1243 | ||
1244 | switch (request.HttpMethod) | 1244 | switch (request.HttpMethod) |
1245 | { | 1245 | { |
1246 | case "OPTIONS": | 1246 | case "OPTIONS": |
@@ -1256,7 +1256,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1256 | private void HandleContentVerbs(OSHttpRequest request, OSHttpResponse response) | 1256 | private void HandleContentVerbs(OSHttpRequest request, OSHttpResponse response) |
1257 | { | 1257 | { |
1258 | // m_log.DebugFormat("[BASE HTTP SERVER]: HandleContentVerbs for request to {0}", request.RawUrl); | 1258 | // m_log.DebugFormat("[BASE HTTP SERVER]: HandleContentVerbs for request to {0}", request.RawUrl); |
1259 | 1259 | ||
1260 | // This is a test. There's a workable alternative.. as this way sucks. | 1260 | // This is a test. There's a workable alternative.. as this way sucks. |
1261 | // We'd like to put this into a text file parhaps that's easily editable. | 1261 | // We'd like to put this into a text file parhaps that's easily editable. |
1262 | // | 1262 | // |
@@ -1391,7 +1391,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1391 | 1391 | ||
1392 | // m_log.DebugFormat( | 1392 | // m_log.DebugFormat( |
1393 | // "[BASE HTTP HANDLER]: TryGetHTTPHandlerPathBased() looking for HTTP handler to match {0}", searchquery); | 1393 | // "[BASE HTTP HANDLER]: TryGetHTTPHandlerPathBased() looking for HTTP handler to match {0}", searchquery); |
1394 | 1394 | ||
1395 | lock (m_HTTPHandlers) | 1395 | lock (m_HTTPHandlers) |
1396 | { | 1396 | { |
1397 | foreach (string pattern in m_HTTPHandlers.Keys) | 1397 | foreach (string pattern in m_HTTPHandlers.Keys) |
@@ -1452,7 +1452,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1452 | 1452 | ||
1453 | //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this | 1453 | //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this |
1454 | //and should check for NullReferenceExceptions | 1454 | //and should check for NullReferenceExceptions |
1455 | 1455 | ||
1456 | if (string.IsNullOrEmpty(contentType)) | 1456 | if (string.IsNullOrEmpty(contentType)) |
1457 | { | 1457 | { |
1458 | contentType = "text/html"; | 1458 | contentType = "text/html"; |
@@ -1472,8 +1472,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1472 | 1472 | ||
1473 | byte[] buffer; | 1473 | byte[] buffer; |
1474 | 1474 | ||
1475 | if (!(contentType.Contains("image") | 1475 | if (!(contentType.Contains("image") |
1476 | || contentType.Contains("x-shockwave-flash") | 1476 | || contentType.Contains("x-shockwave-flash") |
1477 | || contentType.Contains("application/x-oar"))) | 1477 | || contentType.Contains("application/x-oar"))) |
1478 | { | 1478 | { |
1479 | // Text | 1479 | // Text |
@@ -1504,7 +1504,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1504 | { | 1504 | { |
1505 | response.OutputStream.Flush(); | 1505 | response.OutputStream.Flush(); |
1506 | response.Send(); | 1506 | response.Send(); |
1507 | 1507 | ||
1508 | //if (!response.KeepAlive && response.ReuseContext) | 1508 | //if (!response.KeepAlive && response.ReuseContext) |
1509 | // response.FreeContext(); | 1509 | // response.FreeContext(); |
1510 | } | 1510 | } |
@@ -1611,11 +1611,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1611 | m_httpListener2 = CoolHTTPListener.Create(m_listenIPAddress, (int)m_port); | 1611 | m_httpListener2 = CoolHTTPListener.Create(m_listenIPAddress, (int)m_port); |
1612 | m_httpListener2.ExceptionThrown += httpServerException; | 1612 | m_httpListener2.ExceptionThrown += httpServerException; |
1613 | m_httpListener2.LogWriter = httpserverlog; | 1613 | m_httpListener2.LogWriter = httpserverlog; |
1614 | 1614 | ||
1615 | // Uncomment this line in addition to those in HttpServerLogWriter | 1615 | // Uncomment this line in addition to those in HttpServerLogWriter |
1616 | // if you want more detailed trace information from the HttpServer | 1616 | // if you want more detailed trace information from the HttpServer |
1617 | //m_httpListener2.UseTraceLogs = true; | 1617 | //m_httpListener2.UseTraceLogs = true; |
1618 | 1618 | ||
1619 | //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor; | 1619 | //m_httpListener2.DisconnectHandler = httpServerDisconnectMonitor; |
1620 | } | 1620 | } |
1621 | else | 1621 | else |
@@ -1643,8 +1643,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1643 | { | 1643 | { |
1644 | m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message); | 1644 | m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message); |
1645 | m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?"); | 1645 | m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?"); |
1646 | 1646 | ||
1647 | // We want this exception to halt the entire server since in current configurations we aren't too | 1647 | // We want this exception to halt the entire server since in current configurations we aren't too |
1648 | // useful without inbound HTTP. | 1648 | // useful without inbound HTTP. |
1649 | throw e; | 1649 | throw e; |
1650 | } | 1650 | } |
@@ -1656,7 +1656,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1656 | { | 1656 | { |
1657 | case SocketError.NotSocket: | 1657 | case SocketError.NotSocket: |
1658 | NotSocketErrors++; | 1658 | NotSocketErrors++; |
1659 | 1659 | ||
1660 | break; | 1660 | break; |
1661 | } | 1661 | } |
1662 | } | 1662 | } |
@@ -1686,12 +1686,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1686 | m_httpListener2.LogWriter = null; | 1686 | m_httpListener2.LogWriter = null; |
1687 | m_httpListener2.RequestReceived -= OnRequest; | 1687 | m_httpListener2.RequestReceived -= OnRequest; |
1688 | m_httpListener2.Stop(); | 1688 | m_httpListener2.Stop(); |
1689 | } | 1689 | } |
1690 | catch (NullReferenceException) | 1690 | catch (NullReferenceException) |
1691 | { | 1691 | { |
1692 | m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer."); | 1692 | m_log.Warn("[BASE HTTP SERVER]: Null Reference when stopping HttpServer."); |
1693 | } | 1693 | } |
1694 | |||
1695 | } | 1694 | } |
1696 | 1695 | ||
1697 | public void RemoveStreamHandler(string httpMethod, string path) | 1696 | public void RemoveStreamHandler(string httpMethod, string path) |
@@ -1712,7 +1711,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1712 | m_HTTPHandlers.Remove(path); | 1711 | m_HTTPHandlers.Remove(path); |
1713 | return; | 1712 | return; |
1714 | } | 1713 | } |
1715 | 1714 | ||
1716 | m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); | 1715 | m_HTTPHandlers.Remove(GetHandlerKey(httpMethod, path)); |
1717 | } | 1716 | } |
1718 | } | 1717 | } |
@@ -1728,7 +1727,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1728 | } | 1727 | } |
1729 | 1728 | ||
1730 | RemoveHTTPHandler(httpMethod, path); | 1729 | RemoveHTTPHandler(httpMethod, path); |
1731 | |||
1732 | } | 1730 | } |
1733 | 1731 | ||
1734 | public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) | 1732 | public bool RemoveAgentHandler(string agent, IHttpAgentHandler handler) |
@@ -1759,7 +1757,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1759 | } | 1757 | } |
1760 | } | 1758 | } |
1761 | 1759 | ||
1762 | |||
1763 | public bool RemoveLLSDHandler(string path, LLSDMethod handler) | 1760 | public bool RemoveLLSDHandler(string path, LLSDMethod handler) |
1764 | { | 1761 | { |
1765 | try | 1762 | try |
@@ -1833,7 +1830,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1833 | oresp = osresp; | 1830 | oresp = osresp; |
1834 | } | 1831 | } |
1835 | } | 1832 | } |
1836 | 1833 | ||
1837 | /// <summary> | 1834 | /// <summary> |
1838 | /// Relays HttpServer log messages to our own logging mechanism. | 1835 | /// Relays HttpServer log messages to our own logging mechanism. |
1839 | /// </summary> | 1836 | /// </summary> |
@@ -1852,7 +1849,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1852 | { | 1849 | { |
1853 | case LogPrio.Trace: | 1850 | case LogPrio.Trace: |
1854 | m_log.DebugFormat("[{0}]: {1}", source, message); | 1851 | m_log.DebugFormat("[{0}]: {1}", source, message); |
1855 | break; | 1852 | break; |
1856 | case LogPrio.Debug: | 1853 | case LogPrio.Debug: |
1857 | m_log.DebugFormat("[{0}]: {1}", source, message); | 1854 | m_log.DebugFormat("[{0}]: {1}", source, message); |
1858 | break; | 1855 | break; |
@@ -1872,8 +1869,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
1872 | break; | 1869 | break; |
1873 | } | 1870 | } |
1874 | */ | 1871 | */ |
1875 | 1872 | ||
1876 | return; | 1873 | return; |
1877 | } | 1874 | } |
1878 | } | 1875 | } |
1879 | } \ No newline at end of file | 1876 | } |
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index f3ac191..4ae370b 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs | |||
@@ -49,7 +49,7 @@ namespace OpenSim | |||
49 | 49 | ||
50 | public static string GetVersionString(string versionNumber, Flavour flavour) | 50 | public static string GetVersionString(string versionNumber, Flavour flavour) |
51 | { | 51 | { |
52 | string versionString = "OpenSim " + versionNumber + " (" + flavour + ")"; | 52 | string versionString = "OpenSim " + versionNumber + " " + flavour; |
53 | return versionString.PadRight(VERSIONINFO_VERSION_LENGTH); | 53 | return versionString.PadRight(VERSIONINFO_VERSION_LENGTH); |
54 | } | 54 | } |
55 | 55 | ||
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs index 2cb7895..df5b936 100644 --- a/OpenSim/Framework/TaskInventoryItem.cs +++ b/OpenSim/Framework/TaskInventoryItem.cs | |||
@@ -348,15 +348,15 @@ namespace OpenSim.Framework | |||
348 | /// <param name="partID">The new part ID to which this item belongs</param> | 348 | /// <param name="partID">The new part ID to which this item belongs</param> |
349 | public void ResetIDs(UUID partID) | 349 | public void ResetIDs(UUID partID) |
350 | { | 350 | { |
351 | _oldID = _itemID; | 351 | OldItemID = ItemID; |
352 | _itemID = UUID.Random(); | 352 | ItemID = UUID.Random(); |
353 | _parentPartID = partID; | 353 | ParentPartID = partID; |
354 | _parentID = partID; | 354 | ParentID = partID; |
355 | } | 355 | } |
356 | 356 | ||
357 | public TaskInventoryItem() | 357 | public TaskInventoryItem() |
358 | { | 358 | { |
359 | _creationDate = (uint)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; | 359 | CreationDate = (uint)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; |
360 | } | 360 | } |
361 | } | 361 | } |
362 | } | 362 | } |
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index b860cf6..d120f03 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -225,7 +225,7 @@ namespace OpenSim | |||
225 | } | 225 | } |
226 | } | 226 | } |
227 | MainConsole.Instance = null; | 227 | MainConsole.Instance = null; |
228 | } | 228 | } |
229 | */ | 229 | */ |
230 | configSource.Alias.AddAlias("On", true); | 230 | configSource.Alias.AddAlias("On", true); |
231 | configSource.Alias.AddAlias("Off", false); | 231 | configSource.Alias.AddAlias("Off", false); |
diff --git a/OpenSim/Region/Application/ConfigurationLoader.cs b/OpenSim/Region/Application/ConfigurationLoader.cs index e69e3fc..e2e0640 100644 --- a/OpenSim/Region/Application/ConfigurationLoader.cs +++ b/OpenSim/Region/Application/ConfigurationLoader.cs | |||
@@ -345,10 +345,6 @@ namespace OpenSim | |||
345 | 345 | ||
346 | m_configSettings.StorageDll = startupConfig.GetString("storage_plugin"); | 346 | m_configSettings.StorageDll = startupConfig.GetString("storage_plugin"); |
347 | 347 | ||
348 | m_configSettings.StorageConnectionString | ||
349 | = startupConfig.GetString("storage_connection_string"); | ||
350 | m_configSettings.EstateConnectionString | ||
351 | = startupConfig.GetString("estate_connection_string", m_configSettings.StorageConnectionString); | ||
352 | m_configSettings.ClientstackDll | 348 | m_configSettings.ClientstackDll |
353 | = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); | 349 | = startupConfig.GetString("clientstack_plugin", "OpenSim.Region.ClientStack.LindenUDP.dll"); |
354 | } | 350 | } |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 945da7d..6094bad 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -152,7 +152,7 @@ namespace OpenSim | |||
152 | RegisterConsoleCommands(); | 152 | RegisterConsoleCommands(); |
153 | 153 | ||
154 | base.StartupSpecific(); | 154 | base.StartupSpecific(); |
155 | 155 | ||
156 | MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler()); | 156 | MainServer.Instance.AddStreamHandler(new OpenSim.SimStatusHandler()); |
157 | MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this)); | 157 | MainServer.Instance.AddStreamHandler(new OpenSim.XSimStatusHandler(this)); |
158 | if (userStatsURI != String.Empty) | 158 | if (userStatsURI != String.Empty) |
@@ -192,7 +192,7 @@ namespace OpenSim | |||
192 | // Hook up to the watchdog timer | 192 | // Hook up to the watchdog timer |
193 | Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; | 193 | Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; |
194 | 194 | ||
195 | PrintFileToConsole("startuplogo.txt"); | 195 | PrintFileToConsole("startuplogo.txt"); |
196 | 196 | ||
197 | // For now, start at the 'root' level by default | 197 | // For now, start at the 'root' level by default |
198 | if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it | 198 | if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it |
@@ -218,8 +218,8 @@ namespace OpenSim | |||
218 | 218 | ||
219 | m_console.Commands.AddCommand("region", false, "debug packet", | 219 | m_console.Commands.AddCommand("region", false, "debug packet", |
220 | "debug packet <level>", | 220 | "debug packet <level>", |
221 | "Turn on packet debugging", | 221 | "Turn on packet debugging", |
222 | "If level > 255 then all incoming and outgoing packets are logged.\n" | 222 | "If level > 255 then all incoming and outgoing packets are logged.\n" |
223 | + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" | 223 | + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" |
224 | + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" | 224 | + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" |
225 | + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" | 225 | + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" |
@@ -316,7 +316,7 @@ namespace OpenSim | |||
316 | m_console.Commands.AddCommand("region", false, "create region", | 316 | m_console.Commands.AddCommand("region", false, "create region", |
317 | "create region [\"region name\"] <region_file.ini>", | 317 | "create region [\"region name\"] <region_file.ini>", |
318 | "Create a new region.", | 318 | "Create a new region.", |
319 | "The settings for \"region name\" are read from <region_file.ini>." | 319 | "The settings for \"region name\" are read from <region_file.ini> in your Regions directory." |
320 | + " If \"region name\" does not exist in <region_file.ini>, it will be added." + Environment.NewLine | 320 | + " If \"region name\" does not exist in <region_file.ini>, it will be added." + Environment.NewLine |
321 | + "Without \"region name\", the first region found in <region_file.ini> will be created." + Environment.NewLine | 321 | + "Without \"region name\", the first region found in <region_file.ini> will be created." + Environment.NewLine |
322 | + "If <region_file.ini> does not exist, it will be created.", | 322 | + "If <region_file.ini> does not exist, it will be created.", |
@@ -552,19 +552,20 @@ namespace OpenSim | |||
552 | regionFile = Path.Combine(regionsDir, regionFile); | 552 | regionFile = Path.Combine(regionsDir, regionFile); |
553 | } | 553 | } |
554 | 554 | ||
555 | RegionInfo regInfo; | 555 | RegionInfo regInfo; |
556 | if (isXml) | 556 | if (isXml) |
557 | { | 557 | { |
558 | regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source); | 558 | regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source); |
559 | } | 559 | } |
560 | else | 560 | else |
561 | { | 561 | { |
562 | regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName); | 562 | regInfo = new RegionInfo(regionName, regionFile, false, ConfigSource.Source, regionName); |
563 | } | 563 | } |
564 | |||
564 | IScene scene; | 565 | IScene scene; |
565 | PopulateRegionEstateInfo(regInfo); | 566 | PopulateRegionEstateInfo(regInfo); |
566 | CreateRegion(regInfo, true, out scene); | 567 | CreateRegion(regInfo, true, out scene); |
567 | regInfo.EstateSettings.Save(); | 568 | regInfo.EstateSettings.Save(); |
568 | } | 569 | } |
569 | 570 | ||
570 | /// <summary> | 571 | /// <summary> |
@@ -942,7 +943,7 @@ namespace OpenSim | |||
942 | delegate(Scene scene) | 943 | delegate(Scene scene) |
943 | { | 944 | { |
944 | MainConsole.Instance.Output(String.Format( | 945 | MainConsole.Instance.Output(String.Format( |
945 | "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}", | 946 | "Region Name: {0}, Region XLoc: {1}, Region YLoc: {2}, Region Port: {3}", |
946 | scene.RegionInfo.RegionName, | 947 | scene.RegionInfo.RegionName, |
947 | scene.RegionInfo.RegionLocX, | 948 | scene.RegionInfo.RegionLocX, |
948 | scene.RegionInfo.RegionLocY, | 949 | scene.RegionInfo.RegionLocY, |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index ec3193c..c5ee385 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -45,6 +45,7 @@ using OpenSim.Region.Framework; | |||
45 | using OpenSim.Region.Framework.Interfaces; | 45 | using OpenSim.Region.Framework.Interfaces; |
46 | using OpenSim.Region.Framework.Scenes; | 46 | using OpenSim.Region.Framework.Scenes; |
47 | using OpenSim.Region.Physics.Manager; | 47 | using OpenSim.Region.Physics.Manager; |
48 | using OpenSim.Server.Base; | ||
48 | 49 | ||
49 | namespace OpenSim | 50 | namespace OpenSim |
50 | { | 51 | { |
@@ -195,6 +196,24 @@ namespace OpenSim | |||
195 | m_permsModules = new List<string>(permissionModules.Split(',')); | 196 | m_permsModules = new List<string>(permissionModules.Split(',')); |
196 | } | 197 | } |
197 | 198 | ||
199 | // Load the simulation data service | ||
200 | IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"]; | ||
201 | if (simDataConfig == null) | ||
202 | throw new Exception("Configuration file is missing the [SimulationDataStore] section"); | ||
203 | string module = simDataConfig.GetString("LocalServiceModule", String.Empty); | ||
204 | if (String.IsNullOrEmpty(module)) | ||
205 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section"); | ||
206 | m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source }); | ||
207 | |||
208 | // Load the estate data service | ||
209 | IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"]; | ||
210 | if (estateDataConfig == null) | ||
211 | throw new Exception("Configuration file is missing the [EstateDataStore] section"); | ||
212 | module = estateDataConfig.GetString("LocalServiceModule", String.Empty); | ||
213 | if (String.IsNullOrEmpty(module)) | ||
214 | throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section"); | ||
215 | m_estateDataService = ServerUtils.LoadPlugin<IEstateDataService>(module, new object[] { m_config.Source }); | ||
216 | |||
198 | base.StartupSpecific(); | 217 | base.StartupSpecific(); |
199 | 218 | ||
200 | m_stats = StatsManager.StartCollectingSimExtraStats(); | 219 | m_stats = StatsManager.StartCollectingSimExtraStats(); |
@@ -612,7 +631,7 @@ namespace OpenSim | |||
612 | 631 | ||
613 | regionInfo.InternalEndPoint.Port = (int) port; | 632 | regionInfo.InternalEndPoint.Port = (int) port; |
614 | 633 | ||
615 | Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); | 634 | Scene scene = CreateScene(regionInfo, m_simulationDataService, m_estateDataService, circuitManager); |
616 | 635 | ||
617 | if (m_autoCreateClientStack) | 636 | if (m_autoCreateClientStack) |
618 | { | 637 | { |
@@ -628,30 +647,19 @@ namespace OpenSim | |||
628 | return scene; | 647 | return scene; |
629 | } | 648 | } |
630 | 649 | ||
631 | protected override StorageManager CreateStorageManager() | ||
632 | { | ||
633 | return | ||
634 | CreateStorageManager(m_configSettings.StorageConnectionString, m_configSettings.EstateConnectionString); | ||
635 | } | ||
636 | |||
637 | protected StorageManager CreateStorageManager(string connectionstring, string estateconnectionstring) | ||
638 | { | ||
639 | return new StorageManager(m_configSettings.StorageDll, connectionstring, estateconnectionstring); | ||
640 | } | ||
641 | |||
642 | protected override ClientStackManager CreateClientStackManager() | 650 | protected override ClientStackManager CreateClientStackManager() |
643 | { | 651 | { |
644 | return new ClientStackManager(m_configSettings.ClientstackDll); | 652 | return new ClientStackManager(m_configSettings.ClientstackDll); |
645 | } | 653 | } |
646 | 654 | ||
647 | protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, | 655 | protected override Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, |
648 | AgentCircuitManager circuitManager) | 656 | IEstateDataService estateDataService, AgentCircuitManager circuitManager) |
649 | { | 657 | { |
650 | SceneCommunicationService sceneGridService = new SceneCommunicationService(); | 658 | SceneCommunicationService sceneGridService = new SceneCommunicationService(); |
651 | 659 | ||
652 | return new Scene( | 660 | return new Scene( |
653 | regionInfo, circuitManager, sceneGridService, | 661 | regionInfo, circuitManager, sceneGridService, |
654 | storageManager, m_moduleLoader, false, m_configSettings.PhysicalPrim, | 662 | simDataService, estateDataService, m_moduleLoader, false, m_configSettings.PhysicalPrim, |
655 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); | 663 | m_configSettings.See_into_region_from_neighbor, m_config.Source, m_version); |
656 | } | 664 | } |
657 | 665 | ||
@@ -868,21 +876,23 @@ namespace OpenSim | |||
868 | /// </param> | 876 | /// </param> |
869 | public void PopulateRegionEstateInfo(RegionInfo regInfo) | 877 | public void PopulateRegionEstateInfo(RegionInfo regInfo) |
870 | { | 878 | { |
871 | if (m_storageManager.EstateDataStore != null) | 879 | IEstateDataService estateDataService = EstateDataService; |
880 | |||
881 | if (estateDataService != null) | ||
872 | { | 882 | { |
873 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, false); | 883 | regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, false); |
874 | } | 884 | } |
875 | 885 | ||
876 | if (regInfo.EstateSettings.EstateID == 0) // No record at all | 886 | if (regInfo.EstateSettings.EstateID == 0) // No record at all |
877 | { | 887 | { |
878 | MainConsole.Instance.Output("Your region is not part of an estate."); | 888 | MainConsole.Instance.Output("Your region is not part of an estate."); |
879 | while (true) | 889 | while (true) |
880 | { | 890 | { |
881 | string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() {"yes", "no"}); | 891 | string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() { "yes", "no" }); |
882 | if (response == "no") | 892 | if (response == "no") |
883 | { | 893 | { |
884 | // Create a new estate | 894 | // Create a new estate |
885 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, true); | 895 | regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, true); |
886 | 896 | ||
887 | regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); | 897 | regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); |
888 | //regInfo.EstateSettings.Save(); | 898 | //regInfo.EstateSettings.Save(); |
@@ -894,7 +904,7 @@ namespace OpenSim | |||
894 | if (response == "None") | 904 | if (response == "None") |
895 | continue; | 905 | continue; |
896 | 906 | ||
897 | List<int> estateIDs = m_storageManager.EstateDataStore.GetEstates(response); | 907 | List<int> estateIDs = estateDataService.GetEstates(response); |
898 | if (estateIDs.Count < 1) | 908 | if (estateIDs.Count < 1) |
899 | { | 909 | { |
900 | MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again"); | 910 | MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again"); |
@@ -903,9 +913,9 @@ namespace OpenSim | |||
903 | 913 | ||
904 | int estateID = estateIDs[0]; | 914 | int estateID = estateIDs[0]; |
905 | 915 | ||
906 | regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(estateID); | 916 | regInfo.EstateSettings = estateDataService.LoadEstateSettings(estateID); |
907 | 917 | ||
908 | if (m_storageManager.EstateDataStore.LinkRegion(regInfo.RegionID, estateID)) | 918 | if (estateDataService.LinkRegion(regInfo.RegionID, estateID)) |
909 | break; | 919 | break; |
910 | 920 | ||
911 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); | 921 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 8a96389..0e17496 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
63 | /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. | 63 | /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. |
64 | /// </value> | 64 | /// </value> |
65 | protected int m_debugPacketLevel = 0; | 65 | protected int m_debugPacketLevel = 0; |
66 | 66 | ||
67 | #region Events | 67 | #region Events |
68 | 68 | ||
69 | public event GenericMessage OnGenericMessage; | 69 | public event GenericMessage OnGenericMessage; |
@@ -288,7 +288,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
288 | public event MuteListEntryRemove OnRemoveMuteListEntry; | 288 | public event MuteListEntryRemove OnRemoveMuteListEntry; |
289 | public event GodlikeMessage onGodlikeMessage; | 289 | public event GodlikeMessage onGodlikeMessage; |
290 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; | 290 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; |
291 | |||
292 | 291 | ||
293 | #endregion Events | 292 | #endregion Events |
294 | 293 | ||
@@ -330,12 +329,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
330 | /// ownerless phantom. | 329 | /// ownerless phantom. |
331 | /// | 330 | /// |
332 | /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock | 331 | /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock |
333 | /// | 332 | /// |
334 | /// </value> | 333 | /// </value> |
335 | protected HashSet<uint> m_killRecord; | 334 | protected HashSet<uint> m_killRecord; |
336 | 335 | ||
337 | // protected HashSet<uint> m_attachmentsSent; | 336 | // protected HashSet<uint> m_attachmentsSent; |
338 | 337 | ||
339 | private int m_moneyBalance; | 338 | private int m_moneyBalance; |
340 | private bool m_deliverPackets = true; | 339 | private bool m_deliverPackets = true; |
341 | private int m_animationSequenceNumber = 1; | 340 | private int m_animationSequenceNumber = 1; |
@@ -395,22 +394,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
395 | public string ActiveGroupName { get { return m_activeGroupName; } } | 394 | public string ActiveGroupName { get { return m_activeGroupName; } } |
396 | public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } | 395 | public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } |
397 | public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } | 396 | public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } |
398 | 397 | ||
399 | /// <summary> | 398 | /// <summary> |
400 | /// First name of the agent/avatar represented by the client | 399 | /// First name of the agent/avatar represented by the client |
401 | /// </summary> | 400 | /// </summary> |
402 | public string FirstName { get { return m_firstName; } } | 401 | public string FirstName { get { return m_firstName; } } |
403 | 402 | ||
404 | /// <summary> | 403 | /// <summary> |
405 | /// Last name of the agent/avatar represented by the client | 404 | /// Last name of the agent/avatar represented by the client |
406 | /// </summary> | 405 | /// </summary> |
407 | public string LastName { get { return m_lastName; } } | 406 | public string LastName { get { return m_lastName; } } |
408 | 407 | ||
409 | /// <summary> | 408 | /// <summary> |
410 | /// Full name of the client (first name and last name) | 409 | /// Full name of the client (first name and last name) |
411 | /// </summary> | 410 | /// </summary> |
412 | public string Name { get { return FirstName + " " + LastName; } } | 411 | public string Name { get { return FirstName + " " + LastName; } } |
413 | 412 | ||
414 | public uint CircuitCode { get { return m_circuitCode; } } | 413 | public uint CircuitCode { get { return m_circuitCode; } } |
415 | public int MoneyBalance { get { return m_moneyBalance; } } | 414 | public int MoneyBalance { get { return m_moneyBalance; } } |
416 | public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } | 415 | public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } |
@@ -453,7 +452,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
453 | m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); | 452 | m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); |
454 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); | 453 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); |
455 | m_killRecord = new HashSet<uint>(); | 454 | m_killRecord = new HashSet<uint>(); |
456 | // m_attachmentsSent = new HashSet<uint>(); | 455 | // m_attachmentsSent = new HashSet<uint>(); |
457 | 456 | ||
458 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); | 457 | m_assetService = m_scene.RequestModuleInterface<IAssetService>(); |
459 | m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>(); | 458 | m_GroupsModule = scene.RequestModuleInterface<IGroupsModule>(); |
@@ -679,7 +678,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
679 | // Make sure that we see any exception caused by the asynchronous operation. | 678 | // Make sure that we see any exception caused by the asynchronous operation. |
680 | m_log.Error( | 679 | m_log.Error( |
681 | string.Format("[LLCLIENTVIEW]: Caught exception while processing {0}", packetObject.Pack), e); | 680 | string.Format("[LLCLIENTVIEW]: Caught exception while processing {0}", packetObject.Pack), e); |
682 | } | 681 | } |
683 | } | 682 | } |
684 | 683 | ||
685 | #endregion Packet Handling | 684 | #endregion Packet Handling |
@@ -890,7 +889,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
890 | foreach (GroupActiveProposals Proposal in Proposals) | 889 | foreach (GroupActiveProposals Proposal in Proposals) |
891 | { | 890 | { |
892 | GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); | 891 | GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); |
893 | 892 | ||
894 | GAPIRP.AgentData.AgentID = AgentId; | 893 | GAPIRP.AgentData.AgentID = AgentId; |
895 | GAPIRP.AgentData.GroupID = groupID; | 894 | GAPIRP.AgentData.GroupID = groupID; |
896 | GAPIRP.TransactionData.TransactionID = transactionID; | 895 | GAPIRP.TransactionData.TransactionID = transactionID; |
@@ -914,7 +913,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
914 | if (Proposals.Length == 0) | 913 | if (Proposals.Length == 0) |
915 | { | 914 | { |
916 | GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); | 915 | GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); |
917 | 916 | ||
918 | GAPIRP.AgentData.AgentID = AgentId; | 917 | GAPIRP.AgentData.AgentID = AgentId; |
919 | GAPIRP.AgentData.GroupID = groupID; | 918 | GAPIRP.AgentData.GroupID = groupID; |
920 | GAPIRP.TransactionData.TransactionID = transactionID; | 919 | GAPIRP.TransactionData.TransactionID = transactionID; |
@@ -969,7 +968,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
969 | if (Votes.Length == 0) | 968 | if (Votes.Length == 0) |
970 | { | 969 | { |
971 | GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); | 970 | GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); |
972 | 971 | ||
973 | GVHIRP.AgentData.AgentID = AgentId; | 972 | GVHIRP.AgentData.AgentID = AgentId; |
974 | GVHIRP.AgentData.GroupID = groupID; | 973 | GVHIRP.AgentData.GroupID = groupID; |
975 | GVHIRP.TransactionData.TransactionID = transactionID; | 974 | GVHIRP.TransactionData.TransactionID = transactionID; |
@@ -993,7 +992,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
993 | OutPacket(GVHIRP, ThrottleOutPacketType.Task); | 992 | OutPacket(GVHIRP, ThrottleOutPacketType.Task); |
994 | } | 993 | } |
995 | } | 994 | } |
996 | 995 | ||
997 | public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) | 996 | public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) |
998 | { | 997 | { |
999 | GroupAccountDetailsReplyPacket GADRP = new GroupAccountDetailsReplyPacket(); | 998 | GroupAccountDetailsReplyPacket GADRP = new GroupAccountDetailsReplyPacket(); |
@@ -1012,13 +1011,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1012 | GADRP.HistoryData[0] = History; | 1011 | GADRP.HistoryData[0] = History; |
1013 | OutPacket(GADRP, ThrottleOutPacketType.Task); | 1012 | OutPacket(GADRP, ThrottleOutPacketType.Task); |
1014 | } | 1013 | } |
1015 | 1014 | ||
1016 | public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) | 1015 | public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) |
1017 | { | 1016 | { |
1018 | GroupAccountSummaryReplyPacket GASRP = | 1017 | GroupAccountSummaryReplyPacket GASRP = |
1019 | (GroupAccountSummaryReplyPacket)PacketPool.Instance.GetPacket( | 1018 | (GroupAccountSummaryReplyPacket)PacketPool.Instance.GetPacket( |
1020 | PacketType.GroupAccountSummaryReply); | 1019 | PacketType.GroupAccountSummaryReply); |
1021 | 1020 | ||
1022 | GASRP.AgentData = new GroupAccountSummaryReplyPacket.AgentDataBlock(); | 1021 | GASRP.AgentData = new GroupAccountSummaryReplyPacket.AgentDataBlock(); |
1023 | GASRP.AgentData.AgentID = sender.AgentId; | 1022 | GASRP.AgentData.AgentID = sender.AgentId; |
1024 | GASRP.AgentData.GroupID = groupID; | 1023 | GASRP.AgentData.GroupID = groupID; |
@@ -1045,13 +1044,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1045 | GASRP.MoneyData.LightTaxEstimate = 0; | 1044 | GASRP.MoneyData.LightTaxEstimate = 0; |
1046 | OutPacket(GASRP, ThrottleOutPacketType.Task); | 1045 | OutPacket(GASRP, ThrottleOutPacketType.Task); |
1047 | } | 1046 | } |
1048 | 1047 | ||
1049 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) | 1048 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) |
1050 | { | 1049 | { |
1051 | GroupAccountTransactionsReplyPacket GATRP = | 1050 | GroupAccountTransactionsReplyPacket GATRP = |
1052 | (GroupAccountTransactionsReplyPacket)PacketPool.Instance.GetPacket( | 1051 | (GroupAccountTransactionsReplyPacket)PacketPool.Instance.GetPacket( |
1053 | PacketType.GroupAccountTransactionsReply); | 1052 | PacketType.GroupAccountTransactionsReply); |
1054 | 1053 | ||
1055 | GATRP.AgentData = new GroupAccountTransactionsReplyPacket.AgentDataBlock(); | 1054 | GATRP.AgentData = new GroupAccountTransactionsReplyPacket.AgentDataBlock(); |
1056 | GATRP.AgentData.AgentID = sender.AgentId; | 1055 | GATRP.AgentData.AgentID = sender.AgentId; |
1057 | GATRP.AgentData.GroupID = groupID; | 1056 | GATRP.AgentData.GroupID = groupID; |
@@ -1520,7 +1519,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1520 | public void SendKillObject(ulong regionHandle, uint localID) | 1519 | public void SendKillObject(ulong regionHandle, uint localID) |
1521 | { | 1520 | { |
1522 | // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle); | 1521 | // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle); |
1523 | 1522 | ||
1524 | KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); | 1523 | KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); |
1525 | // TODO: don't create new blocks if recycling an old packet | 1524 | // TODO: don't create new blocks if recycling an old packet |
1526 | kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; | 1525 | kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; |
@@ -3488,9 +3487,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3488 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); | 3487 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); |
3489 | 3488 | ||
3490 | OutPacket(objupdate, ThrottleOutPacketType.Task); | 3489 | OutPacket(objupdate, ThrottleOutPacketType.Task); |
3491 | 3490 | ||
3492 | // We need to record the avatar local id since the root prim of an attachment points to this. | 3491 | // We need to record the avatar local id since the root prim of an attachment points to this. |
3493 | // m_attachmentsSent.Add(avatar.LocalId); | 3492 | // m_attachmentsSent.Add(avatar.LocalId); |
3494 | } | 3493 | } |
3495 | 3494 | ||
3496 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 3495 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
@@ -3538,7 +3537,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3538 | #region Primitive Packet/Data Sending Methods | 3537 | #region Primitive Packet/Data Sending Methods |
3539 | 3538 | ||
3540 | /// <summary> | 3539 | /// <summary> |
3541 | /// Generate one of the object update packets based on PrimUpdateFlags | 3540 | /// Generate one of the object update packets based on PrimUpdateFlags |
3542 | /// and broadcast the packet to clients | 3541 | /// and broadcast the packet to clients |
3543 | /// </summary> | 3542 | /// </summary> |
3544 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) | 3543 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) |
@@ -3555,14 +3554,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3555 | double priority = m_prioritizer.GetUpdatePriority(this, entity); | 3554 | double priority = m_prioritizer.GetUpdatePriority(this, entity); |
3556 | 3555 | ||
3557 | lock (m_entityUpdates.SyncRoot) | 3556 | lock (m_entityUpdates.SyncRoot) |
3558 | m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); | 3557 | m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); |
3559 | } | 3558 | } |
3560 | 3559 | ||
3561 | private void ProcessEntityUpdates(int maxUpdates) | 3560 | private void ProcessEntityUpdates(int maxUpdates) |
3562 | { | 3561 | { |
3563 | Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>(); | 3562 | OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>(); |
3564 | Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>(); | 3563 | OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>(); |
3565 | Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>(); | 3564 | OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new OpenSim.Framework.Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>(); |
3566 | 3565 | ||
3567 | if (maxUpdates <= 0) maxUpdates = Int32.MaxValue; | 3566 | if (maxUpdates <= 0) maxUpdates = Int32.MaxValue; |
3568 | int updatesThisCall = 0; | 3567 | int updatesThisCall = 0; |
@@ -3660,28 +3659,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3660 | // string text = sop.Text; | 3659 | // string text = sop.Text; |
3661 | // if (text.IndexOf("\n") >= 0) | 3660 | // if (text.IndexOf("\n") >= 0) |
3662 | // text = text.Remove(text.IndexOf("\n")); | 3661 | // text = text.Remove(text.IndexOf("\n")); |
3663 | // | 3662 | // |
3664 | // if (m_attachmentsSent.Contains(sop.ParentID)) | 3663 | // if (m_attachmentsSent.Contains(sop.ParentID)) |
3665 | // { | 3664 | // { |
3666 | //// m_log.DebugFormat( | 3665 | //// m_log.DebugFormat( |
3667 | //// "[CLIENT]: Sending full info about attached prim {0} text {1}", | 3666 | //// "[CLIENT]: Sending full info about attached prim {0} text {1}", |
3668 | //// sop.LocalId, text); | 3667 | //// sop.LocalId, text); |
3669 | // | 3668 | // |
3670 | // objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId)); | 3669 | // objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId)); |
3671 | // | 3670 | // |
3672 | // m_attachmentsSent.Add(sop.LocalId); | 3671 | // m_attachmentsSent.Add(sop.LocalId); |
3673 | // } | 3672 | // } |
3674 | // else | 3673 | // else |
3675 | // { | 3674 | // { |
3676 | // m_log.DebugFormat( | 3675 | // m_log.DebugFormat( |
3677 | // "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet", | 3676 | // "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet", |
3678 | // sop.LocalId, text, sop.ParentID); | 3677 | // sop.LocalId, text, sop.ParentID); |
3679 | // | 3678 | // |
3680 | // m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId); | 3679 | // m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId); |
3681 | // } | 3680 | // } |
3682 | // } | 3681 | // } |
3683 | // else | 3682 | // else |
3684 | // { | 3683 | // { |
3685 | objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); | 3684 | objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); |
3686 | // } | 3685 | // } |
3687 | } | 3686 | } |
@@ -3995,7 +3994,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3995 | m_propertiesPacketTimer.Stop(); | 3994 | m_propertiesPacketTimer.Stop(); |
3996 | return; | 3995 | return; |
3997 | } | 3996 | } |
3998 | 3997 | ||
3999 | m_propertiesPacketTimer.Stop(); | 3998 | m_propertiesPacketTimer.Stop(); |
4000 | m_propertiesPacketTimer.Start(); | 3999 | m_propertiesPacketTimer.Start(); |
4001 | } | 4000 | } |
@@ -4229,7 +4228,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4229 | 4228 | ||
4230 | public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) | 4229 | public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) |
4231 | { | 4230 | { |
4232 | ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); | 4231 | ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); |
4233 | 4232 | ||
4234 | updateMessage.AABBMax = landData.AABBMax; | 4233 | updateMessage.AABBMax = landData.AABBMax; |
4235 | updateMessage.AABBMin = landData.AABBMin; | 4234 | updateMessage.AABBMin = landData.AABBMin; |
@@ -4273,7 +4272,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4273 | updateMessage.PassHours = landData.PassHours; | 4272 | updateMessage.PassHours = landData.PassHours; |
4274 | updateMessage.PassPrice = landData.PassPrice; | 4273 | updateMessage.PassPrice = landData.PassPrice; |
4275 | updateMessage.PublicCount = 0; //TODO: Unimplemented | 4274 | updateMessage.PublicCount = 0; //TODO: Unimplemented |
4276 | 4275 | ||
4277 | updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0; | 4276 | updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0; |
4278 | updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0; | 4277 | updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0; |
4279 | 4278 | ||
@@ -4303,13 +4302,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4303 | updateMessage.UserLocation = landData.UserLocation; | 4302 | updateMessage.UserLocation = landData.UserLocation; |
4304 | updateMessage.UserLookAt = landData.UserLookAt; | 4303 | updateMessage.UserLookAt = landData.UserLookAt; |
4305 | 4304 | ||
4306 | updateMessage.MediaType = landData.MediaType; | 4305 | updateMessage.MediaType = landData.MediaType; |
4307 | updateMessage.MediaDesc = landData.MediaDescription; | 4306 | updateMessage.MediaDesc = landData.MediaDescription; |
4308 | updateMessage.MediaWidth = landData.MediaWidth; | 4307 | updateMessage.MediaWidth = landData.MediaWidth; |
4309 | updateMessage.MediaHeight = landData.MediaHeight; | 4308 | updateMessage.MediaHeight = landData.MediaHeight; |
4310 | updateMessage.MediaLoop = landData.MediaLoop; | 4309 | updateMessage.MediaLoop = landData.MediaLoop; |
4311 | updateMessage.ObscureMusic = landData.ObscureMusic; | 4310 | updateMessage.ObscureMusic = landData.ObscureMusic; |
4312 | updateMessage.ObscureMedia = landData.ObscureMedia; | 4311 | updateMessage.ObscureMedia = landData.ObscureMedia; |
4313 | 4312 | ||
4314 | try | 4313 | try |
4315 | { | 4314 | { |
@@ -4318,8 +4317,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4318 | { | 4317 | { |
4319 | eq.ParcelProperties(updateMessage, this.AgentId); | 4318 | eq.ParcelProperties(updateMessage, this.AgentId); |
4320 | } else { | 4319 | } else { |
4321 | m_log.Warn("No EQ Interface when sending parcel data."); | 4320 | m_log.Warn("No EQ Interface when sending parcel data."); |
4322 | } | 4321 | } |
4323 | } | 4322 | } |
4324 | catch (Exception ex) | 4323 | catch (Exception ex) |
4325 | { | 4324 | { |
@@ -4692,9 +4691,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4692 | } | 4691 | } |
4693 | 4692 | ||
4694 | // m_log.DebugFormat( | 4693 | // m_log.DebugFormat( |
4695 | // "[LLCLIENTVIEW]: Constructing client update for part {0} {1} with flags {2}, localId {3}", | 4694 | // "[LLCLIENTVIEW]: Constructing client update for part {0} {1} with flags {2}, localId {3}", |
4696 | // data.Name, update.FullID, flags, update.ID); | 4695 | // data.Name, update.FullID, flags, update.ID); |
4697 | 4696 | ||
4698 | update.UpdateFlags = (uint)flags; | 4697 | update.UpdateFlags = (uint)flags; |
4699 | 4698 | ||
4700 | #endregion PrimFlags | 4699 | #endregion PrimFlags |
@@ -4827,11 +4826,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4827 | AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale); | 4826 | AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale); |
4828 | AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation); | 4827 | AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation); |
4829 | AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate); | 4828 | AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate); |
4830 | 4829 | ||
4831 | // Handle ObjectImage (TextureEntry) updates synchronously, since when updating multiple prim faces at once, | 4830 | // Handle ObjectImage (TextureEntry) updates synchronously, since when updating multiple prim faces at once, |
4832 | // some clients will send out a separate ObjectImage packet for each face | 4831 | // some clients will send out a separate ObjectImage packet for each face |
4833 | AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage, false); | 4832 | AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage, false); |
4834 | 4833 | ||
4835 | AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false); | 4834 | AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false); |
4836 | AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false); | 4835 | AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false); |
4837 | AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab); | 4836 | AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab); |
@@ -5088,12 +5087,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5088 | 5087 | ||
5089 | return false; | 5088 | return false; |
5090 | } | 5089 | } |
5091 | 5090 | ||
5092 | private bool HandleParcelGodMarkAsContent(IClientAPI client, Packet Packet) | 5091 | private bool HandleParcelGodMarkAsContent(IClientAPI client, Packet Packet) |
5093 | { | 5092 | { |
5094 | ParcelGodMarkAsContentPacket ParcelGodMarkAsContent = | 5093 | ParcelGodMarkAsContentPacket ParcelGodMarkAsContent = |
5095 | (ParcelGodMarkAsContentPacket)Packet; | 5094 | (ParcelGodMarkAsContentPacket)Packet; |
5096 | 5095 | ||
5097 | ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark; | 5096 | ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark; |
5098 | if (ParcelGodMarkAsContentHandler != null) | 5097 | if (ParcelGodMarkAsContentHandler != null) |
5099 | { | 5098 | { |
@@ -5104,11 +5103,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5104 | } | 5103 | } |
5105 | return false; | 5104 | return false; |
5106 | } | 5105 | } |
5107 | 5106 | ||
5108 | private bool HandleFreezeUser(IClientAPI client, Packet Packet) | 5107 | private bool HandleFreezeUser(IClientAPI client, Packet Packet) |
5109 | { | 5108 | { |
5110 | FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; | 5109 | FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; |
5111 | 5110 | ||
5112 | FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUser; | 5111 | FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUser; |
5113 | if (FreezeUserHandler != null) | 5112 | if (FreezeUserHandler != null) |
5114 | { | 5113 | { |
@@ -5120,12 +5119,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5120 | } | 5119 | } |
5121 | return false; | 5120 | return false; |
5122 | } | 5121 | } |
5123 | 5122 | ||
5124 | private bool HandleEjectUser(IClientAPI client, Packet Packet) | 5123 | private bool HandleEjectUser(IClientAPI client, Packet Packet) |
5125 | { | 5124 | { |
5126 | EjectUserPacket EjectUser = | 5125 | EjectUserPacket EjectUser = |
5127 | (EjectUserPacket)Packet; | 5126 | (EjectUserPacket)Packet; |
5128 | 5127 | ||
5129 | EjectUserUpdate EjectUserHandler = OnParcelEjectUser; | 5128 | EjectUserUpdate EjectUserHandler = OnParcelEjectUser; |
5130 | if (EjectUserHandler != null) | 5129 | if (EjectUserHandler != null) |
5131 | { | 5130 | { |
@@ -5137,12 +5136,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5137 | } | 5136 | } |
5138 | return false; | 5137 | return false; |
5139 | } | 5138 | } |
5140 | 5139 | ||
5141 | private bool HandleParcelBuyPass(IClientAPI client, Packet Packet) | 5140 | private bool HandleParcelBuyPass(IClientAPI client, Packet Packet) |
5142 | { | 5141 | { |
5143 | ParcelBuyPassPacket ParcelBuyPass = | 5142 | ParcelBuyPassPacket ParcelBuyPass = |
5144 | (ParcelBuyPassPacket)Packet; | 5143 | (ParcelBuyPassPacket)Packet; |
5145 | 5144 | ||
5146 | ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass; | 5145 | ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass; |
5147 | if (ParcelBuyPassHandler != null) | 5146 | if (ParcelBuyPassHandler != null) |
5148 | { | 5147 | { |
@@ -5153,7 +5152,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5153 | } | 5152 | } |
5154 | return false; | 5153 | return false; |
5155 | } | 5154 | } |
5156 | 5155 | ||
5157 | private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack) | 5156 | private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack) |
5158 | { | 5157 | { |
5159 | ParcelBuyPacket parcel = (ParcelBuyPacket)Pack; | 5158 | ParcelBuyPacket parcel = (ParcelBuyPacket)Pack; |
@@ -5375,7 +5374,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5375 | ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; | 5374 | ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; |
5376 | 5375 | ||
5377 | //m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID); | 5376 | //m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID); |
5378 | 5377 | ||
5379 | #region Packet Session and User Check | 5378 | #region Packet Session and User Check |
5380 | if (m_checkPackets) | 5379 | if (m_checkPackets) |
5381 | { | 5380 | { |
@@ -5521,12 +5520,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5521 | } | 5520 | } |
5522 | return true; | 5521 | return true; |
5523 | } | 5522 | } |
5524 | 5523 | ||
5525 | private bool HandleFindAgent(IClientAPI client, Packet Packet) | 5524 | private bool HandleFindAgent(IClientAPI client, Packet Packet) |
5526 | { | 5525 | { |
5527 | FindAgentPacket FindAgent = | 5526 | FindAgentPacket FindAgent = |
5528 | (FindAgentPacket)Packet; | 5527 | (FindAgentPacket)Packet; |
5529 | 5528 | ||
5530 | FindAgentUpdate FindAgentHandler = OnFindAgent; | 5529 | FindAgentUpdate FindAgentHandler = OnFindAgent; |
5531 | if (FindAgentHandler != null) | 5530 | if (FindAgentHandler != null) |
5532 | { | 5531 | { |
@@ -5535,12 +5534,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5535 | } | 5534 | } |
5536 | return false; | 5535 | return false; |
5537 | } | 5536 | } |
5538 | 5537 | ||
5539 | private bool HandleTrackAgent(IClientAPI client, Packet Packet) | 5538 | private bool HandleTrackAgent(IClientAPI client, Packet Packet) |
5540 | { | 5539 | { |
5541 | TrackAgentPacket TrackAgent = | 5540 | TrackAgentPacket TrackAgent = |
5542 | (TrackAgentPacket)Packet; | 5541 | (TrackAgentPacket)Packet; |
5543 | 5542 | ||
5544 | TrackAgentUpdate TrackAgentHandler = OnTrackAgent; | 5543 | TrackAgentUpdate TrackAgentHandler = OnTrackAgent; |
5545 | if (TrackAgentHandler != null) | 5544 | if (TrackAgentHandler != null) |
5546 | { | 5545 | { |
@@ -5551,7 +5550,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5551 | } | 5550 | } |
5552 | return false; | 5551 | return false; |
5553 | } | 5552 | } |
5554 | 5553 | ||
5555 | private bool HandlerRezObject(IClientAPI sender, Packet Pack) | 5554 | private bool HandlerRezObject(IClientAPI sender, Packet Pack) |
5556 | { | 5555 | { |
5557 | RezObjectPacket rezPacket = (RezObjectPacket)Pack; | 5556 | RezObjectPacket rezPacket = (RezObjectPacket)Pack; |
@@ -7207,19 +7206,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7207 | UUID requestID = new UUID(transfer.TransferInfo.Params, 80); | 7206 | UUID requestID = new UUID(transfer.TransferInfo.Params, 80); |
7208 | 7207 | ||
7209 | // m_log.DebugFormat( | 7208 | // m_log.DebugFormat( |
7210 | // "[CLIENT]: Got request for asset {0} from item {1} in prim {2} by {3}", | 7209 | // "[CLIENT]: Got request for asset {0} from item {1} in prim {2} by {3}", |
7211 | // requestID, itemID, taskID, Name); | 7210 | // requestID, itemID, taskID, Name); |
7212 | 7211 | ||
7213 | if (!(((Scene)m_scene).Permissions.BypassPermissions())) | 7212 | if (!(((Scene)m_scene).Permissions.BypassPermissions())) |
7214 | { | 7213 | { |
7215 | if (taskID != UUID.Zero) // Prim | 7214 | if (taskID != UUID.Zero) // Prim |
7216 | { | 7215 | { |
7217 | SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID); | 7216 | SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID); |
7218 | 7217 | ||
7219 | if (part == null) | 7218 | if (part == null) |
7220 | { | 7219 | { |
7221 | m_log.WarnFormat( | 7220 | m_log.WarnFormat( |
7222 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but prim does not exist", | 7221 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but prim does not exist", |
7223 | Name, requestID, itemID, taskID); | 7222 | Name, requestID, itemID, taskID); |
7224 | return true; | 7223 | return true; |
7225 | } | 7224 | } |
@@ -7228,11 +7227,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7228 | if (tii == null) | 7227 | if (tii == null) |
7229 | { | 7228 | { |
7230 | m_log.WarnFormat( | 7229 | m_log.WarnFormat( |
7231 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item does not exist", | 7230 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item does not exist", |
7232 | Name, requestID, itemID, taskID); | 7231 | Name, requestID, itemID, taskID); |
7233 | return true; | 7232 | return true; |
7234 | } | 7233 | } |
7235 | 7234 | ||
7236 | if (tii.Type == (int)AssetType.LSLText) | 7235 | if (tii.Type == (int)AssetType.LSLText) |
7237 | { | 7236 | { |
7238 | if (!((Scene)m_scene).Permissions.CanEditScript(itemID, taskID, AgentId)) | 7237 | if (!((Scene)m_scene).Permissions.CanEditScript(itemID, taskID, AgentId)) |
@@ -7251,41 +7250,41 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7251 | { | 7250 | { |
7252 | m_log.WarnFormat( | 7251 | m_log.WarnFormat( |
7253 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the prim is owned by {4}", | 7252 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the prim is owned by {4}", |
7254 | Name, requestID, itemID, taskID, part.OwnerID); | 7253 | Name, requestID, itemID, taskID, part.OwnerID); |
7255 | return true; | 7254 | return true; |
7256 | } | 7255 | } |
7257 | 7256 | ||
7258 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) | 7257 | if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) |
7259 | { | 7258 | { |
7260 | m_log.WarnFormat( | 7259 | m_log.WarnFormat( |
7261 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set", | 7260 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set", |
7262 | Name, requestID, itemID, taskID); | 7261 | Name, requestID, itemID, taskID); |
7263 | return true; | 7262 | return true; |
7264 | } | 7263 | } |
7265 | 7264 | ||
7266 | if (tii.OwnerID != AgentId) | 7265 | if (tii.OwnerID != AgentId) |
7267 | { | 7266 | { |
7268 | m_log.WarnFormat( | 7267 | m_log.WarnFormat( |
7269 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}", | 7268 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}", |
7270 | Name, requestID, itemID, taskID, tii.OwnerID); | 7269 | Name, requestID, itemID, taskID, tii.OwnerID); |
7271 | return true; | 7270 | return true; |
7272 | } | 7271 | } |
7273 | 7272 | ||
7274 | if (( | 7273 | if (( |
7275 | tii.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) | 7274 | tii.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) |
7276 | != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) | 7275 | != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) |
7277 | { | 7276 | { |
7278 | m_log.WarnFormat( | 7277 | m_log.WarnFormat( |
7279 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer", | 7278 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer", |
7280 | Name, requestID, itemID, taskID); | 7279 | Name, requestID, itemID, taskID); |
7281 | return true; | 7280 | return true; |
7282 | } | 7281 | } |
7283 | 7282 | ||
7284 | if (tii.AssetID != requestID) | 7283 | if (tii.AssetID != requestID) |
7285 | { | 7284 | { |
7286 | m_log.WarnFormat( | 7285 | m_log.WarnFormat( |
7287 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}", | 7286 | "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}", |
7288 | Name, requestID, itemID, taskID, tii.AssetID); | 7287 | Name, requestID, itemID, taskID, tii.AssetID); |
7289 | return true; | 7288 | return true; |
7290 | } | 7289 | } |
7291 | } | 7290 | } |
@@ -7889,7 +7888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7889 | newTaskItem, updatetask.UpdateData.LocalID); | 7888 | newTaskItem, updatetask.UpdateData.LocalID); |
7890 | } | 7889 | } |
7891 | } | 7890 | } |
7892 | } | 7891 | } |
7893 | 7892 | ||
7894 | return true; | 7893 | return true; |
7895 | } | 7894 | } |
@@ -8884,7 +8883,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8884 | 8883 | ||
8885 | // return true; | 8884 | // return true; |
8886 | } | 8885 | } |
8887 | 8886 | ||
8888 | private bool HandleRequestRegionInfo(IClientAPI sender, Packet Pack) | 8887 | private bool HandleRequestRegionInfo(IClientAPI sender, Packet Pack) |
8889 | { | 8888 | { |
8890 | RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; | 8889 | RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; |
@@ -8905,7 +8904,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8905 | } | 8904 | } |
8906 | return true; | 8905 | return true; |
8907 | } | 8906 | } |
8908 | 8907 | ||
8909 | private bool HandleEstateCovenantRequest(IClientAPI sender, Packet Pack) | 8908 | private bool HandleEstateCovenantRequest(IClientAPI sender, Packet Pack) |
8910 | { | 8909 | { |
8911 | 8910 | ||
@@ -8942,7 +8941,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8942 | 8941 | ||
8943 | return true; | 8942 | return true; |
8944 | } | 8943 | } |
8945 | 8944 | ||
8946 | private bool HandleGodUpdateRegionInfoUpdate(IClientAPI client, Packet Packet) | 8945 | private bool HandleGodUpdateRegionInfoUpdate(IClientAPI client, Packet Packet) |
8947 | { | 8946 | { |
8948 | GodUpdateRegionInfoPacket GodUpdateRegionInfo = | 8947 | GodUpdateRegionInfoPacket GodUpdateRegionInfo = |
@@ -8962,7 +8961,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8962 | } | 8961 | } |
8963 | return false; | 8962 | return false; |
8964 | } | 8963 | } |
8965 | 8964 | ||
8966 | private bool HandleSimWideDeletes(IClientAPI client, Packet Packet) | 8965 | private bool HandleSimWideDeletes(IClientAPI client, Packet Packet) |
8967 | { | 8966 | { |
8968 | SimWideDeletesPacket SimWideDeletesRequest = | 8967 | SimWideDeletesPacket SimWideDeletesRequest = |
@@ -8975,7 +8974,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8975 | } | 8974 | } |
8976 | return false; | 8975 | return false; |
8977 | } | 8976 | } |
8978 | 8977 | ||
8979 | private bool HandleGodlikeMessage(IClientAPI client, Packet Packet) | 8978 | private bool HandleGodlikeMessage(IClientAPI client, Packet Packet) |
8980 | { | 8979 | { |
8981 | GodlikeMessagePacket GodlikeMessage = | 8980 | GodlikeMessagePacket GodlikeMessage = |
@@ -8992,7 +8991,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8992 | } | 8991 | } |
8993 | return false; | 8992 | return false; |
8994 | } | 8993 | } |
8995 | 8994 | ||
8996 | private bool HandleSaveStatePacket(IClientAPI client, Packet Packet) | 8995 | private bool HandleSaveStatePacket(IClientAPI client, Packet Packet) |
8997 | { | 8996 | { |
8998 | StateSavePacket SaveStateMessage = | 8997 | StateSavePacket SaveStateMessage = |
@@ -9005,7 +9004,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9005 | } | 9004 | } |
9006 | return false; | 9005 | return false; |
9007 | } | 9006 | } |
9008 | 9007 | ||
9009 | private bool HandleGodKickUser(IClientAPI sender, Packet Pack) | 9008 | private bool HandleGodKickUser(IClientAPI sender, Packet Pack) |
9010 | { | 9009 | { |
9011 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; | 9010 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; |
@@ -9143,7 +9142,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9143 | } | 9142 | } |
9144 | return true; | 9143 | return true; |
9145 | } | 9144 | } |
9146 | 9145 | ||
9147 | #endregion Economy/Transaction Packets | 9146 | #endregion Economy/Transaction Packets |
9148 | 9147 | ||
9149 | #region Script Packets | 9148 | #region Script Packets |
@@ -9356,7 +9355,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9356 | } | 9355 | } |
9357 | return true; | 9356 | return true; |
9358 | } | 9357 | } |
9359 | 9358 | ||
9360 | private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet) | 9359 | private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet) |
9361 | { | 9360 | { |
9362 | UpdateMuteListEntryPacket UpdateMuteListEntry = | 9361 | UpdateMuteListEntryPacket UpdateMuteListEntry = |
@@ -9372,7 +9371,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9372 | } | 9371 | } |
9373 | return false; | 9372 | return false; |
9374 | } | 9373 | } |
9375 | 9374 | ||
9376 | private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet) | 9375 | private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet) |
9377 | { | 9376 | { |
9378 | RemoveMuteListEntryPacket RemoveMuteListEntry = | 9377 | RemoveMuteListEntryPacket RemoveMuteListEntry = |
@@ -9388,7 +9387,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9388 | } | 9387 | } |
9389 | return false; | 9388 | return false; |
9390 | } | 9389 | } |
9391 | 9390 | ||
9392 | private bool HandleUserReport(IClientAPI client, Packet Packet) | 9391 | private bool HandleUserReport(IClientAPI client, Packet Packet) |
9393 | { | 9392 | { |
9394 | UserReportPacket UserReport = | 9393 | UserReportPacket UserReport = |
@@ -9413,7 +9412,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9413 | } | 9412 | } |
9414 | return false; | 9413 | return false; |
9415 | } | 9414 | } |
9416 | 9415 | ||
9417 | private bool HandleSendPostcard(IClientAPI client, Packet packet) | 9416 | private bool HandleSendPostcard(IClientAPI client, Packet packet) |
9418 | { | 9417 | { |
9419 | // SendPostcardPacket SendPostcard = | 9418 | // SendPostcardPacket SendPostcard = |
@@ -9726,7 +9725,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9726 | return true; | 9725 | return true; |
9727 | 9726 | ||
9728 | } | 9727 | } |
9729 | 9728 | ||
9730 | private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet) | 9729 | private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet) |
9731 | { | 9730 | { |
9732 | GroupVoteHistoryRequestPacket GroupVoteHistoryRequest = | 9731 | GroupVoteHistoryRequestPacket GroupVoteHistoryRequest = |
@@ -9739,7 +9738,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9739 | } | 9738 | } |
9740 | return false; | 9739 | return false; |
9741 | } | 9740 | } |
9742 | 9741 | ||
9743 | private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet) | 9742 | private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet) |
9744 | { | 9743 | { |
9745 | GroupActiveProposalsRequestPacket GroupActiveProposalsRequest = | 9744 | GroupActiveProposalsRequestPacket GroupActiveProposalsRequest = |
@@ -9752,7 +9751,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9752 | } | 9751 | } |
9753 | return false; | 9752 | return false; |
9754 | } | 9753 | } |
9755 | 9754 | ||
9756 | private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet) | 9755 | private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet) |
9757 | { | 9756 | { |
9758 | GroupAccountDetailsRequestPacket GroupAccountDetailsRequest = | 9757 | GroupAccountDetailsRequestPacket GroupAccountDetailsRequest = |
@@ -9765,7 +9764,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9765 | } | 9764 | } |
9766 | return false; | 9765 | return false; |
9767 | } | 9766 | } |
9768 | 9767 | ||
9769 | private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet) | 9768 | private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet) |
9770 | { | 9769 | { |
9771 | GroupAccountSummaryRequestPacket GroupAccountSummaryRequest = | 9770 | GroupAccountSummaryRequestPacket GroupAccountSummaryRequest = |
@@ -9778,7 +9777,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9778 | } | 9777 | } |
9779 | return false; | 9778 | return false; |
9780 | } | 9779 | } |
9781 | 9780 | ||
9782 | private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet) | 9781 | private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet) |
9783 | { | 9782 | { |
9784 | GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest = | 9783 | GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest = |
@@ -9791,7 +9790,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9791 | } | 9790 | } |
9792 | return false; | 9791 | return false; |
9793 | } | 9792 | } |
9794 | 9793 | ||
9795 | private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack) | 9794 | private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack) |
9796 | { | 9795 | { |
9797 | GroupTitlesRequestPacket groupTitlesRequest = | 9796 | GroupTitlesRequestPacket groupTitlesRequest = |
@@ -11239,26 +11238,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11239 | if (m_debugPacketLevel > 0) | 11238 | if (m_debugPacketLevel > 0) |
11240 | { | 11239 | { |
11241 | bool outputPacket = true; | 11240 | bool outputPacket = true; |
11242 | 11241 | ||
11243 | if (m_debugPacketLevel <= 255 | 11242 | if (m_debugPacketLevel <= 255 |
11244 | && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage)) | 11243 | && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage)) |
11245 | outputPacket = false; | 11244 | outputPacket = false; |
11246 | 11245 | ||
11247 | if (m_debugPacketLevel <= 200 | 11246 | if (m_debugPacketLevel <= 200 |
11248 | && | 11247 | && (packet.Type == PacketType.ImagePacket |
11249 | (packet.Type == PacketType.ImagePacket | ||
11250 | || packet.Type == PacketType.ImageData | 11248 | || packet.Type == PacketType.ImageData |
11251 | || packet.Type == PacketType.LayerData | 11249 | || packet.Type == PacketType.LayerData |
11252 | || packet.Type == PacketType.CoarseLocationUpdate)) | 11250 | || packet.Type == PacketType.CoarseLocationUpdate)) |
11253 | outputPacket = false; | 11251 | outputPacket = false; |
11254 | 11252 | ||
11255 | if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) | 11253 | if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) |
11256 | outputPacket = false; | 11254 | outputPacket = false; |
11257 | 11255 | ||
11258 | if (outputPacket) | 11256 | if (outputPacket) |
11259 | m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); | 11257 | m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); |
11260 | } | 11258 | } |
11261 | 11259 | ||
11262 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); | 11260 | m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); |
11263 | } | 11261 | } |
11264 | 11262 | ||
@@ -11348,16 +11346,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11348 | if (m_debugPacketLevel > 0) | 11346 | if (m_debugPacketLevel > 0) |
11349 | { | 11347 | { |
11350 | bool outputPacket = true; | 11348 | bool outputPacket = true; |
11351 | 11349 | ||
11352 | if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate) | 11350 | if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate) |
11353 | outputPacket = false; | 11351 | outputPacket = false; |
11354 | 11352 | ||
11355 | if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage) | 11353 | if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage) |
11356 | outputPacket = false; | 11354 | outputPacket = false; |
11357 | 11355 | ||
11358 | if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation)) | 11356 | if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation)) |
11359 | outputPacket = false; | 11357 | outputPacket = false; |
11360 | 11358 | ||
11361 | if (outputPacket) | 11359 | if (outputPacket) |
11362 | m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type); | 11360 | m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type); |
11363 | } | 11361 | } |
@@ -11623,12 +11621,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11623 | 11621 | ||
11624 | UUID requestID = UUID.Zero; | 11622 | UUID requestID = UUID.Zero; |
11625 | byte source = (byte)SourceType.Asset; | 11623 | byte source = (byte)SourceType.Asset; |
11626 | 11624 | ||
11627 | if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) | 11625 | if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) |
11628 | { | 11626 | { |
11629 | requestID = new UUID(transferRequest.TransferInfo.Params, 0); | 11627 | requestID = new UUID(transferRequest.TransferInfo.Params, 0); |
11630 | } | 11628 | } |
11631 | else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) | 11629 | else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) |
11632 | { | 11630 | { |
11633 | requestID = new UUID(transferRequest.TransferInfo.Params, 80); | 11631 | requestID = new UUID(transferRequest.TransferInfo.Params, 80); |
11634 | source = (byte)SourceType.SimInventoryItem; | 11632 | source = (byte)SourceType.SimInventoryItem; |
@@ -11874,7 +11872,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11874 | public PacketMethod method; | 11872 | public PacketMethod method; |
11875 | public bool Async; | 11873 | public bool Async; |
11876 | } | 11874 | } |
11877 | 11875 | ||
11878 | public class AsyncPacketProcess | 11876 | public class AsyncPacketProcess |
11879 | { | 11877 | { |
11880 | public bool result = false; | 11878 | public bool result = false; |
@@ -11943,8 +11941,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11943 | dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName); | 11941 | dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName); |
11944 | dialog.Data.LastName = Util.StringToBytes256(ownerLastName); | 11942 | dialog.Data.LastName = Util.StringToBytes256(ownerLastName); |
11945 | dialog.Data.Message = Util.StringToBytes256(message); | 11943 | dialog.Data.Message = Util.StringToBytes256(message); |
11946 | 11944 | ||
11947 | |||
11948 | ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1]; | 11945 | ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1]; |
11949 | buttons[0] = new ScriptDialogPacket.ButtonsBlock(); | 11946 | buttons[0] = new ScriptDialogPacket.ButtonsBlock(); |
11950 | buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!"); | 11947 | buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!"); |
@@ -11958,7 +11955,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11958 | { | 11955 | { |
11959 | ScenePresence presence = p as ScenePresence; | 11956 | ScenePresence presence = p as ScenePresence; |
11960 | // It turns out to get the agent to stop flying, you have to feed it stop flying velocities | 11957 | // It turns out to get the agent to stop flying, you have to feed it stop flying velocities |
11961 | // There's no explicit message to send the client to tell it to stop flying.. it relies on the | 11958 | // There's no explicit message to send the client to tell it to stop flying.. it relies on the |
11962 | // velocity, collision plane and avatar height | 11959 | // velocity, collision plane and avatar height |
11963 | 11960 | ||
11964 | // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air | 11961 | // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air |
@@ -11975,7 +11972,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11975 | 11972 | ||
11976 | // attach a suitable collision plane regardless of the actual situation to force the LLClient to land. | 11973 | // attach a suitable collision plane regardless of the actual situation to force the LLClient to land. |
11977 | // Collision plane below the avatar's position a 6th of the avatar's height is suitable. | 11974 | // Collision plane below the avatar's position a 6th of the avatar's height is suitable. |
11978 | // Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a | 11975 | // Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a |
11979 | // certain amount.. because the LLClient wouldn't land in that situation anyway. | 11976 | // certain amount.. because the LLClient wouldn't land in that situation anyway. |
11980 | 11977 | ||
11981 | // why are we still testing for this really old height value default??? | 11978 | // why are we still testing for this really old height value default??? |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 46b68ec..ea1317a 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -36,6 +36,7 @@ using OpenSim.Framework.Communications; | |||
36 | using OpenSim.Framework.Servers; | 36 | using OpenSim.Framework.Servers; |
37 | using OpenSim.Framework.Servers.HttpServer; | 37 | using OpenSim.Framework.Servers.HttpServer; |
38 | using OpenSim.Region.Framework; | 38 | using OpenSim.Region.Framework; |
39 | using OpenSim.Region.Framework.Interfaces; | ||
39 | using OpenSim.Region.Framework.Scenes; | 40 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Region.Physics.Manager; | 41 | using OpenSim.Region.Physics.Manager; |
41 | 42 | ||
@@ -48,28 +49,16 @@ namespace OpenSim.Region.ClientStack | |||
48 | 49 | ||
49 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); | 50 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); |
50 | protected NetworkServersInfo m_networkServersInfo; | 51 | protected NetworkServersInfo m_networkServersInfo; |
51 | |||
52 | public NetworkServersInfo NetServersInfo | ||
53 | { | ||
54 | get { return m_networkServersInfo; } | ||
55 | } | ||
56 | |||
57 | protected uint m_httpServerPort; | 52 | protected uint m_httpServerPort; |
58 | 53 | protected ISimulationDataService m_simulationDataService; | |
59 | protected StorageManager m_storageManager; | 54 | protected IEstateDataService m_estateDataService; |
60 | |||
61 | public StorageManager StorageManager | ||
62 | { | ||
63 | get { return m_storageManager; } | ||
64 | } | ||
65 | |||
66 | protected ClientStackManager m_clientStackManager; | 55 | protected ClientStackManager m_clientStackManager; |
67 | |||
68 | public SceneManager SceneManager | ||
69 | { | ||
70 | get { return m_sceneManager; } | ||
71 | } | ||
72 | protected SceneManager m_sceneManager = new SceneManager(); | 56 | protected SceneManager m_sceneManager = new SceneManager(); |
57 | |||
58 | public SceneManager SceneManager { get { return m_sceneManager; } } | ||
59 | public NetworkServersInfo NetServersInfo { get { return m_networkServersInfo; } } | ||
60 | public ISimulationDataService SimulationDataService { get { return m_simulationDataService; } } | ||
61 | public IEstateDataService EstateDataService { get { return m_estateDataService; } } | ||
73 | 62 | ||
74 | protected abstract void Initialize(); | 63 | protected abstract void Initialize(); |
75 | 64 | ||
@@ -83,15 +72,11 @@ namespace OpenSim.Region.ClientStack | |||
83 | /// <returns></returns> | 72 | /// <returns></returns> |
84 | protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier); | 73 | protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier); |
85 | 74 | ||
86 | protected abstract StorageManager CreateStorageManager(); | ||
87 | protected abstract ClientStackManager CreateClientStackManager(); | 75 | protected abstract ClientStackManager CreateClientStackManager(); |
88 | protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, | 76 | protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager); |
89 | AgentCircuitManager circuitManager); | ||
90 | 77 | ||
91 | protected override void StartupSpecific() | 78 | protected override void StartupSpecific() |
92 | { | 79 | { |
93 | m_storageManager = CreateStorageManager(); | ||
94 | |||
95 | m_clientStackManager = CreateClientStackManager(); | 80 | m_clientStackManager = CreateClientStackManager(); |
96 | 81 | ||
97 | Initialize(); | 82 | Initialize(); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 100b55c..e1c0949 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
49 | 49 | ||
50 | protected Scene m_scene = null; | 50 | protected Scene m_scene = null; |
51 | 51 | ||
52 | public string Name { get { return "Attachments Module"; } } | 52 | public string Name { get { return "Attachments Module"; } } |
53 | public Type ReplaceableInterface { get { return null; } } | 53 | public Type ReplaceableInterface { get { return null; } } |
54 | 54 | ||
55 | public void Initialise(IConfigSource source) {} | 55 | public void Initialise(IConfigSource source) {} |
56 | 56 | ||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
81 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory; | 81 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory; |
82 | client.OnObjectAttach += AttachObject; | 82 | client.OnObjectAttach += AttachObject; |
83 | client.OnObjectDetach += DetachObject; | 83 | client.OnObjectDetach += DetachObject; |
84 | client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory; | 84 | client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory; |
85 | } | 85 | } |
86 | 86 | ||
87 | public void UnsubscribeFromClientEvents(IClientAPI client) | 87 | public void UnsubscribeFromClientEvents(IClientAPI client) |
@@ -90,7 +90,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
90 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory; | 90 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory; |
91 | client.OnObjectAttach -= AttachObject; | 91 | client.OnObjectAttach -= AttachObject; |
92 | client.OnObjectDetach -= DetachObject; | 92 | client.OnObjectDetach -= DetachObject; |
93 | client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory; | 93 | client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory; |
94 | } | 94 | } |
95 | 95 | ||
96 | /// <summary> | 96 | /// <summary> |
@@ -174,12 +174,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
174 | UUID itemID = UUID.Zero; | 174 | UUID itemID = UUID.Zero; |
175 | if (sp != null) | 175 | if (sp != null) |
176 | { | 176 | { |
177 | foreach(SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) | 177 | foreach (SceneObjectGroup grp in sp.GetAttachments(AttachmentPt)) |
178 | { | 178 | { |
179 | itemID = grp.GetFromItemID(); | 179 | itemID = grp.GetFromItemID(); |
180 | if (itemID != UUID.Zero) | 180 | if (itemID != UUID.Zero) |
181 | DetachSingleAttachmentToInv(itemID, remoteClient); | 181 | DetachSingleAttachmentToInv(itemID, remoteClient); |
182 | } | 182 | } |
183 | } | 183 | } |
184 | 184 | ||
185 | if (group.GetFromItemID() == UUID.Zero) | 185 | if (group.GetFromItemID() == UUID.Zero) |
@@ -232,7 +232,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
232 | 232 | ||
233 | public UUID RezSingleAttachmentFromInventory( | 233 | public UUID RezSingleAttachmentFromInventory( |
234 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus, XmlDocument doc) | 234 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus, XmlDocument doc) |
235 | { | 235 | { |
236 | SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt, doc); | 236 | SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt, doc); |
237 | 237 | ||
238 | if (updateInventoryStatus) | 238 | if (updateInventoryStatus) |
@@ -248,8 +248,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
248 | if (null == att) | 248 | if (null == att) |
249 | return UUID.Zero; | 249 | return UUID.Zero; |
250 | else | 250 | else |
251 | return att.UUID; | 251 | return att.UUID; |
252 | } | 252 | } |
253 | 253 | ||
254 | protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( | 254 | protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( |
255 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, XmlDocument doc) | 255 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, XmlDocument doc) |
@@ -311,7 +311,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
311 | } | 311 | } |
312 | 312 | ||
313 | return null; | 313 | return null; |
314 | } | 314 | } |
315 | 315 | ||
316 | public UUID SetAttachmentInventoryStatus( | 316 | public UUID SetAttachmentInventoryStatus( |
317 | SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | 317 | SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) |
@@ -456,7 +456,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
456 | 456 | ||
457 | // We can NOT use the dictionries here, as we are looking | 457 | // We can NOT use the dictionries here, as we are looking |
458 | // for an entity by the fromAssetID, which is NOT the prim UUID | 458 | // for an entity by the fromAssetID, which is NOT the prim UUID |
459 | List<EntityBase> detachEntities = m_scene.GetEntities(); | 459 | EntityBase[] detachEntities = m_scene.GetEntities(); |
460 | SceneObjectGroup group; | 460 | SceneObjectGroup group; |
461 | 461 | ||
462 | foreach (EntityBase entity in detachEntities) | 462 | foreach (EntityBase entity in detachEntities) |
@@ -495,7 +495,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
495 | sog.RootPart.IsAttachment = false; | 495 | sog.RootPart.IsAttachment = false; |
496 | sog.AbsolutePosition = sog.RootPart.AttachedPos; | 496 | sog.AbsolutePosition = sog.RootPart.AttachedPos; |
497 | UpdateKnownItem(client, sog, sog.GetFromItemID(), sog.OwnerID); | 497 | UpdateKnownItem(client, sog, sog.GetFromItemID(), sog.OwnerID); |
498 | sog.SetAttachmentPoint(attachmentPoint); | 498 | sog.SetAttachmentPoint(attachmentPoint); |
499 | } | 499 | } |
500 | 500 | ||
501 | /// <summary> | 501 | /// <summary> |
@@ -622,7 +622,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
622 | // In case it is later dropped again, don't let | 622 | // In case it is later dropped again, don't let |
623 | // it get cleaned up | 623 | // it get cleaned up |
624 | so.RootPart.RemFlag(PrimFlags.TemporaryOnRez); | 624 | so.RootPart.RemFlag(PrimFlags.TemporaryOnRez); |
625 | so.HasGroupChanged = false; | 625 | so.HasGroupChanged = false; |
626 | } | 626 | } |
627 | } | 627 | } |
628 | } | 628 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 032e55a..25322a1 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
132 | try | 132 | try |
133 | { | 133 | { |
134 | deadAvatar.ControllingClient.SendAgentAlertMessage(deadAvatarMessage, true); | 134 | deadAvatar.ControllingClient.SendAgentAlertMessage(deadAvatarMessage, true); |
135 | if(killingAvatar != null) | 135 | if (killingAvatar != null) |
136 | killingAvatar.ControllingClient.SendAlertMessage("You fragged " + deadAvatar.Firstname + " " + deadAvatar.Lastname); | 136 | killingAvatar.ControllingClient.SendAlertMessage("You fragged " + deadAvatar.Firstname + " " + deadAvatar.Lastname); |
137 | } | 137 | } |
138 | catch (InvalidOperationException) | 138 | catch (InvalidOperationException) |
@@ -143,7 +143,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
143 | } | 143 | } |
144 | 144 | ||
145 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) | 145 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) |
146 | { | 146 | { |
147 | try | 147 | try |
148 | { | 148 | { |
149 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 149 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index ca0b7ad..a49e71e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | |||
@@ -54,7 +54,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
54 | public UUID PrincipalID; | 54 | public UUID PrincipalID; |
55 | public FriendInfo[] Friends; | 55 | public FriendInfo[] Friends; |
56 | public int Refcount; | 56 | public int Refcount; |
57 | public UUID RegionID; | ||
58 | 57 | ||
59 | public bool IsFriend(string friend) | 58 | public bool IsFriend(string friend) |
60 | { | 59 | { |
@@ -68,6 +67,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
68 | } | 67 | } |
69 | } | 68 | } |
70 | 69 | ||
70 | private static readonly FriendInfo[] EMPTY_FRIENDS = new FriendInfo[0]; | ||
71 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 71 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
72 | 72 | ||
73 | protected List<Scene> m_Scenes = new List<Scene>(); | 73 | protected List<Scene> m_Scenes = new List<Scene>(); |
@@ -79,7 +79,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
79 | protected Dictionary<UUID, UserFriendData> m_Friends = | 79 | protected Dictionary<UUID, UserFriendData> m_Friends = |
80 | new Dictionary<UUID, UserFriendData>(); | 80 | new Dictionary<UUID, UserFriendData>(); |
81 | 81 | ||
82 | protected List<UUID> m_NeedsListOfFriends = new List<UUID>(); | 82 | protected HashSet<UUID> m_NeedsListOfFriends = new HashSet<UUID>(); |
83 | 83 | ||
84 | protected IPresenceService PresenceService | 84 | protected IPresenceService PresenceService |
85 | { | 85 | { |
@@ -146,7 +146,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
146 | // Instantiate the request handler | 146 | // Instantiate the request handler |
147 | IHttpServer server = MainServer.GetHttpServer((uint)mPort); | 147 | IHttpServer server = MainServer.GetHttpServer((uint)mPort); |
148 | server.AddStreamHandler(new FriendsRequestHandler(this)); | 148 | server.AddStreamHandler(new FriendsRequestHandler(this)); |
149 | |||
150 | } | 149 | } |
151 | 150 | ||
152 | if (m_FriendsService == null) | 151 | if (m_FriendsService == null) |
@@ -173,7 +172,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
173 | scene.EventManager.OnNewClient += OnNewClient; | 172 | scene.EventManager.OnNewClient += OnNewClient; |
174 | scene.EventManager.OnClientClosed += OnClientClosed; | 173 | scene.EventManager.OnClientClosed += OnClientClosed; |
175 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; | 174 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; |
176 | scene.EventManager.OnMakeChildAgent += OnMakeChildAgent; | ||
177 | scene.EventManager.OnClientLogin += OnClientLogin; | 175 | scene.EventManager.OnClientLogin += OnClientLogin; |
178 | } | 176 | } |
179 | 177 | ||
@@ -198,17 +196,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
198 | 196 | ||
199 | public uint GetFriendPerms(UUID principalID, UUID friendID) | 197 | public uint GetFriendPerms(UUID principalID, UUID friendID) |
200 | { | 198 | { |
201 | if (!m_Friends.ContainsKey(principalID)) | 199 | FriendInfo[] friends = GetFriends(principalID); |
202 | return 0; | 200 | foreach (FriendInfo fi in friends) |
203 | |||
204 | UserFriendData data = m_Friends[principalID]; | ||
205 | |||
206 | string searchFor = friendID.ToString(); | ||
207 | foreach (FriendInfo fi in data.Friends) | ||
208 | { | 201 | { |
209 | if (fi.Friend == searchFor) | 202 | if (fi.Friend == friendID.ToString()) |
210 | return (uint)fi.TheirFlags; | 203 | return (uint)fi.TheirFlags; |
211 | } | 204 | } |
205 | |||
212 | return 0; | 206 | return 0; |
213 | } | 207 | } |
214 | 208 | ||
@@ -218,73 +212,59 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
218 | client.OnApproveFriendRequest += OnApproveFriendRequest; | 212 | client.OnApproveFriendRequest += OnApproveFriendRequest; |
219 | client.OnDenyFriendRequest += OnDenyFriendRequest; | 213 | client.OnDenyFriendRequest += OnDenyFriendRequest; |
220 | client.OnTerminateFriendship += OnTerminateFriendship; | 214 | client.OnTerminateFriendship += OnTerminateFriendship; |
221 | |||
222 | client.OnGrantUserRights += OnGrantUserRights; | 215 | client.OnGrantUserRights += OnGrantUserRights; |
223 | 216 | ||
224 | lock (m_Friends) | 217 | // Asynchronously fetch the friends list or increment the refcount for the existing |
225 | { | 218 | // friends list |
226 | if (m_Friends.ContainsKey(client.AgentId)) | 219 | Util.FireAndForget( |
220 | delegate(object o) | ||
227 | { | 221 | { |
228 | m_Friends[client.AgentId].Refcount++; | 222 | lock (m_Friends) |
229 | return; | 223 | { |
230 | } | 224 | UserFriendData friendsData; |
231 | 225 | if (m_Friends.TryGetValue(client.AgentId, out friendsData)) | |
232 | UserFriendData newFriends = new UserFriendData(); | 226 | { |
233 | 227 | friendsData.Refcount++; | |
234 | newFriends.PrincipalID = client.AgentId; | 228 | } |
235 | newFriends.Friends = m_FriendsService.GetFriends(client.AgentId); | 229 | else |
236 | newFriends.Refcount = 1; | 230 | { |
237 | newFriends.RegionID = UUID.Zero; | 231 | friendsData = new UserFriendData(); |
232 | friendsData.PrincipalID = client.AgentId; | ||
233 | friendsData.Friends = FriendsService.GetFriends(client.AgentId); | ||
234 | friendsData.Refcount = 1; | ||
238 | 235 | ||
239 | m_Friends.Add(client.AgentId, newFriends); | 236 | m_Friends[client.AgentId] = friendsData; |
240 | } | 237 | } |
241 | 238 | } | |
239 | } | ||
240 | ); | ||
242 | } | 241 | } |
243 | 242 | ||
244 | private void OnClientClosed(UUID agentID, Scene scene) | 243 | private void OnClientClosed(UUID agentID, Scene scene) |
245 | { | 244 | { |
246 | ScenePresence sp = scene.GetScenePresence(agentID); | 245 | ScenePresence sp = scene.GetScenePresence(agentID); |
247 | if (sp != null && !sp.IsChildAgent) | 246 | if (sp != null && !sp.IsChildAgent) |
247 | { | ||
248 | // do this for root agents closing out | 248 | // do this for root agents closing out |
249 | StatusChange(agentID, false); | 249 | StatusChange(agentID, false); |
250 | } | ||
250 | 251 | ||
251 | lock (m_Friends) | 252 | lock (m_Friends) |
252 | if (m_Friends.ContainsKey(agentID)) | 253 | { |
254 | UserFriendData friendsData; | ||
255 | if (m_Friends.TryGetValue(agentID, out friendsData)) | ||
253 | { | 256 | { |
254 | if (m_Friends[agentID].Refcount == 1) | 257 | friendsData.Refcount--; |
258 | if (friendsData.Refcount <= 0) | ||
255 | m_Friends.Remove(agentID); | 259 | m_Friends.Remove(agentID); |
256 | else | ||
257 | m_Friends[agentID].Refcount--; | ||
258 | } | 260 | } |
259 | } | ||
260 | |||
261 | private void OnMakeRootAgent(ScenePresence sp) | ||
262 | { | ||
263 | UUID agentID = sp.ControllingClient.AgentId; | ||
264 | |||
265 | if (m_Friends.ContainsKey(agentID)) | ||
266 | { | ||
267 | // This is probably an overkill, but just | ||
268 | // to make sure we have the latest and greatest | ||
269 | // friends list -- always pull OnMakeRoot | ||
270 | m_Friends[agentID].Friends = | ||
271 | m_FriendsService.GetFriends(agentID); | ||
272 | |||
273 | m_Friends[agentID].RegionID = | ||
274 | sp.ControllingClient.Scene.RegionInfo.RegionID; | ||
275 | } | 261 | } |
276 | } | 262 | } |
277 | 263 | ||
278 | 264 | private void OnMakeRootAgent(ScenePresence sp) | |
279 | private void OnMakeChildAgent(ScenePresence sp) | ||
280 | { | 265 | { |
281 | UUID agentID = sp.ControllingClient.AgentId; | 266 | UUID agentID = sp.ControllingClient.AgentId; |
282 | 267 | UpdateFriendsCache(agentID); | |
283 | if (m_Friends.ContainsKey(agentID)) | ||
284 | { | ||
285 | if (m_Friends[agentID].RegionID == sp.ControllingClient.Scene.RegionInfo.RegionID) | ||
286 | m_Friends[agentID].RegionID = UUID.Zero; | ||
287 | } | ||
288 | } | 268 | } |
289 | 269 | ||
290 | private void OnClientLogin(IClientAPI client) | 270 | private void OnClientLogin(IClientAPI client) |
@@ -296,75 +276,56 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
296 | 276 | ||
297 | // Register that we need to send the list of online friends to this user | 277 | // Register that we need to send the list of online friends to this user |
298 | lock (m_NeedsListOfFriends) | 278 | lock (m_NeedsListOfFriends) |
299 | if (!m_NeedsListOfFriends.Contains(agentID)) | 279 | m_NeedsListOfFriends.Add(agentID); |
300 | { | ||
301 | m_NeedsListOfFriends.Add(agentID); | ||
302 | } | ||
303 | } | 280 | } |
304 | 281 | ||
305 | public void SendFriendsOnlineIfNeeded(IClientAPI client) | 282 | public void SendFriendsOnlineIfNeeded(IClientAPI client) |
306 | { | 283 | { |
307 | UUID agentID = client.AgentId; | 284 | UUID agentID = client.AgentId; |
308 | if (m_NeedsListOfFriends.Contains(agentID)) | 285 | |
286 | // Check if the online friends list is needed | ||
287 | lock (m_NeedsListOfFriends) | ||
309 | { | 288 | { |
310 | if (!m_Friends.ContainsKey(agentID)) | 289 | if (!m_NeedsListOfFriends.Remove(agentID)) |
311 | { | ||
312 | m_log.DebugFormat("[FRIENDS MODULE]: agent {0} not found in local cache", agentID); | ||
313 | return; | 290 | return; |
314 | } | 291 | } |
315 | |||
316 | // | ||
317 | // Send the friends online | ||
318 | // | ||
319 | List<UUID> online = GetOnlineFriends(agentID); | ||
320 | if (online.Count > 0) | ||
321 | { | ||
322 | m_log.DebugFormat("[FRIENDS MODULE]: User {0} in region {1} has {2} friends online", client.AgentId, client.Scene.RegionInfo.RegionName, online.Count); | ||
323 | client.SendAgentOnline(online.ToArray()); | ||
324 | } | ||
325 | |||
326 | // | ||
327 | // Send outstanding friendship offers | ||
328 | // | ||
329 | if (m_Friends.ContainsKey(agentID)) | ||
330 | { | ||
331 | List<string> outstanding = new List<string>(); | ||
332 | 292 | ||
333 | foreach (FriendInfo fi in m_Friends[agentID].Friends) | 293 | // Send the friends online |
334 | if (fi.TheirFlags == -1) | 294 | List<UUID> online = GetOnlineFriends(agentID); |
335 | outstanding.Add(fi.Friend); | 295 | if (online.Count > 0) |
296 | { | ||
297 | m_log.DebugFormat("[FRIENDS MODULE]: User {0} in region {1} has {2} friends online", client.AgentId, client.Scene.RegionInfo.RegionName, online.Count); | ||
298 | client.SendAgentOnline(online.ToArray()); | ||
299 | } | ||
336 | 300 | ||
337 | GridInstantMessage im = new GridInstantMessage(client.Scene, UUID.Zero, "", agentID, (byte)InstantMessageDialog.FriendshipOffered, "Will you be my friend?", true, Vector3.Zero); | 301 | // Send outstanding friendship offers |
338 | foreach (string fid in outstanding) | 302 | List<string> outstanding = new List<string>(); |
339 | { | 303 | FriendInfo[] friends = GetFriends(agentID); |
340 | try | 304 | foreach (FriendInfo fi in friends) |
341 | { | 305 | { |
342 | im.fromAgentID = new Guid(fid); | 306 | if (fi.TheirFlags == -1) |
343 | } | 307 | outstanding.Add(fi.Friend); |
344 | catch | 308 | } |
345 | { | ||
346 | continue; | ||
347 | } | ||
348 | 309 | ||
349 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(client.Scene.RegionInfo.ScopeID, new UUID(im.fromAgentID)); | 310 | GridInstantMessage im = new GridInstantMessage(client.Scene, UUID.Zero, String.Empty, agentID, (byte)InstantMessageDialog.FriendshipOffered, |
350 | im.fromAgentName = account.FirstName + " " + account.LastName; | 311 | "Will you be my friend?", true, Vector3.Zero); |
351 | 312 | ||
352 | PresenceInfo presence = null; | 313 | foreach (string fid in outstanding) |
353 | PresenceInfo[] presences = PresenceService.GetAgents(new string[] { fid }); | 314 | { |
354 | if (presences != null && presences.Length > 0) | 315 | UUID fromAgentID; |
355 | presence = presences[0]; | 316 | if (!UUID.TryParse(fid, out fromAgentID)) |
356 | if (presence != null) | 317 | continue; |
357 | im.offline = 0; | ||
358 | 318 | ||
359 | im.imSessionID = im.fromAgentID; | 319 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(client.Scene.RegionInfo.ScopeID, fromAgentID); |
320 | PresenceInfo presence = PresenceService.GetAgent(fromAgentID); | ||
360 | 321 | ||
361 | // Finally | 322 | im.fromAgentID = fromAgentID.Guid; |
362 | LocalFriendshipOffered(agentID, im); | 323 | im.fromAgentName = account.FirstName + " " + account.LastName; |
363 | } | 324 | im.offline = (byte)((presence == null) ? 1 : 0); |
364 | } | 325 | im.imSessionID = im.fromAgentID; |
365 | 326 | ||
366 | lock (m_NeedsListOfFriends) | 327 | // Finally |
367 | m_NeedsListOfFriends.Remove(agentID); | 328 | LocalFriendshipOffered(agentID, im); |
368 | } | 329 | } |
369 | } | 330 | } |
370 | 331 | ||
@@ -373,44 +334,46 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
373 | List<string> friendList = new List<string>(); | 334 | List<string> friendList = new List<string>(); |
374 | List<UUID> online = new List<UUID>(); | 335 | List<UUID> online = new List<UUID>(); |
375 | 336 | ||
376 | foreach (FriendInfo fi in m_Friends[userID].Friends) | 337 | FriendInfo[] friends = GetFriends(userID); |
338 | foreach (FriendInfo fi in friends) | ||
377 | { | 339 | { |
378 | if (((fi.TheirFlags & 1) != 0) && (fi.TheirFlags != -1)) | 340 | if (((fi.TheirFlags & 1) != 0) && (fi.TheirFlags != -1)) |
379 | friendList.Add(fi.Friend); | 341 | friendList.Add(fi.Friend); |
380 | } | 342 | } |
381 | 343 | ||
382 | if (friendList.Count == 0) | 344 | if (friendList.Count > 0) |
383 | // no friends whatsoever | 345 | { |
384 | return online; | 346 | PresenceInfo[] presence = PresenceService.GetAgents(friendList.ToArray()); |
385 | 347 | foreach (PresenceInfo pi in presence) | |
386 | PresenceInfo[] presence = PresenceService.GetAgents(friendList.ToArray()); | 348 | { |
387 | 349 | UUID presenceID; | |
388 | foreach (PresenceInfo pi in presence) | 350 | if (UUID.TryParse(pi.UserID, out presenceID)) |
389 | online.Add(new UUID(pi.UserID)); | 351 | online.Add(presenceID); |
390 | //m_log.DebugFormat("[XXX] {0} friend online {1}", userID, pi.UserID); | 352 | } |
353 | } | ||
391 | 354 | ||
392 | return online; | 355 | return online; |
393 | } | 356 | } |
394 | 357 | ||
395 | // | 358 | /// <summary> |
396 | // Find the client for a ID | 359 | /// Find the client for a ID |
397 | // | 360 | /// </summary> |
398 | public IClientAPI LocateClientObject(UUID agentID) | 361 | public IClientAPI LocateClientObject(UUID agentID) |
399 | { | 362 | { |
400 | Scene scene = GetClientScene(agentID); | 363 | Scene scene = GetClientScene(agentID); |
401 | if (scene == null) | 364 | if (scene != null) |
402 | return null; | 365 | { |
403 | 366 | ScenePresence presence = scene.GetScenePresence(agentID); | |
404 | ScenePresence presence = scene.GetScenePresence(agentID); | 367 | if (presence != null) |
405 | if (presence == null) | 368 | return presence.ControllingClient; |
406 | return null; | 369 | } |
407 | 370 | ||
408 | return presence.ControllingClient; | 371 | return null; |
409 | } | 372 | } |
410 | 373 | ||
411 | // | 374 | /// <summary> |
412 | // Find the scene for an agent | 375 | /// Find the scene for an agent |
413 | // | 376 | /// </summary> |
414 | private Scene GetClientScene(UUID agentId) | 377 | private Scene GetClientScene(UUID agentId) |
415 | { | 378 | { |
416 | lock (m_Scenes) | 379 | lock (m_Scenes) |
@@ -418,13 +381,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
418 | foreach (Scene scene in m_Scenes) | 381 | foreach (Scene scene in m_Scenes) |
419 | { | 382 | { |
420 | ScenePresence presence = scene.GetScenePresence(agentId); | 383 | ScenePresence presence = scene.GetScenePresence(agentId); |
421 | if (presence != null) | 384 | if (presence != null && !presence.IsChildAgent) |
422 | { | 385 | return scene; |
423 | if (!presence.IsChildAgent) | ||
424 | return scene; | ||
425 | } | ||
426 | } | 386 | } |
427 | } | 387 | } |
388 | |||
428 | return null; | 389 | return null; |
429 | } | 390 | } |
430 | 391 | ||
@@ -435,35 +396,33 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
435 | /// <param name="online"></param> | 396 | /// <param name="online"></param> |
436 | private void StatusChange(UUID agentID, bool online) | 397 | private void StatusChange(UUID agentID, bool online) |
437 | { | 398 | { |
438 | //m_log.DebugFormat("[FRIENDS]: StatusChange {0}", online); | 399 | FriendInfo[] friends = GetFriends(agentID); |
439 | if (m_Friends.ContainsKey(agentID)) | 400 | if (friends.Length > 0) |
440 | { | 401 | { |
441 | //m_log.DebugFormat("[FRIENDS]: # of friends: {0}", m_Friends[agentID].Friends.Length); | ||
442 | List<FriendInfo> friendList = new List<FriendInfo>(); | 402 | List<FriendInfo> friendList = new List<FriendInfo>(); |
443 | foreach (FriendInfo fi in m_Friends[agentID].Friends) | 403 | foreach (FriendInfo fi in friends) |
444 | { | 404 | { |
445 | if (((fi.MyFlags & 1) != 0) && (fi.TheirFlags != -1)) | 405 | if (((fi.MyFlags & 1) != 0) && (fi.TheirFlags != -1)) |
446 | friendList.Add(fi); | 406 | friendList.Add(fi); |
447 | } | 407 | } |
448 | 408 | ||
449 | Util.FireAndForget(delegate | 409 | Util.FireAndForget( |
450 | { | 410 | delegate |
451 | foreach (FriendInfo fi in friendList) | ||
452 | { | 411 | { |
453 | //m_log.DebugFormat("[FRIENDS]: Notifying {0}", fi.PrincipalID); | 412 | foreach (FriendInfo fi in friendList) |
454 | // Notify about this user status | 413 | { |
455 | StatusNotify(fi, agentID, online); | 414 | //m_log.DebugFormat("[FRIENDS]: Notifying {0}", fi.PrincipalID); |
415 | // Notify about this user status | ||
416 | StatusNotify(fi, agentID, online); | ||
417 | } | ||
456 | } | 418 | } |
457 | }); | 419 | ); |
458 | } | 420 | } |
459 | else | ||
460 | m_log.WarnFormat("[FRIENDS]: {0} not found in cache", agentID); | ||
461 | } | 421 | } |
462 | 422 | ||
463 | private void StatusNotify(FriendInfo friend, UUID userID, bool online) | 423 | private void StatusNotify(FriendInfo friend, UUID userID, bool online) |
464 | { | 424 | { |
465 | UUID friendID = UUID.Zero; | 425 | UUID friendID; |
466 | |||
467 | if (UUID.TryParse(friend.Friend, out friendID)) | 426 | if (UUID.TryParse(friend.Friend, out friendID)) |
468 | { | 427 | { |
469 | // Try local | 428 | // Try local |
@@ -471,35 +430,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
471 | return; | 430 | return; |
472 | 431 | ||
473 | // The friend is not here [as root]. Let's forward. | 432 | // The friend is not here [as root]. Let's forward. |
474 | PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { friendID.ToString() }); | 433 | PresenceInfo friendSession = PresenceService.GetAgent(friendID); |
475 | if (friendSessions != null && friendSessions.Length > 0) | 434 | if (friendSession != null && friendSession.RegionID != UUID.Zero) // let's guard against sessions-gone-bad with the RegionID check |
476 | { | 435 | { |
477 | PresenceInfo friendSession = null; | 436 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); |
478 | foreach (PresenceInfo pinfo in friendSessions) | 437 | //m_log.DebugFormat("[FRIENDS]: Remote Notify to region {0}", region.RegionName); |
479 | if (pinfo.RegionID != UUID.Zero) // let's guard against sessions-gone-bad | 438 | m_FriendsSimConnector.StatusNotify(region, userID, friendID, online); |
480 | { | ||
481 | friendSession = pinfo; | ||
482 | break; | ||
483 | } | ||
484 | |||
485 | if (friendSession != null) | ||
486 | { | ||
487 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); | ||
488 | //m_log.DebugFormat("[FRIENDS]: Remote Notify to region {0}", region.RegionName); | ||
489 | m_FriendsSimConnector.StatusNotify(region, userID, friendID, online); | ||
490 | } | ||
491 | } | 439 | } |
492 | |||
493 | // Friend is not online. Ignore. | ||
494 | } | 440 | } |
495 | else | 441 | else |
442 | { | ||
496 | m_log.WarnFormat("[FRIENDS]: Error parsing friend ID {0}", friend.Friend); | 443 | m_log.WarnFormat("[FRIENDS]: Error parsing friend ID {0}", friend.Friend); |
444 | } | ||
497 | } | 445 | } |
498 | 446 | ||
499 | private void OnInstantMessage(IClientAPI client, GridInstantMessage im) | 447 | private void OnInstantMessage(IClientAPI client, GridInstantMessage im) |
500 | { | 448 | { |
501 | if (im.dialog == (byte)OpenMetaverse.InstantMessageDialog.FriendshipOffered) | 449 | if ((InstantMessageDialog)im.dialog == InstantMessageDialog.FriendshipOffered) |
502 | { | 450 | { |
503 | // we got a friendship offer | 451 | // we got a friendship offer |
504 | UUID principalID = new UUID(im.fromAgentID); | 452 | UUID principalID = new UUID(im.fromAgentID); |
505 | UUID friendID = new UUID(im.toAgentID); | 453 | UUID friendID = new UUID(im.toAgentID); |
@@ -529,15 +477,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
529 | return; | 477 | return; |
530 | 478 | ||
531 | // The prospective friend is not here [as root]. Let's forward. | 479 | // The prospective friend is not here [as root]. Let's forward. |
532 | PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { friendID.ToString() }); | 480 | PresenceInfo friendSession = PresenceService.GetAgent(friendID); |
533 | if (friendSessions != null && friendSessions.Length > 0) | 481 | if (friendSession != null) |
534 | { | 482 | { |
535 | PresenceInfo friendSession = friendSessions[0]; | 483 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); |
536 | if (friendSession != null) | 484 | m_FriendsSimConnector.FriendshipOffered(region, agentID, friendID, im.message); |
537 | { | ||
538 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); | ||
539 | m_FriendsSimConnector.FriendshipOffered(region, agentID, friendID, im.message); | ||
540 | } | ||
541 | } | 485 | } |
542 | // If the prospective friend is not online, he'll get the message upon login. | 486 | // If the prospective friend is not online, he'll get the message upon login. |
543 | } | 487 | } |
@@ -548,9 +492,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
548 | 492 | ||
549 | FriendsService.StoreFriend(agentID, friendID.ToString(), 1); | 493 | FriendsService.StoreFriend(agentID, friendID.ToString(), 1); |
550 | FriendsService.StoreFriend(friendID, agentID.ToString(), 1); | 494 | FriendsService.StoreFriend(friendID, agentID.ToString(), 1); |
551 | // update the local cache | ||
552 | m_Friends[agentID].Friends = FriendsService.GetFriends(agentID); | ||
553 | 495 | ||
496 | // Update the local cache | ||
497 | UpdateFriendsCache(agentID); | ||
554 | 498 | ||
555 | // | 499 | // |
556 | // Notify the friend | 500 | // Notify the friend |
@@ -564,16 +508,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
564 | } | 508 | } |
565 | 509 | ||
566 | // The friend is not here | 510 | // The friend is not here |
567 | PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { friendID.ToString() }); | 511 | PresenceInfo friendSession = PresenceService.GetAgent(friendID); |
568 | if (friendSessions != null && friendSessions.Length > 0) | 512 | if (friendSession != null) |
569 | { | 513 | { |
570 | PresenceInfo friendSession = friendSessions[0]; | 514 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); |
571 | if (friendSession != null) | 515 | m_FriendsSimConnector.FriendshipApproved(region, agentID, client.Name, friendID); |
572 | { | 516 | client.SendAgentOnline(new UUID[] { friendID }); |
573 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); | ||
574 | m_FriendsSimConnector.FriendshipApproved(region, agentID, client.Name, friendID); | ||
575 | client.SendAgentOnline(new UUID[] { friendID }); | ||
576 | } | ||
577 | } | 517 | } |
578 | } | 518 | } |
579 | 519 | ||
@@ -592,18 +532,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
592 | if (LocalFriendshipDenied(agentID, client.Name, friendID)) | 532 | if (LocalFriendshipDenied(agentID, client.Name, friendID)) |
593 | return; | 533 | return; |
594 | 534 | ||
595 | PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { friendID.ToString() }); | 535 | PresenceInfo friendSession = PresenceService.GetAgent(friendID); |
596 | if (friendSessions != null && friendSessions.Length > 0) | 536 | if (friendSession != null) |
597 | { | 537 | { |
598 | PresenceInfo friendSession = friendSessions[0]; | 538 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); |
599 | if (friendSession != null) | 539 | if (region != null) |
600 | { | 540 | m_FriendsSimConnector.FriendshipDenied(region, agentID, client.Name, friendID); |
601 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); | 541 | else |
602 | if (region != null) | 542 | m_log.WarnFormat("[FRIENDS]: Could not find region {0} in locating {1}", friendSession.RegionID, friendID); |
603 | m_FriendsSimConnector.FriendshipDenied(region, agentID, client.Name, friendID); | ||
604 | else | ||
605 | m_log.WarnFormat("[FRIENDS]: Could not find region {0} in locating {1}", friendSession.RegionID, friendID); | ||
606 | } | ||
607 | } | 543 | } |
608 | } | 544 | } |
609 | 545 | ||
@@ -613,7 +549,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
613 | FriendsService.Delete(exfriendID, agentID.ToString()); | 549 | FriendsService.Delete(exfriendID, agentID.ToString()); |
614 | 550 | ||
615 | // Update local cache | 551 | // Update local cache |
616 | m_Friends[agentID].Friends = FriendsService.GetFriends(agentID); | 552 | UpdateFriendsCache(agentID); |
617 | 553 | ||
618 | client.SendTerminateFriend(exfriendID); | 554 | client.SendTerminateFriend(exfriendID); |
619 | 555 | ||
@@ -625,30 +561,28 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
625 | if (LocalFriendshipTerminated(exfriendID)) | 561 | if (LocalFriendshipTerminated(exfriendID)) |
626 | return; | 562 | return; |
627 | 563 | ||
628 | PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { exfriendID.ToString() }); | 564 | PresenceInfo friendSession = PresenceService.GetAgent(exfriendID); |
629 | if (friendSessions != null && friendSessions.Length > 0) | 565 | if (friendSession != null) |
630 | { | 566 | { |
631 | PresenceInfo friendSession = friendSessions[0]; | 567 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); |
632 | if (friendSession != null) | 568 | m_FriendsSimConnector.FriendshipTerminated(region, agentID, exfriendID); |
633 | { | ||
634 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); | ||
635 | m_FriendsSimConnector.FriendshipTerminated(region, agentID, exfriendID); | ||
636 | } | ||
637 | } | 569 | } |
638 | } | 570 | } |
639 | 571 | ||
640 | private void OnGrantUserRights(IClientAPI remoteClient, UUID requester, UUID target, int rights) | 572 | private void OnGrantUserRights(IClientAPI remoteClient, UUID requester, UUID target, int rights) |
641 | { | 573 | { |
642 | if (!m_Friends.ContainsKey(remoteClient.AgentId)) | 574 | FriendInfo[] friends = GetFriends(remoteClient.AgentId); |
575 | if (friends.Length == 0) | ||
643 | return; | 576 | return; |
644 | 577 | ||
645 | m_log.DebugFormat("[FRIENDS MODULE]: User {0} changing rights to {1} for friend {2}", requester, rights, target); | 578 | m_log.DebugFormat("[FRIENDS MODULE]: User {0} changing rights to {1} for friend {2}", requester, rights, target); |
646 | // Let's find the friend in this user's friend list | 579 | // Let's find the friend in this user's friend list |
647 | UserFriendData fd = m_Friends[remoteClient.AgentId]; | ||
648 | FriendInfo friend = null; | 580 | FriendInfo friend = null; |
649 | foreach (FriendInfo fi in fd.Friends) | 581 | foreach (FriendInfo fi in friends) |
582 | { | ||
650 | if (fi.Friend == target.ToString()) | 583 | if (fi.Friend == target.ToString()) |
651 | friend = fi; | 584 | friend = fi; |
585 | } | ||
652 | 586 | ||
653 | if (friend != null) // Found it | 587 | if (friend != null) // Found it |
654 | { | 588 | { |
@@ -670,17 +604,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
670 | if (LocalGrantRights(requester, target, myFlags, rights)) | 604 | if (LocalGrantRights(requester, target, myFlags, rights)) |
671 | return; | 605 | return; |
672 | 606 | ||
673 | PresenceInfo[] friendSessions = PresenceService.GetAgents(new string[] { target.ToString() }); | 607 | PresenceInfo friendSession = PresenceService.GetAgent(target); |
674 | if (friendSessions != null && friendSessions.Length > 0) | 608 | if (friendSession != null) |
675 | { | 609 | { |
676 | PresenceInfo friendSession = friendSessions[0]; | 610 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); |
677 | if (friendSession != null) | 611 | // TODO: You might want to send the delta to save the lookup |
678 | { | 612 | // on the other end!! |
679 | GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); | 613 | m_FriendsSimConnector.GrantRights(region, requester, target, myFlags, rights); |
680 | // TODO: You might want to send the delta to save the lookup | ||
681 | // on the other end!! | ||
682 | m_FriendsSimConnector.GrantRights(region, requester, target, myFlags, rights); | ||
683 | } | ||
684 | } | 614 | } |
685 | } | 615 | } |
686 | } | 616 | } |
@@ -709,8 +639,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
709 | GridInstantMessage im = new GridInstantMessage(Scene, userID, userName, friendID, | 639 | GridInstantMessage im = new GridInstantMessage(Scene, userID, userName, friendID, |
710 | (byte)OpenMetaverse.InstantMessageDialog.FriendshipAccepted, userID.ToString(), false, Vector3.Zero); | 640 | (byte)OpenMetaverse.InstantMessageDialog.FriendshipAccepted, userID.ToString(), false, Vector3.Zero); |
711 | friendClient.SendInstantMessage(im); | 641 | friendClient.SendInstantMessage(im); |
712 | // update the local cache | 642 | |
713 | m_Friends[friendID].Friends = FriendsService.GetFriends(friendID); | 643 | // Update the local cache |
644 | UpdateFriendsCache(friendID); | ||
645 | |||
714 | // we're done | 646 | // we're done |
715 | return true; | 647 | return true; |
716 | } | 648 | } |
@@ -724,7 +656,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
724 | if (friendClient != null) | 656 | if (friendClient != null) |
725 | { | 657 | { |
726 | // the prospective friend in this sim as root agent | 658 | // the prospective friend in this sim as root agent |
727 | |||
728 | GridInstantMessage im = new GridInstantMessage(Scene, userID, userName, friendID, | 659 | GridInstantMessage im = new GridInstantMessage(Scene, userID, userName, friendID, |
729 | (byte)OpenMetaverse.InstantMessageDialog.FriendshipDeclined, userID.ToString(), false, Vector3.Zero); | 660 | (byte)OpenMetaverse.InstantMessageDialog.FriendshipDeclined, userID.ToString(), false, Vector3.Zero); |
730 | friendClient.SendInstantMessage(im); | 661 | friendClient.SendInstantMessage(im); |
@@ -743,7 +674,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
743 | // the friend in this sim as root agent | 674 | // the friend in this sim as root agent |
744 | friendClient.SendTerminateFriend(exfriendID); | 675 | friendClient.SendTerminateFriend(exfriendID); |
745 | // update local cache | 676 | // update local cache |
746 | m_Friends[exfriendID].Friends = FriendsService.GetFriends(exfriendID); | 677 | UpdateFriendsCache(exfriendID); |
747 | // we're done | 678 | // we're done |
748 | return true; | 679 | return true; |
749 | } | 680 | } |
@@ -772,11 +703,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
772 | 703 | ||
773 | } | 704 | } |
774 | 705 | ||
775 | // update local cache | 706 | // Update local cache |
776 | //m_Friends[friendID].Friends = m_FriendsService.GetFriends(friendID); | 707 | lock (m_Friends) |
777 | foreach (FriendInfo finfo in m_Friends[friendID].Friends) | 708 | { |
778 | if (finfo.Friend == userID.ToString()) | 709 | FriendInfo[] friends = GetFriends(friendID); |
779 | finfo.TheirFlags = rights; | 710 | foreach (FriendInfo finfo in friends) |
711 | { | ||
712 | if (finfo.Friend == userID.ToString()) | ||
713 | finfo.TheirFlags = rights; | ||
714 | } | ||
715 | } | ||
780 | 716 | ||
781 | return true; | 717 | return true; |
782 | } | 718 | } |
@@ -802,7 +738,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
802 | 738 | ||
803 | return false; | 739 | return false; |
804 | } | 740 | } |
741 | |||
805 | #endregion | 742 | #endregion |
806 | 743 | ||
744 | private FriendInfo[] GetFriends(UUID agentID) | ||
745 | { | ||
746 | UserFriendData friendsData; | ||
747 | |||
748 | lock (m_Friends) | ||
749 | { | ||
750 | if (m_Friends.TryGetValue(agentID, out friendsData)) | ||
751 | return friendsData.Friends; | ||
752 | } | ||
753 | |||
754 | return EMPTY_FRIENDS; | ||
755 | } | ||
756 | |||
757 | private void UpdateFriendsCache(UUID agentID) | ||
758 | { | ||
759 | lock (m_Friends) | ||
760 | { | ||
761 | UserFriendData friendsData; | ||
762 | if (m_Friends.TryGetValue(agentID, out friendsData)) | ||
763 | friendsData.Friends = FriendsService.GetFriends(agentID); | ||
764 | } | ||
765 | } | ||
807 | } | 766 | } |
808 | } | 767 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 4b30b0d..5ec64d5 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs | |||
@@ -58,13 +58,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
58 | public void SubscribeToClientEvents(IClientAPI client) | 58 | public void SubscribeToClientEvents(IClientAPI client) |
59 | { | 59 | { |
60 | client.OnGodKickUser += KickUser; | 60 | client.OnGodKickUser += KickUser; |
61 | client.OnRequestGodlikePowers += RequestGodlikePowers; | 61 | client.OnRequestGodlikePowers += RequestGodlikePowers; |
62 | } | 62 | } |
63 | 63 | ||
64 | public void UnsubscribeFromClientEvents(IClientAPI client) | 64 | public void UnsubscribeFromClientEvents(IClientAPI client) |
65 | { | 65 | { |
66 | client.OnGodKickUser -= KickUser; | 66 | client.OnGodKickUser -= KickUser; |
67 | client.OnRequestGodlikePowers -= RequestGodlikePowers; | 67 | client.OnRequestGodlikePowers -= RequestGodlikePowers; |
68 | } | 68 | } |
69 | 69 | ||
70 | public void RequestGodlikePowers( | 70 | public void RequestGodlikePowers( |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index a49faec..a6894ff 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -138,8 +138,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
138 | if (scene.Entities.ContainsKey(toAgentID) && | 138 | if (scene.Entities.ContainsKey(toAgentID) && |
139 | scene.Entities[toAgentID] is ScenePresence) | 139 | scene.Entities[toAgentID] is ScenePresence) |
140 | { | 140 | { |
141 | // m_log.DebugFormat("[INSTANT MESSAGE]: Looking for {0} in {1}", toAgentID.ToString(), scene.RegionInfo.RegionName); | 141 | // m_log.DebugFormat( |
142 | // Local message | 142 | // "[INSTANT MESSAGE]: Looking for root agent {0} in {1}", |
143 | // toAgentID.ToString(), scene.RegionInfo.RegionName); | ||
144 | |||
143 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; | 145 | ScenePresence user = (ScenePresence) scene.Entities[toAgentID]; |
144 | if (!user.IsChildAgent) | 146 | if (!user.IsChildAgent) |
145 | { | 147 | { |
@@ -495,9 +497,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
495 | if (lookupAgent) | 497 | if (lookupAgent) |
496 | { | 498 | { |
497 | // Non-cached user agent lookup. | 499 | // Non-cached user agent lookup. |
498 | PresenceInfo[] presences = PresenceService.GetAgents(new string[] { toAgentID.ToString() }); | 500 | upd = PresenceService.GetAgent(toAgentID); |
499 | if (presences != null && presences.Length > 0) | ||
500 | upd = presences[0]; | ||
501 | 501 | ||
502 | if (upd != null) | 502 | if (upd != null) |
503 | { | 503 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 52342ec..c1df827 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -179,14 +179,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
179 | m_log.DebugFormat( | 179 | m_log.DebugFormat( |
180 | "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", | 180 | "[INVENTORY ARCHIVER]: Successfully loaded {0} assets with {1} failures", |
181 | successfulAssetRestores, failedAssetRestores); | 181 | successfulAssetRestores, failedAssetRestores); |
182 | m_log.InfoFormat("[INVENTORY ARCHIVER]: Successfully loaded {0} items", successfulItemRestores); | 182 | m_log.InfoFormat("[INVENTORY ARCHIVER]: Successfully loaded {0} items", successfulItemRestores); |
183 | 183 | ||
184 | return loadedNodes; | 184 | return loadedNodes; |
185 | } | 185 | } |
186 | finally | 186 | finally |
187 | { | 187 | { |
188 | m_loadStream.Close(); | 188 | m_loadStream.Close(); |
189 | } | 189 | } |
190 | } | 190 | } |
191 | 191 | ||
192 | public void Close() | 192 | public void Close() |
@@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
201 | /// <param name="iarPath">The item archive path to replicate</param> | 201 | /// <param name="iarPath">The item archive path to replicate</param> |
202 | /// <param name="rootDestinationFolder">The root folder for the inventory load</param> | 202 | /// <param name="rootDestinationFolder">The root folder for the inventory load</param> |
203 | /// <param name="resolvedFolders"> | 203 | /// <param name="resolvedFolders"> |
204 | /// The folders that we have resolved so far for a given archive path. | 204 | /// The folders that we have resolved so far for a given archive path. |
205 | /// This method will add more folders if necessary | 205 | /// This method will add more folders if necessary |
206 | /// </param> | 206 | /// </param> |
207 | /// <param name="loadedNodes"> | 207 | /// <param name="loadedNodes"> |
@@ -246,17 +246,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
246 | /// The root folder for the inventory load | 246 | /// The root folder for the inventory load |
247 | /// </param> | 247 | /// </param> |
248 | /// <param name="resolvedFolders"> | 248 | /// <param name="resolvedFolders"> |
249 | /// The folders that we have resolved so far for a given archive path. | 249 | /// The folders that we have resolved so far for a given archive path. |
250 | /// </param> | 250 | /// </param> |
251 | /// <returns> | 251 | /// <returns> |
252 | /// The folder in the user's inventory that matches best the archive path given. If no such folder was found | 252 | /// The folder in the user's inventory that matches best the archive path given. If no such folder was found |
253 | /// then the passed in root destination folder is returned. | 253 | /// then the passed in root destination folder is returned. |
254 | /// </returns> | 254 | /// </returns> |
255 | protected InventoryFolderBase ResolveDestinationFolder( | 255 | protected InventoryFolderBase ResolveDestinationFolder( |
256 | InventoryFolderBase rootDestFolder, | 256 | InventoryFolderBase rootDestFolder, |
257 | ref string archivePath, | 257 | ref string archivePath, |
258 | Dictionary <string, InventoryFolderBase> resolvedFolders) | 258 | Dictionary <string, InventoryFolderBase> resolvedFolders) |
259 | { | 259 | { |
260 | // string originalArchivePath = archivePath; | 260 | // string originalArchivePath = archivePath; |
261 | 261 | ||
262 | while (archivePath.Length > 0) | 262 | while (archivePath.Length > 0) |
@@ -370,7 +370,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
370 | 370 | ||
371 | if (0 == i) | 371 | if (0 == i) |
372 | loadedNodes.Add(destFolder); | 372 | loadedNodes.Add(destFolder); |
373 | } | 373 | } |
374 | } | 374 | } |
375 | 375 | ||
376 | /// <summary> | 376 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 9908018..bae5a7a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -119,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
119 | protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) | 119 | protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids) |
120 | { | 120 | { |
121 | Exception reportedException = null; | 121 | Exception reportedException = null; |
122 | bool succeeded = true; | 122 | bool succeeded = true; |
123 | 123 | ||
124 | try | 124 | try |
125 | { | 125 | { |
@@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
136 | finally | 136 | finally |
137 | { | 137 | { |
138 | m_saveStream.Close(); | 138 | m_saveStream.Close(); |
139 | } | 139 | } |
140 | 140 | ||
141 | m_module.TriggerInventoryArchiveSaved( | 141 | m_module.TriggerInventoryArchiveSaved( |
142 | m_id, succeeded, m_userInfo, m_invPath, m_saveStream, reportedException); | 142 | m_id, succeeded, m_userInfo, m_invPath, m_saveStream, reportedException); |
@@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
270 | { | 270 | { |
271 | // We couldn't find the path indicated | 271 | // We couldn't find the path indicated |
272 | string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); | 272 | string errorMessage = string.Format("Aborted save. Could not find inventory path {0}", m_invPath); |
273 | Exception e = new InventoryArchiverException(errorMessage); | 273 | Exception e = new InventoryArchiverException(errorMessage); |
274 | m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e); | 274 | m_module.TriggerInventoryArchiveSaved(m_id, false, m_userInfo, m_invPath, m_saveStream, e); |
275 | throw e; | 275 | throw e; |
276 | } | 276 | } |
@@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
283 | "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", | 283 | "[INVENTORY ARCHIVER]: Found folder {0} {1} at {2}", |
284 | inventoryFolder.Name, | 284 | inventoryFolder.Name, |
285 | inventoryFolder.ID, | 285 | inventoryFolder.ID, |
286 | m_invPath == String.Empty ? InventoryFolderImpl.PATH_DELIMITER : m_invPath ); | 286 | m_invPath == String.Empty ? InventoryFolderImpl.PATH_DELIMITER : m_invPath); |
287 | 287 | ||
288 | //recurse through all dirs getting dirs and files | 288 | //recurse through all dirs getting dirs and files |
289 | SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !saveFolderContentsOnly); | 289 | SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !saveFolderContentsOnly); |
@@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
301 | //SaveUsers(); | 301 | //SaveUsers(); |
302 | 302 | ||
303 | new AssetsRequest( | 303 | new AssetsRequest( |
304 | new AssetsArchiver(m_archiveWriter), m_assetUuids, m_scene.AssetService, ReceivedAllAssets).Execute(); | 304 | new AssetsArchiver(m_archiveWriter), m_assetUuids, m_scene.AssetService, ReceivedAllAssets).Execute(); |
305 | } | 305 | } |
306 | catch (Exception) | 306 | catch (Exception) |
307 | { | 307 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs index e07e2ca..5fd1a7e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverException.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
33 | /// Signals an inventory archiving problem | 33 | /// Signals an inventory archiving problem |
34 | /// </summary> | 34 | /// </summary> |
35 | public class InventoryArchiverException : Exception | 35 | public class InventoryArchiverException : Exception |
36 | { | 36 | { |
37 | public InventoryArchiverException(string message) : base(message) {} | 37 | public InventoryArchiverException(string message) : base(message) {} |
38 | public InventoryArchiverException(string message, Exception e) : base(message, e) {} | 38 | public InventoryArchiverException(string message, Exception e) : base(message, e) {} |
39 | } | 39 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index f03f2a1..2eaca49 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -91,12 +91,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
91 | 91 | ||
92 | scene.AddCommand( | 92 | scene.AddCommand( |
93 | this, "load iar", | 93 | this, "load iar", |
94 | "load iar <first> <last> <inventory path> <password> [<IAR path>]", | 94 | "load iar <first> <last> <inventory path> <password> [<IAR path>]", |
95 | //"load iar [--merge] <first> <last> <inventory path> <password> [<IAR path>]", | 95 | //"load iar [--merge] <first> <last> <inventory path> <password> [<IAR path>]", |
96 | "Load user inventory archive (IAR).", | 96 | "Load user inventory archive (IAR).", |
97 | //"--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones" | 97 | //"--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones" |
98 | //+ "<first> is user's first name." + Environment.NewLine | 98 | //+ "<first> is user's first name." + Environment.NewLine |
99 | "<first> is user's first name." + Environment.NewLine | 99 | "<first> is user's first name." + Environment.NewLine |
100 | + "<last> is user's last name." + Environment.NewLine | 100 | + "<last> is user's last name." + Environment.NewLine |
101 | + "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine | 101 | + "<inventory path> is the path inside the user's inventory where the IAR should be loaded." + Environment.NewLine |
102 | + "<password> is the user's password." + Environment.NewLine | 102 | + "<password> is the user's password." + Environment.NewLine |
@@ -241,7 +241,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
241 | if (CheckPresence(userInfo.PrincipalID)) | 241 | if (CheckPresence(userInfo.PrincipalID)) |
242 | { | 242 | { |
243 | InventoryArchiveReadRequest request; | 243 | InventoryArchiveReadRequest request; |
244 | bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); | 244 | bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); |
245 | 245 | ||
246 | try | 246 | try |
247 | { | 247 | { |
@@ -286,10 +286,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
286 | if (CheckPresence(userInfo.PrincipalID)) | 286 | if (CheckPresence(userInfo.PrincipalID)) |
287 | { | 287 | { |
288 | InventoryArchiveReadRequest request; | 288 | InventoryArchiveReadRequest request; |
289 | bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); | 289 | bool merge = (options.ContainsKey("merge") ? (bool)options["merge"] : false); |
290 | 290 | ||
291 | try | 291 | try |
292 | { | 292 | { |
293 | request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath, merge); | 293 | request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath, merge); |
294 | } | 294 | } |
295 | catch (EntryPointNotFoundException e) | 295 | catch (EntryPointNotFoundException e) |
@@ -325,20 +325,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
325 | protected void HandleLoadInvConsoleCommand(string module, string[] cmdparams) | 325 | protected void HandleLoadInvConsoleCommand(string module, string[] cmdparams) |
326 | { | 326 | { |
327 | try | 327 | try |
328 | { | 328 | { |
329 | m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); | 329 | m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); |
330 | 330 | ||
331 | Dictionary<string, object> options = new Dictionary<string, object>(); | 331 | Dictionary<string, object> options = new Dictionary<string, object>(); |
332 | OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; }); | 332 | OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; }); |
333 | 333 | ||
334 | List<string> mainParams = optionSet.Parse(cmdparams); | 334 | List<string> mainParams = optionSet.Parse(cmdparams); |
335 | 335 | ||
336 | if (mainParams.Count < 6) | 336 | if (mainParams.Count < 6) |
337 | { | 337 | { |
338 | m_log.Error( | 338 | m_log.Error( |
339 | "[INVENTORY ARCHIVER]: usage is load iar [--merge] <first name> <last name> <inventory path> <user password> [<load file path>]"); | 339 | "[INVENTORY ARCHIVER]: usage is load iar [--merge] <first name> <last name> <inventory path> <user password> [<load file path>]"); |
340 | return; | 340 | return; |
341 | } | 341 | } |
342 | 342 | ||
343 | string firstName = mainParams[2]; | 343 | string firstName = mainParams[2]; |
344 | string lastName = mainParams[3]; | 344 | string lastName = mainParams[3]; |
@@ -353,7 +353,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
353 | if (DearchiveInventory(firstName, lastName, invPath, pass, loadPath, options)) | 353 | if (DearchiveInventory(firstName, lastName, invPath, pass, loadPath, options)) |
354 | m_log.InfoFormat( | 354 | m_log.InfoFormat( |
355 | "[INVENTORY ARCHIVER]: Loaded archive {0} for {1} {2}", | 355 | "[INVENTORY ARCHIVER]: Loaded archive {0} for {1} {2}", |
356 | loadPath, firstName, lastName); | 356 | loadPath, firstName, lastName); |
357 | } | 357 | } |
358 | catch (InventoryArchiverException e) | 358 | catch (InventoryArchiverException e) |
359 | { | 359 | { |
@@ -390,7 +390,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
390 | "[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}", | 390 | "[INVENTORY ARCHIVER]: Saving archive {0} using inventory path {1} for {2} {3}", |
391 | savePath, invPath, firstName, lastName); | 391 | savePath, invPath, firstName, lastName); |
392 | 392 | ||
393 | ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, new Dictionary<string, object>()); | 393 | ArchiveInventory(id, firstName, lastName, invPath, pass, savePath, new Dictionary<string, object>()); |
394 | } | 394 | } |
395 | catch (InventoryArchiverException e) | 395 | catch (InventoryArchiverException e) |
396 | { | 396 | { |
@@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
398 | } | 398 | } |
399 | 399 | ||
400 | lock (m_pendingConsoleSaves) | 400 | lock (m_pendingConsoleSaves) |
401 | m_pendingConsoleSaves.Add(id); | 401 | m_pendingConsoleSaves.Add(id); |
402 | } | 402 | } |
403 | 403 | ||
404 | private void SaveInvConsoleCommandCompleted( | 404 | private void SaveInvConsoleCommandCompleted( |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs index d66a1d0..938886b2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs | |||
@@ -58,18 +58,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
58 | /// <summary> | 58 | /// <summary> |
59 | /// Stream of data representing a common IAR that can be reused in load tests. | 59 | /// Stream of data representing a common IAR that can be reused in load tests. |
60 | /// </summary> | 60 | /// </summary> |
61 | protected MemoryStream m_iarStream; | 61 | protected MemoryStream m_iarStream; |
62 | 62 | ||
63 | protected UserAccount m_ua1 | 63 | protected UserAccount m_ua1 |
64 | = new UserAccount { | 64 | = new UserAccount { |
65 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), | 65 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000555"), |
66 | FirstName = "Mr", | 66 | FirstName = "Mr", |
67 | LastName = "Tiddles" }; | 67 | LastName = "Tiddles" }; |
68 | protected UserAccount m_ua2 | 68 | protected UserAccount m_ua2 |
69 | = new UserAccount { | 69 | = new UserAccount { |
70 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), | 70 | PrincipalID = UUID.Parse("00000000-0000-0000-0000-000000000666"), |
71 | FirstName = "Lord", | 71 | FirstName = "Lord", |
72 | LastName = "Lucan" }; | 72 | LastName = "Lucan" }; |
73 | string m_item1Name = "b.lsl"; | 73 | string m_item1Name = "b.lsl"; |
74 | 74 | ||
75 | private void SaveCompleted( | 75 | private void SaveCompleted( |
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
86 | } | 86 | } |
87 | 87 | ||
88 | protected void ConstructDefaultIarForTestLoad() | 88 | protected void ConstructDefaultIarForTestLoad() |
89 | { | 89 | { |
90 | string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(m_item1Name, UUID.Random()); | 90 | string archiveItemName = InventoryArchiveWriteRequest.CreateArchiveItemName(m_item1Name, UUID.Random()); |
91 | 91 | ||
92 | MemoryStream archiveWriteStream = new MemoryStream(); | 92 | MemoryStream archiveWriteStream = new MemoryStream(); |
@@ -104,7 +104,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
104 | string item1FileName | 104 | string item1FileName |
105 | = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName); | 105 | = string.Format("{0}{1}", ArchiveConstants.INVENTORY_PATH, archiveItemName); |
106 | tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1)); | 106 | tar.WriteFile(item1FileName, UserInventoryItemSerializer.Serialize(item1)); |
107 | tar.Close(); | 107 | tar.Close(); |
108 | m_iarStream = new MemoryStream(archiveWriteStream.ToArray()); | 108 | m_iarStream = new MemoryStream(archiveWriteStream.ToArray()); |
109 | } | 109 | } |
110 | 110 | ||
@@ -341,7 +341,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
341 | // Assert.That(gotObject2File, Is.True, "No object2 file in archive"); | 341 | // Assert.That(gotObject2File, Is.True, "No object2 file in archive"); |
342 | 342 | ||
343 | // TODO: Test presence of more files and contents of files. | 343 | // TODO: Test presence of more files and contents of files. |
344 | } | 344 | } |
345 | 345 | ||
346 | /// <summary> | 346 | /// <summary> |
347 | /// Test that things work when the load path specified starts with a slash | 347 | /// Test that things work when the load path specified starts with a slash |
@@ -349,22 +349,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
349 | [Test] | 349 | [Test] |
350 | public void TestLoadIarPathStartsWithSlash() | 350 | public void TestLoadIarPathStartsWithSlash() |
351 | { | 351 | { |
352 | TestHelper.InMethod(); | 352 | TestHelper.InMethod(); |
353 | // log4net.Config.XmlConfigurator.Configure(); | 353 | // log4net.Config.XmlConfigurator.Configure(); |
354 | 354 | ||
355 | SerialiserModule serialiserModule = new SerialiserModule(); | 355 | SerialiserModule serialiserModule = new SerialiserModule(); |
356 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(true); | 356 | InventoryArchiverModule archiverModule = new InventoryArchiverModule(true); |
357 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 357 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); |
358 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 358 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
359 | 359 | ||
360 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "password"); | 360 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "password"); |
361 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/Objects", "password", m_iarStream); | 361 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/Objects", "password", m_iarStream); |
362 | 362 | ||
363 | InventoryItemBase foundItem1 | 363 | InventoryItemBase foundItem1 |
364 | = InventoryArchiveUtils.FindItemByPath( | 364 | = InventoryArchiveUtils.FindItemByPath( |
365 | scene.InventoryService, m_ua1.PrincipalID, "/Objects/" + m_item1Name); | 365 | scene.InventoryService, m_ua1.PrincipalID, "/Objects/" + m_item1Name); |
366 | 366 | ||
367 | Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()"); | 367 | Assert.That(foundItem1, Is.Not.Null, "Didn't find loaded item 1 in TestLoadIarFolderStartsWithSlash()"); |
368 | } | 368 | } |
369 | 369 | ||
370 | /// <summary> | 370 | /// <summary> |
@@ -376,7 +376,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
376 | [Test] | 376 | [Test] |
377 | public void TestLoadIarV0_1ExistingUsers() | 377 | public void TestLoadIarV0_1ExistingUsers() |
378 | { | 378 | { |
379 | TestHelper.InMethod(); | 379 | TestHelper.InMethod(); |
380 | //log4net.Config.XmlConfigurator.Configure(); | 380 | //log4net.Config.XmlConfigurator.Configure(); |
381 | 381 | ||
382 | SerialiserModule serialiserModule = new SerialiserModule(); | 382 | SerialiserModule serialiserModule = new SerialiserModule(); |
@@ -386,9 +386,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
386 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 386 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); |
387 | 387 | ||
388 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 388 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
389 | 389 | ||
390 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); | 390 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua1, "meowfood"); |
391 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); | 391 | UserProfileTestUtils.CreateUserWithInventory(scene, m_ua2, "hampshire"); |
392 | 392 | ||
393 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream); | 393 | archiverModule.DearchiveInventory(m_ua1.FirstName, m_ua1.LastName, "/", "meowfood", m_iarStream); |
394 | 394 | ||
@@ -450,7 +450,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
450 | string userFirstName = "Jock"; | 450 | string userFirstName = "Jock"; |
451 | string userLastName = "Stirrup"; | 451 | string userLastName = "Stirrup"; |
452 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); | 452 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); |
453 | UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood"); | 453 | UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, "meowfood"); |
454 | 454 | ||
455 | // Create asset | 455 | // Create asset |
456 | SceneObjectGroup object1; | 456 | SceneObjectGroup object1; |
@@ -524,7 +524,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
524 | [Test] | 524 | [Test] |
525 | public void TestLoadIarV0_1AbsentUsers() | 525 | public void TestLoadIarV0_1AbsentUsers() |
526 | { | 526 | { |
527 | TestHelper.InMethod(); | 527 | TestHelper.InMethod(); |
528 | //log4net.Config.XmlConfigurator.Configure(); | 528 | //log4net.Config.XmlConfigurator.Configure(); |
529 | 529 | ||
530 | string userFirstName = "Charlie"; | 530 | string userFirstName = "Charlie"; |
@@ -562,7 +562,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
562 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); | 562 | Scene scene = SceneSetupHelpers.SetupScene("inventory"); |
563 | 563 | ||
564 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); | 564 | SceneSetupHelpers.SetupSceneModules(scene, serialiserModule, archiverModule); |
565 | UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userUuid, "meowfood"); | 565 | UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userUuid, "meowfood"); |
566 | 566 | ||
567 | archiverModule.DearchiveInventory(userFirstName, userLastName, "/", "meowfood", archiveReadStream); | 567 | archiverModule.DearchiveInventory(userFirstName, userLastName, "/", "meowfood", archiveReadStream); |
568 | 568 | ||
@@ -680,8 +680,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
680 | string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random()); | 680 | string folder2aArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2aName, UUID.Random()); |
681 | string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random()); | 681 | string folder2bArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2bName, UUID.Random()); |
682 | 682 | ||
683 | string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName }); | 683 | string iarPath1 = string.Join("", new string[] { folder1ArchiveName, folder2aArchiveName }); |
684 | string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName }); | 684 | string iarPath2 = string.Join("", new string[] { folder1ArchiveName, folder2bArchiveName }); |
685 | 685 | ||
686 | { | 686 | { |
687 | // Test replication of path1 | 687 | // Test replication of path1 |
@@ -694,7 +694,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
694 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); | 694 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, ua1.PrincipalID, folder1Name); |
695 | Assert.That(folder1Candidates.Count, Is.EqualTo(1)); | 695 | Assert.That(folder1Candidates.Count, Is.EqualTo(1)); |
696 | 696 | ||
697 | InventoryFolderBase folder1 = folder1Candidates[0]; | 697 | InventoryFolderBase folder1 = folder1Candidates[0]; |
698 | List<InventoryFolderBase> folder2aCandidates | 698 | List<InventoryFolderBase> folder2aCandidates |
699 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); | 699 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); |
700 | Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); | 700 | Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); |
@@ -715,11 +715,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
715 | 715 | ||
716 | List<InventoryFolderBase> folder2aCandidates | 716 | List<InventoryFolderBase> folder2aCandidates |
717 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); | 717 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2aName); |
718 | Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); | 718 | Assert.That(folder2aCandidates.Count, Is.EqualTo(1)); |
719 | 719 | ||
720 | List<InventoryFolderBase> folder2bCandidates | 720 | List<InventoryFolderBase> folder2bCandidates |
721 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2bName); | 721 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1, folder2bName); |
722 | Assert.That(folder2bCandidates.Count, Is.EqualTo(1)); | 722 | Assert.That(folder2bCandidates.Count, Is.EqualTo(1)); |
723 | } | 723 | } |
724 | } | 724 | } |
725 | 725 | ||
@@ -741,7 +741,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
741 | 741 | ||
742 | InventoryFolderBase folder1 | 742 | InventoryFolderBase folder1 |
743 | = UserInventoryTestUtils.CreateInventoryFolder( | 743 | = UserInventoryTestUtils.CreateInventoryFolder( |
744 | scene.InventoryService, ua1.PrincipalID, folder1ExistingName); | 744 | scene.InventoryService, ua1.PrincipalID, folder1ExistingName); |
745 | 745 | ||
746 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); | 746 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); |
747 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); | 747 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); |
@@ -772,7 +772,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
772 | List<InventoryFolderBase> folder2PostCandidates | 772 | List<InventoryFolderBase> folder2PostCandidates |
773 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b"); | 773 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1Post, "b"); |
774 | Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); | 774 | Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); |
775 | } | 775 | } |
776 | 776 | ||
777 | /// <summary> | 777 | /// <summary> |
778 | /// Test replication of a partly existing archive path to the user's inventory. This should create | 778 | /// Test replication of a partly existing archive path to the user's inventory. This should create |
@@ -792,7 +792,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
792 | 792 | ||
793 | InventoryFolderBase folder1 | 793 | InventoryFolderBase folder1 |
794 | = UserInventoryTestUtils.CreateInventoryFolder( | 794 | = UserInventoryTestUtils.CreateInventoryFolder( |
795 | scene.InventoryService, ua1.PrincipalID, folder1ExistingName); | 795 | scene.InventoryService, ua1.PrincipalID, folder1ExistingName); |
796 | 796 | ||
797 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); | 797 | string folder1ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder1ExistingName, UUID.Random()); |
798 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); | 798 | string folder2ArchiveName = InventoryArchiveWriteRequest.CreateArchiveFolderName(folder2Name, UUID.Random()); |
@@ -812,6 +812,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests | |||
812 | List<InventoryFolderBase> folder2PostCandidates | 812 | List<InventoryFolderBase> folder2PostCandidates |
813 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1PostCandidates[0], "b"); | 813 | = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, folder1PostCandidates[0], "b"); |
814 | Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); | 814 | Assert.That(folder2PostCandidates.Count, Is.EqualTo(1)); |
815 | } | 815 | } |
816 | } | 816 | } |
817 | } \ No newline at end of file | 817 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs index 35b70de..05fe3ee 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs | |||
@@ -138,7 +138,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
138 | { | 138 | { |
139 | if (!queues.ContainsKey(agentId)) | 139 | if (!queues.ContainsKey(agentId)) |
140 | { | 140 | { |
141 | /* | 141 | /* |
142 | m_log.DebugFormat( | 142 | m_log.DebugFormat( |
143 | "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", | 143 | "[EVENTQUEUE]: Adding new queue for agent {0} in region {1}", |
144 | agentId, m_scene.RegionInfo.RegionName); | 144 | agentId, m_scene.RegionInfo.RegionName); |
@@ -701,7 +701,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
701 | 701 | ||
702 | public void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID) | 702 | public void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID) |
703 | { | 703 | { |
704 | OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage); | 704 | OSD item = EventQueueHelper.ParcelProperties(parcelPropertiesMessage); |
705 | Enqueue(item, avatarID); | 705 | Enqueue(item, avatarID); |
706 | } | 706 | } |
707 | 707 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs index b62df18..0d7d16a 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
55 | } | 55 | } |
56 | 56 | ||
57 | // private static byte[] uintToByteArray(uint uIntValue) | 57 | // private static byte[] uintToByteArray(uint uIntValue) |
58 | // { | 58 | // { |
59 | // byte[] result = new byte[4]; | 59 | // byte[] result = new byte[4]; |
60 | // Utils.UIntToBytesBig(uIntValue, result, 0); | 60 | // Utils.UIntToBytesBig(uIntValue, result, 0); |
61 | // return result; | 61 | // return result; |
@@ -386,14 +386,14 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
386 | return placesReply; | 386 | return placesReply; |
387 | } | 387 | } |
388 | 388 | ||
389 | public static OSD ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage) | 389 | public static OSD ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage) |
390 | { | 390 | { |
391 | OSDMap message = new OSDMap(); | 391 | OSDMap message = new OSDMap(); |
392 | message.Add("message", OSD.FromString("ParcelProperties")); | 392 | message.Add("message", OSD.FromString("ParcelProperties")); |
393 | OSD message_body = parcelPropertiesMessage.Serialize(); | 393 | OSD message_body = parcelPropertiesMessage.Serialize(); |
394 | message.Add("body", message_body); | 394 | message.Add("body", message_body); |
395 | return message; | 395 | return message; |
396 | } | 396 | } |
397 | 397 | ||
398 | } | 398 | } |
399 | } | 399 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 37f6ea0..a2ba498 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -629,7 +629,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
629 | rootPart.Name = item.Name; | 629 | rootPart.Name = item.Name; |
630 | rootPart.Description = item.Description; | 630 | rootPart.Description = item.Description; |
631 | 631 | ||
632 | List<SceneObjectPart> partList = null; | 632 | List<SceneObjectPart> partList = null; |
633 | lock (group.Children) | 633 | lock (group.Children) |
634 | partList = new List<SceneObjectPart>(group.Children.Values); | 634 | partList = new List<SceneObjectPart>(group.Children.Values); |
635 | 635 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs index b75a700..a75ff62 100644 --- a/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Statistics/Logging/BinaryLoggingModule.cs | |||
@@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
49 | protected bool m_collectStats; | 49 | protected bool m_collectStats; |
50 | protected Scene m_scene = null; | 50 | protected Scene m_scene = null; |
51 | 51 | ||
52 | public string Name { get { return "Binary Statistics Logging Module"; } } | 52 | public string Name { get { return "Binary Statistics Logging Module"; } } |
53 | public Type ReplaceableInterface { get { return null; } } | 53 | public Type ReplaceableInterface { get { return null; } } |
54 | 54 | ||
55 | public void Initialise(IConfigSource source) | 55 | public void Initialise(IConfigSource source) |
56 | { | 56 | { |
@@ -79,7 +79,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
79 | catch | 79 | catch |
80 | { | 80 | { |
81 | // if it doesn't work, we don't collect anything | 81 | // if it doesn't work, we don't collect anything |
82 | } | 82 | } |
83 | } | 83 | } |
84 | 84 | ||
85 | public void AddRegion(Scene scene) | 85 | public void AddRegion(Scene scene) |
@@ -94,12 +94,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
94 | public void RegionLoaded(Scene scene) | 94 | public void RegionLoaded(Scene scene) |
95 | { | 95 | { |
96 | if (m_collectStats) | 96 | if (m_collectStats) |
97 | m_scene.StatsReporter.OnSendStatsResult += LogSimStats; | 97 | m_scene.StatsReporter.OnSendStatsResult += LogSimStats; |
98 | } | 98 | } |
99 | 99 | ||
100 | public void Close() | 100 | public void Close() |
101 | { | 101 | { |
102 | } | 102 | } |
103 | 103 | ||
104 | public class StatLogger | 104 | public class StatLogger |
105 | { | 105 | { |
@@ -164,6 +164,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
164 | } | 164 | } |
165 | } | 165 | } |
166 | return; | 166 | return; |
167 | } | 167 | } |
168 | } | 168 | } |
169 | } | 169 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs index 235914a..2f96bcb 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Hypergrid/HypergridServiceInConnectorModule.cs | |||
@@ -115,6 +115,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Hypergrid | |||
115 | m_HypergridHandler = new GatekeeperServiceInConnector(m_Config, MainServer.Instance, simService); | 115 | m_HypergridHandler = new GatekeeperServiceInConnector(m_Config, MainServer.Instance, simService); |
116 | 116 | ||
117 | new UserAgentServerConnector(m_Config, MainServer.Instance); | 117 | new UserAgentServerConnector(m_Config, MainServer.Instance); |
118 | new HeloServiceInConnector(m_Config, MainServer.Instance, "HeloService"); | ||
118 | } | 119 | } |
119 | scene.RegisterModuleInterface<IGatekeeperService>(m_HypergridHandler.GateKeeper); | 120 | scene.RegisterModuleInterface<IGatekeeperService>(m_HypergridHandler.GateKeeper); |
120 | } | 121 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index 5b4fecb..39410b5 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -37,6 +37,7 @@ using OpenSim.Region.Framework.Interfaces; | |||
37 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
38 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
39 | using OpenSim.Services.Connectors; | 39 | using OpenSim.Services.Connectors; |
40 | using OpenSim.Services.Connectors.SimianGrid; | ||
40 | using OpenMetaverse; | 41 | using OpenMetaverse; |
41 | 42 | ||
42 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | 43 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory |
@@ -538,12 +539,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
538 | } | 539 | } |
539 | else | 540 | else |
540 | { | 541 | { |
541 | // We're instantiating this class explicitly, but this won't | 542 | // Still not as flexible as I would like this to be, |
542 | // work in general, because the remote grid may be running | 543 | // but good enough for now |
543 | // an inventory server that has a different protocol. | 544 | string connectorType = new HeloServicesConnector(url).Helo(); |
544 | // Eventually we will want a piece of protocol asking | 545 | m_log.DebugFormat("[HG INVENTORY SERVICE]: HELO returned {0}", connectorType); |
545 | // the remote server about its kind. Definitely cool thing to do! | 546 | if (connectorType == "opensim-simian") |
546 | connector = new RemoteXInventoryServicesConnector(url); | 547 | connector = new SimianInventoryServiceConnector(url); |
548 | else | ||
549 | connector = new RemoteXInventoryServicesConnector(url); | ||
547 | m_connectors.Add(url, connector); | 550 | m_connectors.Add(url, connector); |
548 | } | 551 | } |
549 | } | 552 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs index 4e2f602..2322d7c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/InventoryCache.cs | |||
@@ -185,7 +185,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
185 | return folders[type]; | 185 | return folders[type]; |
186 | } | 186 | } |
187 | 187 | ||
188 | m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID); | 188 | m_log.WarnFormat("[INVENTORY CACHE]: Could not find folder for system type {0} for {1}", type, userID); |
189 | 189 | ||
190 | return null; | 190 | return null; |
191 | } | 191 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index cbd9e05..ab6be50 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
220 | { | 220 | { |
221 | // m_log.DebugFormat( | 221 | // m_log.DebugFormat( |
222 | // "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", | 222 | // "[LOCAL INVENTORY SERVICES CONNECTOR]: Adding inventory item {0} to user {1} folder {2}", |
223 | // item.Name, item.Owner, item.Folder); | 223 | // item.Name, item.Owner, item.Folder); |
224 | 224 | ||
225 | return m_InventoryService.AddItem(item); | 225 | return m_InventoryService.AddItem(item); |
226 | } | 226 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index 4ab6947..34205e3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs | |||
@@ -227,7 +227,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
227 | public bool AddItem(InventoryItemBase item) | 227 | public bool AddItem(InventoryItemBase item) |
228 | { | 228 | { |
229 | if (item == null) | 229 | if (item == null) |
230 | return false; | 230 | return false; |
231 | 231 | ||
232 | return m_RemoteConnector.AddItem(item); | 232 | return m_RemoteConnector.AddItem(item); |
233 | } | 233 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs index fb2edb9..64788db 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/UserAccountCache.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
36 | { | 36 | { |
37 | public class UserAccountCache | 37 | public class UserAccountCache |
38 | { | 38 | { |
39 | private const double CACHE_EXPIRATION_SECONDS = 120.0; | ||
40 | |||
39 | private static readonly ILog m_log = | 41 | private static readonly ILog m_log = |
40 | LogManager.GetLogger( | 42 | LogManager.GetLogger( |
41 | MethodBase.GetCurrentMethod().DeclaringType); | 43 | MethodBase.GetCurrentMethod().DeclaringType); |
@@ -51,9 +53,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
51 | public void Cache(UUID userID, UserAccount account) | 53 | public void Cache(UUID userID, UserAccount account) |
52 | { | 54 | { |
53 | // Cache even null accounts | 55 | // Cache even null accounts |
54 | m_UUIDCache.AddOrUpdate(userID, account, DateTime.Now + TimeSpan.FromMinutes(2.0d)); | 56 | m_UUIDCache.AddOrUpdate(userID, account, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); |
55 | if (account != null) | 57 | if (account != null) |
56 | m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromMinutes(2.0d)); | 58 | m_NameCache.AddOrUpdate(account.Name, account.PrincipalID, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); |
57 | 59 | ||
58 | // m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); | 60 | // m_log.DebugFormat("[USER CACHE]: cached user {0}", userID); |
59 | } | 61 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs index ddc3dd7..c72acc3 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs | |||
@@ -33,7 +33,7 @@ using OpenSim.Framework.Serialization; | |||
33 | using OpenSim.Region.Framework.Scenes; | 33 | using OpenSim.Region.Framework.Scenes; |
34 | 34 | ||
35 | namespace OpenSim.Region.CoreModules.World.Archiver | 35 | namespace OpenSim.Region.CoreModules.World.Archiver |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Helper methods for archive manipulation | 38 | /// Helper methods for archive manipulation |
39 | /// </summary> | 39 | /// </summary> |
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
50 | public static string CreateObjectFilename(SceneObjectGroup sog) | 50 | public static string CreateObjectFilename(SceneObjectGroup sog) |
51 | { | 51 | { |
52 | return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition); | 52 | return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition); |
53 | } | 53 | } |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Create the path used to store an object in an OpenSim Archive. | 56 | /// Create the path used to store an object in an OpenSim Archive. |
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
62 | public static string CreateObjectPath(SceneObjectGroup sog) | 62 | public static string CreateObjectPath(SceneObjectGroup sog) |
63 | { | 63 | { |
64 | return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition); | 64 | return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition); |
65 | } | 65 | } |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// Resolve path to a working FileStream | 68 | /// Resolve path to a working FileStream |
@@ -123,6 +123,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
123 | 123 | ||
124 | // return new BufferedStream(file, (int) response.ContentLength); | 124 | // return new BufferedStream(file, (int) response.ContentLength); |
125 | return new BufferedStream(file, 1000000); | 125 | return new BufferedStream(file, 1000000); |
126 | } | 126 | } |
127 | } | 127 | } |
128 | } \ No newline at end of file | 128 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index b25636f..283b33b 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
102 | { | 102 | { |
103 | Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); | 103 | Dictionary<UUID, AssetType> assetUuids = new Dictionary<UUID, AssetType>(); |
104 | 104 | ||
105 | List<EntityBase> entities = m_scene.GetEntities(); | 105 | EntityBase[] entities = m_scene.GetEntities(); |
106 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); | 106 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); |
107 | 107 | ||
108 | /* | 108 | /* |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 58698ee..3342164 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | |||
@@ -48,6 +48,7 @@ using OpenSim.Tests.Common.Setup; | |||
48 | using ArchiveConstants = OpenSim.Framework.Serialization.ArchiveConstants; | 48 | using ArchiveConstants = OpenSim.Framework.Serialization.ArchiveConstants; |
49 | using TarArchiveReader = OpenSim.Framework.Serialization.TarArchiveReader; | 49 | using TarArchiveReader = OpenSim.Framework.Serialization.TarArchiveReader; |
50 | using TarArchiveWriter = OpenSim.Framework.Serialization.TarArchiveWriter; | 50 | using TarArchiveWriter = OpenSim.Framework.Serialization.TarArchiveWriter; |
51 | using RegionSettings = OpenSim.Framework.RegionSettings; | ||
51 | 52 | ||
52 | namespace OpenSim.Region.CoreModules.World.Archiver.Tests | 53 | namespace OpenSim.Region.CoreModules.World.Archiver.Tests |
53 | { | 54 | { |
@@ -135,7 +136,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
135 | 136 | ||
136 | SceneObjectPart part2 = CreateSceneObjectPart2(); | 137 | SceneObjectPart part2 = CreateSceneObjectPart2(); |
137 | 138 | ||
138 | AssetNotecard nc = new AssetNotecard("Hello World!"); | 139 | AssetNotecard nc = new AssetNotecard(); |
140 | nc.BodyText = "Hello World!"; | ||
141 | nc.Encode(); | ||
139 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); | 142 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); |
140 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); | 143 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); |
141 | AssetBase ncAsset | 144 | AssetBase ncAsset |
@@ -215,7 +218,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests | |||
215 | public void TestLoadOarV0_2() | 218 | public void TestLoadOarV0_2() |
216 | { | 219 | { |
217 | TestHelper.InMethod(); | 220 | TestHelper.InMethod(); |
218 | //log4net.Config.XmlConfigurator.Configure(); | 221 | // log4net.Config.XmlConfigurator.Configure(); |
219 | 222 | ||
220 | MemoryStream archiveWriteStream = new MemoryStream(); | 223 | MemoryStream archiveWriteStream = new MemoryStream(); |
221 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); | 224 | TarArchiveWriter tar = new TarArchiveWriter(archiveWriteStream); |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index f62ec1b..5bd72ee 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -72,12 +72,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
72 | #pragma warning restore 0429 | 72 | #pragma warning restore 0429 |
73 | 73 | ||
74 | /// <value> | 74 | /// <value> |
75 | /// Local land ids at specified region co-ordinates (region size / 4) | 75 | /// Local land ids at specified region co-ordinates (region size / 4) |
76 | /// </value> | 76 | /// </value> |
77 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; | 77 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; |
78 | 78 | ||
79 | /// <value> | 79 | /// <value> |
80 | /// Land objects keyed by local id | 80 | /// Land objects keyed by local id |
81 | /// </value> | 81 | /// </value> |
82 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); | 82 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); |
83 | 83 | ||
@@ -94,8 +94,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
94 | 94 | ||
95 | #region INonSharedRegionModule Members | 95 | #region INonSharedRegionModule Members |
96 | 96 | ||
97 | public Type ReplaceableInterface | 97 | public Type ReplaceableInterface |
98 | { | 98 | { |
99 | get { return null; } | 99 | get { return null; } |
100 | } | 100 | } |
101 | 101 | ||
@@ -200,7 +200,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
200 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 200 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); |
201 | forcedPosition = null; | 201 | forcedPosition = null; |
202 | } | 202 | } |
203 | //if we are far away, teleport | 203 | //if we are far away, teleport |
204 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) | 204 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) |
205 | { | 205 | { |
206 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 206 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); |
@@ -329,8 +329,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
329 | } | 329 | } |
330 | } | 330 | } |
331 | 331 | ||
332 | |||
333 | |||
334 | private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) | 332 | private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) |
335 | { | 333 | { |
336 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; | 334 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; |
@@ -344,7 +342,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
344 | { | 342 | { |
345 | avatar.ControllingClient.SendAlertMessage( | 343 | avatar.ControllingClient.SendAlertMessage( |
346 | "You are not allowed on this parcel because the land owner has restricted access."); | 344 | "You are not allowed on this parcel because the land owner has restricted access."); |
347 | |||
348 | } | 345 | } |
349 | 346 | ||
350 | public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) | 347 | public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) |
@@ -456,7 +453,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
456 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && | 453 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && |
457 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) | 454 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) |
458 | { | 455 | { |
459 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, | 456 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, |
460 | m_scene.RegionInfo.RegionID); | 457 | m_scene.RegionInfo.RegionID); |
461 | //They are going under the safety line! | 458 | //They are going under the safety line! |
462 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) | 459 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) |
@@ -660,7 +657,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
660 | 657 | ||
661 | if (x_float > Constants.RegionSize || x_float < 0 || y_float > Constants.RegionSize || y_float < 0) | 658 | if (x_float > Constants.RegionSize || x_float < 0 || y_float > Constants.RegionSize || y_float < 0) |
662 | return null; | 659 | return null; |
663 | 660 | ||
664 | try | 661 | try |
665 | { | 662 | { |
666 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); | 663 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); |
@@ -675,7 +672,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
675 | { | 672 | { |
676 | return null; | 673 | return null; |
677 | } | 674 | } |
678 | 675 | ||
679 | lock (m_landList) | 676 | lock (m_landList) |
680 | { | 677 | { |
681 | // Corner case. If an autoreturn happens during sim startup | 678 | // Corner case. If an autoreturn happens during sim startup |
@@ -695,7 +692,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
695 | // they happen every time at border crossings | 692 | // they happen every time at border crossings |
696 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); | 693 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); |
697 | } | 694 | } |
698 | 695 | ||
699 | lock (m_landIDList) | 696 | lock (m_landIDList) |
700 | { | 697 | { |
701 | try | 698 | try |
@@ -749,7 +746,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
749 | 746 | ||
750 | public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) | 747 | public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) |
751 | { | 748 | { |
752 | |||
753 | lock (m_landList) | 749 | lock (m_landList) |
754 | { | 750 | { |
755 | foreach (LandObject p in m_landList.Values) | 751 | foreach (LandObject p in m_landList.Values) |
@@ -802,7 +798,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
802 | public void EventManagerOnParcelPrimCountUpdate() | 798 | public void EventManagerOnParcelPrimCountUpdate() |
803 | { | 799 | { |
804 | ResetAllLandPrimCounts(); | 800 | ResetAllLandPrimCounts(); |
805 | foreach (EntityBase obj in m_scene.Entities) | 801 | EntityBase[] entities = m_scene.Entities.GetEntities(); |
802 | foreach (EntityBase obj in entities) | ||
806 | { | 803 | { |
807 | if (obj != null) | 804 | if (obj != null) |
808 | { | 805 | { |
@@ -943,7 +940,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
943 | return; | 940 | return; |
944 | } | 941 | } |
945 | } | 942 | } |
946 | 943 | ||
947 | lock (m_landList) | 944 | lock (m_landList) |
948 | { | 945 | { |
949 | foreach (ILandObject slaveLandObject in selectedLandObjects) | 946 | foreach (ILandObject slaveLandObject in selectedLandObjects) |
@@ -1089,7 +1086,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1089 | temp.Add(currentParcel); | 1086 | temp.Add(currentParcel); |
1090 | } | 1087 | } |
1091 | } | 1088 | } |
1092 | |||
1093 | } | 1089 | } |
1094 | } | 1090 | } |
1095 | 1091 | ||
@@ -1132,7 +1128,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1132 | join(west, south, east, north, remote_client.AgentId); | 1128 | join(west, south, east, north, remote_client.AgentId); |
1133 | } | 1129 | } |
1134 | 1130 | ||
1135 | public void ClientOnParcelSelectObjects(int local_id, int request_type, | 1131 | public void ClientOnParcelSelectObjects(int local_id, int request_type, |
1136 | List<UUID> returnIDs, IClientAPI remote_client) | 1132 | List<UUID> returnIDs, IClientAPI remote_client) |
1137 | { | 1133 | { |
1138 | m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client); | 1134 | m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client); |
@@ -1382,31 +1378,31 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1382 | { | 1378 | { |
1383 | return RemoteParcelRequest(request, path, param, agentID, caps); | 1379 | return RemoteParcelRequest(request, path, param, agentID, caps); |
1384 | })); | 1380 | })); |
1385 | UUID parcelCapID = UUID.Random(); | 1381 | UUID parcelCapID = UUID.Random(); |
1386 | caps.RegisterHandler("ParcelPropertiesUpdate", | 1382 | caps.RegisterHandler("ParcelPropertiesUpdate", |
1387 | new RestStreamHandler("POST", "/CAPS/" + parcelCapID, | 1383 | new RestStreamHandler("POST", "/CAPS/" + parcelCapID, |
1388 | delegate(string request, string path, string param, | 1384 | delegate(string request, string path, string param, |
1389 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 1385 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
1390 | { | 1386 | { |
1391 | return ProcessPropertiesUpdate(request, path, param, agentID, caps); | 1387 | return ProcessPropertiesUpdate(request, path, param, agentID, caps); |
1392 | })); | 1388 | })); |
1393 | } | 1389 | } |
1394 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) | 1390 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) |
1395 | { | 1391 | { |
1396 | IClientAPI client; | 1392 | IClientAPI client; |
1397 | if ( ! m_scene.TryGetClient(agentID, out client) ) { | 1393 | if (! m_scene.TryGetClient(agentID, out client)) { |
1398 | m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString() ); | 1394 | m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString()); |
1399 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); | 1395 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); |
1400 | } | 1396 | } |
1401 | 1397 | ||
1402 | ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); | 1398 | ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); |
1403 | OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request); | 1399 | OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request); |
1404 | 1400 | ||
1405 | properties.Deserialize(args); | 1401 | properties.Deserialize(args); |
1406 | 1402 | ||
1407 | LandUpdateArgs land_update = new LandUpdateArgs(); | 1403 | LandUpdateArgs land_update = new LandUpdateArgs(); |
1408 | int parcelID = properties.LocalID; | 1404 | int parcelID = properties.LocalID; |
1409 | land_update.AuthBuyerID = properties.AuthBuyerID; | 1405 | land_update.AuthBuyerID = properties.AuthBuyerID; |
1410 | land_update.Category = properties.Category; | 1406 | land_update.Category = properties.Category; |
1411 | land_update.Desc = properties.Desc; | 1407 | land_update.Desc = properties.Desc; |
1412 | land_update.GroupID = properties.GroupID; | 1408 | land_update.GroupID = properties.GroupID; |
@@ -1423,15 +1419,15 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1423 | land_update.SnapshotID = properties.SnapshotID; | 1419 | land_update.SnapshotID = properties.SnapshotID; |
1424 | land_update.UserLocation = properties.UserLocation; | 1420 | land_update.UserLocation = properties.UserLocation; |
1425 | land_update.UserLookAt = properties.UserLookAt; | 1421 | land_update.UserLookAt = properties.UserLookAt; |
1426 | land_update.MediaDescription = properties.MediaDesc; | 1422 | land_update.MediaDescription = properties.MediaDesc; |
1427 | land_update.MediaType = properties.MediaType; | 1423 | land_update.MediaType = properties.MediaType; |
1428 | land_update.MediaWidth = properties.MediaWidth; | 1424 | land_update.MediaWidth = properties.MediaWidth; |
1429 | land_update.MediaHeight = properties.MediaHeight; | 1425 | land_update.MediaHeight = properties.MediaHeight; |
1430 | land_update.MediaLoop = properties.MediaLoop; | 1426 | land_update.MediaLoop = properties.MediaLoop; |
1431 | land_update.ObscureMusic = properties.ObscureMusic; | 1427 | land_update.ObscureMusic = properties.ObscureMusic; |
1432 | land_update.ObscureMedia = properties.ObscureMedia; | 1428 | land_update.ObscureMedia = properties.ObscureMedia; |
1433 | 1429 | ||
1434 | ILandObject land; | 1430 | ILandObject land; |
1435 | lock (m_landList) | 1431 | lock (m_landList) |
1436 | { | 1432 | { |
1437 | m_landList.TryGetValue(parcelID, out land); | 1433 | m_landList.TryGetValue(parcelID, out land); |
@@ -1439,15 +1435,15 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1439 | 1435 | ||
1440 | if (land != null) | 1436 | if (land != null) |
1441 | { | 1437 | { |
1442 | land.UpdateLandProperties(land_update, client); | 1438 | land.UpdateLandProperties(land_update, client); |
1443 | m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); | 1439 | m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); |
1444 | } | 1440 | } |
1445 | else | 1441 | else |
1446 | { | 1442 | { |
1447 | m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); | 1443 | m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); |
1448 | } | 1444 | } |
1449 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); | 1445 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); |
1450 | } | 1446 | } |
1451 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the | 1447 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the |
1452 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. | 1448 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. |
1453 | // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x | 1449 | // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x |
@@ -1524,19 +1520,19 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1524 | if (parcelID == UUID.Zero) | 1520 | if (parcelID == UUID.Zero) |
1525 | return; | 1521 | return; |
1526 | 1522 | ||
1527 | ExtendedLandData data = | 1523 | ExtendedLandData data = |
1528 | (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), | 1524 | (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), |
1529 | delegate(string id) | 1525 | delegate(string id) |
1530 | { | 1526 | { |
1531 | UUID parcel = UUID.Zero; | 1527 | UUID parcel = UUID.Zero; |
1532 | UUID.TryParse(id, out parcel); | 1528 | UUID.TryParse(id, out parcel); |
1533 | // assume we've got the parcelID we just computed in RemoteParcelRequest | 1529 | // assume we've got the parcelID we just computed in RemoteParcelRequest |
1534 | ExtendedLandData extLandData = new ExtendedLandData(); | 1530 | ExtendedLandData extLandData = new ExtendedLandData(); |
1535 | Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, | 1531 | Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, |
1536 | out extLandData.X, out extLandData.Y); | 1532 | out extLandData.X, out extLandData.Y); |
1537 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", | 1533 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", |
1538 | extLandData.RegionHandle, extLandData.X, extLandData.Y); | 1534 | extLandData.RegionHandle, extLandData.X, extLandData.Y); |
1539 | 1535 | ||
1540 | // for this region or for somewhere else? | 1536 | // for this region or for somewhere else? |
1541 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) | 1537 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) |
1542 | { | 1538 | { |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 1b2cabb..bd1dd66 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -229,13 +229,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
229 | newData.SnapshotID = args.SnapshotID; | 229 | newData.SnapshotID = args.SnapshotID; |
230 | newData.UserLocation = args.UserLocation; | 230 | newData.UserLocation = args.UserLocation; |
231 | newData.UserLookAt = args.UserLookAt; | 231 | newData.UserLookAt = args.UserLookAt; |
232 | newData.MediaType = args.MediaType; | 232 | newData.MediaType = args.MediaType; |
233 | newData.MediaDescription = args.MediaDescription; | 233 | newData.MediaDescription = args.MediaDescription; |
234 | newData.MediaWidth = args.MediaWidth; | 234 | newData.MediaWidth = args.MediaWidth; |
235 | newData.MediaHeight = args.MediaHeight; | 235 | newData.MediaHeight = args.MediaHeight; |
236 | newData.MediaLoop = args.MediaLoop; | 236 | newData.MediaLoop = args.MediaLoop; |
237 | newData.ObscureMusic = args.ObscureMusic; | 237 | newData.ObscureMusic = args.ObscureMusic; |
238 | newData.ObscureMedia = args.ObscureMedia; | 238 | newData.ObscureMedia = args.ObscureMedia; |
239 | 239 | ||
240 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); | 240 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); |
241 | 241 | ||
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 82ad109..7c5d044 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | |||
@@ -54,11 +54,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
54 | { | 54 | { |
55 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] | 55 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] |
56 | public class MoapModule : INonSharedRegionModule, IMoapModule | 56 | public class MoapModule : INonSharedRegionModule, IMoapModule |
57 | { | 57 | { |
58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
59 | 59 | ||
60 | public string Name { get { return "MoapModule"; } } | 60 | public string Name { get { return "MoapModule"; } } |
61 | public Type ReplaceableInterface { get { return null; } } | 61 | public Type ReplaceableInterface { get { return null; } } |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
64 | /// Is this module enabled? | 64 | /// Is this module enabled? |
@@ -78,17 +78,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
78 | /// <summary> | 78 | /// <summary> |
79 | /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. | 79 | /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. |
80 | /// </summary> | 80 | /// </summary> |
81 | protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); | 81 | protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); |
82 | 82 | ||
83 | /// <summary> | 83 | /// <summary> |
84 | /// Track the ObjectMediaUpdate capabilities given to users keyed by path | 84 | /// Track the ObjectMediaUpdate capabilities given to users keyed by path |
85 | /// </summary> | 85 | /// </summary> |
86 | protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); | 86 | protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); |
87 | 87 | ||
88 | /// <summary> | 88 | /// <summary> |
89 | /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate | 89 | /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate |
90 | /// </summary> | 90 | /// </summary> |
91 | protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); | 91 | protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); |
92 | 92 | ||
93 | public void Initialise(IConfigSource configSource) | 93 | public void Initialise(IConfigSource configSource) |
94 | { | 94 | { |
@@ -129,7 +129,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
129 | m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; | 129 | m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; |
130 | m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; | 130 | m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; |
131 | m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; | 131 | m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; |
132 | } | 132 | } |
133 | 133 | ||
134 | public void OnRegisterCaps(UUID agentID, Caps caps) | 134 | public void OnRegisterCaps(UUID agentID, Caps caps) |
135 | { | 135 | { |
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
159 | caps.RegisterHandler( | 159 | caps.RegisterHandler( |
160 | "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); | 160 | "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | public void OnDeregisterCaps(UUID agentID, Caps caps) | 164 | public void OnDeregisterCaps(UUID agentID, Caps caps) |
165 | { | 165 | { |
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
179 | } | 179 | } |
180 | 180 | ||
181 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) | 181 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) |
182 | { | 182 | { |
183 | if (original.Shape.Media != null) | 183 | if (original.Shape.Media != null) |
184 | { | 184 | { |
185 | PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); | 185 | PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); |
@@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
195 | } | 195 | } |
196 | 196 | ||
197 | copy.Shape.Media = dupeMedia; | 197 | copy.Shape.Media = dupeMedia; |
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | public MediaEntry GetMediaEntry(SceneObjectPart part, int face) | 201 | public MediaEntry GetMediaEntry(SceneObjectPart part, int face) |
@@ -211,9 +211,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
211 | me = null; | 211 | me = null; |
212 | } | 212 | } |
213 | else | 213 | else |
214 | { | 214 | { |
215 | lock (media) | 215 | lock (media) |
216 | me = media[face]; | 216 | me = media[face]; |
217 | 217 | ||
218 | // TODO: Really need a proper copy constructor down in libopenmetaverse | 218 | // TODO: Really need a proper copy constructor down in libopenmetaverse |
219 | if (me != null) | 219 | if (me != null) |
@@ -227,17 +227,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
227 | 227 | ||
228 | public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) | 228 | public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) |
229 | { | 229 | { |
230 | CheckFaceParam(part, face); | 230 | CheckFaceParam(part, face); |
231 | 231 | ||
232 | if (null == part.Shape.Media) | 232 | if (null == part.Shape.Media) |
233 | part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); | 233 | part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); |
234 | 234 | ||
235 | lock (part.Shape.Media) | 235 | lock (part.Shape.Media) |
236 | part.Shape.Media[face] = me; | 236 | part.Shape.Media[face] = me; |
237 | 237 | ||
238 | UpdateMediaUrl(part, UUID.Zero); | 238 | UpdateMediaUrl(part, UUID.Zero); |
239 | part.ScheduleFullUpdate(); | 239 | part.ScheduleFullUpdate(); |
240 | part.TriggerScriptChangedEvent(Changed.MEDIA); | 240 | part.TriggerScriptChangedEvent(Changed.MEDIA); |
241 | } | 241 | } |
242 | 242 | ||
243 | public void ClearMediaEntry(SceneObjectPart part, int face) | 243 | public void ClearMediaEntry(SceneObjectPart part, int face) |
@@ -256,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
256 | /// <returns></returns> | 256 | /// <returns></returns> |
257 | protected string HandleObjectMediaMessage( | 257 | protected string HandleObjectMediaMessage( |
258 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 258 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
259 | { | 259 | { |
260 | // m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); | 260 | // m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); |
261 | 261 | ||
262 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 262 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
@@ -266,12 +266,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
266 | if (omm.Request is ObjectMediaRequest) | 266 | if (omm.Request is ObjectMediaRequest) |
267 | return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); | 267 | return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); |
268 | else if (omm.Request is ObjectMediaUpdate) | 268 | else if (omm.Request is ObjectMediaUpdate) |
269 | return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); | 269 | return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); |
270 | 270 | ||
271 | throw new Exception( | 271 | throw new Exception( |
272 | string.Format( | 272 | string.Format( |
273 | "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", | 273 | "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", |
274 | omm.Request.GetType())); | 274 | omm.Request.GetType())); |
275 | } | 275 | } |
276 | 276 | ||
277 | /// <summary> | 277 | /// <summary> |
@@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
279 | /// </summary> | 279 | /// </summary> |
280 | /// <param name="omr"></param> | 280 | /// <param name="omr"></param> |
281 | /// <returns></returns> | 281 | /// <returns></returns> |
282 | protected string HandleObjectMediaRequest(ObjectMediaRequest omr) | 282 | protected string HandleObjectMediaRequest(ObjectMediaRequest omr) |
283 | { | 283 | { |
284 | UUID primId = omr.PrimID; | 284 | UUID primId = omr.PrimID; |
285 | 285 | ||
@@ -318,7 +318,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
318 | /// <param name="path">Path on which this request was made</param> | 318 | /// <param name="path">Path on which this request was made</param> |
319 | /// <param name="omu">/param> | 319 | /// <param name="omu">/param> |
320 | /// <returns></returns> | 320 | /// <returns></returns> |
321 | protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) | 321 | protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) |
322 | { | 322 | { |
323 | UUID primId = omu.PrimID; | 323 | UUID primId = omu.PrimID; |
324 | 324 | ||
@@ -330,9 +330,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
330 | "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", | 330 | "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", |
331 | primId, m_scene.RegionInfo.RegionName); | 331 | primId, m_scene.RegionInfo.RegionName); |
332 | return string.Empty; | 332 | return string.Empty; |
333 | } | 333 | } |
334 | 334 | ||
335 | // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); | 335 | // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); |
336 | 336 | ||
337 | // for (int i = 0; i < omu.FaceMedia.Length; i++) | 337 | // for (int i = 0; i < omu.FaceMedia.Length; i++) |
338 | // { | 338 | // { |
@@ -374,14 +374,14 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
374 | part.Shape.Textures = te; | 374 | part.Shape.Textures = te; |
375 | // m_log.DebugFormat( | 375 | // m_log.DebugFormat( |
376 | // "[MOAP]: Media flags for face {0} is {1}", | 376 | // "[MOAP]: Media flags for face {0} is {1}", |
377 | // i, part.Shape.Textures.FaceTextures[i].MediaFlags); | 377 | // i, part.Shape.Textures.FaceTextures[i].MediaFlags); |
378 | } | 378 | } |
379 | } | 379 | } |
380 | } | 380 | } |
381 | else | 381 | else |
382 | { | 382 | { |
383 | // We need to go through the media textures one at a time to make sure that we have permission | 383 | // We need to go through the media textures one at a time to make sure that we have permission |
384 | // to change them | 384 | // to change them |
385 | 385 | ||
386 | // FIXME: Race condition here since some other texture entry manipulator may overwrite/get | 386 | // FIXME: Race condition here since some other texture entry manipulator may overwrite/get |
387 | // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry | 387 | // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry |
@@ -391,18 +391,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
391 | lock (media) | 391 | lock (media) |
392 | { | 392 | { |
393 | for (int i = 0; i < media.Count; i++) | 393 | for (int i = 0; i < media.Count; i++) |
394 | { | 394 | { |
395 | if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) | 395 | if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) |
396 | { | 396 | { |
397 | media[i] = omu.FaceMedia[i]; | 397 | media[i] = omu.FaceMedia[i]; |
398 | 398 | ||
399 | // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal | 399 | // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal |
400 | // texture update, so we don't need to worry about clearing MediaFlags here. | 400 | // texture update, so we don't need to worry about clearing MediaFlags here. |
401 | if (null == media[i]) | 401 | if (null == media[i]) |
402 | continue; | 402 | continue; |
403 | 403 | ||
404 | Primitive.TextureEntryFace face = te.CreateFace((uint)i); | 404 | Primitive.TextureEntryFace face = te.CreateFace((uint)i); |
405 | face.MediaFlags = true; | 405 | face.MediaFlags = true; |
406 | 406 | ||
407 | // m_log.DebugFormat( | 407 | // m_log.DebugFormat( |
408 | // "[MOAP]: Media flags for face {0} is {1}", | 408 | // "[MOAP]: Media flags for face {0} is {1}", |
@@ -414,11 +414,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
414 | 414 | ||
415 | part.Shape.Textures = te; | 415 | part.Shape.Textures = te; |
416 | 416 | ||
417 | // for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) | 417 | // for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) |
418 | // m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); | 418 | // m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); |
419 | } | 419 | } |
420 | 420 | ||
421 | UpdateMediaUrl(part, agentId); | 421 | UpdateMediaUrl(part, agentId); |
422 | 422 | ||
423 | // Arguably, we could avoid sending a full update to the avatar that just changed the texture. | 423 | // Arguably, we could avoid sending a full update to the avatar that just changed the texture. |
424 | part.ScheduleFullUpdate(); | 424 | part.ScheduleFullUpdate(); |
@@ -439,16 +439,16 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
439 | /// <returns></returns> | 439 | /// <returns></returns> |
440 | protected string HandleObjectMediaNavigateMessage( | 440 | protected string HandleObjectMediaNavigateMessage( |
441 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 441 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
442 | { | 442 | { |
443 | // m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); | 443 | // m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); |
444 | 444 | ||
445 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 445 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
446 | ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); | 446 | ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); |
447 | omn.Deserialize(osd); | 447 | omn.Deserialize(osd); |
448 | 448 | ||
449 | UUID primId = omn.PrimID; | 449 | UUID primId = omn.PrimID; |
450 | 450 | ||
451 | SceneObjectPart part = m_scene.GetSceneObjectPart(primId); | 451 | SceneObjectPart part = m_scene.GetSceneObjectPart(primId); |
452 | 452 | ||
453 | if (null == part) | 453 | if (null == part) |
454 | { | 454 | { |
@@ -456,12 +456,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
456 | "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", | 456 | "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", |
457 | primId, m_scene.RegionInfo.RegionName); | 457 | primId, m_scene.RegionInfo.RegionName); |
458 | return string.Empty; | 458 | return string.Empty; |
459 | } | 459 | } |
460 | 460 | ||
461 | UUID agentId = default(UUID); | 461 | UUID agentId = default(UUID); |
462 | 462 | ||
463 | lock (m_omuCapUsers) | 463 | lock (m_omuCapUsers) |
464 | agentId = m_omuCapUsers[path]; | 464 | agentId = m_omuCapUsers[path]; |
465 | 465 | ||
466 | if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) | 466 | if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) |
467 | return string.Empty; | 467 | return string.Empty; |
@@ -484,7 +484,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
484 | return string.Empty; | 484 | return string.Empty; |
485 | 485 | ||
486 | if (me.EnableWhiteList) | 486 | if (me.EnableWhiteList) |
487 | { | 487 | { |
488 | if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) | 488 | if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) |
489 | { | 489 | { |
490 | // m_log.DebugFormat( | 490 | // m_log.DebugFormat( |
@@ -493,18 +493,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
493 | 493 | ||
494 | return string.Empty; | 494 | return string.Empty; |
495 | } | 495 | } |
496 | } | 496 | } |
497 | 497 | ||
498 | me.CurrentURL = omn.URL; | 498 | me.CurrentURL = omn.URL; |
499 | 499 | ||
500 | UpdateMediaUrl(part, agentId); | 500 | UpdateMediaUrl(part, agentId); |
501 | 501 | ||
502 | part.ScheduleFullUpdate(); | 502 | part.ScheduleFullUpdate(); |
503 | 503 | ||
504 | part.TriggerScriptChangedEvent(Changed.MEDIA); | 504 | part.TriggerScriptChangedEvent(Changed.MEDIA); |
505 | 505 | ||
506 | return OSDParser.SerializeLLSDXmlString(new OSD()); | 506 | return OSDParser.SerializeLLSDXmlString(new OSD()); |
507 | } | 507 | } |
508 | 508 | ||
509 | /// <summary> | 509 | /// <summary> |
510 | /// Check that the face number is valid for the given prim. | 510 | /// Check that the face number is valid for the given prim. |
@@ -519,7 +519,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
519 | int maxFaces = part.GetNumberOfSides() - 1; | 519 | int maxFaces = part.GetNumberOfSides() - 1; |
520 | if (face > maxFaces) | 520 | if (face > maxFaces) |
521 | throw new ArgumentException( | 521 | throw new ArgumentException( |
522 | string.Format("Face argument was {0} but max is {1}", face, maxFaces)); | 522 | string.Format("Face argument was {0} but max is {1}", face, maxFaces)); |
523 | } | 523 | } |
524 | 524 | ||
525 | /// <summary> | 525 | /// <summary> |
@@ -542,9 +542,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
542 | string rawVersion = part.MediaUrl.Substring(5, 10); | 542 | string rawVersion = part.MediaUrl.Substring(5, 10); |
543 | int version = int.Parse(rawVersion); | 543 | int version = int.Parse(rawVersion); |
544 | part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); | 544 | part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); |
545 | } | 545 | } |
546 | 546 | ||
547 | // m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); | 547 | // m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); |
548 | } | 548 | } |
549 | 549 | ||
550 | /// <summary> | 550 | /// <summary> |
@@ -554,7 +554,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
554 | /// <param name="whitelist"></param> | 554 | /// <param name="whitelist"></param> |
555 | /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns> | 555 | /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns> |
556 | protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) | 556 | protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) |
557 | { | 557 | { |
558 | Uri url = new Uri(rawUrl); | 558 | Uri url = new Uri(rawUrl); |
559 | 559 | ||
560 | foreach (string origWlUrl in whitelist) | 560 | foreach (string origWlUrl in whitelist) |
@@ -575,7 +575,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
575 | if (url.Host.Contains(wlUrl)) | 575 | if (url.Host.Contains(wlUrl)) |
576 | { | 576 | { |
577 | // m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); | 577 | // m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); |
578 | return true; | 578 | return true; |
579 | } | 579 | } |
580 | } | 580 | } |
581 | else | 581 | else |
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
588 | return true; | 588 | return true; |
589 | } | 589 | } |
590 | } | 590 | } |
591 | } | 591 | } |
592 | 592 | ||
593 | return false; | 593 | return false; |
594 | } | 594 | } |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 12750c5..db50339 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
49 | protected Scene m_scene = null; | 49 | protected Scene m_scene = null; |
50 | protected IDialogModule m_dialogModule; | 50 | protected IDialogModule m_dialogModule; |
51 | 51 | ||
52 | public string Name { get { return "Object BuySell Module"; } } | 52 | public string Name { get { return "Object BuySell Module"; } } |
53 | public Type ReplaceableInterface { get { return null; } } | 53 | public Type ReplaceableInterface { get { return null; } } |
54 | 54 | ||
55 | public void Initialise(IConfigSource source) {} | 55 | public void Initialise(IConfigSource source) {} |
56 | 56 | ||
@@ -78,8 +78,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
78 | 78 | ||
79 | public void SubscribeToClientEvents(IClientAPI client) | 79 | public void SubscribeToClientEvents(IClientAPI client) |
80 | { | 80 | { |
81 | client.OnObjectSaleInfo += ObjectSaleInfo; | 81 | client.OnObjectSaleInfo += ObjectSaleInfo; |
82 | } | 82 | } |
83 | 83 | ||
84 | protected void ObjectSaleInfo( | 84 | protected void ObjectSaleInfo( |
85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) | 85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) |
@@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
99 | part.ParentGroup.HasGroupChanged = true; | 99 | part.ParentGroup.HasGroupChanged = true; |
100 | 100 | ||
101 | part.GetProperties(client); | 101 | part.GetProperties(client); |
102 | } | 102 | } |
103 | 103 | ||
104 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) | 104 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) |
105 | { | 105 | { |
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
225 | } | 225 | } |
226 | else | 226 | else |
227 | { | 227 | { |
228 | if (m_dialogModule != null) | 228 | if (m_dialogModule != null) |
229 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); | 229 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); |
230 | return false; | 230 | return false; |
231 | } | 231 | } |
@@ -261,6 +261,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
261 | } | 261 | } |
262 | 262 | ||
263 | return true; | 263 | return true; |
264 | } | 264 | } |
265 | } | 265 | } |
266 | } \ No newline at end of file | 266 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index b1747ef..ecfd211 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -397,13 +397,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
397 | m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>(); | 397 | m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>(); |
398 | 398 | ||
399 | if (m_groupsModule == null) | 399 | if (m_groupsModule == null) |
400 | m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); | 400 | m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); |
401 | 401 | ||
402 | m_moapModule = m_scene.RequestModuleInterface<IMoapModule>(); | 402 | m_moapModule = m_scene.RequestModuleInterface<IMoapModule>(); |
403 | 403 | ||
404 | // This log line will be commented out when no longer required for debugging | 404 | // This log line will be commented out when no longer required for debugging |
405 | // if (m_moapModule == null) | 405 | // if (m_moapModule == null) |
406 | // m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); | 406 | // m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); |
407 | } | 407 | } |
408 | 408 | ||
409 | public void Close() | 409 | public void Close() |
@@ -1906,7 +1906,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1906 | } | 1906 | } |
1907 | 1907 | ||
1908 | private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) | 1908 | private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) |
1909 | { | 1909 | { |
1910 | // m_log.DebugFormat( | 1910 | // m_log.DebugFormat( |
1911 | // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", | 1911 | // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", |
1912 | // agentID, primID, face); | 1912 | // agentID, primID, face); |
@@ -1918,7 +1918,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1918 | if (null == part) | 1918 | if (null == part) |
1919 | return false; | 1919 | return false; |
1920 | 1920 | ||
1921 | MediaEntry me = m_moapModule.GetMediaEntry(part, face); | 1921 | MediaEntry me = m_moapModule.GetMediaEntry(part, face); |
1922 | 1922 | ||
1923 | // If there is no existing media entry then it can be controlled (in this context, created). | 1923 | // If there is no existing media entry then it can be controlled (in this context, created). |
1924 | if (null == me) | 1924 | if (null == me) |
@@ -1929,7 +1929,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1929 | // agentID, primID, face, me.ControlPermissions); | 1929 | // agentID, primID, face, me.ControlPermissions); |
1930 | 1930 | ||
1931 | return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); | 1931 | return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); |
1932 | } | 1932 | } |
1933 | 1933 | ||
1934 | private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) | 1934 | private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) |
1935 | { | 1935 | { |
@@ -1952,15 +1952,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1952 | 1952 | ||
1953 | // m_log.DebugFormat( | 1953 | // m_log.DebugFormat( |
1954 | // "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", | 1954 | // "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", |
1955 | // agentID, primID, face, me.InteractPermissions); | 1955 | // agentID, primID, face, me.InteractPermissions); |
1956 | 1956 | ||
1957 | return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); | 1957 | return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); |
1958 | } | 1958 | } |
1959 | 1959 | ||
1960 | private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) | 1960 | private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) |
1961 | { | 1961 | { |
1962 | // if (IsAdministrator(agentID)) | 1962 | // if (IsAdministrator(agentID)) |
1963 | // return true; | 1963 | // return true; |
1964 | 1964 | ||
1965 | if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) | 1965 | if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) |
1966 | return true; | 1966 | return true; |
@@ -1969,15 +1969,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1969 | { | 1969 | { |
1970 | if (agentID == part.OwnerID) | 1970 | if (agentID == part.OwnerID) |
1971 | return true; | 1971 | return true; |
1972 | } | 1972 | } |
1973 | 1973 | ||
1974 | if ((perms & MediaPermission.Group) == MediaPermission.Group) | 1974 | if ((perms & MediaPermission.Group) == MediaPermission.Group) |
1975 | { | 1975 | { |
1976 | if (IsGroupMember(part.GroupID, agentID, 0)) | 1976 | if (IsGroupMember(part.GroupID, agentID, 0)) |
1977 | return true; | 1977 | return true; |
1978 | } | 1978 | } |
1979 | 1979 | ||
1980 | return false; | 1980 | return false; |
1981 | } | 1981 | } |
1982 | } | 1982 | } |
1983 | } \ No newline at end of file | 1983 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs index bef7fe4..5067ebd 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser | |||
80 | { | 80 | { |
81 | string xmlstream = "<scene>"; | 81 | string xmlstream = "<scene>"; |
82 | 82 | ||
83 | List<EntityBase> EntityList = scene.GetEntities(); | 83 | EntityBase[] EntityList = scene.GetEntities(); |
84 | List<string> EntityXml = new List<string>(); | 84 | List<string> EntityXml = new List<string>(); |
85 | 85 | ||
86 | foreach (EntityBase ent in EntityList) | 86 | foreach (EntityBase ent in EntityList) |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs index 58e4261..98fe493 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiserModule.cs | |||
@@ -165,12 +165,12 @@ namespace OpenSim.Region.CoreModules.World.Serialiser | |||
165 | return SceneXmlLoader.SaveGroupToXml2(grp); | 165 | return SceneXmlLoader.SaveGroupToXml2(grp); |
166 | } | 166 | } |
167 | 167 | ||
168 | public void SavePrimListToXml2(List<EntityBase> entityList, string fileName) | 168 | public void SavePrimListToXml2(EntityBase[] entityList, string fileName) |
169 | { | 169 | { |
170 | SceneXmlLoader.SavePrimListToXml2(entityList, fileName); | 170 | SceneXmlLoader.SavePrimListToXml2(entityList, fileName); |
171 | } | 171 | } |
172 | 172 | ||
173 | public void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max) | 173 | public void SavePrimListToXml2(EntityBase[] entityList, TextWriter stream, Vector3 min, Vector3 max) |
174 | { | 174 | { |
175 | SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max); | 175 | SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max); |
176 | } | 176 | } |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index d4166d0..4611352 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | |||
@@ -816,7 +816,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
816 | { | 816 | { |
817 | //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); | 817 | //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); |
818 | client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); | 818 | client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); |
819 | } | 819 | } |
820 | 820 | ||
821 | private void StoreUndoState() | 821 | private void StoreUndoState() |
822 | { | 822 | { |
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 9736b73..6bac555 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs | |||
@@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules | |||
425 | { | 425 | { |
426 | if (m_ready) | 426 | if (m_ready) |
427 | { | 427 | { |
428 | if(m_scene.GetRootAgentCount() > 0) | 428 | if (m_scene.GetRootAgentCount() > 0) |
429 | { | 429 | { |
430 | // Ask wind plugin to generate a LL wind array to be cached locally | 430 | // Ask wind plugin to generate a LL wind array to be cached locally |
431 | // Try not to update this too often, as it may involve array copies | 431 | // Try not to update this too often, as it may involve array copies |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs index 57eff8a..1bd1371 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs | |||
@@ -212,7 +212,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
212 | double[,] hm = whichScene.Heightmap.GetDoubles(); | 212 | double[,] hm = whichScene.Heightmap.GetDoubles(); |
213 | tc = Environment.TickCount; | 213 | tc = Environment.TickCount; |
214 | m_log.Info("[MAPTILE]: Generating Maptile Step 2: Object Volume Profile"); | 214 | m_log.Info("[MAPTILE]: Generating Maptile Step 2: Object Volume Profile"); |
215 | List<EntityBase> objs = whichScene.GetEntities(); | 215 | EntityBase[] objs = whichScene.GetEntities(); |
216 | Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>(); | 216 | Dictionary<uint, DrawStruct> z_sort = new Dictionary<uint, DrawStruct>(); |
217 | //SortedList<float, RectangleDrawStruct> z_sort = new SortedList<float, RectangleDrawStruct>(); | 217 | //SortedList<float, RectangleDrawStruct> z_sort = new SortedList<float, RectangleDrawStruct>(); |
218 | List<float> z_sortheights = new List<float>(); | 218 | List<float> z_sortheights = new List<float>(); |
@@ -228,7 +228,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
228 | SceneObjectGroup mapdot = (SceneObjectGroup)obj; | 228 | SceneObjectGroup mapdot = (SceneObjectGroup)obj; |
229 | Color mapdotspot = Color.Gray; // Default color when prim color is white | 229 | Color mapdotspot = Color.Gray; // Default color when prim color is white |
230 | 230 | ||
231 | // Loop over prim in group | 231 | // Loop over prim in group |
232 | List<SceneObjectPart> partList = null; | 232 | List<SceneObjectPart> partList = null; |
233 | lock (mapdot.Children) | 233 | lock (mapdot.Children) |
234 | partList = new List<SceneObjectPart>(mapdot.Children.Values); | 234 | partList = new List<SceneObjectPart>(mapdot.Children.Values); |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index f036d85..fbc8a50 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -307,7 +307,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
307 | lock (m_rootAgents) | 307 | lock (m_rootAgents) |
308 | { | 308 | { |
309 | m_rootAgents.Remove(AgentId); | 309 | m_rootAgents.Remove(AgentId); |
310 | if(m_rootAgents.Count == 0) | 310 | if (m_rootAgents.Count == 0) |
311 | StopThread(); | 311 | StopThread(); |
312 | } | 312 | } |
313 | } | 313 | } |
diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index 3c39f9e..5e75cae 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | |||
@@ -101,7 +101,8 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
101 | XmlNode parent = nodeFactory.CreateNode(XmlNodeType.Element, "objectdata", ""); | 101 | XmlNode parent = nodeFactory.CreateNode(XmlNodeType.Element, "objectdata", ""); |
102 | XmlNode node; | 102 | XmlNode node; |
103 | 103 | ||
104 | foreach (EntityBase entity in m_scene.Entities) | 104 | EntityBase[] entities = m_scene.Entities.GetEntities(); |
105 | foreach (EntityBase entity in entities) | ||
105 | { | 106 | { |
106 | // only objects, not avatars | 107 | // only objects, not avatars |
107 | if (entity is SceneObjectGroup) | 108 | if (entity is SceneObjectGroup) |
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index 59c035f..6a0fb63 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
56 | /// <param name="rot"></param> | 56 | /// <param name="rot"></param> |
57 | /// <param name="attachPos"></param> | 57 | /// <param name="attachPos"></param> |
58 | /// <param name="silent"></param> | 58 | /// <param name="silent"></param> |
59 | /// <returns>true if the object was successfully attached, false otherwise</returns> | 59 | /// <returns>true if the object was successfully attached, false otherwise</returns> |
60 | bool AttachObject( | 60 | bool AttachObject( |
61 | IClientAPI remoteClient, SceneObjectGroup grp, uint AttachmentPt, bool silent); | 61 | IClientAPI remoteClient, SceneObjectGroup grp, uint AttachmentPt, bool silent); |
62 | 62 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs index f5cd528..6289f7a 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs | |||
@@ -202,7 +202,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
202 | /// Backup the inventory to the given data store | 202 | /// Backup the inventory to the given data store |
203 | /// </summary> | 203 | /// </summary> |
204 | /// <param name="datastore"></param> | 204 | /// <param name="datastore"></param> |
205 | void ProcessInventoryBackup(IRegionDataStore datastore); | 205 | void ProcessInventoryBackup(ISimulationDataService datastore); |
206 | 206 | ||
207 | uint MaskEffectivePermissions(); | 207 | uint MaskEffectivePermissions(); |
208 | 208 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs b/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs new file mode 100644 index 0000000..95c9659 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/IEstateDataService.cs | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using OpenSim.Framework; | ||
31 | using OpenMetaverse; | ||
32 | |||
33 | namespace OpenSim.Region.Framework.Interfaces | ||
34 | { | ||
35 | public interface IEstateDataService | ||
36 | { | ||
37 | EstateSettings LoadEstateSettings(UUID regionID, bool create); | ||
38 | EstateSettings LoadEstateSettings(int estateID); | ||
39 | void StoreEstateSettings(EstateSettings es); | ||
40 | List<int> GetEstates(string search); | ||
41 | bool LinkRegion(UUID regionID, int estateID); | ||
42 | List<UUID> GetRegions(int estateID); | ||
43 | bool DeleteEstate(int estateID); | ||
44 | } | ||
45 | } | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs index 2c091e7..4c501f6 100644 --- a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
65 | /// Get a group | 65 | /// Get a group |
66 | /// </summary> | 66 | /// </summary> |
67 | /// <param name="GroupID">ID of the group</param> | 67 | /// <param name="GroupID">ID of the group</param> |
68 | /// <returns>The group's data. Null if there is no such group.</returns> | 68 | /// <returns>The group's data. Null if there is no such group.</returns> |
69 | GroupRecord GetGroupRecord(UUID GroupID); | 69 | GroupRecord GetGroupRecord(UUID GroupID); |
70 | 70 | ||
71 | void ActivateGroup(IClientAPI remoteClient, UUID groupID); | 71 | void ActivateGroup(IClientAPI remoteClient, UUID groupID); |
@@ -74,14 +74,14 @@ namespace OpenSim.Region.Framework.Interfaces | |||
74 | List<GroupRolesData> GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID); | 74 | List<GroupRolesData> GroupRoleDataRequest(IClientAPI remoteClient, UUID groupID); |
75 | List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID); | 75 | List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID); |
76 | GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID); | 76 | GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID); |
77 | GroupMembershipData[] GetMembershipData(UUID UserID); | 77 | GroupMembershipData[] GetMembershipData(UUID UserID); |
78 | GroupMembershipData GetMembershipData(UUID GroupID, UUID UserID); | 78 | GroupMembershipData GetMembershipData(UUID GroupID, UUID UserID); |
79 | 79 | ||
80 | void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish); | 80 | void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish); |
81 | 81 | ||
82 | void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile); | 82 | void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile); |
83 | 83 | ||
84 | void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID); | 84 | void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID); |
85 | 85 | ||
86 | GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID); | 86 | GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID); |
87 | string GetGroupTitle(UUID avatarID); | 87 | string GetGroupTitle(UUID avatarID); |
diff --git a/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs b/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs index 01066e6..ddf7565 100644 --- a/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IInventoryArchiverModule.cs | |||
@@ -43,14 +43,14 @@ namespace OpenSim.Region.Framework.Interfaces | |||
43 | /// <param name="reportedException">Contains the exception generated if the save did not succeed</param> | 43 | /// <param name="reportedException">Contains the exception generated if the save did not succeed</param> |
44 | public delegate void InventoryArchiveSaved( | 44 | public delegate void InventoryArchiveSaved( |
45 | Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, Exception reportedException); | 45 | Guid id, bool succeeded, UserAccount userInfo, string invPath, Stream saveStream, Exception reportedException); |
46 | 46 | ||
47 | public interface IInventoryArchiverModule | 47 | public interface IInventoryArchiverModule |
48 | { | 48 | { |
49 | /// <summary> | 49 | /// <summary> |
50 | /// Fired when an archive inventory save has been completed. | 50 | /// Fired when an archive inventory save has been completed. |
51 | /// </summary> | 51 | /// </summary> |
52 | event InventoryArchiveSaved OnInventoryArchiveSaved; | 52 | event InventoryArchiveSaved OnInventoryArchiveSaved; |
53 | 53 | ||
54 | /// <summary> | 54 | /// <summary> |
55 | /// Dearchive a user's inventory folder from the given stream | 55 | /// Dearchive a user's inventory folder from the given stream |
56 | /// </summary> | 56 | /// </summary> |
@@ -60,7 +60,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
60 | /// <param name="loadStream">The stream from which the inventory archive will be loaded</param> | 60 | /// <param name="loadStream">The stream from which the inventory archive will be loaded</param> |
61 | /// <returns>true if the first stage of the operation succeeded, false otherwise</returns> | 61 | /// <returns>true if the first stage of the operation succeeded, false otherwise</returns> |
62 | bool DearchiveInventory(string firstName, string lastName, string invPath, string pass, Stream loadStream); | 62 | bool DearchiveInventory(string firstName, string lastName, string invPath, string pass, Stream loadStream); |
63 | 63 | ||
64 | /// <summary> | 64 | /// <summary> |
65 | /// Dearchive a user's inventory folder from the given stream | 65 | /// Dearchive a user's inventory folder from the given stream |
66 | /// </summary> | 66 | /// </summary> |
@@ -72,8 +72,8 @@ namespace OpenSim.Region.Framework.Interfaces | |||
72 | /// the loaded IAR with existing folders where possible.</param> | 72 | /// the loaded IAR with existing folders where possible.</param> |
73 | /// <returns>true if the first stage of the operation succeeded, false otherwise</returns> | 73 | /// <returns>true if the first stage of the operation succeeded, false otherwise</returns> |
74 | bool DearchiveInventory( | 74 | bool DearchiveInventory( |
75 | string firstName, string lastName, string invPath, string pass, Stream loadStream, | 75 | string firstName, string lastName, string invPath, string pass, Stream loadStream, |
76 | Dictionary<string, object> options); | 76 | Dictionary<string, object> options); |
77 | 77 | ||
78 | /// <summary> | 78 | /// <summary> |
79 | /// Archive a user's inventory folder to the given stream | 79 | /// Archive a user's inventory folder to the given stream |
@@ -85,7 +85,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
85 | /// <param name="saveStream">The stream to which the inventory archive will be saved</param> | 85 | /// <param name="saveStream">The stream to which the inventory archive will be saved</param> |
86 | /// <returns>true if the first stage of the operation succeeded, false otherwise</returns> | 86 | /// <returns>true if the first stage of the operation succeeded, false otherwise</returns> |
87 | bool ArchiveInventory(Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream); | 87 | bool ArchiveInventory(Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream); |
88 | 88 | ||
89 | /// <summary> | 89 | /// <summary> |
90 | /// Archive a user's inventory folder to the given stream | 90 | /// Archive a user's inventory folder to the given stream |
91 | /// </summary> | 91 | /// </summary> |
@@ -97,7 +97,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
97 | /// <param name="options">Archiving options. Currently, there are none.</param> | 97 | /// <param name="options">Archiving options. Currently, there are none.</param> |
98 | /// <returns>true if the first stage of the operation succeeded, false otherwise</returns> | 98 | /// <returns>true if the first stage of the operation succeeded, false otherwise</returns> |
99 | bool ArchiveInventory( | 99 | bool ArchiveInventory( |
100 | Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream, | 100 | Guid id, string firstName, string lastName, string invPath, string pass, Stream saveStream, |
101 | Dictionary<string, object> options); | 101 | Dictionary<string, object> options); |
102 | } | 102 | } |
103 | } | 103 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/IMoapModule.cs b/OpenSim/Region/Framework/Interfaces/IMoapModule.cs index 24b6860..1d3d240 100644 --- a/OpenSim/Region/Framework/Interfaces/IMoapModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IMoapModule.cs | |||
@@ -63,5 +63,5 @@ namespace OpenSim.Region.Framework.Interfaces | |||
63 | /// <param name="part"></param> | 63 | /// <param name="part"></param> |
64 | /// <param name="face">/param> | 64 | /// <param name="face">/param> |
65 | void ClearMediaEntry(SceneObjectPart part, int face); | 65 | void ClearMediaEntry(SceneObjectPart part, int face); |
66 | } | 66 | } |
67 | } \ No newline at end of file | 67 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs b/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs index e7562a5..18758c8 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionSerialiserModule.cs | |||
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
90 | /// </summary> | 90 | /// </summary> |
91 | /// <param name="entityList"></param> | 91 | /// <param name="entityList"></param> |
92 | /// <param name="fileName"></param> | 92 | /// <param name="fileName"></param> |
93 | void SavePrimListToXml2(List<EntityBase> entityList, string fileName); | 93 | void SavePrimListToXml2(EntityBase[] entityList, string fileName); |
94 | 94 | ||
95 | /// <summary> | 95 | /// <summary> |
96 | /// Save a set of prims in the xml2 format, optionally specifying a bounding box for which | 96 | /// Save a set of prims in the xml2 format, optionally specifying a bounding box for which |
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
101 | /// <param name="stream"></param> | 101 | /// <param name="stream"></param> |
102 | /// <param name="min"></param> | 102 | /// <param name="min"></param> |
103 | /// <param name="max"></param> | 103 | /// <param name="max"></param> |
104 | void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max); | 104 | void SavePrimListToXml2(EntityBase[] entityList, TextWriter stream, Vector3 min, Vector3 max); |
105 | 105 | ||
106 | void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName); | 106 | void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName); |
107 | 107 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs new file mode 100644 index 0000000..edaa07c --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using OpenMetaverse; | ||
31 | using OpenSim.Framework; | ||
32 | using OpenSim.Region.Framework.Scenes; | ||
33 | |||
34 | namespace OpenSim.Region.Framework.Interfaces | ||
35 | { | ||
36 | public interface ISimulationDataService | ||
37 | { | ||
38 | /// <summary> | ||
39 | /// Stores all object's details apart from inventory | ||
40 | /// </summary> | ||
41 | /// <param name="obj"></param> | ||
42 | /// <param name="regionUUID"></param> | ||
43 | void StoreObject(SceneObjectGroup obj, UUID regionUUID); | ||
44 | |||
45 | /// <summary> | ||
46 | /// Entirely removes the object, including inventory | ||
47 | /// </summary> | ||
48 | /// <param name="uuid"></param> | ||
49 | /// <param name="regionUUID"></param> | ||
50 | /// <returns></returns> | ||
51 | void RemoveObject(UUID uuid, UUID regionUUID); | ||
52 | |||
53 | /// <summary> | ||
54 | /// Store a prim's inventory | ||
55 | /// </summary> | ||
56 | /// <returns></returns> | ||
57 | void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items); | ||
58 | |||
59 | /// <summary> | ||
60 | /// Load persisted objects from region storage. | ||
61 | /// </summary> | ||
62 | /// <param name="regionUUID">the Region UUID</param> | ||
63 | /// <returns>List of loaded groups</returns> | ||
64 | List<SceneObjectGroup> LoadObjects(UUID regionUUID); | ||
65 | |||
66 | /// <summary> | ||
67 | /// Store a terrain revision in region storage | ||
68 | /// </summary> | ||
69 | /// <param name="ter">HeightField data</param> | ||
70 | /// <param name="regionID">region UUID</param> | ||
71 | void StoreTerrain(double[,] terrain, UUID regionID); | ||
72 | |||
73 | /// <summary> | ||
74 | /// Load the latest terrain revision from region storage | ||
75 | /// </summary> | ||
76 | /// <param name="regionID">the region UUID</param> | ||
77 | /// <returns>Heightfield data</returns> | ||
78 | double[,] LoadTerrain(UUID regionID); | ||
79 | |||
80 | void StoreLandObject(ILandObject Parcel); | ||
81 | |||
82 | /// <summary> | ||
83 | /// <list type="bullet"> | ||
84 | /// <item>delete from land where UUID=globalID</item> | ||
85 | /// <item>delete from landaccesslist where LandUUID=globalID</item> | ||
86 | /// </list> | ||
87 | /// </summary> | ||
88 | /// <param name="globalID"></param> | ||
89 | void RemoveLandObject(UUID globalID); | ||
90 | |||
91 | List<LandData> LoadLandObjects(UUID regionUUID); | ||
92 | |||
93 | void StoreRegionSettings(RegionSettings rs); | ||
94 | RegionSettings LoadRegionSettings(UUID regionUUID); | ||
95 | RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID); | ||
96 | void StoreRegionWindlightSettings(RegionLightShareData wl); | ||
97 | } | ||
98 | } | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs index 3e8e196..0a4d531 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionDataStore.cs +++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs | |||
@@ -32,7 +32,7 @@ using OpenSim.Region.Framework.Scenes; | |||
32 | 32 | ||
33 | namespace OpenSim.Region.Framework.Interfaces | 33 | namespace OpenSim.Region.Framework.Interfaces |
34 | { | 34 | { |
35 | public interface IRegionDataStore | 35 | public interface ISimulationDataStore |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Initialises the data storage engine | 38 | /// Initialises the data storage engine |
diff --git a/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs b/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs index d6e31f4..65c57a6 100644 --- a/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs | |||
@@ -31,7 +31,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
31 | { | 31 | { |
32 | /// <summary> | 32 | /// <summary> |
33 | /// Generate a map tile for the scene. a terrain texture for this scene | 33 | /// Generate a map tile for the scene. a terrain texture for this scene |
34 | /// </summary> | 34 | /// </summary> |
35 | void GenerateMaptile(); | 35 | void GenerateMaptile(); |
36 | } | 36 | } |
37 | } | 37 | } |
diff --git a/OpenSim/Region/Framework/Scenes/EntityManager.cs b/OpenSim/Region/Framework/Scenes/EntityManager.cs index c246e32..0defa93 100644 --- a/OpenSim/Region/Framework/Scenes/EntityManager.cs +++ b/OpenSim/Region/Framework/Scenes/EntityManager.cs | |||
@@ -34,227 +34,89 @@ using OpenMetaverse; | |||
34 | 34 | ||
35 | namespace OpenSim.Region.Framework.Scenes | 35 | namespace OpenSim.Region.Framework.Scenes |
36 | { | 36 | { |
37 | public class EntityManager : IEnumerable<EntityBase> | 37 | public class EntityManager |
38 | { | 38 | { |
39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 39 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
40 | private readonly Dictionary<UUID,EntityBase> m_eb_uuid = new Dictionary<UUID, EntityBase>(); | 40 | private readonly DoubleDictionary<UUID, uint, EntityBase> m_entities = new DoubleDictionary<UUID, uint, EntityBase>(); |
41 | private readonly Dictionary<uint, EntityBase> m_eb_localID = new Dictionary<uint, EntityBase>(); | ||
42 | //private readonly Dictionary<UUID, ScenePresence> m_pres_uuid = new Dictionary<UUID, ScenePresence>(); | ||
43 | private System.Threading.ReaderWriterLockSlim m_lock = new System.Threading.ReaderWriterLockSlim(); | ||
44 | 41 | ||
45 | [Obsolete("Use Add() instead.")] | 42 | public int Count |
46 | public void Add(UUID id, EntityBase eb) | ||
47 | { | 43 | { |
48 | Add(eb); | 44 | get { return m_entities.Count; } |
49 | } | 45 | } |
50 | 46 | ||
51 | public void Add(EntityBase entity) | 47 | public void Add(EntityBase entity) |
52 | { | 48 | { |
53 | m_lock.EnterWriteLock(); | 49 | m_entities.Add(entity.UUID, entity.LocalId, entity); |
54 | try | ||
55 | { | ||
56 | try | ||
57 | { | ||
58 | m_eb_uuid.Add(entity.UUID, entity); | ||
59 | m_eb_localID.Add(entity.LocalId, entity); | ||
60 | } | ||
61 | catch(Exception e) | ||
62 | { | ||
63 | m_log.ErrorFormat("Add Entity failed: {0}", e.Message); | ||
64 | } | ||
65 | } | ||
66 | finally | ||
67 | { | ||
68 | m_lock.ExitWriteLock(); | ||
69 | } | ||
70 | } | ||
71 | |||
72 | public void InsertOrReplace(EntityBase entity) | ||
73 | { | ||
74 | m_lock.EnterWriteLock(); | ||
75 | try | ||
76 | { | ||
77 | try | ||
78 | { | ||
79 | m_eb_uuid[entity.UUID] = entity; | ||
80 | m_eb_localID[entity.LocalId] = entity; | ||
81 | } | ||
82 | catch(Exception e) | ||
83 | { | ||
84 | m_log.ErrorFormat("Insert or Replace Entity failed: {0}", e.Message); | ||
85 | } | ||
86 | } | ||
87 | finally | ||
88 | { | ||
89 | m_lock.ExitWriteLock(); | ||
90 | } | ||
91 | } | 50 | } |
92 | 51 | ||
93 | public void Clear() | 52 | public void Clear() |
94 | { | 53 | { |
95 | m_lock.EnterWriteLock(); | 54 | m_entities.Clear(); |
96 | try | ||
97 | { | ||
98 | m_eb_uuid.Clear(); | ||
99 | m_eb_localID.Clear(); | ||
100 | } | ||
101 | finally | ||
102 | { | ||
103 | m_lock.ExitWriteLock(); | ||
104 | } | ||
105 | } | ||
106 | |||
107 | public int Count | ||
108 | { | ||
109 | get | ||
110 | { | ||
111 | return m_eb_uuid.Count; | ||
112 | } | ||
113 | } | 55 | } |
114 | 56 | ||
115 | public bool ContainsKey(UUID id) | 57 | public bool ContainsKey(UUID id) |
116 | { | 58 | { |
117 | try | 59 | return m_entities.ContainsKey(id); |
118 | { | ||
119 | return m_eb_uuid.ContainsKey(id); | ||
120 | } | ||
121 | catch | ||
122 | { | ||
123 | return false; | ||
124 | } | ||
125 | } | 60 | } |
126 | 61 | ||
127 | public bool ContainsKey(uint localID) | 62 | public bool ContainsKey(uint localID) |
128 | { | 63 | { |
129 | try | 64 | return m_entities.ContainsKey(localID); |
130 | { | ||
131 | return m_eb_localID.ContainsKey(localID); | ||
132 | } | ||
133 | catch | ||
134 | { | ||
135 | return false; | ||
136 | } | ||
137 | } | 65 | } |
138 | 66 | ||
139 | public bool Remove(uint localID) | 67 | public bool Remove(uint localID) |
140 | { | 68 | { |
141 | m_lock.EnterWriteLock(); | 69 | return m_entities.Remove(localID); |
142 | try | ||
143 | { | ||
144 | try | ||
145 | { | ||
146 | bool a = false; | ||
147 | EntityBase entity; | ||
148 | if (m_eb_localID.TryGetValue(localID, out entity)) | ||
149 | a = m_eb_uuid.Remove(entity.UUID); | ||
150 | |||
151 | bool b = m_eb_localID.Remove(localID); | ||
152 | return a && b; | ||
153 | } | ||
154 | catch (Exception e) | ||
155 | { | ||
156 | m_log.ErrorFormat("Remove Entity failed for {0}", localID, e); | ||
157 | return false; | ||
158 | } | ||
159 | } | ||
160 | finally | ||
161 | { | ||
162 | m_lock.ExitWriteLock(); | ||
163 | } | ||
164 | } | 70 | } |
165 | 71 | ||
166 | public bool Remove(UUID id) | 72 | public bool Remove(UUID id) |
167 | { | 73 | { |
168 | m_lock.EnterWriteLock(); | 74 | return m_entities.Remove(id); |
169 | try | ||
170 | { | ||
171 | try | ||
172 | { | ||
173 | bool a = false; | ||
174 | EntityBase entity; | ||
175 | if (m_eb_uuid.TryGetValue(id, out entity)) | ||
176 | a = m_eb_localID.Remove(entity.LocalId); | ||
177 | |||
178 | bool b = m_eb_uuid.Remove(id); | ||
179 | return a && b; | ||
180 | } | ||
181 | catch (Exception e) | ||
182 | { | ||
183 | m_log.ErrorFormat("Remove Entity failed for {0}", id, e); | ||
184 | return false; | ||
185 | } | ||
186 | } | ||
187 | finally | ||
188 | { | ||
189 | m_lock.ExitWriteLock(); | ||
190 | } | ||
191 | } | 75 | } |
192 | 76 | ||
193 | public List<EntityBase> GetAllByType<T>() | 77 | public EntityBase[] GetAllByType<T>() |
194 | { | 78 | { |
195 | List<EntityBase> tmp = new List<EntityBase>(); | 79 | List<EntityBase> tmp = new List<EntityBase>(); |
196 | 80 | ||
197 | m_lock.EnterReadLock(); | 81 | m_entities.ForEach( |
198 | try | 82 | delegate(EntityBase entity) |
199 | { | ||
200 | try | ||
201 | { | ||
202 | foreach (KeyValuePair<UUID, EntityBase> pair in m_eb_uuid) | ||
203 | { | ||
204 | if (pair.Value is T) | ||
205 | { | ||
206 | tmp.Add(pair.Value); | ||
207 | } | ||
208 | } | ||
209 | } | ||
210 | catch (Exception e) | ||
211 | { | 83 | { |
212 | m_log.ErrorFormat("GetAllByType failed for {0}", e); | 84 | if (entity is T) |
213 | tmp = null; | 85 | tmp.Add(entity); |
214 | } | 86 | } |
215 | } | 87 | ); |
216 | finally | ||
217 | { | ||
218 | m_lock.ExitReadLock(); | ||
219 | } | ||
220 | 88 | ||
221 | return tmp; | 89 | return tmp.ToArray(); |
222 | } | 90 | } |
223 | 91 | ||
224 | public List<EntityBase> GetEntities() | 92 | public EntityBase[] GetEntities() |
225 | { | 93 | { |
226 | m_lock.EnterReadLock(); | 94 | List<EntityBase> tmp = new List<EntityBase>(m_entities.Count); |
227 | try | 95 | m_entities.ForEach(delegate(EntityBase entity) { tmp.Add(entity); }); |
228 | { | 96 | return tmp.ToArray(); |
229 | return new List<EntityBase>(m_eb_uuid.Values); | 97 | } |
230 | } | 98 | |
231 | finally | 99 | public void ForEach(Action<EntityBase> action) |
232 | { | 100 | { |
233 | m_lock.ExitReadLock(); | 101 | m_entities.ForEach(action); |
234 | } | 102 | } |
103 | |||
104 | public EntityBase Find(Predicate<EntityBase> predicate) | ||
105 | { | ||
106 | return m_entities.FindValue(predicate); | ||
235 | } | 107 | } |
236 | 108 | ||
237 | public EntityBase this[UUID id] | 109 | public EntityBase this[UUID id] |
238 | { | 110 | { |
239 | get | 111 | get |
240 | { | 112 | { |
241 | m_lock.EnterReadLock(); | 113 | EntityBase entity; |
242 | try | 114 | m_entities.TryGetValue(id, out entity); |
243 | { | 115 | return entity; |
244 | EntityBase entity; | ||
245 | if (m_eb_uuid.TryGetValue(id, out entity)) | ||
246 | return entity; | ||
247 | else | ||
248 | return null; | ||
249 | } | ||
250 | finally | ||
251 | { | ||
252 | m_lock.ExitReadLock(); | ||
253 | } | ||
254 | } | 116 | } |
255 | set | 117 | set |
256 | { | 118 | { |
257 | InsertOrReplace(value); | 119 | Add(value); |
258 | } | 120 | } |
259 | } | 121 | } |
260 | 122 | ||
@@ -262,65 +124,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
262 | { | 124 | { |
263 | get | 125 | get |
264 | { | 126 | { |
265 | m_lock.EnterReadLock(); | 127 | EntityBase entity; |
266 | try | 128 | m_entities.TryGetValue(localID, out entity); |
267 | { | 129 | return entity; |
268 | EntityBase entity; | ||
269 | if (m_eb_localID.TryGetValue(localID, out entity)) | ||
270 | return entity; | ||
271 | else | ||
272 | return null; | ||
273 | } | ||
274 | finally | ||
275 | { | ||
276 | m_lock.ExitReadLock(); | ||
277 | } | ||
278 | } | 130 | } |
279 | set | 131 | set |
280 | { | 132 | { |
281 | InsertOrReplace(value); | 133 | Add(value); |
282 | } | 134 | } |
283 | } | 135 | } |
284 | 136 | ||
285 | public bool TryGetValue(UUID key, out EntityBase obj) | 137 | public bool TryGetValue(UUID key, out EntityBase obj) |
286 | { | 138 | { |
287 | m_lock.EnterReadLock(); | 139 | return m_entities.TryGetValue(key, out obj); |
288 | try | ||
289 | { | ||
290 | return m_eb_uuid.TryGetValue(key, out obj); | ||
291 | } | ||
292 | finally | ||
293 | { | ||
294 | m_lock.ExitReadLock(); | ||
295 | } | ||
296 | } | 140 | } |
297 | 141 | ||
298 | public bool TryGetValue(uint key, out EntityBase obj) | 142 | public bool TryGetValue(uint key, out EntityBase obj) |
299 | { | 143 | { |
300 | m_lock.EnterReadLock(); | 144 | return m_entities.TryGetValue(key, out obj); |
301 | try | ||
302 | { | ||
303 | return m_eb_localID.TryGetValue(key, out obj); | ||
304 | } | ||
305 | finally | ||
306 | { | ||
307 | m_lock.ExitReadLock(); | ||
308 | } | ||
309 | } | ||
310 | |||
311 | /// <summary> | ||
312 | /// This could be optimised to work on the list 'live' rather than making a safe copy and iterating that. | ||
313 | /// </summary> | ||
314 | /// <returns></returns> | ||
315 | public IEnumerator<EntityBase> GetEnumerator() | ||
316 | { | ||
317 | return GetEntities().GetEnumerator(); | ||
318 | } | ||
319 | |||
320 | IEnumerator IEnumerable.GetEnumerator() | ||
321 | { | ||
322 | return GetEnumerator(); | ||
323 | } | 145 | } |
324 | |||
325 | } | 146 | } |
326 | } | 147 | } |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 3fae5e6..e923932 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
61 | 61 | ||
62 | public event OnTerrainUpdateDelegate OnTerrainUpdate; | 62 | public event OnTerrainUpdateDelegate OnTerrainUpdate; |
63 | 63 | ||
64 | public delegate void OnBackupDelegate(IRegionDataStore datastore, bool forceBackup); | 64 | public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); |
65 | 65 | ||
66 | public event OnBackupDelegate OnBackup; | 66 | public event OnBackupDelegate OnBackup; |
67 | 67 | ||
@@ -336,7 +336,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
336 | /// If the object is being attached, then the avatarID will be present. If the object is being detached then | 336 | /// If the object is being attached, then the avatarID will be present. If the object is being detached then |
337 | /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical). | 337 | /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical). |
338 | public delegate void Attach(uint localID, UUID itemID, UUID avatarID); | 338 | public delegate void Attach(uint localID, UUID itemID, UUID avatarID); |
339 | public event Attach OnAttach; | 339 | public event Attach OnAttach; |
340 | 340 | ||
341 | /// <summary> | 341 | /// <summary> |
342 | /// Called immediately after an object is loaded from storage. | 342 | /// Called immediately after an object is loaded from storage. |
@@ -348,7 +348,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
348 | /// Called immediately before an object is saved to storage. | 348 | /// Called immediately before an object is saved to storage. |
349 | /// </summary> | 349 | /// </summary> |
350 | /// <param name="persistingSo"> | 350 | /// <param name="persistingSo"> |
351 | /// The scene object being persisted. | 351 | /// The scene object being persisted. |
352 | /// This is actually a copy of the original scene object so changes made here will be saved to storage but will not be kept in memory. | 352 | /// This is actually a copy of the original scene object so changes made here will be saved to storage but will not be kept in memory. |
353 | /// </param> | 353 | /// </param> |
354 | /// <param name="originalSo"> | 354 | /// <param name="originalSo"> |
@@ -367,7 +367,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
367 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); | 367 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); |
368 | 368 | ||
369 | public delegate void RegionUp(GridRegion region); | 369 | public delegate void RegionUp(GridRegion region); |
370 | public event RegionUp OnRegionUp; | 370 | public event RegionUp OnRegionUp; |
371 | 371 | ||
372 | public class MoneyTransferArgs : EventArgs | 372 | public class MoneyTransferArgs : EventArgs |
373 | { | 373 | { |
@@ -688,7 +688,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
688 | } | 688 | } |
689 | } | 689 | } |
690 | 690 | ||
691 | public void TriggerOnBackup(IRegionDataStore dstore, bool forced) | 691 | public void TriggerOnBackup(ISimulationDataService dstore, bool forced) |
692 | { | 692 | { |
693 | OnBackupDelegate handlerOnAttach = OnBackup; | 693 | OnBackupDelegate handlerOnAttach = OnBackup; |
694 | if (handlerOnAttach != null) | 694 | if (handlerOnAttach != null) |
@@ -2087,7 +2087,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2087 | } | 2087 | } |
2088 | } | 2088 | } |
2089 | } | 2089 | } |
2090 | } | 2090 | } |
2091 | 2091 | ||
2092 | public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo) | 2092 | public void TriggerOnSceneObjectPreSave(SceneObjectGroup persistingSo, SceneObjectGroup originalSo) |
2093 | { | 2093 | { |
@@ -2129,7 +2129,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2129 | } | 2129 | } |
2130 | } | 2130 | } |
2131 | } | 2131 | } |
2132 | } | 2132 | } |
2133 | 2133 | ||
2134 | public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, | 2134 | public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, |
2135 | int local_id, IClientAPI remote_client) | 2135 | int local_id, IClientAPI remote_client) |
@@ -2151,6 +2151,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2151 | } | 2151 | } |
2152 | } | 2152 | } |
2153 | } | 2153 | } |
2154 | } | 2154 | } |
2155 | } | 2155 | } |
2156 | } | 2156 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs index 3a3ec2b..c75f8ba 100644 --- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs +++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs | |||
@@ -1,3 +1,30 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
1 | using System; | 28 | using System; |
2 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
3 | using log4net; | 30 | using log4net; |
@@ -35,7 +62,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
35 | 62 | ||
36 | /// <summary> | 63 | /// <summary> |
37 | /// This is added to the priority of all child prims, to make sure that the root prim update is sent to the | 64 | /// This is added to the priority of all child prims, to make sure that the root prim update is sent to the |
38 | /// viewer before child prim updates. | 65 | /// viewer before child prim updates. |
39 | /// The adjustment is added to child prims and subtracted from root prims, so the gap ends up | 66 | /// The adjustment is added to child prims and subtracted from root prims, so the gap ends up |
40 | /// being double. We do it both ways so that there is a still a priority delta even if the priority is already | 67 | /// being double. We do it both ways so that there is a still a priority delta even if the priority is already |
41 | /// double.MinValue or double.MaxValue. | 68 | /// double.MinValue or double.MaxValue. |
@@ -123,9 +150,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
123 | if (entity is SceneObjectPart) | 150 | if (entity is SceneObjectPart) |
124 | { | 151 | { |
125 | // Can't use Scene.GetGroupByPrim() here, since the entity may have been delete from the scene | 152 | // Can't use Scene.GetGroupByPrim() here, since the entity may have been delete from the scene |
126 | // before its scheduled update was triggered | 153 | // before its scheduled update was triggered |
127 | //entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition; | 154 | //entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition; |
128 | entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition; | 155 | entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition; |
129 | } | 156 | } |
130 | else | 157 | else |
131 | { | 158 | { |
@@ -152,15 +179,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
152 | Vector3 entityPos = entity.AbsolutePosition; | 179 | Vector3 entityPos = entity.AbsolutePosition; |
153 | if (entity is SceneObjectPart) | 180 | if (entity is SceneObjectPart) |
154 | { | 181 | { |
155 | SceneObjectGroup group = m_scene.GetGroupByPrim(entity.LocalId); | 182 | // Can't use Scene.GetGroupByPrim() here, since the entity may have been delete from the scene |
156 | if (group == null) | 183 | // before its scheduled update was triggered |
157 | { | 184 | //entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition; |
158 | entityPos = entity.AbsolutePosition; | 185 | entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition; |
159 | } | ||
160 | else | ||
161 | { | ||
162 | entityPos = group.AbsolutePosition; | ||
163 | } | ||
164 | } | 186 | } |
165 | else | 187 | else |
166 | { | 188 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index ccbd880..867fb10 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -58,7 +58,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
58 | { | 58 | { |
59 | m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); | 59 | m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); |
60 | 60 | ||
61 | foreach (EntityBase group in Entities) | 61 | EntityBase[] entities = Entities.GetEntities(); |
62 | foreach (EntityBase group in entities) | ||
62 | { | 63 | { |
63 | if (group is SceneObjectGroup) | 64 | if (group is SceneObjectGroup) |
64 | { | 65 | { |
@@ -132,7 +133,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
132 | item.Owner, item.Name, item.ID); | 133 | item.Owner, item.Name, item.ID); |
133 | 134 | ||
134 | return false; | 135 | return false; |
135 | } | 136 | } |
136 | } | 137 | } |
137 | 138 | ||
138 | /// <summary> | 139 | /// <summary> |
@@ -1987,7 +1988,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1987 | return null; | 1988 | return null; |
1988 | 1989 | ||
1989 | if (!Permissions.CanRezObject(group.PrimCount, item.OwnerID, pos)) | 1990 | if (!Permissions.CanRezObject(group.PrimCount, item.OwnerID, pos)) |
1990 | return null; | 1991 | return null; |
1991 | 1992 | ||
1992 | if (!Permissions.BypassPermissions()) | 1993 | if (!Permissions.BypassPermissions()) |
1993 | { | 1994 | { |
@@ -2065,7 +2066,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2065 | 2066 | ||
2066 | List<SceneObjectPart> partList = null; | 2067 | List<SceneObjectPart> partList = null; |
2067 | lock (sog.Children) | 2068 | lock (sog.Children) |
2068 | partList = new List<SceneObjectPart>(sog.Children.Values); | 2069 | partList = new List<SceneObjectPart>(sog.Children.Values); |
2069 | 2070 | ||
2070 | foreach (SceneObjectPart child in partList) | 2071 | foreach (SceneObjectPart child in partList) |
2071 | child.Inventory.ChangeInventoryOwner(ownerID); | 2072 | child.Inventory.ChangeInventoryOwner(ownerID); |
@@ -2080,7 +2081,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2080 | 2081 | ||
2081 | List<SceneObjectPart> partList = null; | 2082 | List<SceneObjectPart> partList = null; |
2082 | lock (sog.Children) | 2083 | lock (sog.Children) |
2083 | partList = new List<SceneObjectPart>(sog.Children.Values); | 2084 | partList = new List<SceneObjectPart>(sog.Children.Values); |
2084 | 2085 | ||
2085 | foreach (SceneObjectPart child in partList) | 2086 | foreach (SceneObjectPart child in partList) |
2086 | { | 2087 | { |
@@ -2090,7 +2091,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2090 | 2091 | ||
2091 | sog.SetOwnerId(groupID); | 2092 | sog.SetOwnerId(groupID); |
2092 | sog.ApplyNextOwnerPermissions(); | 2093 | sog.ApplyNextOwnerPermissions(); |
2093 | } | 2094 | } |
2094 | } | 2095 | } |
2095 | 2096 | ||
2096 | foreach (uint localID in localIDs) | 2097 | foreach (uint localID in localIDs) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index c511774..7788e43 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -116,9 +116,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
116 | /// <param name="remoteClient"></param> | 116 | /// <param name="remoteClient"></param> |
117 | public void RequestPrim(uint primLocalID, IClientAPI remoteClient) | 117 | public void RequestPrim(uint primLocalID, IClientAPI remoteClient) |
118 | { | 118 | { |
119 | List<EntityBase> EntityList = GetEntities(); | 119 | EntityBase[] entityList = GetEntities(); |
120 | 120 | foreach (EntityBase ent in entityList) | |
121 | foreach (EntityBase ent in EntityList) | ||
122 | { | 121 | { |
123 | if (ent is SceneObjectGroup) | 122 | if (ent is SceneObjectGroup) |
124 | { | 123 | { |
@@ -138,9 +137,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
138 | /// <param name="remoteClient"></param> | 137 | /// <param name="remoteClient"></param> |
139 | public void SelectPrim(uint primLocalID, IClientAPI remoteClient) | 138 | public void SelectPrim(uint primLocalID, IClientAPI remoteClient) |
140 | { | 139 | { |
141 | List<EntityBase> EntityList = GetEntities(); | 140 | EntityBase[] entityList = GetEntities(); |
142 | 141 | foreach (EntityBase ent in entityList) | |
143 | foreach (EntityBase ent in EntityList) | ||
144 | { | 142 | { |
145 | if (ent is SceneObjectGroup) | 143 | if (ent is SceneObjectGroup) |
146 | { | 144 | { |
@@ -166,7 +164,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
166 | 164 | ||
167 | List<SceneObjectPart> partList = null; | 165 | List<SceneObjectPart> partList = null; |
168 | lock (sog.Children) | 166 | lock (sog.Children) |
169 | partList = new List<SceneObjectPart>(sog.Children.Values); | 167 | partList = new List<SceneObjectPart>(sog.Children.Values); |
170 | 168 | ||
171 | foreach (SceneObjectPart part in partList) | 169 | foreach (SceneObjectPart part in partList) |
172 | { | 170 | { |
@@ -259,7 +257,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
259 | 257 | ||
260 | public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) | 258 | public virtual void ProcessObjectGrab(uint localID, Vector3 offsetPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) |
261 | { | 259 | { |
262 | List<EntityBase> EntityList = GetEntities(); | 260 | EntityBase[] EntityList = GetEntities(); |
263 | 261 | ||
264 | SurfaceTouchEventArgs surfaceArg = null; | 262 | SurfaceTouchEventArgs surfaceArg = null; |
265 | if (surfaceArgs != null && surfaceArgs.Count > 0) | 263 | if (surfaceArgs != null && surfaceArgs.Count > 0) |
@@ -303,7 +301,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
303 | 301 | ||
304 | public virtual void ProcessObjectGrabUpdate(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) | 302 | public virtual void ProcessObjectGrabUpdate(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) |
305 | { | 303 | { |
306 | List<EntityBase> EntityList = GetEntities(); | 304 | EntityBase[] EntityList = GetEntities(); |
307 | 305 | ||
308 | SurfaceTouchEventArgs surfaceArg = null; | 306 | SurfaceTouchEventArgs surfaceArg = null; |
309 | if (surfaceArgs != null && surfaceArgs.Count > 0) | 307 | if (surfaceArgs != null && surfaceArgs.Count > 0) |
@@ -343,7 +341,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
343 | 341 | ||
344 | public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) | 342 | public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) |
345 | { | 343 | { |
346 | List<EntityBase> EntityList = GetEntities(); | 344 | EntityBase[] EntityList = GetEntities(); |
347 | 345 | ||
348 | SurfaceTouchEventArgs surfaceArg = null; | 346 | SurfaceTouchEventArgs surfaceArg = null; |
349 | if (surfaceArgs != null && surfaceArgs.Count > 0) | 347 | if (surfaceArgs != null && surfaceArgs.Count > 0) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index 4e80bf2..06890a0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -997,6 +997,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
997 | } | 997 | } |
998 | } | 998 | } |
999 | return true; | 999 | return true; |
1000 | } | 1000 | } |
1001 | } | 1001 | } |
1002 | } \ No newline at end of file | 1002 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index be342ab..0e1b4b1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -57,55 +57,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
57 | 57 | ||
58 | public partial class Scene : SceneBase | 58 | public partial class Scene : SceneBase |
59 | { | 59 | { |
60 | public delegate void SynchronizeSceneHandler(Scene scene); | ||
61 | public SynchronizeSceneHandler SynchronizeScene = null; | ||
62 | |||
63 | /* Used by the loadbalancer plugin on GForge */ | ||
64 | protected int m_splitRegionID = 0; | ||
65 | public int SplitRegionID | ||
66 | { | ||
67 | get { return m_splitRegionID; } | ||
68 | set { m_splitRegionID = value; } | ||
69 | } | ||
70 | |||
71 | private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L; | 60 | private const long DEFAULT_MIN_TIME_FOR_PERSISTENCE = 60L; |
72 | private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L; | 61 | private const long DEFAULT_MAX_TIME_FOR_PERSISTENCE = 600L; |
73 | 62 | ||
74 | #region Fields | 63 | public delegate void SynchronizeSceneHandler(Scene scene); |
75 | 64 | ||
76 | protected Timer m_restartWaitTimer = new Timer(); | 65 | #region Fields |
77 | 66 | ||
67 | public SynchronizeSceneHandler SynchronizeScene; | ||
78 | public SimStatsReporter StatsReporter; | 68 | public SimStatsReporter StatsReporter; |
79 | |||
80 | protected List<RegionInfo> m_regionRestartNotifyList = new List<RegionInfo>(); | ||
81 | protected List<RegionInfo> m_neighbours = new List<RegionInfo>(); | ||
82 | |||
83 | private volatile int m_bordersLocked = 0; | ||
84 | public bool BordersLocked | ||
85 | { | ||
86 | get { return m_bordersLocked == 1; } | ||
87 | set | ||
88 | { | ||
89 | if (value == true) | ||
90 | m_bordersLocked = 1; | ||
91 | else | ||
92 | m_bordersLocked = 0; | ||
93 | } | ||
94 | } | ||
95 | public List<Border> NorthBorders = new List<Border>(); | 69 | public List<Border> NorthBorders = new List<Border>(); |
96 | public List<Border> EastBorders = new List<Border>(); | 70 | public List<Border> EastBorders = new List<Border>(); |
97 | public List<Border> SouthBorders = new List<Border>(); | 71 | public List<Border> SouthBorders = new List<Border>(); |
98 | public List<Border> WestBorders = new List<Border>(); | 72 | public List<Border> WestBorders = new List<Border>(); |
99 | 73 | ||
100 | /// <value> | 74 | /// <summary>Are we applying physics to any of the prims in this scene?</summary> |
101 | /// The scene graph for this scene | ||
102 | /// </value> | ||
103 | /// TODO: Possibly stop other classes being able to manipulate this directly. | ||
104 | private SceneGraph m_sceneGraph; | ||
105 | |||
106 | /// <summary> | ||
107 | /// Are we applying physics to any of the prims in this scene? | ||
108 | /// </summary> | ||
109 | public bool m_physicalPrim; | 75 | public bool m_physicalPrim; |
110 | public float m_maxNonphys = 256; | 76 | public float m_maxNonphys = 256; |
111 | public float m_maxPhys = 10; | 77 | public float m_maxPhys = 10; |
@@ -119,25 +85,131 @@ namespace OpenSim.Region.Framework.Scenes | |||
119 | // root agents when ACL denies access to root agent | 85 | // root agents when ACL denies access to root agent |
120 | public bool m_strictAccessControl = true; | 86 | public bool m_strictAccessControl = true; |
121 | public int MaxUndoCount = 5; | 87 | public int MaxUndoCount = 5; |
88 | public bool LoginsDisabled = true; | ||
89 | public bool LoadingPrims; | ||
90 | public IXfer XferManager; | ||
91 | |||
92 | // the minimum time that must elapse before a changed object will be considered for persisted | ||
93 | public long m_dontPersistBefore = DEFAULT_MIN_TIME_FOR_PERSISTENCE * 10000000L; | ||
94 | // the maximum time that must elapse before a changed object will be considered for persisted | ||
95 | public long m_persistAfter = DEFAULT_MAX_TIME_FOR_PERSISTENCE * 10000000L; | ||
96 | |||
97 | protected int m_splitRegionID; | ||
98 | protected Timer m_restartWaitTimer = new Timer(); | ||
99 | protected List<RegionInfo> m_regionRestartNotifyList = new List<RegionInfo>(); | ||
100 | protected List<RegionInfo> m_neighbours = new List<RegionInfo>(); | ||
101 | protected string m_simulatorVersion = "OpenSimulator Server"; | ||
102 | protected ModuleLoader m_moduleLoader; | ||
103 | protected AgentCircuitManager m_authenticateHandler; | ||
104 | protected SceneCommunicationService m_sceneGridService; | ||
105 | protected ISnmpModule m_snmpService = null; | ||
106 | |||
107 | protected ISimulationDataService m_SimulationDataService; | ||
108 | protected IEstateDataService m_EstateDataService; | ||
109 | protected IAssetService m_AssetService; | ||
110 | protected IAuthorizationService m_AuthorizationService; | ||
111 | protected IInventoryService m_InventoryService; | ||
112 | protected IGridService m_GridService; | ||
113 | protected ILibraryService m_LibraryService; | ||
114 | protected ISimulationService m_simulationService; | ||
115 | protected IAuthenticationService m_AuthenticationService; | ||
116 | protected IPresenceService m_PresenceService; | ||
117 | protected IUserAccountService m_UserAccountService; | ||
118 | protected IAvatarService m_AvatarService; | ||
119 | protected IGridUserService m_GridUserService; | ||
120 | |||
121 | protected IXMLRPC m_xmlrpcModule; | ||
122 | protected IWorldComm m_worldCommModule; | ||
123 | protected IAvatarFactory m_AvatarFactory; | ||
124 | protected IConfigSource m_config; | ||
125 | protected IRegionSerialiserModule m_serialiser; | ||
126 | protected IDialogModule m_dialogModule; | ||
127 | protected IEntityTransferModule m_teleportModule; | ||
128 | protected ICapabilitiesModule m_capsModule; | ||
129 | // Central Update Loop | ||
130 | protected int m_fps = 10; | ||
131 | protected uint m_frame; | ||
132 | protected float m_timespan = 0.089f; | ||
133 | protected DateTime m_lastupdate = DateTime.UtcNow; | ||
134 | |||
135 | // TODO: Possibly stop other classes being able to manipulate this directly. | ||
136 | private SceneGraph m_sceneGraph; | ||
137 | private volatile int m_bordersLocked; | ||
122 | private int m_RestartTimerCounter; | 138 | private int m_RestartTimerCounter; |
123 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing | 139 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing |
124 | private int m_incrementsof15seconds; | 140 | private int m_incrementsof15seconds; |
125 | private volatile bool m_backingup; | 141 | private volatile bool m_backingup; |
126 | |||
127 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); | 142 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); |
128 | private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); | 143 | private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); |
144 | private Object m_heartbeatLock = new Object(); | ||
129 | 145 | ||
130 | protected string m_simulatorVersion = "OpenSimulator Server"; | 146 | private int m_update_physics = 1; |
147 | private int m_update_entitymovement = 1; | ||
148 | private int m_update_objects = 1; // Update objects which have scheduled themselves for updates | ||
149 | private int m_update_presences = 1; // Update scene presence movements | ||
150 | private int m_update_events = 1; | ||
151 | private int m_update_backup = 200; | ||
152 | private int m_update_terrain = 50; | ||
153 | private int m_update_land = 1; | ||
154 | private int m_update_coarse_locations = 50; | ||
131 | 155 | ||
132 | protected ModuleLoader m_moduleLoader; | 156 | private int frameMS; |
133 | protected StorageManager m_storageManager; | 157 | private int physicsMS2; |
134 | protected AgentCircuitManager m_authenticateHandler; | 158 | private int physicsMS; |
159 | private int otherMS; | ||
160 | private int tempOnRezMS; | ||
161 | private int eventMS; | ||
162 | private int backupMS; | ||
163 | private int terrainMS; | ||
164 | private int landMS; | ||
165 | private int lastCompletedFrame; | ||
135 | 166 | ||
136 | protected SceneCommunicationService m_sceneGridService; | ||
137 | public bool LoginsDisabled = true; | ||
138 | public bool LoadingPrims = false; | ||
139 | public bool CombineRegions = false; | 167 | public bool CombineRegions = false; |
168 | private bool m_physics_enabled = true; | ||
169 | private bool m_scripts_enabled = true; | ||
170 | private string m_defaultScriptEngine; | ||
171 | private int m_LastLogin; | ||
172 | private Thread HeartbeatThread; | ||
173 | private volatile bool shuttingdown; | ||
174 | |||
175 | private int m_lastUpdate; | ||
176 | private bool m_firstHeartbeat = true; | ||
177 | |||
178 | private object m_deleting_scene_object = new object(); | ||
179 | private object m_cleaningAttachments = new object(); | ||
180 | |||
181 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; | ||
182 | private bool m_reprioritizationEnabled = true; | ||
183 | private double m_reprioritizationInterval = 5000.0; | ||
184 | private double m_rootReprioritizationDistance = 10.0; | ||
185 | private double m_childReprioritizationDistance = 20.0; | ||
186 | |||
187 | private Timer m_mapGenerationTimer = new Timer(); | ||
188 | private bool m_generateMaptiles; | ||
189 | |||
190 | #endregion Fields | ||
140 | 191 | ||
192 | #region Properties | ||
193 | |||
194 | /* Used by the loadbalancer plugin on GForge */ | ||
195 | public int SplitRegionID | ||
196 | { | ||
197 | get { return m_splitRegionID; } | ||
198 | set { m_splitRegionID = value; } | ||
199 | } | ||
200 | |||
201 | public bool BordersLocked | ||
202 | { | ||
203 | get { return m_bordersLocked == 1; } | ||
204 | set | ||
205 | { | ||
206 | if (value == true) | ||
207 | m_bordersLocked = 1; | ||
208 | else | ||
209 | m_bordersLocked = 0; | ||
210 | } | ||
211 | } | ||
212 | |||
141 | public new float TimeDilation | 213 | public new float TimeDilation |
142 | { | 214 | { |
143 | get { return m_sceneGraph.PhysicsScene.TimeDilation; } | 215 | get { return m_sceneGraph.PhysicsScene.TimeDilation; } |
@@ -148,9 +220,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
148 | get { return m_sceneGridService; } | 220 | get { return m_sceneGridService; } |
149 | } | 221 | } |
150 | 222 | ||
151 | public IXfer XferManager; | ||
152 | |||
153 | protected ISnmpModule m_snmpService = null; | ||
154 | public ISnmpModule SnmpService | 223 | public ISnmpModule SnmpService |
155 | { | 224 | { |
156 | get | 225 | get |
@@ -164,10 +233,41 @@ namespace OpenSim.Region.Framework.Scenes | |||
164 | } | 233 | } |
165 | } | 234 | } |
166 | 235 | ||
167 | protected IAssetService m_AssetService; | 236 | public ISimulationDataService SimulationDataService |
168 | protected IAuthorizationService m_AuthorizationService; | 237 | { |
238 | get | ||
239 | { | ||
240 | if (m_SimulationDataService == null) | ||
241 | { | ||
242 | m_SimulationDataService = RequestModuleInterface<ISimulationDataService>(); | ||
169 | 243 | ||
170 | private Object m_heartbeatLock = new Object(); | 244 | if (m_SimulationDataService == null) |
245 | { | ||
246 | throw new Exception("No ISimulationDataService available."); | ||
247 | } | ||
248 | } | ||
249 | |||
250 | return m_SimulationDataService; | ||
251 | } | ||
252 | } | ||
253 | |||
254 | public IEstateDataService EstateDataService | ||
255 | { | ||
256 | get | ||
257 | { | ||
258 | if (m_EstateDataService == null) | ||
259 | { | ||
260 | m_EstateDataService = RequestModuleInterface<IEstateDataService>(); | ||
261 | |||
262 | if (m_EstateDataService == null) | ||
263 | { | ||
264 | throw new Exception("No IEstateDataService available."); | ||
265 | } | ||
266 | } | ||
267 | |||
268 | return m_EstateDataService; | ||
269 | } | ||
270 | } | ||
171 | 271 | ||
172 | public IAssetService AssetService | 272 | public IAssetService AssetService |
173 | { | 273 | { |
@@ -206,8 +306,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
206 | } | 306 | } |
207 | } | 307 | } |
208 | 308 | ||
209 | protected IInventoryService m_InventoryService; | ||
210 | |||
211 | public IInventoryService InventoryService | 309 | public IInventoryService InventoryService |
212 | { | 310 | { |
213 | get | 311 | get |
@@ -226,8 +324,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
226 | } | 324 | } |
227 | } | 325 | } |
228 | 326 | ||
229 | protected IGridService m_GridService; | ||
230 | |||
231 | public IGridService GridService | 327 | public IGridService GridService |
232 | { | 328 | { |
233 | get | 329 | get |
@@ -246,8 +342,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
246 | } | 342 | } |
247 | } | 343 | } |
248 | 344 | ||
249 | protected ILibraryService m_LibraryService; | ||
250 | |||
251 | public ILibraryService LibraryService | 345 | public ILibraryService LibraryService |
252 | { | 346 | { |
253 | get | 347 | get |
@@ -259,7 +353,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
259 | } | 353 | } |
260 | } | 354 | } |
261 | 355 | ||
262 | protected ISimulationService m_simulationService; | ||
263 | public ISimulationService SimulationService | 356 | public ISimulationService SimulationService |
264 | { | 357 | { |
265 | get | 358 | get |
@@ -270,7 +363,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
270 | } | 363 | } |
271 | } | 364 | } |
272 | 365 | ||
273 | protected IAuthenticationService m_AuthenticationService; | ||
274 | public IAuthenticationService AuthenticationService | 366 | public IAuthenticationService AuthenticationService |
275 | { | 367 | { |
276 | get | 368 | get |
@@ -281,7 +373,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
281 | } | 373 | } |
282 | } | 374 | } |
283 | 375 | ||
284 | protected IPresenceService m_PresenceService; | ||
285 | public IPresenceService PresenceService | 376 | public IPresenceService PresenceService |
286 | { | 377 | { |
287 | get | 378 | get |
@@ -291,7 +382,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
291 | return m_PresenceService; | 382 | return m_PresenceService; |
292 | } | 383 | } |
293 | } | 384 | } |
294 | protected IUserAccountService m_UserAccountService; | 385 | |
295 | public IUserAccountService UserAccountService | 386 | public IUserAccountService UserAccountService |
296 | { | 387 | { |
297 | get | 388 | get |
@@ -302,8 +393,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
302 | } | 393 | } |
303 | } | 394 | } |
304 | 395 | ||
305 | protected OpenSim.Services.Interfaces.IAvatarService m_AvatarService; | 396 | public IAvatarService AvatarService |
306 | public OpenSim.Services.Interfaces.IAvatarService AvatarService | ||
307 | { | 397 | { |
308 | get | 398 | get |
309 | { | 399 | { |
@@ -313,7 +403,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
313 | } | 403 | } |
314 | } | 404 | } |
315 | 405 | ||
316 | protected IGridUserService m_GridUserService; | ||
317 | public IGridUserService GridUserService | 406 | public IGridUserService GridUserService |
318 | { | 407 | { |
319 | get | 408 | get |
@@ -324,58 +413,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
324 | } | 413 | } |
325 | } | 414 | } |
326 | 415 | ||
327 | protected IXMLRPC m_xmlrpcModule; | ||
328 | protected IWorldComm m_worldCommModule; | ||
329 | public IAttachmentsModule AttachmentsModule { get; set; } | 416 | public IAttachmentsModule AttachmentsModule { get; set; } |
330 | protected IAvatarFactory m_AvatarFactory; | 417 | |
331 | public IAvatarFactory AvatarFactory | 418 | public IAvatarFactory AvatarFactory |
332 | { | 419 | { |
333 | get { return m_AvatarFactory; } | 420 | get { return m_AvatarFactory; } |
334 | } | 421 | } |
335 | protected IConfigSource m_config; | ||
336 | protected IRegionSerialiserModule m_serialiser; | ||
337 | protected IDialogModule m_dialogModule; | ||
338 | protected IEntityTransferModule m_teleportModule; | ||
339 | 422 | ||
340 | protected ICapabilitiesModule m_capsModule; | ||
341 | public ICapabilitiesModule CapsModule | 423 | public ICapabilitiesModule CapsModule |
342 | { | 424 | { |
343 | get { return m_capsModule; } | 425 | get { return m_capsModule; } |
344 | } | 426 | } |
345 | 427 | ||
346 | protected override IConfigSource GetConfig() | ||
347 | { | ||
348 | return m_config; | ||
349 | } | ||
350 | |||
351 | // Central Update Loop | ||
352 | |||
353 | protected int m_fps = 10; | ||
354 | protected uint m_frame; | ||
355 | protected float m_timespan = 0.089f; | ||
356 | protected DateTime m_lastupdate = DateTime.UtcNow; | ||
357 | |||
358 | private int m_update_physics = 1; | ||
359 | private int m_update_entitymovement = 1; | ||
360 | private int m_update_objects = 1; // Update objects which have scheduled themselves for updates | ||
361 | private int m_update_presences = 1; // Update scene presence movements | ||
362 | private int m_update_events = 1; | ||
363 | private int m_update_backup = 200; | ||
364 | private int m_update_terrain = 50; | ||
365 | private int m_update_land = 1; | ||
366 | private int m_update_coarse_locations = 50; | ||
367 | |||
368 | private int frameMS; | ||
369 | private int physicsMS2; | ||
370 | private int physicsMS; | ||
371 | private int otherMS; | ||
372 | private int tempOnRezMS; | ||
373 | private int eventMS; | ||
374 | private int backupMS; | ||
375 | private int terrainMS; | ||
376 | private int landMS; | ||
377 | private int lastCompletedFrame; | ||
378 | |||
379 | public int MonitorFrameTime { get { return frameMS; } } | 428 | public int MonitorFrameTime { get { return frameMS; } } |
380 | public int MonitorPhysicsUpdateTime { get { return physicsMS; } } | 429 | public int MonitorPhysicsUpdateTime { get { return physicsMS; } } |
381 | public int MonitorPhysicsSyncTime { get { return physicsMS2; } } | 430 | public int MonitorPhysicsSyncTime { get { return physicsMS2; } } |
@@ -387,37 +436,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
387 | public int MonitorLandTime { get { return landMS; } } | 436 | public int MonitorLandTime { get { return landMS; } } |
388 | public int MonitorLastFrameTick { get { return lastCompletedFrame; } } | 437 | public int MonitorLastFrameTick { get { return lastCompletedFrame; } } |
389 | 438 | ||
390 | private bool m_physics_enabled = true; | ||
391 | private bool m_scripts_enabled = true; | ||
392 | private string m_defaultScriptEngine; | ||
393 | private int m_LastLogin; | ||
394 | private Thread HeartbeatThread; | ||
395 | private volatile bool shuttingdown; | ||
396 | |||
397 | private int m_lastUpdate; | ||
398 | private bool m_firstHeartbeat = true; | ||
399 | |||
400 | private object m_deleting_scene_object = new object(); | ||
401 | private object m_cleaningAttachments = new object(); | ||
402 | |||
403 | // the minimum time that must elapse before a changed object will be considered for persisted | ||
404 | public long m_dontPersistBefore = DEFAULT_MIN_TIME_FOR_PERSISTENCE * 10000000L; | ||
405 | // the maximum time that must elapse before a changed object will be considered for persisted | ||
406 | public long m_persistAfter = DEFAULT_MAX_TIME_FOR_PERSISTENCE * 10000000L; | ||
407 | |||
408 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; | ||
409 | private bool m_reprioritizationEnabled = true; | ||
410 | private double m_reprioritizationInterval = 5000.0; | ||
411 | private double m_rootReprioritizationDistance = 10.0; | ||
412 | private double m_childReprioritizationDistance = 20.0; | ||
413 | |||
414 | private Timer m_mapGenerationTimer = new Timer(); | ||
415 | bool m_generateMaptiles = false; | ||
416 | |||
417 | #endregion | ||
418 | |||
419 | #region Properties | ||
420 | |||
421 | public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return m_priorityScheme; } } | 439 | public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return m_priorityScheme; } } |
422 | public bool IsReprioritizationEnabled { get { return m_reprioritizationEnabled; } } | 440 | public bool IsReprioritizationEnabled { get { return m_reprioritizationEnabled; } } |
423 | public double ReprioritizationInterval { get { return m_reprioritizationInterval; } } | 441 | public double ReprioritizationInterval { get { return m_reprioritizationInterval; } } |
@@ -497,13 +515,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
497 | set { m_sceneGraph.RestorePresences = value; } | 515 | set { m_sceneGraph.RestorePresences = value; } |
498 | } | 516 | } |
499 | 517 | ||
500 | #endregion | 518 | #endregion Properties |
501 | 519 | ||
502 | #region Constructors | 520 | #region Constructors |
503 | 521 | ||
504 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, | 522 | public Scene(RegionInfo regInfo, AgentCircuitManager authen, |
505 | SceneCommunicationService sceneGridService, | 523 | SceneCommunicationService sceneGridService, |
506 | StorageManager storeManager, | 524 | ISimulationDataService simDataService, IEstateDataService estateDataService, |
507 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, | 525 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, |
508 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) | 526 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) |
509 | { | 527 | { |
@@ -539,7 +557,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
539 | m_moduleLoader = moduleLoader; | 557 | m_moduleLoader = moduleLoader; |
540 | m_authenticateHandler = authen; | 558 | m_authenticateHandler = authen; |
541 | m_sceneGridService = sceneGridService; | 559 | m_sceneGridService = sceneGridService; |
542 | m_storageManager = storeManager; | 560 | m_SimulationDataService = simDataService; |
561 | m_EstateDataService = estateDataService; | ||
543 | m_regInfo = regInfo; | 562 | m_regInfo = regInfo; |
544 | m_regionHandle = m_regInfo.RegionHandle; | 563 | m_regionHandle = m_regInfo.RegionHandle; |
545 | m_regionName = m_regInfo.RegionName; | 564 | m_regionName = m_regInfo.RegionName; |
@@ -558,13 +577,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
558 | #region Region Settings | 577 | #region Region Settings |
559 | 578 | ||
560 | // Load region settings | 579 | // Load region settings |
561 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); | 580 | m_regInfo.WindlightSettings = SimulationDataService.LoadRegionWindlightSettings(m_regInfo.RegionID); |
562 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID); | ||
563 | 581 | ||
564 | if (m_storageManager.EstateDataStore != null) | 582 | m_regInfo.RegionSettings = simDataService.LoadRegionSettings(m_regInfo.RegionID); |
565 | { | 583 | if (estateDataService != null) |
566 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); | 584 | m_regInfo.EstateSettings = estateDataService.LoadEstateSettings(m_regInfo.RegionID, false); |
567 | } | ||
568 | 585 | ||
569 | #endregion Region Settings | 586 | #endregion Region Settings |
570 | 587 | ||
@@ -574,9 +591,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
574 | 591 | ||
575 | //Bind Storage Manager functions to some land manager functions for this scene | 592 | //Bind Storage Manager functions to some land manager functions for this scene |
576 | EventManager.OnLandObjectAdded += | 593 | EventManager.OnLandObjectAdded += |
577 | new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject); | 594 | new EventManager.LandObjectAdded(simDataService.StoreLandObject); |
578 | EventManager.OnLandObjectRemoved += | 595 | EventManager.OnLandObjectRemoved += |
579 | new EventManager.LandObjectRemoved(m_storageManager.DataStore.RemoveLandObject); | 596 | new EventManager.LandObjectRemoved(simDataService.RemoveLandObject); |
580 | 597 | ||
581 | m_sceneGraph = new SceneGraph(this, m_regInfo); | 598 | m_sceneGraph = new SceneGraph(this, m_regInfo); |
582 | 599 | ||
@@ -1062,29 +1079,30 @@ namespace OpenSim.Region.Framework.Scenes | |||
1062 | if (ScriptEngine) | 1079 | if (ScriptEngine) |
1063 | { | 1080 | { |
1064 | m_log.Info("Stopping all Scripts in Scene"); | 1081 | m_log.Info("Stopping all Scripts in Scene"); |
1065 | foreach (EntityBase ent in Entities) | 1082 | |
1083 | EntityBase[] entities = Entities.GetEntities(); | ||
1084 | foreach (EntityBase ent in entities) | ||
1066 | { | 1085 | { |
1067 | if (ent is SceneObjectGroup) | 1086 | if (ent is SceneObjectGroup) |
1068 | { | 1087 | ((SceneObjectGroup)ent).RemoveScriptInstances(false); |
1069 | ((SceneObjectGroup) ent).RemoveScriptInstances(false); | ||
1070 | } | ||
1071 | } | 1088 | } |
1072 | } | 1089 | } |
1073 | else | 1090 | else |
1074 | { | 1091 | { |
1075 | m_log.Info("Starting all Scripts in Scene"); | 1092 | m_log.Info("Starting all Scripts in Scene"); |
1076 | lock (Entities) | 1093 | |
1094 | EntityBase[] entities = Entities.GetEntities(); | ||
1095 | foreach (EntityBase ent in entities) | ||
1077 | { | 1096 | { |
1078 | foreach (EntityBase ent in Entities) | 1097 | if (ent is SceneObjectGroup) |
1079 | { | 1098 | { |
1080 | if (ent is SceneObjectGroup) | 1099 | SceneObjectGroup sog = (SceneObjectGroup)ent; |
1081 | { | 1100 | sog.CreateScriptInstances(0, false, DefaultScriptEngine, 0); |
1082 | ((SceneObjectGroup)ent).CreateScriptInstances(0, false, DefaultScriptEngine, 0); | 1101 | sog.ResumeScripts(); |
1083 | ((SceneObjectGroup)ent).ResumeScripts(); | ||
1084 | } | ||
1085 | } | 1102 | } |
1086 | } | 1103 | } |
1087 | } | 1104 | } |
1105 | |||
1088 | m_scripts_enabled = !ScriptEngine; | 1106 | m_scripts_enabled = !ScriptEngine; |
1089 | m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); | 1107 | m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); |
1090 | } | 1108 | } |
@@ -1131,12 +1149,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1131 | shuttingdown = true; | 1149 | shuttingdown = true; |
1132 | 1150 | ||
1133 | m_log.Debug("[SCENE]: Persisting changed objects"); | 1151 | m_log.Debug("[SCENE]: Persisting changed objects"); |
1134 | List<EntityBase> entities = GetEntities(); | 1152 | EntityBase[] entities = GetEntities(); |
1135 | foreach (EntityBase entity in entities) | 1153 | foreach (EntityBase entity in entities) |
1136 | { | 1154 | { |
1137 | if (!entity.IsDeleted && entity is SceneObjectGroup && ((SceneObjectGroup)entity).HasGroupChanged) | 1155 | if (!entity.IsDeleted && entity is SceneObjectGroup && ((SceneObjectGroup)entity).HasGroupChanged) |
1138 | { | 1156 | { |
1139 | ((SceneObjectGroup)entity).ProcessBackup(m_storageManager.DataStore, false); | 1157 | ((SceneObjectGroup)entity).ProcessBackup(SimulationDataService, false); |
1140 | } | 1158 | } |
1141 | } | 1159 | } |
1142 | 1160 | ||
@@ -1192,8 +1210,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1192 | while (m_regInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) | 1210 | while (m_regInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) |
1193 | { | 1211 | { |
1194 | MainConsole.Instance.Output("The current estate has no owner set."); | 1212 | MainConsole.Instance.Output("The current estate has no owner set."); |
1195 | string first = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test"); | 1213 | List<char> excluded = new List<char>(new char[1]{' '}); |
1196 | string last = MainConsole.Instance.CmdPrompt("Estate owner last name", "User"); | 1214 | string first = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded); |
1215 | string last = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded); | ||
1197 | 1216 | ||
1198 | UserAccount account = UserAccountService.GetUserAccount(m_regInfo.ScopeID, first, last); | 1217 | UserAccount account = UserAccountService.GetUserAccount(m_regInfo.ScopeID, first, last); |
1199 | 1218 | ||
@@ -1577,7 +1596,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1577 | { | 1596 | { |
1578 | lock (m_returns) | 1597 | lock (m_returns) |
1579 | { | 1598 | { |
1580 | EventManager.TriggerOnBackup(m_storageManager.DataStore, forced); | 1599 | EventManager.TriggerOnBackup(SimulationDataService, forced); |
1581 | m_backingup = false; | 1600 | m_backingup = false; |
1582 | 1601 | ||
1583 | foreach (KeyValuePair<UUID, ReturnInfo> ret in m_returns) | 1602 | foreach (KeyValuePair<UUID, ReturnInfo> ret in m_returns) |
@@ -1618,7 +1637,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1618 | { | 1637 | { |
1619 | if (group != null) | 1638 | if (group != null) |
1620 | { | 1639 | { |
1621 | group.ProcessBackup(m_storageManager.DataStore, true); | 1640 | group.ProcessBackup(SimulationDataService, true); |
1622 | } | 1641 | } |
1623 | } | 1642 | } |
1624 | 1643 | ||
@@ -1660,20 +1679,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1660 | /// </summary> | 1679 | /// </summary> |
1661 | public void SaveTerrain() | 1680 | public void SaveTerrain() |
1662 | { | 1681 | { |
1663 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1682 | SimulationDataService.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1664 | } | 1683 | } |
1665 | 1684 | ||
1666 | public void StoreWindlightProfile(RegionLightShareData wl) | 1685 | public void StoreWindlightProfile(RegionLightShareData wl) |
1667 | { | 1686 | { |
1668 | m_regInfo.WindlightSettings = wl; | 1687 | m_regInfo.WindlightSettings = wl; |
1669 | wl.Save(); | 1688 | SimulationDataService.StoreRegionWindlightSettings(wl); |
1670 | m_storageManager.DataStore.StoreRegionWindlightSettings(wl); | ||
1671 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | 1689 | m_eventManager.TriggerOnSaveNewWindlightProfile(); |
1672 | } | 1690 | } |
1673 | 1691 | ||
1674 | public void LoadWindlightProfile() | 1692 | public void LoadWindlightProfile() |
1675 | { | 1693 | { |
1676 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(RegionInfo.RegionID); | 1694 | m_regInfo.WindlightSettings = SimulationDataService.LoadRegionWindlightSettings(RegionInfo.RegionID); |
1677 | m_eventManager.TriggerOnSaveNewWindlightProfile(); | 1695 | m_eventManager.TriggerOnSaveNewWindlightProfile(); |
1678 | } | 1696 | } |
1679 | 1697 | ||
@@ -1684,13 +1702,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1684 | { | 1702 | { |
1685 | try | 1703 | try |
1686 | { | 1704 | { |
1687 | double[,] map = m_storageManager.DataStore.LoadTerrain(RegionInfo.RegionID); | 1705 | double[,] map = SimulationDataService.LoadTerrain(RegionInfo.RegionID); |
1688 | if (map == null) | 1706 | if (map == null) |
1689 | { | 1707 | { |
1690 | m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain."); | 1708 | m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain."); |
1691 | Heightmap = new TerrainChannel(); | 1709 | Heightmap = new TerrainChannel(); |
1692 | 1710 | ||
1693 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1711 | SimulationDataService.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1694 | } | 1712 | } |
1695 | else | 1713 | else |
1696 | { | 1714 | { |
@@ -1707,7 +1725,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1707 | { | 1725 | { |
1708 | Heightmap = new TerrainChannel(); | 1726 | Heightmap = new TerrainChannel(); |
1709 | 1727 | ||
1710 | m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); | 1728 | SimulationDataService.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); |
1711 | } | 1729 | } |
1712 | } | 1730 | } |
1713 | catch (Exception e) | 1731 | catch (Exception e) |
@@ -1754,7 +1772,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1754 | public void loadAllLandObjectsFromStorage(UUID regionID) | 1772 | public void loadAllLandObjectsFromStorage(UUID regionID) |
1755 | { | 1773 | { |
1756 | m_log.Info("[SCENE]: Loading land objects from storage"); | 1774 | m_log.Info("[SCENE]: Loading land objects from storage"); |
1757 | List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(regionID); | 1775 | List<LandData> landData = SimulationDataService.LoadLandObjects(regionID); |
1758 | 1776 | ||
1759 | if (LandChannel != null) | 1777 | if (LandChannel != null) |
1760 | { | 1778 | { |
@@ -1785,7 +1803,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1785 | LoadingPrims = true; | 1803 | LoadingPrims = true; |
1786 | m_log.Info("[SCENE]: Loading objects from datastore"); | 1804 | m_log.Info("[SCENE]: Loading objects from datastore"); |
1787 | 1805 | ||
1788 | List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(regionID); | 1806 | List<SceneObjectGroup> PrimsFromDB = SimulationDataService.LoadObjects(regionID); |
1789 | 1807 | ||
1790 | m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count + " objects from the datastore"); | 1808 | m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count + " objects from the datastore"); |
1791 | 1809 | ||
@@ -1978,7 +1996,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1978 | sceneObject.ScheduleGroupForFullUpdate(); | 1996 | sceneObject.ScheduleGroupForFullUpdate(); |
1979 | 1997 | ||
1980 | return sceneObject; | 1998 | return sceneObject; |
1981 | } | 1999 | } |
1982 | 2000 | ||
1983 | /// <summary> | 2001 | /// <summary> |
1984 | /// Add an object into the scene that has come from storage | 2002 | /// Add an object into the scene that has come from storage |
@@ -2074,7 +2092,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2074 | /// <returns></returns> | 2092 | /// <returns></returns> |
2075 | public bool AddNewSceneObject( | 2093 | public bool AddNewSceneObject( |
2076 | SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) | 2094 | SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) |
2077 | { | 2095 | { |
2078 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, pos, rot, vel); | 2096 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, pos, rot, vel); |
2079 | } | 2097 | } |
2080 | 2098 | ||
@@ -2094,8 +2112,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2094 | List<SceneObjectGroup> toReturn = new List<SceneObjectGroup>(); | 2112 | List<SceneObjectGroup> toReturn = new List<SceneObjectGroup>(); |
2095 | lock (Entities) | 2113 | lock (Entities) |
2096 | { | 2114 | { |
2097 | ICollection<EntityBase> entities = new List<EntityBase>(Entities); | 2115 | EntityBase[] entities = Entities.GetEntities(); |
2098 | |||
2099 | foreach (EntityBase e in entities) | 2116 | foreach (EntityBase e in entities) |
2100 | { | 2117 | { |
2101 | if (e is SceneObjectGroup) | 2118 | if (e is SceneObjectGroup) |
@@ -2190,12 +2207,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2190 | // group has recently been delinked from another group but that this change has not been persisted | 2207 | // group has recently been delinked from another group but that this change has not been persisted |
2191 | // to the DB. | 2208 | // to the DB. |
2192 | ForceSceneObjectBackup(so); | 2209 | ForceSceneObjectBackup(so); |
2193 | so.DetachFromBackup(); | 2210 | so.DetachFromBackup(); |
2194 | m_storageManager.DataStore.RemoveObject(so.UUID, m_regInfo.RegionID); | 2211 | SimulationDataService.RemoveObject(so.UUID, m_regInfo.RegionID); |
2195 | } | 2212 | } |
2196 | 2213 | ||
2197 | // We need to keep track of this state in case this group is still queued for further backup. | 2214 | // We need to keep track of this state in case this group is still queued for further backup. |
2198 | so.IsDeleted = true; | 2215 | so.IsDeleted = true; |
2199 | 2216 | ||
2200 | return true; | 2217 | return true; |
2201 | } | 2218 | } |
@@ -2482,7 +2499,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2482 | ScenePresence sp = GetScenePresence(userID); | 2499 | ScenePresence sp = GetScenePresence(userID); |
2483 | if (sp != null && AttachmentsModule != null) | 2500 | if (sp != null && AttachmentsModule != null) |
2484 | { | 2501 | { |
2485 | uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID); | 2502 | uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID); |
2486 | AttachmentsModule.RezSingleAttachmentFromInventory(sp.ControllingClient, itemID, attPt); | 2503 | AttachmentsModule.RezSingleAttachmentFromInventory(sp.ControllingClient, itemID, attPt); |
2487 | } | 2504 | } |
2488 | 2505 | ||
@@ -2531,7 +2548,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2531 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); | 2548 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); |
2532 | 2549 | ||
2533 | // Don't sent a full update here because this will cause full updates to be sent twice for | 2550 | // Don't sent a full update here because this will cause full updates to be sent twice for |
2534 | // attachments on region crossings, resulting in viewer glitches. | 2551 | // attachments on region crossings, resulting in viewer glitches. |
2535 | AddRestoredSceneObject(sceneObject, false, false, false); | 2552 | AddRestoredSceneObject(sceneObject, false, false, false); |
2536 | 2553 | ||
2537 | // Handle attachment special case | 2554 | // Handle attachment special case |
@@ -2788,7 +2805,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2788 | } | 2805 | } |
2789 | 2806 | ||
2790 | public virtual void SubscribeToClientPrimEvents(IClientAPI client) | 2807 | public virtual void SubscribeToClientPrimEvents(IClientAPI client) |
2791 | { | 2808 | { |
2792 | client.OnUpdatePrimGroupPosition += m_sceneGraph.UpdatePrimPosition; | 2809 | client.OnUpdatePrimGroupPosition += m_sceneGraph.UpdatePrimPosition; |
2793 | client.OnUpdatePrimSinglePosition += m_sceneGraph.UpdatePrimSinglePosition; | 2810 | client.OnUpdatePrimSinglePosition += m_sceneGraph.UpdatePrimSinglePosition; |
2794 | client.OnUpdatePrimGroupRotation += m_sceneGraph.UpdatePrimRotation; | 2811 | client.OnUpdatePrimGroupRotation += m_sceneGraph.UpdatePrimRotation; |
@@ -2824,7 +2841,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2824 | client.OnUndo += m_sceneGraph.HandleUndo; | 2841 | client.OnUndo += m_sceneGraph.HandleUndo; |
2825 | client.OnRedo += m_sceneGraph.HandleRedo; | 2842 | client.OnRedo += m_sceneGraph.HandleRedo; |
2826 | client.OnObjectDescription += m_sceneGraph.PrimDescription; | 2843 | client.OnObjectDescription += m_sceneGraph.PrimDescription; |
2827 | client.OnObjectDrop += m_sceneGraph.DropObject; | 2844 | client.OnObjectDrop += m_sceneGraph.DropObject; |
2828 | client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; | 2845 | client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; |
2829 | client.OnObjectOwner += ObjectOwner; | 2846 | client.OnObjectOwner += ObjectOwner; |
2830 | } | 2847 | } |
@@ -3804,7 +3821,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3804 | public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying) | 3821 | public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying) |
3805 | { | 3822 | { |
3806 | ScenePresence presence = GetScenePresence(agentID); | 3823 | ScenePresence presence = GetScenePresence(agentID); |
3807 | if(presence != null) | 3824 | if (presence != null) |
3808 | { | 3825 | { |
3809 | try | 3826 | try |
3810 | { | 3827 | { |
@@ -4083,6 +4100,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
4083 | 4100 | ||
4084 | #region Other Methods | 4101 | #region Other Methods |
4085 | 4102 | ||
4103 | protected override IConfigSource GetConfig() | ||
4104 | { | ||
4105 | return m_config; | ||
4106 | } | ||
4107 | |||
4086 | #endregion | 4108 | #endregion |
4087 | 4109 | ||
4088 | public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set) | 4110 | public void HandleObjectPermissionsUpdate(IClientAPI controller, UUID agentID, UUID sessionID, byte field, uint localId, uint mask, byte set) |
@@ -4107,9 +4129,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4107 | /// </summary> | 4129 | /// </summary> |
4108 | public void ForceClientUpdate() | 4130 | public void ForceClientUpdate() |
4109 | { | 4131 | { |
4110 | List<EntityBase> EntityList = GetEntities(); | 4132 | EntityBase[] entityList = GetEntities(); |
4111 | 4133 | foreach (EntityBase ent in entityList) | |
4112 | foreach (EntityBase ent in EntityList) | ||
4113 | { | 4134 | { |
4114 | if (ent is SceneObjectGroup) | 4135 | if (ent is SceneObjectGroup) |
4115 | { | 4136 | { |
@@ -4127,9 +4148,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4127 | { | 4148 | { |
4128 | m_log.Debug("Searching for Primitive: '" + cmdparams[2] + "'"); | 4149 | m_log.Debug("Searching for Primitive: '" + cmdparams[2] + "'"); |
4129 | 4150 | ||
4130 | List<EntityBase> EntityList = GetEntities(); | 4151 | EntityBase[] entityList = GetEntities(); |
4131 | 4152 | foreach (EntityBase ent in entityList) | |
4132 | foreach (EntityBase ent in EntityList) | ||
4133 | { | 4153 | { |
4134 | if (ent is SceneObjectGroup) | 4154 | if (ent is SceneObjectGroup) |
4135 | { | 4155 | { |
@@ -4498,7 +4518,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4498 | /// will not affect the original list of objects in the scene. | 4518 | /// will not affect the original list of objects in the scene. |
4499 | /// </summary> | 4519 | /// </summary> |
4500 | /// <returns></returns> | 4520 | /// <returns></returns> |
4501 | public List<EntityBase> GetEntities() | 4521 | public EntityBase[] GetEntities() |
4502 | { | 4522 | { |
4503 | return m_sceneGraph.GetEntities(); | 4523 | return m_sceneGraph.GetEntities(); |
4504 | } | 4524 | } |
@@ -4532,9 +4552,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4532 | 4552 | ||
4533 | public void CleanTempObjects() | 4553 | public void CleanTempObjects() |
4534 | { | 4554 | { |
4535 | List<EntityBase> objs = GetEntities(); | 4555 | EntityBase[] entities = GetEntities(); |
4536 | 4556 | foreach (EntityBase obj in entities) | |
4537 | foreach (EntityBase obj in objs) | ||
4538 | { | 4557 | { |
4539 | if (obj is SceneObjectGroup) | 4558 | if (obj is SceneObjectGroup) |
4540 | { | 4559 | { |
@@ -4554,7 +4573,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4554 | 4573 | ||
4555 | public void DeleteFromStorage(UUID uuid) | 4574 | public void DeleteFromStorage(UUID uuid) |
4556 | { | 4575 | { |
4557 | m_storageManager.DataStore.RemoveObject(uuid, m_regInfo.RegionID); | 4576 | SimulationDataService.RemoveObject(uuid, m_regInfo.RegionID); |
4558 | } | 4577 | } |
4559 | 4578 | ||
4560 | public int GetHealth() | 4579 | public int GetHealth() |
@@ -4963,17 +4982,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
4963 | 4982 | ||
4964 | public List<UUID> GetEstateRegions(int estateID) | 4983 | public List<UUID> GetEstateRegions(int estateID) |
4965 | { | 4984 | { |
4966 | if (m_storageManager.EstateDataStore == null) | 4985 | IEstateDataService estateDataService = EstateDataService; |
4967 | return new List<UUID>(); | 4986 | if (estateDataService == null) |
4987 | return new List<UUID>(0); | ||
4968 | 4988 | ||
4969 | return m_storageManager.EstateDataStore.GetRegions(estateID); | 4989 | return estateDataService.GetRegions(estateID); |
4970 | } | 4990 | } |
4971 | 4991 | ||
4972 | public void ReloadEstateData() | 4992 | public void ReloadEstateData() |
4973 | { | 4993 | { |
4974 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); | 4994 | IEstateDataService estateDataService = EstateDataService; |
4975 | 4995 | if (estateDataService != null) | |
4976 | TriggerEstateSunUpdate(); | 4996 | { |
4997 | m_regInfo.EstateSettings = estateDataService.LoadEstateSettings(m_regInfo.RegionID, false); | ||
4998 | TriggerEstateSunUpdate(); | ||
4999 | } | ||
4977 | } | 5000 | } |
4978 | 5001 | ||
4979 | public void TriggerEstateSunUpdate() | 5002 | public void TriggerEstateSunUpdate() |
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index f8591ba..c71aefa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs | |||
@@ -521,7 +521,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
521 | /// <param name="shorthelp"></param> | 521 | /// <param name="shorthelp"></param> |
522 | /// <param name="longhelp"></param> | 522 | /// <param name="longhelp"></param> |
523 | /// <param name="descriptivehelp"></param> | 523 | /// <param name="descriptivehelp"></param> |
524 | /// <param name="callback"></param> | 524 | /// <param name="callback"></param> |
525 | public void AddCommand( | 525 | public void AddCommand( |
526 | object mod, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback) | 526 | object mod, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback) |
527 | { | 527 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index a39f27a..6246400 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -81,10 +81,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
81 | protected Dictionary<UUID, ScenePresence> m_scenePresenceMap = new Dictionary<UUID, ScenePresence>(); | 81 | protected Dictionary<UUID, ScenePresence> m_scenePresenceMap = new Dictionary<UUID, ScenePresence>(); |
82 | protected List<ScenePresence> m_scenePresenceArray = new List<ScenePresence>(); | 82 | protected List<ScenePresence> m_scenePresenceArray = new List<ScenePresence>(); |
83 | 83 | ||
84 | // SceneObjects is not currently populated or used. | ||
85 | //public Dictionary<UUID, SceneObjectGroup> SceneObjects; | ||
86 | protected internal EntityManager Entities = new EntityManager(); | 84 | protected internal EntityManager Entities = new EntityManager(); |
87 | // protected internal Dictionary<UUID, EntityBase> Entities = new Dictionary<UUID, EntityBase>(); | ||
88 | protected internal Dictionary<UUID, ScenePresence> RestorePresences = new Dictionary<UUID, ScenePresence>(); | 85 | protected internal Dictionary<UUID, ScenePresence> RestorePresences = new Dictionary<UUID, ScenePresence>(); |
89 | 86 | ||
90 | protected RegionInfo m_regInfo; | 87 | protected RegionInfo m_regInfo; |
@@ -323,7 +320,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
323 | /// <param name="pos">Position of the object</param> | 320 | /// <param name="pos">Position of the object</param> |
324 | /// <param name="rot">Rotation of the object</param> | 321 | /// <param name="rot">Rotation of the object</param> |
325 | /// <param name="vel">Velocity of the object. This parameter only has an effect if the object is physical</param> | 322 | /// <param name="vel">Velocity of the object. This parameter only has an effect if the object is physical</param> |
326 | /// <returns></returns> | 323 | /// <returns></returns> |
327 | public bool AddNewSceneObject( | 324 | public bool AddNewSceneObject( |
328 | SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) | 325 | SceneObjectGroup sceneObject, bool attachToBackup, Vector3 pos, Quaternion rot, Vector3 vel) |
329 | { | 326 | { |
@@ -347,7 +344,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
347 | } | 344 | } |
348 | 345 | ||
349 | return true; | 346 | return true; |
350 | } | 347 | } |
351 | 348 | ||
352 | /// <summary> | 349 | /// <summary> |
353 | /// Add an object to the scene. This will both update the scene, and send information about the | 350 | /// Add an object to the scene. This will both update the scene, and send information about the |
@@ -370,68 +367,57 @@ namespace OpenSim.Region.Framework.Scenes | |||
370 | if (sceneObject == null || sceneObject.RootPart == null || sceneObject.RootPart.UUID == UUID.Zero) | 367 | if (sceneObject == null || sceneObject.RootPart == null || sceneObject.RootPart.UUID == UUID.Zero) |
371 | return false; | 368 | return false; |
372 | 369 | ||
373 | lock (sceneObject) | 370 | if (Entities.ContainsKey(sceneObject.UUID)) |
374 | { | 371 | return false; |
375 | if (Entities.ContainsKey(sceneObject.UUID)) | 372 | |
376 | { | 373 | List<SceneObjectPart> children; |
377 | // m_log.WarnFormat( | 374 | lock (sceneObject.Children) |
378 | // "[SCENE GRAPH]: Scene object {0} {1} was already in region {2} on add request", | 375 | children = new List<SceneObjectPart>(sceneObject.Children.Values); |
379 | // sceneObject.Name, sceneObject.UUID, m_parentScene.RegionInfo.RegionName); | 376 | |
380 | return false; | 377 | // Clamp child prim sizes and add child prims to the m_numPrim count |
381 | } | 378 | if (m_parentScene.m_clampPrimSize) |
382 | 379 | { | |
383 | // m_log.DebugFormat( | 380 | foreach (SceneObjectPart part in children) |
384 | // "[SCENE GRAPH]: Adding object {0} {1} to region {2}", | ||
385 | // sceneObject.Name, sceneObject.UUID, m_parentScene.RegionInfo.RegionName); | ||
386 | |||
387 | lock (sceneObject.Children) | ||
388 | { | 381 | { |
389 | if (m_parentScene.m_clampPrimSize) | 382 | Vector3 scale = part.Shape.Scale; |
390 | { | 383 | |
391 | foreach (SceneObjectPart part in sceneObject.Children.Values) | 384 | if (scale.X > m_parentScene.m_maxNonphys) |
392 | { | 385 | scale.X = m_parentScene.m_maxNonphys; |
393 | Vector3 scale = part.Shape.Scale; | 386 | if (scale.Y > m_parentScene.m_maxNonphys) |
394 | 387 | scale.Y = m_parentScene.m_maxNonphys; | |
395 | if (scale.X > m_parentScene.m_maxNonphys) | 388 | if (scale.Z > m_parentScene.m_maxNonphys) |
396 | scale.X = m_parentScene.m_maxNonphys; | 389 | scale.Z = m_parentScene.m_maxNonphys; |
397 | if (scale.Y > m_parentScene.m_maxNonphys) | 390 | |
398 | scale.Y = m_parentScene.m_maxNonphys; | 391 | part.Shape.Scale = scale; |
399 | if (scale.Z > m_parentScene.m_maxNonphys) | ||
400 | scale.Z = m_parentScene.m_maxNonphys; | ||
401 | |||
402 | part.Shape.Scale = scale; | ||
403 | } | ||
404 | } | ||
405 | |||
406 | m_numPrim += sceneObject.Children.Count; | ||
407 | } | 392 | } |
408 | 393 | } | |
409 | sceneObject.AttachToScene(m_parentScene); | 394 | m_numPrim += children.Count; |
410 | 395 | ||
411 | if (sendClientUpdates) | 396 | sceneObject.AttachToScene(m_parentScene); |
412 | sceneObject.ScheduleGroupForFullUpdate(); | ||
413 | |||
414 | Entities.Add(sceneObject); | ||
415 | 397 | ||
416 | if (attachToBackup) | 398 | if (sendClientUpdates) |
417 | sceneObject.AttachToBackup(); | 399 | sceneObject.ScheduleGroupForFullUpdate(); |
418 | 400 | ||
419 | if (OnObjectCreate != null) | 401 | Entities.Add(sceneObject); |
420 | OnObjectCreate(sceneObject); | 402 | |
421 | 403 | if (attachToBackup) | |
422 | lock (SceneObjectGroupsByFullID) | 404 | sceneObject.AttachToBackup(); |
423 | { | 405 | |
424 | SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject; | 406 | if (OnObjectCreate != null) |
425 | foreach (SceneObjectPart part in sceneObject.Children.Values) | 407 | OnObjectCreate(sceneObject); |
426 | SceneObjectGroupsByFullID[part.UUID] = sceneObject; | 408 | |
427 | } | 409 | lock (SceneObjectGroupsByFullID) |
428 | 410 | { | |
429 | lock (SceneObjectGroupsByLocalID) | 411 | SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject; |
430 | { | 412 | foreach (SceneObjectPart part in children) |
431 | SceneObjectGroupsByLocalID[sceneObject.LocalId] = sceneObject; | 413 | SceneObjectGroupsByFullID[part.UUID] = sceneObject; |
432 | foreach (SceneObjectPart part in sceneObject.Children.Values) | 414 | } |
433 | SceneObjectGroupsByLocalID[part.LocalId] = sceneObject; | 415 | |
434 | } | 416 | lock (SceneObjectGroupsByLocalID) |
417 | { | ||
418 | SceneObjectGroupsByLocalID[sceneObject.LocalId] = sceneObject; | ||
419 | foreach (SceneObjectPart part in children) | ||
420 | SceneObjectGroupsByLocalID[part.LocalId] = sceneObject; | ||
435 | } | 421 | } |
436 | 422 | ||
437 | return true; | 423 | return true; |
@@ -443,42 +429,38 @@ namespace OpenSim.Region.Framework.Scenes | |||
443 | /// <returns>true if the object was deleted, false if there was no object to delete</returns> | 429 | /// <returns>true if the object was deleted, false if there was no object to delete</returns> |
444 | public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked) | 430 | public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked) |
445 | { | 431 | { |
446 | if (Entities.ContainsKey(uuid)) | 432 | EntityBase entity; |
447 | { | 433 | if (!Entities.TryGetValue(uuid, out entity) && entity is SceneObjectGroup) |
448 | SceneObjectGroup grp = (SceneObjectGroup)Entities[uuid]; | 434 | return false; |
449 | 435 | ||
450 | if (!resultOfObjectLinked) | 436 | SceneObjectGroup grp = (SceneObjectGroup)entity; |
451 | { | ||
452 | m_numPrim -= grp.PrimCount; | ||
453 | 437 | ||
454 | if ((grp.RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics) | 438 | if (!resultOfObjectLinked) |
455 | RemovePhysicalPrim(grp.PrimCount); | 439 | { |
456 | } | 440 | m_numPrim -= grp.PrimCount; |
457 | 441 | ||
458 | if (OnObjectRemove != null) | 442 | if ((grp.RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics) |
459 | OnObjectRemove(Entities[uuid]); | 443 | RemovePhysicalPrim(grp.PrimCount); |
444 | } | ||
460 | 445 | ||
461 | lock (SceneObjectGroupsByFullID) | 446 | if (OnObjectRemove != null) |
462 | { | 447 | OnObjectRemove(Entities[uuid]); |
463 | foreach (SceneObjectPart part in grp.Children.Values) | ||
464 | SceneObjectGroupsByFullID.Remove(part.UUID); | ||
465 | SceneObjectGroupsByFullID.Remove(grp.RootPart.UUID); | ||
466 | } | ||
467 | lock (SceneObjectGroupsByLocalID) | ||
468 | { | ||
469 | foreach (SceneObjectPart part in grp.Children.Values) | ||
470 | SceneObjectGroupsByLocalID.Remove(part.LocalId); | ||
471 | SceneObjectGroupsByLocalID.Remove(grp.RootPart.LocalId); | ||
472 | } | ||
473 | 448 | ||
474 | Entities.Remove(uuid); | 449 | lock (SceneObjectGroupsByFullID) |
475 | //SceneObjectGroup part; | 450 | { |
476 | //((part.RootPart.Flags & PrimFlags.Physics) == PrimFlags.Physics) | 451 | foreach (SceneObjectPart part in grp.Children.Values) |
452 | SceneObjectGroupsByFullID.Remove(part.UUID); | ||
453 | SceneObjectGroupsByFullID.Remove(grp.RootPart.UUID); | ||
454 | } | ||
477 | 455 | ||
478 | return true; | 456 | lock (SceneObjectGroupsByLocalID) |
457 | { | ||
458 | foreach (SceneObjectPart part in grp.Children.Values) | ||
459 | SceneObjectGroupsByLocalID.Remove(part.LocalId); | ||
460 | SceneObjectGroupsByLocalID.Remove(grp.RootPart.LocalId); | ||
479 | } | 461 | } |
480 | 462 | ||
481 | return false; | 463 | return Entities.Remove(uuid); |
482 | } | 464 | } |
483 | 465 | ||
484 | /// <summary> | 466 | /// <summary> |
@@ -490,9 +472,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
490 | protected internal void AddToUpdateList(SceneObjectGroup obj) | 472 | protected internal void AddToUpdateList(SceneObjectGroup obj) |
491 | { | 473 | { |
492 | lock (m_updateList) | 474 | lock (m_updateList) |
493 | { | ||
494 | m_updateList[obj.UUID] = obj; | 475 | m_updateList[obj.UUID] = obj; |
495 | } | ||
496 | } | 476 | } |
497 | 477 | ||
498 | public void FireAttachToBackup(SceneObjectGroup obj) | 478 | public void FireAttachToBackup(SceneObjectGroup obj) |
@@ -526,34 +506,39 @@ namespace OpenSim.Region.Framework.Scenes | |||
526 | { | 506 | { |
527 | if (!Monitor.TryEnter(m_updateLock)) | 507 | if (!Monitor.TryEnter(m_updateLock)) |
528 | return; | 508 | return; |
529 | 509 | try | |
530 | List<SceneObjectGroup> updates; | ||
531 | |||
532 | // Some updates add more updates to the updateList. | ||
533 | // Get the current list of updates and clear the list before iterating | ||
534 | lock (m_updateList) | ||
535 | { | ||
536 | updates = new List<SceneObjectGroup>(m_updateList.Values); | ||
537 | m_updateList.Clear(); | ||
538 | } | ||
539 | |||
540 | // Go through all updates | ||
541 | for (int i = 0; i < updates.Count; i++) | ||
542 | { | 510 | { |
543 | SceneObjectGroup sog = updates[i]; | 511 | List<SceneObjectGroup> updates; |
544 | 512 | ||
545 | // Don't abort the whole update if one entity happens to give us an exception. | 513 | // Some updates add more updates to the updateList. |
546 | try | 514 | // Get the current list of updates and clear the list before iterating |
515 | lock (m_updateList) | ||
547 | { | 516 | { |
548 | sog.Update(); | 517 | updates = new List<SceneObjectGroup>(m_updateList.Values); |
518 | m_updateList.Clear(); | ||
549 | } | 519 | } |
550 | catch (Exception e) | 520 | |
521 | // Go through all updates | ||
522 | for (int i = 0; i < updates.Count; i++) | ||
551 | { | 523 | { |
552 | m_log.ErrorFormat( | 524 | SceneObjectGroup sog = updates[i]; |
553 | "[INNER SCENE]: Failed to update {0}, {1} - {2}", sog.Name, sog.UUID, e); | 525 | |
526 | // Don't abort the whole update if one entity happens to give us an exception. | ||
527 | try | ||
528 | { | ||
529 | sog.Update(); | ||
530 | } | ||
531 | catch (Exception e) | ||
532 | { | ||
533 | m_log.ErrorFormat( | ||
534 | "[INNER SCENE]: Failed to update {0}, {1} - {2}", sog.Name, sog.UUID, e); | ||
535 | } | ||
554 | } | 536 | } |
555 | } | 537 | } |
556 | Monitor.Exit(m_updateLock); | 538 | finally |
539 | { | ||
540 | Monitor.Exit(m_updateLock); | ||
541 | } | ||
557 | } | 542 | } |
558 | 543 | ||
559 | protected internal void AddPhysicalPrim(int number) | 544 | protected internal void AddPhysicalPrim(int number) |
@@ -920,38 +905,38 @@ namespace OpenSim.Region.Framework.Scenes | |||
920 | /// <returns>null if no scene object group containing that prim is found</returns> | 905 | /// <returns>null if no scene object group containing that prim is found</returns> |
921 | public SceneObjectGroup GetGroupByPrim(uint localID) | 906 | public SceneObjectGroup GetGroupByPrim(uint localID) |
922 | { | 907 | { |
923 | if (Entities.ContainsKey(localID)) | 908 | EntityBase entity; |
924 | return Entities[localID] as SceneObjectGroup; | 909 | if (Entities.TryGetValue(localID, out entity)) |
910 | return entity as SceneObjectGroup; | ||
925 | 911 | ||
926 | //m_log.DebugFormat("Entered GetGroupByPrim with localID {0}", localID); | 912 | //m_log.DebugFormat("Entered GetGroupByPrim with localID {0}", localID); |
927 | SceneObjectGroup sog; | 913 | SceneObjectGroup sog; |
928 | lock (SceneObjectGroupsByLocalID) | 914 | lock (SceneObjectGroupsByLocalID) |
915 | SceneObjectGroupsByLocalID.TryGetValue(localID, out sog); | ||
916 | |||
917 | if (sog != null) | ||
929 | { | 918 | { |
930 | if (SceneObjectGroupsByLocalID.TryGetValue(localID, out sog)) | 919 | if (sog.HasChildPrim(localID)) |
931 | { | 920 | return sog; |
932 | if (sog.HasChildPrim(localID)) | 921 | SceneObjectGroupsByLocalID.Remove(localID); |
933 | return sog; | ||
934 | SceneObjectGroupsByLocalID.Remove(localID); | ||
935 | } | ||
936 | } | 922 | } |
937 | 923 | ||
938 | List<EntityBase> EntityList = GetEntities(); | 924 | EntityBase[] entityList = GetEntities(); |
939 | foreach (EntityBase ent in EntityList) | 925 | foreach (EntityBase ent in entityList) |
940 | { | 926 | { |
941 | //m_log.DebugFormat("Looking at entity {0}", ent.UUID); | 927 | //m_log.DebugFormat("Looking at entity {0}", ent.UUID); |
942 | if (ent is SceneObjectGroup) | 928 | if (ent is SceneObjectGroup) |
943 | { | 929 | { |
944 | if (((SceneObjectGroup)ent).HasChildPrim(localID)) | 930 | sog = (SceneObjectGroup)ent; |
931 | if (sog.HasChildPrim(localID)) | ||
945 | { | 932 | { |
946 | sog = (SceneObjectGroup)ent; | ||
947 | lock (SceneObjectGroupsByLocalID) | 933 | lock (SceneObjectGroupsByLocalID) |
948 | { | ||
949 | SceneObjectGroupsByLocalID[localID] = sog; | 934 | SceneObjectGroupsByLocalID[localID] = sog; |
950 | } | ||
951 | return sog; | 935 | return sog; |
952 | } | 936 | } |
953 | } | 937 | } |
954 | } | 938 | } |
939 | |||
955 | return null; | 940 | return null; |
956 | } | 941 | } |
957 | 942 | ||
@@ -964,36 +949,35 @@ namespace OpenSim.Region.Framework.Scenes | |||
964 | { | 949 | { |
965 | SceneObjectGroup sog; | 950 | SceneObjectGroup sog; |
966 | lock (SceneObjectGroupsByFullID) | 951 | lock (SceneObjectGroupsByFullID) |
952 | SceneObjectGroupsByFullID.TryGetValue(fullID, out sog); | ||
953 | |||
954 | if (sog != null) | ||
967 | { | 955 | { |
968 | if (SceneObjectGroupsByFullID.TryGetValue(fullID, out sog)) | 956 | lock (sog.Children) |
969 | { | 957 | { |
970 | lock (sog.Children) | 958 | if (sog.Children.ContainsKey(fullID)) |
971 | { | 959 | return sog; |
972 | if (sog.Children.ContainsKey(fullID)) | ||
973 | return sog; | ||
974 | } | ||
975 | |||
976 | SceneObjectGroupsByFullID.Remove(fullID); | ||
977 | } | 960 | } |
978 | } | ||
979 | 961 | ||
980 | List<EntityBase> EntityList = GetEntities(); | 962 | lock (SceneObjectGroupsByFullID) |
963 | SceneObjectGroupsByFullID.Remove(fullID); | ||
964 | } | ||
981 | 965 | ||
982 | foreach (EntityBase ent in EntityList) | 966 | EntityBase[] entityList = GetEntities(); |
967 | foreach (EntityBase ent in entityList) | ||
983 | { | 968 | { |
984 | if (ent is SceneObjectGroup) | 969 | if (ent is SceneObjectGroup) |
985 | { | 970 | { |
986 | if (((SceneObjectGroup)ent).HasChildPrim(fullID)) | 971 | sog = (SceneObjectGroup)ent; |
972 | if (sog.HasChildPrim(fullID)) | ||
987 | { | 973 | { |
988 | sog = (SceneObjectGroup)ent; | ||
989 | lock (SceneObjectGroupsByFullID) | 974 | lock (SceneObjectGroupsByFullID) |
990 | { | ||
991 | SceneObjectGroupsByFullID[fullID] = sog; | 975 | SceneObjectGroupsByFullID[fullID] = sog; |
992 | } | ||
993 | return sog; | 976 | return sog; |
994 | } | 977 | } |
995 | } | 978 | } |
996 | } | 979 | } |
980 | |||
997 | return null; | 981 | return null; |
998 | } | 982 | } |
999 | 983 | ||
@@ -1002,7 +986,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1002 | // Primitive Ray Tracing | 986 | // Primitive Ray Tracing |
1003 | float closestDistance = 280f; | 987 | float closestDistance = 280f; |
1004 | EntityIntersection result = new EntityIntersection(); | 988 | EntityIntersection result = new EntityIntersection(); |
1005 | List<EntityBase> EntityList = GetEntities(); | 989 | EntityBase[] EntityList = GetEntities(); |
1006 | foreach (EntityBase ent in EntityList) | 990 | foreach (EntityBase ent in EntityList) |
1007 | { | 991 | { |
1008 | if (ent is SceneObjectGroup) | 992 | if (ent is SceneObjectGroup) |
@@ -1040,23 +1024,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
1040 | /// <returns>null if the part was not found</returns> | 1024 | /// <returns>null if the part was not found</returns> |
1041 | protected internal SceneObjectPart GetSceneObjectPart(string name) | 1025 | protected internal SceneObjectPart GetSceneObjectPart(string name) |
1042 | { | 1026 | { |
1043 | List<EntityBase> EntityList = GetEntities(); | 1027 | SceneObjectPart sop = null; |
1044 | 1028 | ||
1045 | // FIXME: use a dictionary here | 1029 | Entities.Find( |
1046 | foreach (EntityBase ent in EntityList) | 1030 | delegate(EntityBase entity) |
1047 | { | ||
1048 | if (ent is SceneObjectGroup) | ||
1049 | { | 1031 | { |
1050 | foreach (SceneObjectPart p in ((SceneObjectGroup) ent).GetParts()) | 1032 | if (entity is SceneObjectGroup) |
1051 | { | 1033 | { |
1052 | if (p.Name == name) | 1034 | foreach (SceneObjectPart p in ((SceneObjectGroup)entity).GetParts()) |
1053 | { | 1035 | { |
1054 | return p; | 1036 | if (p.Name == name) |
1037 | { | ||
1038 | sop = p; | ||
1039 | return true; | ||
1040 | } | ||
1055 | } | 1041 | } |
1056 | } | 1042 | } |
1043 | |||
1044 | return false; | ||
1057 | } | 1045 | } |
1058 | } | 1046 | ); |
1059 | return null; | 1047 | |
1048 | return sop; | ||
1060 | } | 1049 | } |
1061 | 1050 | ||
1062 | /// <summary> | 1051 | /// <summary> |
@@ -1077,7 +1066,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1077 | /// it | 1066 | /// it |
1078 | /// </summary> | 1067 | /// </summary> |
1079 | /// <returns></returns> | 1068 | /// <returns></returns> |
1080 | protected internal List<EntityBase> GetEntities() | 1069 | protected internal EntityBase[] GetEntities() |
1081 | { | 1070 | { |
1082 | return Entities.GetEntities(); | 1071 | return Entities.GetEntities(); |
1083 | } | 1072 | } |
@@ -1086,7 +1075,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1086 | { | 1075 | { |
1087 | Dictionary<uint, float> topScripts = new Dictionary<uint, float>(); | 1076 | Dictionary<uint, float> topScripts = new Dictionary<uint, float>(); |
1088 | 1077 | ||
1089 | List<EntityBase> EntityList = GetEntities(); | 1078 | EntityBase[] EntityList = GetEntities(); |
1090 | int limit = 0; | 1079 | int limit = 0; |
1091 | foreach (EntityBase ent in EntityList) | 1080 | foreach (EntityBase ent in EntityList) |
1092 | { | 1081 | { |
@@ -1140,7 +1129,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1140 | /// <param name="action"></param> | 1129 | /// <param name="action"></param> |
1141 | protected internal void ForEachSOG(Action<SceneObjectGroup> action) | 1130 | protected internal void ForEachSOG(Action<SceneObjectGroup> action) |
1142 | { | 1131 | { |
1143 | List<EntityBase> objlist = Entities.GetAllByType<SceneObjectGroup>(); | 1132 | EntityBase[] objlist = Entities.GetAllByType<SceneObjectGroup>(); |
1144 | foreach (EntityBase ent in objlist) | 1133 | foreach (EntityBase ent in objlist) |
1145 | { | 1134 | { |
1146 | SceneObjectGroup obj = (SceneObjectGroup)ent; | 1135 | SceneObjectGroup obj = (SceneObjectGroup)ent; |
@@ -1353,7 +1342,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1353 | SceneObjectGroup group = GetGroupByPrim(localID); | 1342 | SceneObjectGroup group = GetGroupByPrim(localID); |
1354 | 1343 | ||
1355 | if (group != null) | 1344 | if (group != null) |
1356 | { | 1345 | { |
1357 | if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) | 1346 | if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) |
1358 | { | 1347 | { |
1359 | if (m_parentScene.AttachmentsModule != null) | 1348 | if (m_parentScene.AttachmentsModule != null) |
@@ -1798,8 +1787,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1798 | UUID objid = UUID.Zero; | 1787 | UUID objid = UUID.Zero; |
1799 | SceneObjectPart obj = null; | 1788 | SceneObjectPart obj = null; |
1800 | 1789 | ||
1801 | List<EntityBase> EntityList = GetEntities(); | 1790 | EntityBase[] entityList = GetEntities(); |
1802 | foreach (EntityBase ent in EntityList) | 1791 | foreach (EntityBase ent in entityList) |
1803 | { | 1792 | { |
1804 | if (ent is SceneObjectGroup) | 1793 | if (ent is SceneObjectGroup) |
1805 | { | 1794 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 470fdd7..a952508 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1326,7 +1326,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1326 | AbsolutePosition = detachedpos; | 1326 | AbsolutePosition = detachedpos; |
1327 | m_rootPart.AttachedAvatar = UUID.Zero; | 1327 | m_rootPart.AttachedAvatar = UUID.Zero; |
1328 | 1328 | ||
1329 | //Anakin Lohner bug #3839 | 1329 | //Anakin Lohner bug #3839 |
1330 | lock (m_parts) | 1330 | lock (m_parts) |
1331 | { | 1331 | { |
1332 | foreach (SceneObjectPart p in m_parts.Values) | 1332 | foreach (SceneObjectPart p in m_parts.Values) |
@@ -1556,7 +1556,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1556 | } | 1556 | } |
1557 | 1557 | ||
1558 | /// <summary> | 1558 | /// <summary> |
1559 | /// Delete this group from its scene. | 1559 | /// Delete this group from its scene. |
1560 | /// </summary> | 1560 | /// </summary> |
1561 | /// | 1561 | /// |
1562 | /// This only handles the in-world consequences of deletion (e.g. any avatars sitting on it are forcibly stood | 1562 | /// This only handles the in-world consequences of deletion (e.g. any avatars sitting on it are forcibly stood |
@@ -1731,12 +1731,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1731 | /// Processes backup. | 1731 | /// Processes backup. |
1732 | /// </summary> | 1732 | /// </summary> |
1733 | /// <param name="datastore"></param> | 1733 | /// <param name="datastore"></param> |
1734 | public virtual void ProcessBackup(IRegionDataStore datastore, bool forcedBackup) | 1734 | public virtual void ProcessBackup(ISimulationDataService datastore, bool forcedBackup) |
1735 | { | 1735 | { |
1736 | if (!m_isBackedUp) | 1736 | if (!m_isBackedUp) |
1737 | { | 1737 | { |
1738 | // m_log.DebugFormat( | 1738 | // m_log.DebugFormat( |
1739 | // "[WATER WARS]: Ignoring backup of {0} {1} since object is not marked to be backed up", Name, UUID); | 1739 | // "[WATER WARS]: Ignoring backup of {0} {1} since object is not marked to be backed up", Name, UUID); |
1740 | return; | 1740 | return; |
1741 | } | 1741 | } |
1742 | 1742 | ||
@@ -1748,7 +1748,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1748 | } | 1748 | } |
1749 | 1749 | ||
1750 | // Since this is the top of the section of call stack for backing up a particular scene object, don't let | 1750 | // Since this is the top of the section of call stack for backing up a particular scene object, don't let |
1751 | // any exception propogate upwards. | 1751 | // any exception propogate upwards. |
1752 | try | 1752 | try |
1753 | { | 1753 | { |
1754 | if (!m_scene.ShuttingDown || // if shutting down then there will be nothing to handle the return so leave till next restart | 1754 | if (!m_scene.ShuttingDown || // if shutting down then there will be nothing to handle the return so leave till next restart |
@@ -1944,7 +1944,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1944 | part.PhysActor.LocalID = part.LocalId; | 1944 | part.PhysActor.LocalID = part.LocalId; |
1945 | part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); | 1945 | part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); |
1946 | } | 1946 | } |
1947 | |||
1948 | } | 1947 | } |
1949 | if (userExposed) | 1948 | if (userExposed) |
1950 | { | 1949 | { |
@@ -1954,7 +1953,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1954 | 1953 | ||
1955 | ScheduleGroupForFullUpdate(); | 1954 | ScheduleGroupForFullUpdate(); |
1956 | } | 1955 | } |
1957 | |||
1958 | } | 1956 | } |
1959 | finally | 1957 | finally |
1960 | { | 1958 | { |
@@ -2515,16 +2513,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2515 | /// <returns>null if a child part with the primID was not found</returns> | 2513 | /// <returns>null if a child part with the primID was not found</returns> |
2516 | public SceneObjectPart GetChildPart(UUID primID) | 2514 | public SceneObjectPart GetChildPart(UUID primID) |
2517 | { | 2515 | { |
2518 | SceneObjectPart childPart = null; | 2516 | SceneObjectPart childPart; |
2519 | |||
2520 | lock (m_parts) | 2517 | lock (m_parts) |
2521 | { | 2518 | m_parts.TryGetValue(primID, out childPart); |
2522 | if (m_parts.ContainsKey(primID)) | ||
2523 | { | ||
2524 | childPart = m_parts[primID]; | ||
2525 | } | ||
2526 | } | ||
2527 | |||
2528 | return childPart; | 2519 | return childPart; |
2529 | } | 2520 | } |
2530 | 2521 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index eefe8bb..5c4a2a3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -508,7 +508,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
508 | public UUID UUID | 508 | public UUID UUID |
509 | { | 509 | { |
510 | get { return m_uuid; } | 510 | get { return m_uuid; } |
511 | set { m_uuid = value; } | 511 | set |
512 | { | ||
513 | m_uuid = value; | ||
514 | |||
515 | // This is necessary so that TaskInventoryItem parent ids correctly reference the new uuid of this part | ||
516 | if (Inventory != null) | ||
517 | Inventory.ResetInventoryIDs(); | ||
518 | } | ||
512 | } | 519 | } |
513 | 520 | ||
514 | public uint LocalId | 521 | public uint LocalId |
@@ -1027,12 +1034,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1027 | return m_mediaUrl; | 1034 | return m_mediaUrl; |
1028 | } | 1035 | } |
1029 | 1036 | ||
1030 | set | 1037 | set |
1031 | { | 1038 | { |
1032 | m_mediaUrl = value; | 1039 | m_mediaUrl = value; |
1033 | 1040 | ||
1034 | if (ParentGroup != null) | 1041 | if (ParentGroup != null) |
1035 | ParentGroup.HasGroupChanged = true; | 1042 | ParentGroup.HasGroupChanged = true; |
1036 | } | 1043 | } |
1037 | } | 1044 | } |
1038 | 1045 | ||
@@ -1045,7 +1052,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1045 | // m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); | 1052 | // m_log.DebugFormat("[SOP]: Setting CreateSelected to {0} for {1} {2}", value, Name, UUID); |
1046 | m_createSelected = value; | 1053 | m_createSelected = value; |
1047 | } | 1054 | } |
1048 | } | 1055 | } |
1049 | 1056 | ||
1050 | #endregion | 1057 | #endregion |
1051 | 1058 | ||
@@ -1207,7 +1214,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1207 | 1214 | ||
1208 | /// <summary> | 1215 | /// <summary> |
1209 | /// Property flags. See OpenMetaverse.PrimFlags | 1216 | /// Property flags. See OpenMetaverse.PrimFlags |
1210 | /// </summary> | 1217 | /// </summary> |
1211 | /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge | 1218 | /// Example properties are PrimFlags.Phantom and PrimFlags.DieAtEdge |
1212 | public PrimFlags Flags | 1219 | public PrimFlags Flags |
1213 | { | 1220 | { |
@@ -1372,7 +1379,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1372 | 1379 | ||
1373 | /// <summary> | 1380 | /// <summary> |
1374 | /// Tell the scene presence that it should send updates for this part to its client | 1381 | /// Tell the scene presence that it should send updates for this part to its client |
1375 | /// </summary> | 1382 | /// </summary> |
1376 | public void AddFullUpdateToAvatar(ScenePresence presence) | 1383 | public void AddFullUpdateToAvatar(ScenePresence presence) |
1377 | { | 1384 | { |
1378 | presence.SceneViewer.QueuePartForUpdate(this); | 1385 | presence.SceneViewer.QueuePartForUpdate(this); |
@@ -1431,7 +1438,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1431 | 1438 | ||
1432 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp) | 1439 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp) |
1433 | { | 1440 | { |
1434 | if(!sp.IsChildAgent) | 1441 | if (!sp.IsChildAgent) |
1435 | sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); | 1442 | sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); |
1436 | }); | 1443 | }); |
1437 | } | 1444 | } |
@@ -1683,7 +1690,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1683 | 1690 | ||
1684 | // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); | 1691 | // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); |
1685 | 1692 | ||
1686 | return dupe; | 1693 | return dupe; |
1687 | } | 1694 | } |
1688 | 1695 | ||
1689 | protected void AssetReceived(string id, Object sender, AssetBase asset) | 1696 | protected void AssetReceived(string id, Object sender, AssetBase asset) |
@@ -1993,10 +2000,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1993 | } | 2000 | } |
1994 | 2001 | ||
1995 | public uint GetEffectiveObjectFlags() | 2002 | public uint GetEffectiveObjectFlags() |
1996 | { | 2003 | { |
1997 | // Commenting this section of code out since it doesn't actually do anything, as enums are handled by | 2004 | // Commenting this section of code out since it doesn't actually do anything, as enums are handled by |
1998 | // value rather than reference | 2005 | // value rather than reference |
1999 | // PrimFlags f = _flags; | 2006 | // PrimFlags f = _flags; |
2000 | // if (m_parentGroup == null || m_parentGroup.RootPart == this) | 2007 | // if (m_parentGroup == null || m_parentGroup.RootPart == this) |
2001 | // f &= ~(PrimFlags.Touch | PrimFlags.Money); | 2008 | // f &= ~(PrimFlags.Touch | PrimFlags.Money); |
2002 | 2009 | ||
@@ -2793,7 +2800,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2793 | UUID = UUID.Random(); | 2800 | UUID = UUID.Random(); |
2794 | LinkNum = linkNum; | 2801 | LinkNum = linkNum; |
2795 | LocalId = 0; | 2802 | LocalId = 0; |
2796 | Inventory.ResetInventoryIDs(); | ||
2797 | } | 2803 | } |
2798 | 2804 | ||
2799 | /// <summary> | 2805 | /// <summary> |
@@ -4756,7 +4762,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4756 | if (ParentGroup == null || ParentGroup.IsDeleted) | 4762 | if (ParentGroup == null || ParentGroup.IsDeleted) |
4757 | return; | 4763 | return; |
4758 | 4764 | ||
4759 | if (IsAttachment && ParentGroup.RootPart != this) | 4765 | if (IsAttachment && ParentGroup.RootPart != this) |
4760 | return; | 4766 | return; |
4761 | 4767 | ||
4762 | // Causes this thread to dig into the Client Thread Data. | 4768 | // Causes this thread to dig into the Client Thread Data. |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 1959427..2de439b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
125 | { | 125 | { |
126 | m_items.LockItemsForWrite(true); | 126 | m_items.LockItemsForWrite(true); |
127 | 127 | ||
128 | if (0 == Items.Count) | 128 | if (Items.Count == 0) |
129 | { | 129 | { |
130 | m_items.LockItemsForWrite(false); | 130 | m_items.LockItemsForWrite(false); |
131 | return; | 131 | return; |
@@ -1010,7 +1010,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1010 | /// Process inventory backup | 1010 | /// Process inventory backup |
1011 | /// </summary> | 1011 | /// </summary> |
1012 | /// <param name="datastore"></param> | 1012 | /// <param name="datastore"></param> |
1013 | public void ProcessInventoryBackup(IRegionDataStore datastore) | 1013 | public void ProcessInventoryBackup(ISimulationDataService datastore) |
1014 | { | 1014 | { |
1015 | if (HasInventoryChanged) | 1015 | if (HasInventoryChanged) |
1016 | { | 1016 | { |
@@ -1257,7 +1257,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1257 | engine.ResumeScript(item.ItemID); | 1257 | engine.ResumeScript(item.ItemID); |
1258 | } | 1258 | } |
1259 | } | 1259 | } |
1260 | } | 1260 | } |
1261 | } | 1261 | } |
1262 | 1262 | ||
1263 | Items.LockItemsForRead(false); | 1263 | Items.LockItemsForRead(false); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d88f2cc..6d0ecf0 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1427,7 +1427,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1427 | // Setting parent ID would fix this, if we knew what value | 1427 | // Setting parent ID would fix this, if we knew what value |
1428 | // to use. Or we could add a m_isSitting variable. | 1428 | // to use. Or we could add a m_isSitting variable. |
1429 | //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); | 1429 | //Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); |
1430 | SitGround = true; | 1430 | SitGround = true; |
1431 | } | 1431 | } |
1432 | 1432 | ||
1433 | // In the future, these values might need to go global. | 1433 | // In the future, these values might need to go global. |
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs index f478a4a..b45291f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs +++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs | |||
@@ -73,9 +73,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
73 | { | 73 | { |
74 | m_pendingObjects = new Queue<SceneObjectGroup>(); | 74 | m_pendingObjects = new Queue<SceneObjectGroup>(); |
75 | 75 | ||
76 | lock(m_pendingObjects) | 76 | lock (m_pendingObjects) |
77 | { | 77 | { |
78 | foreach (EntityBase e in m_presence.Scene.Entities) | 78 | EntityBase[] entities = m_presence.Scene.Entities.GetEntities(); |
79 | foreach (EntityBase e in entities) | ||
79 | { | 80 | { |
80 | if (e != null && e is SceneObjectGroup) | 81 | if (e != null && e is SceneObjectGroup) |
81 | m_pendingObjects.Enqueue((SceneObjectGroup)e); | 82 | m_pendingObjects.Enqueue((SceneObjectGroup)e); |
@@ -84,7 +85,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
84 | } | 85 | } |
85 | } | 86 | } |
86 | 87 | ||
87 | lock(m_pendingObjects) | 88 | lock (m_pendingObjects) |
88 | { | 89 | { |
89 | while (m_pendingObjects != null && m_pendingObjects.Count > 0) | 90 | while (m_pendingObjects != null && m_pendingObjects.Count > 0) |
90 | { | 91 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs index b6677f0..5494549 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs | |||
@@ -84,9 +84,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
84 | int primCount = 0; | 84 | int primCount = 0; |
85 | stream.WriteLine("<scene>\n"); | 85 | stream.WriteLine("<scene>\n"); |
86 | 86 | ||
87 | List<EntityBase> EntityList = scene.GetEntities(); | 87 | EntityBase[] entityList = scene.GetEntities(); |
88 | 88 | foreach (EntityBase ent in entityList) | |
89 | foreach (EntityBase ent in EntityList) | ||
90 | { | 89 | { |
91 | if (ent is SceneObjectGroup) | 90 | if (ent is SceneObjectGroup) |
92 | { | 91 | { |
@@ -204,16 +203,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
204 | 203 | ||
205 | public static void SavePrimsToXml2(Scene scene, string fileName) | 204 | public static void SavePrimsToXml2(Scene scene, string fileName) |
206 | { | 205 | { |
207 | List<EntityBase> EntityList = scene.GetEntities(); | 206 | EntityBase[] entityList = scene.GetEntities(); |
208 | 207 | SavePrimListToXml2(entityList, fileName); | |
209 | SavePrimListToXml2(EntityList, fileName); | ||
210 | } | 208 | } |
211 | 209 | ||
212 | public static void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max) | 210 | public static void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max) |
213 | { | 211 | { |
214 | List<EntityBase> EntityList = scene.GetEntities(); | 212 | EntityBase[] entityList = scene.GetEntities(); |
215 | 213 | SavePrimListToXml2(entityList, stream, min, max); | |
216 | SavePrimListToXml2(EntityList, stream, min, max); | ||
217 | } | 214 | } |
218 | 215 | ||
219 | public static void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName) | 216 | public static void SaveNamedPrimsToXml2(Scene scene, string primName, string fileName) |
@@ -222,7 +219,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
222 | "[SERIALISER]: Saving prims with name {0} in xml2 format for region {1} to {2}", | 219 | "[SERIALISER]: Saving prims with name {0} in xml2 format for region {1} to {2}", |
223 | primName, scene.RegionInfo.RegionName, fileName); | 220 | primName, scene.RegionInfo.RegionName, fileName); |
224 | 221 | ||
225 | List<EntityBase> entityList = scene.GetEntities(); | 222 | EntityBase[] entityList = scene.GetEntities(); |
226 | List<EntityBase> primList = new List<EntityBase>(); | 223 | List<EntityBase> primList = new List<EntityBase>(); |
227 | 224 | ||
228 | foreach (EntityBase ent in entityList) | 225 | foreach (EntityBase ent in entityList) |
@@ -236,10 +233,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
236 | } | 233 | } |
237 | } | 234 | } |
238 | 235 | ||
239 | SavePrimListToXml2(primList, fileName); | 236 | SavePrimListToXml2(primList.ToArray(), fileName); |
240 | } | 237 | } |
241 | 238 | ||
242 | public static void SavePrimListToXml2(List<EntityBase> entityList, string fileName) | 239 | public static void SavePrimListToXml2(EntityBase[] entityList, string fileName) |
243 | { | 240 | { |
244 | FileStream file = new FileStream(fileName, FileMode.Create); | 241 | FileStream file = new FileStream(fileName, FileMode.Create); |
245 | try | 242 | try |
@@ -260,7 +257,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
260 | } | 257 | } |
261 | } | 258 | } |
262 | 259 | ||
263 | public static void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max) | 260 | public static void SavePrimListToXml2(EntityBase[] entityList, TextWriter stream, Vector3 min, Vector3 max) |
264 | { | 261 | { |
265 | int primCount = 0; | 262 | int primCount = 0; |
266 | stream.WriteLine("<scene>\n"); | 263 | stream.WriteLine("<scene>\n"); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs index c9662ef..7d9a6a9 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneGraphTests.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
71 | Assert.That(dupeSo.Children.Count, Is.EqualTo(2)); | 71 | Assert.That(dupeSo.Children.Count, Is.EqualTo(2)); |
72 | 72 | ||
73 | SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); | 73 | SceneObjectPart dupePart1 = dupeSo.GetLinkNumPart(1); |
74 | SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); | 74 | SceneObjectPart dupePart2 = dupeSo.GetLinkNumPart(2); |
75 | Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); | 75 | Assert.That(dupePart1.LocalId, Is.Not.EqualTo(part1.LocalId)); |
76 | Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); | 76 | Assert.That(dupePart2.LocalId, Is.Not.EqualTo(part2.LocalId)); |
77 | 77 | ||
@@ -84,6 +84,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
84 | Assert.That(dupePart1.PhysActor, Is.Not.Null); | 84 | Assert.That(dupePart1.PhysActor, Is.Not.Null); |
85 | Assert.That(dupePart2.PhysActor, Is.Not.Null); | 85 | Assert.That(dupePart2.PhysActor, Is.Not.Null); |
86 | */ | 86 | */ |
87 | } | 87 | } |
88 | } | 88 | } |
89 | } \ No newline at end of file | 89 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs index e3ef263..60824be 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectLinkingTests.cs | |||
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
270 | TestHelper.InMethod(); | 270 | TestHelper.InMethod(); |
271 | //log4net.Config.XmlConfigurator.Configure(); | 271 | //log4net.Config.XmlConfigurator.Configure(); |
272 | 272 | ||
273 | TestScene scene = SceneSetupHelpers.SetupScene(); | 273 | TestScene scene = SceneSetupHelpers.SetupScene(); |
274 | 274 | ||
275 | string rootPartName = "rootpart"; | 275 | string rootPartName = "rootpart"; |
276 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 276 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
@@ -282,17 +282,17 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
282 | { Name = rootPartName, UUID = rootPartUuid }; | 282 | { Name = rootPartName, UUID = rootPartUuid }; |
283 | SceneObjectPart linkPart | 283 | SceneObjectPart linkPart |
284 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 284 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
285 | { Name = linkPartName, UUID = linkPartUuid }; | 285 | { Name = linkPartName, UUID = linkPartUuid }; |
286 | 286 | ||
287 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); | 287 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); |
288 | sog.AddPart(linkPart); | 288 | sog.AddPart(linkPart); |
289 | scene.AddNewSceneObject(sog, true); | 289 | scene.AddNewSceneObject(sog, true); |
290 | 290 | ||
291 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked | 291 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked |
292 | // scene backup thread. | 292 | // scene backup thread. |
293 | scene.Backup(true); | 293 | scene.Backup(true); |
294 | 294 | ||
295 | List<SceneObjectGroup> storedObjects = scene.StorageManager.DataStore.LoadObjects(scene.RegionInfo.RegionID); | 295 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); |
296 | 296 | ||
297 | Assert.That(storedObjects.Count, Is.EqualTo(1)); | 297 | Assert.That(storedObjects.Count, Is.EqualTo(1)); |
298 | Assert.That(storedObjects[0].Children.Count, Is.EqualTo(2)); | 298 | Assert.That(storedObjects[0].Children.Count, Is.EqualTo(2)); |
@@ -309,7 +309,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
309 | TestHelper.InMethod(); | 309 | TestHelper.InMethod(); |
310 | //log4net.Config.XmlConfigurator.Configure(); | 310 | //log4net.Config.XmlConfigurator.Configure(); |
311 | 311 | ||
312 | TestScene scene = SceneSetupHelpers.SetupScene(); | 312 | TestScene scene = SceneSetupHelpers.SetupScene(); |
313 | 313 | ||
314 | string rootPartName = "rootpart"; | 314 | string rootPartName = "rootpart"; |
315 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); | 315 | UUID rootPartUuid = new UUID("00000000-0000-0000-0000-000000000001"); |
@@ -321,11 +321,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
321 | { Name = rootPartName, UUID = rootPartUuid }; | 321 | { Name = rootPartName, UUID = rootPartUuid }; |
322 | SceneObjectPart linkPart | 322 | SceneObjectPart linkPart |
323 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 323 | = new SceneObjectPart(UUID.Zero, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
324 | { Name = linkPartName, UUID = linkPartUuid }; | 324 | { Name = linkPartName, UUID = linkPartUuid }; |
325 | 325 | ||
326 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); | 326 | SceneObjectGroup sog = new SceneObjectGroup(rootPart); |
327 | sog.AddPart(linkPart); | 327 | sog.AddPart(linkPart); |
328 | scene.AddNewSceneObject(sog, true); | 328 | scene.AddNewSceneObject(sog, true); |
329 | 329 | ||
330 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked | 330 | // In a test, we have to crank the backup handle manually. Normally this would be done by the timer invoked |
331 | // scene backup thread. | 331 | // scene backup thread. |
@@ -333,9 +333,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
333 | 333 | ||
334 | // These changes should occur immediately without waiting for a backup pass | 334 | // These changes should occur immediately without waiting for a backup pass |
335 | SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); | 335 | SceneObjectGroup groupToDelete = sog.DelinkFromGroup(linkPart, false); |
336 | scene.DeleteSceneObject(groupToDelete, false); | 336 | scene.DeleteSceneObject(groupToDelete, false); |
337 | 337 | ||
338 | List<SceneObjectGroup> storedObjects = scene.StorageManager.DataStore.LoadObjects(scene.RegionInfo.RegionID); | 338 | List<SceneObjectGroup> storedObjects = scene.SimulationDataService.LoadObjects(scene.RegionInfo.RegionID); |
339 | 339 | ||
340 | Assert.That(storedObjects.Count, Is.EqualTo(1)); | 340 | Assert.That(storedObjects.Count, Is.EqualTo(1)); |
341 | Assert.That(storedObjects[0].Children.Count, Is.EqualTo(1)); | 341 | Assert.That(storedObjects[0].Children.Count, Is.EqualTo(1)); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs index da8199d..fe59d4f 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | |||
@@ -59,8 +59,8 @@ namespace OpenSim.Region.Framework.Tests | |||
59 | string userFirstName = "Jock"; | 59 | string userFirstName = "Jock"; |
60 | string userLastName = "Stirrup"; | 60 | string userLastName = "Stirrup"; |
61 | string userPassword = "troll"; | 61 | string userPassword = "troll"; |
62 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); | 62 | UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000020"); |
63 | return UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword); | 63 | return UserProfileTestUtils.CreateUserWithInventory(scene, userFirstName, userLastName, userId, userPassword); |
64 | } | 64 | } |
65 | 65 | ||
66 | protected SceneObjectGroup CreateSO1(Scene scene, UUID ownerId) | 66 | protected SceneObjectGroup CreateSO1(Scene scene, UUID ownerId) |
@@ -70,14 +70,16 @@ namespace OpenSim.Region.Framework.Tests | |||
70 | SceneObjectPart part1 | 70 | SceneObjectPart part1 |
71 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) | 71 | = new SceneObjectPart(ownerId, PrimitiveBaseShape.Default, Vector3.Zero, Quaternion.Identity, Vector3.Zero) |
72 | { Name = part1Name, UUID = part1Id }; | 72 | { Name = part1Name, UUID = part1Id }; |
73 | return new SceneObjectGroup(part1); | 73 | return new SceneObjectGroup(part1); |
74 | } | 74 | } |
75 | 75 | ||
76 | protected TaskInventoryItem CreateSOItem1(Scene scene, SceneObjectPart part) | 76 | protected TaskInventoryItem CreateSOItem1(Scene scene, SceneObjectPart part) |
77 | { | 77 | { |
78 | AssetNotecard nc = new AssetNotecard("Hello World!"); | 78 | AssetNotecard nc = new AssetNotecard(); |
79 | nc.BodyText = "Hello World!"; | ||
80 | nc.Encode(); | ||
79 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); | 81 | UUID ncAssetUuid = new UUID("00000000-0000-0000-1000-000000000000"); |
80 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); | 82 | UUID ncItemUuid = new UUID("00000000-0000-0000-1100-000000000000"); |
81 | AssetBase ncAsset | 83 | AssetBase ncAsset |
82 | = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); | 84 | = AssetHelpers.CreateAsset(ncAssetUuid, AssetType.Notecard, nc.AssetData, UUID.Zero); |
83 | scene.AssetService.Store(ncAsset); | 85 | scene.AssetService.Store(ncAsset); |
@@ -112,9 +114,9 @@ namespace OpenSim.Region.Framework.Tests | |||
112 | scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID); | 114 | scene.MoveTaskInventoryItem(user1.PrincipalID, folder.ID, sop1, sopItem1.ItemID); |
113 | 115 | ||
114 | InventoryItemBase ncUserItem | 116 | InventoryItemBase ncUserItem |
115 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); | 117 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Objects/ncItem"); |
116 | Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); | 118 | Assert.That(ncUserItem, Is.Not.Null, "Objects/ncItem was not found"); |
117 | } | 119 | } |
118 | 120 | ||
119 | /// <summary> | 121 | /// <summary> |
120 | /// Test MoveTaskInventoryItem where the item has no parent folder assigned. | 122 | /// Test MoveTaskInventoryItem where the item has no parent folder assigned. |
@@ -136,7 +138,7 @@ namespace OpenSim.Region.Framework.Tests | |||
136 | scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID); | 138 | scene.MoveTaskInventoryItem(user1.PrincipalID, UUID.Zero, sop1, sopItem1.ItemID); |
137 | 139 | ||
138 | InventoryItemBase ncUserItem | 140 | InventoryItemBase ncUserItem |
139 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); | 141 | = InventoryArchiveUtils.FindItemByPath(scene.InventoryService, user1.PrincipalID, "Notecards/ncItem"); |
140 | Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found"); | 142 | Assert.That(ncUserItem, Is.Not.Null, "Notecards/ncItem was not found"); |
141 | } | 143 | } |
142 | } | 144 | } |
diff --git a/OpenSim/Region/Framework/StorageManager.cs b/OpenSim/Region/Framework/StorageManager.cs deleted file mode 100644 index 9375b4a..0000000 --- a/OpenSim/Region/Framework/StorageManager.cs +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Reflection; | ||
30 | using log4net; | ||
31 | using OpenSim.Region.Framework.Interfaces; | ||
32 | |||
33 | namespace OpenSim.Region.Framework | ||
34 | { | ||
35 | public class StorageManager | ||
36 | { | ||
37 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
38 | |||
39 | protected IRegionDataStore m_dataStore; | ||
40 | |||
41 | public IRegionDataStore DataStore | ||
42 | { | ||
43 | get { return m_dataStore; } | ||
44 | } | ||
45 | |||
46 | private IEstateDataStore m_estateDataStore; | ||
47 | |||
48 | public IEstateDataStore EstateDataStore | ||
49 | { | ||
50 | get { return m_estateDataStore; } | ||
51 | } | ||
52 | |||
53 | public StorageManager(IRegionDataStore storage) | ||
54 | { | ||
55 | m_dataStore = storage; | ||
56 | } | ||
57 | |||
58 | public StorageManager(string dllName, string connectionstring, string estateconnectionstring) | ||
59 | { | ||
60 | m_log.Info("[DATASTORE]: Attempting to load " + dllName); | ||
61 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | ||
62 | |||
63 | foreach (Type pluginType in pluginAssembly.GetTypes()) | ||
64 | { | ||
65 | if (pluginType.IsPublic) | ||
66 | { | ||
67 | Type typeInterface = pluginType.GetInterface("IRegionDataStore", true); | ||
68 | |||
69 | if (typeInterface != null) | ||
70 | { | ||
71 | IRegionDataStore plug = | ||
72 | (IRegionDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
73 | plug.Initialise(connectionstring); | ||
74 | |||
75 | m_dataStore = plug; | ||
76 | |||
77 | m_log.Info("[DATASTORE]: Added IRegionDataStore Interface"); | ||
78 | } | ||
79 | |||
80 | typeInterface = pluginType.GetInterface("IEstateDataStore", true); | ||
81 | |||
82 | if (typeInterface != null) | ||
83 | { | ||
84 | IEstateDataStore estPlug = | ||
85 | (IEstateDataStore) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
86 | estPlug.Initialise(estateconnectionstring); | ||
87 | |||
88 | m_estateDataStore = estPlug; | ||
89 | } | ||
90 | } | ||
91 | } | ||
92 | |||
93 | //TODO: Add checking and warning to make sure it initialised. | ||
94 | } | ||
95 | } | ||
96 | } | ||
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index b98aabe..4ab67aa 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -375,8 +375,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
375 | 375 | ||
376 | private void IRC_SendNamesReply() | 376 | private void IRC_SendNamesReply() |
377 | { | 377 | { |
378 | List<EntityBase> users = m_scene.Entities.GetAllByType<ScenePresence>(); | 378 | EntityBase[] users = m_scene.Entities.GetAllByType<ScenePresence>(); |
379 | |||
380 | foreach (EntityBase user in users) | 379 | foreach (EntityBase user in users) |
381 | { | 380 | { |
382 | SendServerCommand("353 " + m_nick + " = " + IrcRegionName + " :" + user.Name.Replace(" ", "")); | 381 | SendServerCommand("353 " + m_nick + " = " + IrcRegionName + " :" + user.Name.Replace(" ", "")); |
@@ -386,8 +385,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
386 | 385 | ||
387 | private void IRC_SendWhoReply() | 386 | private void IRC_SendWhoReply() |
388 | { | 387 | { |
389 | List<EntityBase> users = m_scene.Entities.GetAllByType<ScenePresence>(); | 388 | EntityBase[] users = m_scene.Entities.GetAllByType<ScenePresence>(); |
390 | |||
391 | foreach (EntityBase user in users) | 389 | foreach (EntityBase user in users) |
392 | { | 390 | { |
393 | /*SendServerCommand(String.Format("352 {0} {1} {2} {3} {4} {5} :0 {6}", IrcRegionName, | 391 | /*SendServerCommand(String.Format("352 {0} {1} {2} {3} {4} {5} :0 {6}", IrcRegionName, |
@@ -415,11 +413,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
415 | 413 | ||
416 | private void IRC_SendReplyUsers() | 414 | private void IRC_SendReplyUsers() |
417 | { | 415 | { |
418 | List<EntityBase> users = m_scene.Entities.GetAllByType<ScenePresence>(); | 416 | EntityBase[] users = m_scene.Entities.GetAllByType<ScenePresence>(); |
419 | 417 | ||
420 | SendServerCommand("392 :UserID Terminal Host"); | 418 | SendServerCommand("392 :UserID Terminal Host"); |
421 | 419 | ||
422 | if (users.Count == 0) | 420 | if (users.Length == 0) |
423 | { | 421 | { |
424 | SendServerCommand("395 :Nobody logged in"); | 422 | SendServerCommand("395 :Nobody logged in"); |
425 | return; | 423 | return; |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 2969503..6f044e0 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -962,7 +962,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
962 | if ((groupInfo == null) || (account == null)) | 962 | if ((groupInfo == null) || (account == null)) |
963 | { | 963 | { |
964 | return; | 964 | return; |
965 | } | 965 | } |
966 | 966 | ||
967 | // Send Message to Ejectee | 967 | // Send Message to Ejectee |
968 | GridInstantMessage msg = new GridInstantMessage(); | 968 | GridInstantMessage msg = new GridInstantMessage(); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 9363205..0d265f2 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | |||
@@ -91,11 +91,11 @@ using OpenSim.Services.Interfaces; | |||
91 | * + RoleID | 91 | * + RoleID |
92 | * | 92 | * |
93 | * GroupID -> GroupNotice -> NoticeID | 93 | * GroupID -> GroupNotice -> NoticeID |
94 | * + TimeStamp [uint] | 94 | * + TimeStamp [uint] |
95 | * + FromName [string] | 95 | * + FromName [string] |
96 | * + Subject [string] | 96 | * + Subject [string] |
97 | * + Message [string] | 97 | * + Message [string] |
98 | * + BinaryBucket [byte[]] | 98 | * + BinaryBucket [byte[]] |
99 | * | 99 | * |
100 | * */ | 100 | * */ |
101 | 101 | ||
@@ -309,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
309 | GroupInfoMap["OwnerRoleID"] = OSD.FromUUID(OwnerRoleID); | 309 | GroupInfoMap["OwnerRoleID"] = OSD.FromUUID(OwnerRoleID); |
310 | GroupInfoMap["OwnersPowers"] = OSD.FromULong((ulong)m_DefaultOwnerPowers); | 310 | GroupInfoMap["OwnersPowers"] = OSD.FromULong((ulong)m_DefaultOwnerPowers); |
311 | 311 | ||
312 | if(SimianAddGeneric(GroupID, "Group", name, GroupInfoMap)) | 312 | if (SimianAddGeneric(GroupID, "Group", name, GroupInfoMap)) |
313 | { | 313 | { |
314 | AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); | 314 | AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); |
315 | AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); | 315 | AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); |
@@ -334,7 +334,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
334 | 334 | ||
335 | string GroupName; | 335 | string GroupName; |
336 | OSDMap GroupInfoMap; | 336 | OSDMap GroupInfoMap; |
337 | if( SimianGetFirstGenericEntry(groupID, "GroupInfo", out GroupName, out GroupInfoMap) ) | 337 | if (SimianGetFirstGenericEntry(groupID, "GroupInfo", out GroupName, out GroupInfoMap)) |
338 | { | 338 | { |
339 | GroupInfoMap["Charter"] = OSD.FromString(charter); | 339 | GroupInfoMap["Charter"] = OSD.FromString(charter); |
340 | GroupInfoMap["ShowInList"] = OSD.FromBoolean(showInList); | 340 | GroupInfoMap["ShowInList"] = OSD.FromBoolean(showInList); |
@@ -379,7 +379,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
379 | string GroupRoleMemberType = "GroupRole" + groupID.ToString(); | 379 | string GroupRoleMemberType = "GroupRole" + groupID.ToString(); |
380 | if (SimianGetGenericEntries(GroupRoleMemberType, roleID.ToString(), out GroupRoleMembers)) | 380 | if (SimianGetGenericEntries(GroupRoleMemberType, roleID.ToString(), out GroupRoleMembers)) |
381 | { | 381 | { |
382 | foreach(UUID UserID in GroupRoleMembers.Keys) | 382 | foreach (UUID UserID in GroupRoleMembers.Keys) |
383 | { | 383 | { |
384 | EnsureRoleNotSelectedByMember(groupID, roleID, UserID); | 384 | EnsureRoleNotSelectedByMember(groupID, roleID, UserID); |
385 | 385 | ||
@@ -724,7 +724,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
724 | } | 724 | } |
725 | 725 | ||
726 | OSDMap UserGroupMemberInfo; | 726 | OSDMap UserGroupMemberInfo; |
727 | if( SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo) ) | 727 | if (SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo)) |
728 | { | 728 | { |
729 | data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); | 729 | data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); |
730 | data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); | 730 | data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); |
@@ -736,7 +736,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
736 | // | 736 | // |
737 | 737 | ||
738 | OSDMap GroupRoleInfo; | 738 | OSDMap GroupRoleInfo; |
739 | if( SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo) ) | 739 | if (SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo)) |
740 | { | 740 | { |
741 | data.GroupTitle = GroupRoleInfo["Title"].AsString(); | 741 | data.GroupTitle = GroupRoleInfo["Title"].AsString(); |
742 | data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); | 742 | data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); |
@@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
748 | // | 748 | // |
749 | OSDMap GroupInfo; | 749 | OSDMap GroupInfo; |
750 | string GroupName; | 750 | string GroupName; |
751 | if( SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo) ) | 751 | if (SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo)) |
752 | { | 752 | { |
753 | data.GroupID = groupID; | 753 | data.GroupID = groupID; |
754 | data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean(); | 754 | data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean(); |
@@ -928,12 +928,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
928 | Dictionary<string, OSDMap> GroupRoles; | 928 | Dictionary<string, OSDMap> GroupRoles; |
929 | if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles)) | 929 | if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles)) |
930 | { | 930 | { |
931 | foreach( KeyValuePair<string, OSDMap> Role in GroupRoles ) | 931 | foreach (KeyValuePair<string, OSDMap> Role in GroupRoles) |
932 | { | 932 | { |
933 | Dictionary<UUID, OSDMap> GroupRoleMembers; | 933 | Dictionary<UUID, OSDMap> GroupRoleMembers; |
934 | if( SimianGetGenericEntries("GroupRole"+groupID.ToString(), Role.Key, out GroupRoleMembers) ) | 934 | if (SimianGetGenericEntries("GroupRole"+groupID.ToString(), Role.Key, out GroupRoleMembers)) |
935 | { | 935 | { |
936 | foreach( KeyValuePair<UUID, OSDMap> GroupRoleMember in GroupRoleMembers ) | 936 | foreach (KeyValuePair<UUID, OSDMap> GroupRoleMember in GroupRoleMembers) |
937 | { | 937 | { |
938 | GroupRoleMembersData data = new GroupRoleMembersData(); | 938 | GroupRoleMembersData data = new GroupRoleMembersData(); |
939 | 939 | ||
@@ -1264,7 +1264,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1264 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); | 1264 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); |
1265 | maps.Add(entryMap["Key"].AsString(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); | 1265 | maps.Add(entryMap["Key"].AsString(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); |
1266 | } | 1266 | } |
1267 | if(maps.Count == 0) | 1267 | if (maps.Count == 0) |
1268 | { | 1268 | { |
1269 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); | 1269 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); |
1270 | } | 1270 | } |
@@ -1352,17 +1352,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1352 | } | 1352 | } |
1353 | 1353 | ||
1354 | // Check if this is an update or a request | 1354 | // Check if this is an update or a request |
1355 | if ( requestArgs["RequestMethod"] == "RemoveGeneric" | 1355 | if (requestArgs["RequestMethod"] == "RemoveGeneric" |
1356 | || requestArgs["RequestMethod"] == "AddGeneric" | 1356 | || requestArgs["RequestMethod"] == "AddGeneric") |
1357 | ) | ||
1358 | |||
1359 | { | 1357 | { |
1360 | // Any and all updates cause the cache to clear | 1358 | // Any and all updates cause the cache to clear |
1361 | m_memoryCache.Clear(); | 1359 | m_memoryCache.Clear(); |
1362 | 1360 | ||
1363 | // Send update to server, return the response without caching it | 1361 | // Send update to server, return the response without caching it |
1364 | return WebUtil.PostToService(m_groupsServerURI, requestArgs); | 1362 | return WebUtil.PostToService(m_groupsServerURI, requestArgs); |
1365 | |||
1366 | } | 1363 | } |
1367 | 1364 | ||
1368 | // If we're not doing an update, we must be requesting data | 1365 | // If we're not doing an update, we must be requesting data |
@@ -1372,7 +1369,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1372 | OSDMap response = null; | 1369 | OSDMap response = null; |
1373 | if (!m_memoryCache.TryGetValue(CacheKey, out response)) | 1370 | if (!m_memoryCache.TryGetValue(CacheKey, out response)) |
1374 | { | 1371 | { |
1375 | // if it wasn't in the cache, pass the request to the Simian Grid Services | 1372 | // if it wasn't in the cache, pass the request to the Simian Grid Services |
1376 | response = WebUtil.PostToService(m_groupsServerURI, requestArgs); | 1373 | response = WebUtil.PostToService(m_groupsServerURI, requestArgs); |
1377 | 1374 | ||
1378 | // and cache the response | 1375 | // and cache the response |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index 79b9a16..a88c5e2 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | |||
@@ -960,7 +960,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
960 | 960 | ||
961 | } | 961 | } |
962 | 962 | ||
963 | if( resp == null ) | 963 | if (resp == null) |
964 | { | 964 | { |
965 | string UserService; | 965 | string UserService; |
966 | UUID SessionID; | 966 | UUID SessionID; |
@@ -1065,7 +1065,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1065 | 1065 | ||
1066 | /// <summary> | 1066 | /// <summary> |
1067 | /// Group Request Tokens are an attempt to allow the groups service to authenticate | 1067 | /// Group Request Tokens are an attempt to allow the groups service to authenticate |
1068 | /// requests. | 1068 | /// requests. |
1069 | /// TODO: This broke after the big grid refactor, either find a better way, or discard this | 1069 | /// TODO: This broke after the big grid refactor, either find a better way, or discard this |
1070 | /// </summary> | 1070 | /// </summary> |
1071 | /// <param name="client"></param> | 1071 | /// <param name="client"></param> |
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs index de1e01c..d21b652 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/CMEntityCollection.cs | |||
@@ -111,7 +111,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
111 | } | 111 | } |
112 | 112 | ||
113 | // Check if there are SceneObjectGroups in the list that do not have corresponding ContentManagementGroups in the CMEntityHash | 113 | // Check if there are SceneObjectGroups in the list that do not have corresponding ContentManagementGroups in the CMEntityHash |
114 | public System.Collections.ArrayList CheckForMissingEntities(System.Collections.Generic.List<EntityBase> currList) | 114 | public System.Collections.ArrayList CheckForMissingEntities(EntityBase[] currList) |
115 | { | 115 | { |
116 | System.Collections.ArrayList missingList = new System.Collections.ArrayList(); | 116 | System.Collections.ArrayList missingList = new System.Collections.ArrayList(); |
117 | SceneObjectGroup temp = null; | 117 | SceneObjectGroup temp = null; |
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementEntity.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementEntity.cs index 2730eee..49d20e1 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementEntity.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/ContentManagementEntity.cs | |||
@@ -127,7 +127,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
127 | /// </summary> | 127 | /// </summary> |
128 | public void FindDifferences() | 128 | public void FindDifferences() |
129 | { | 129 | { |
130 | System.Collections.Generic.List<EntityBase> sceneEntityList = m_Entity.Scene.GetEntities(); | 130 | List<EntityBase> sceneEntityList = new List<EntityBase>(m_Entity.Scene.GetEntities()); |
131 | DiffersFromSceneGroup = false; | 131 | DiffersFromSceneGroup = false; |
132 | // if group is not contained in scene's list | 132 | // if group is not contained in scene's list |
133 | if (!ContainsKey(sceneEntityList, m_UnchangedEntity.UUID)) | 133 | if (!ContainsKey(sceneEntityList, m_UnchangedEntity.UUID)) |
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs index 796f437..d7838c5 100644 --- a/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs +++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs | |||
@@ -161,7 +161,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement | |||
161 | 161 | ||
162 | //finalize | 162 | //finalize |
163 | m_Entity.RootPart.PhysActor = null; | 163 | m_Entity.RootPart.PhysActor = null; |
164 | m_Entity.Children = parts; | 164 | m_Entity.Children = parts; |
165 | } | 165 | } |
166 | } | 166 | } |
167 | 167 | ||
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/ObjectAccessor.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/ObjectAccessor.cs index 6ba5ccf..140264b 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/ObjectAccessor.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/ObjectAccessor.cs | |||
@@ -41,12 +41,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
41 | private readonly Scene m_scene; | 41 | private readonly Scene m_scene; |
42 | private readonly IEnumerator<EntityBase> m_sogEnum; | 42 | private readonly IEnumerator<EntityBase> m_sogEnum; |
43 | private readonly ISecurityCredential m_security; | 43 | private readonly ISecurityCredential m_security; |
44 | private readonly List<EntityBase> m_entities; | ||
44 | 45 | ||
45 | public IObjEnum(Scene scene, ISecurityCredential security) | 46 | public IObjEnum(Scene scene, ISecurityCredential security) |
46 | { | 47 | { |
47 | m_scene = scene; | 48 | m_scene = scene; |
48 | m_security = security; | 49 | m_security = security; |
49 | m_sogEnum = m_scene.Entities.GetAllByType<SceneObjectGroup>().GetEnumerator(); | 50 | m_entities = new List<EntityBase>(m_scene.Entities.GetEntities()); |
51 | m_sogEnum = m_entities.GetEnumerator(); | ||
50 | } | 52 | } |
51 | 53 | ||
52 | public void Dispose() | 54 | public void Dispose() |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index c439e3e..59ad9d8 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs | |||
@@ -432,7 +432,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
432 | return; | 432 | return; |
433 | } | 433 | } |
434 | 434 | ||
435 | foreach(string button in buttons) | 435 | foreach (string button in buttons) |
436 | { | 436 | { |
437 | if (button == String.Empty) | 437 | if (button == String.Empty) |
438 | { | 438 | { |
@@ -448,7 +448,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
448 | 448 | ||
449 | dm.SendDialogToUser( | 449 | dm.SendDialogToUser( |
450 | avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID, | 450 | avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID, |
451 | message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons); | 451 | message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons); |
452 | 452 | ||
453 | } | 453 | } |
454 | 454 | ||
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs index 45bb005..f2324d2 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs | |||
@@ -205,10 +205,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
205 | { | 205 | { |
206 | get | 206 | get |
207 | { | 207 | { |
208 | List<EntityBase> ents = m_internalScene.Entities.GetAllByType<ScenePresence>(); | 208 | EntityBase[] ents = m_internalScene.Entities.GetAllByType<ScenePresence>(); |
209 | IAvatar[] rets = new IAvatar[ents.Count]; | 209 | IAvatar[] rets = new IAvatar[ents.Length]; |
210 | 210 | ||
211 | for (int i = 0; i < ents.Count; i++) | 211 | for (int i = 0; i < ents.Length; i++) |
212 | { | 212 | { |
213 | EntityBase ent = ents[i]; | 213 | EntityBase ent = ents[i]; |
214 | rets[i] = new SPAvatar(m_internalScene, ent.UUID, m_security); | 214 | rets[i] = new SPAvatar(m_internalScene, ent.UUID, m_security); |
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 61cbb90..cc51c3b 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -824,5 +824,5 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
824 | RegionMoneyRequest = 1, | 824 | RegionMoneyRequest = 1, |
825 | Gift = 2, | 825 | Gift = 2, |
826 | Purchase = 3 | 826 | Purchase = 3 |
827 | } | 827 | } |
828 | } \ No newline at end of file | 828 | } \ No newline at end of file |
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index 3ed338b..421da36 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | |||
@@ -568,8 +568,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
568 | { | 568 | { |
569 | m_copse = new List<Copse>(); | 569 | m_copse = new List<Copse>(); |
570 | 570 | ||
571 | List<EntityBase> objs = m_scene.GetEntities(); | 571 | EntityBase[] objs = m_scene.GetEntities(); |
572 | |||
573 | foreach (EntityBase obj in objs) | 572 | foreach (EntityBase obj in objs) |
574 | { | 573 | { |
575 | if (obj is SceneObjectGroup) | 574 | if (obj is SceneObjectGroup) |
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs index a0d6197..f424e7f 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs | |||
@@ -49,7 +49,7 @@ namespace OpenSim.Region.RegionCombinerModule | |||
49 | public void ClientConnect(IClientAPI client) | 49 | public void ClientConnect(IClientAPI client) |
50 | { | 50 | { |
51 | m_virtScene.UnSubscribeToClientPrimEvents(client); | 51 | m_virtScene.UnSubscribeToClientPrimEvents(client); |
52 | m_virtScene.UnSubscribeToClientPrimRezEvents(client); | 52 | m_virtScene.UnSubscribeToClientPrimRezEvents(client); |
53 | m_virtScene.UnSubscribeToClientInventoryEvents(client); | 53 | m_virtScene.UnSubscribeToClientInventoryEvents(client); |
54 | ((AttachmentsModule)m_virtScene.AttachmentsModule).UnsubscribeFromClientEvents(client); | 54 | ((AttachmentsModule)m_virtScene.AttachmentsModule).UnsubscribeFromClientEvents(client); |
55 | //m_virtScene.UnSubscribeToClientTeleportEvents(client); | 55 | //m_virtScene.UnSubscribeToClientTeleportEvents(client); |
@@ -66,7 +66,7 @@ namespace OpenSim.Region.RegionCombinerModule | |||
66 | client.OnRezObject += LocalRezObject; | 66 | client.OnRezObject += LocalRezObject; |
67 | 67 | ||
68 | m_rootScene.SubscribeToClientInventoryEvents(client); | 68 | m_rootScene.SubscribeToClientInventoryEvents(client); |
69 | ((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client); | 69 | ((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client); |
70 | //m_rootScene.SubscribeToClientTeleportEvents(client); | 70 | //m_rootScene.SubscribeToClientTeleportEvents(client); |
71 | m_rootScene.SubscribeToClientScriptEvents(client); | 71 | m_rootScene.SubscribeToClientScriptEvents(client); |
72 | 72 | ||
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs index 33ff707..be5411a 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs | |||
@@ -118,7 +118,7 @@ public class RegionCombinerLargeLandChannel : ILandChannel | |||
118 | return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY); | 118 | return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
122 | ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); | 122 | ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); |
123 | obj.LandData.Name = "NO LAND"; | 123 | obj.LandData.Name = "NO LAND"; |
124 | return obj; | 124 | return obj; |
@@ -142,14 +142,14 @@ public class RegionCombinerLargeLandChannel : ILandChannel | |||
142 | 142 | ||
143 | public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) | 143 | public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) |
144 | { | 144 | { |
145 | RootRegionLandChannel.Join(start_x, start_y, end_x, end_y, attempting_user_id); | 145 | RootRegionLandChannel.Join(start_x, start_y, end_x, end_y, attempting_user_id); |
146 | } | 146 | } |
147 | 147 | ||
148 | public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) | 148 | public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) |
149 | { | 149 | { |
150 | RootRegionLandChannel.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id); | 150 | RootRegionLandChannel.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id); |
151 | } | 151 | } |
152 | 152 | ||
153 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) | 153 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) |
154 | { | 154 | { |
155 | RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient); | 155 | RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 512957d..a5b3cd0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4298,9 +4298,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4298 | } | 4298 | } |
4299 | 4299 | ||
4300 | 4300 | ||
4301 | PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); | 4301 | pinfo = World.PresenceService.GetAgent(uuid); |
4302 | if (pinfos != null && pinfos.Length > 0) | ||
4303 | pinfo = pinfos[0]; | ||
4304 | 4302 | ||
4305 | ce = new UserInfoCacheEntry(); | 4303 | ce = new UserInfoCacheEntry(); |
4306 | ce.time = Util.EnvironmentTickCount(); | 4304 | ce.time = Util.EnvironmentTickCount(); |
@@ -4319,11 +4317,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4319 | 4317 | ||
4320 | if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000) | 4318 | if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000) |
4321 | { | 4319 | { |
4322 | PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); | 4320 | pinfo = World.PresenceService.GetAgent(uuid); |
4323 | if (pinfos != null && pinfos.Length > 0) | ||
4324 | pinfo = pinfos[0]; | ||
4325 | else | ||
4326 | pinfo = null; | ||
4327 | 4321 | ||
4328 | ce.time = Util.EnvironmentTickCount(); | 4322 | ce.time = Util.EnvironmentTickCount(); |
4329 | ce.pinfo = pinfo; | 4323 | ce.pinfo = pinfo; |
@@ -8482,7 +8476,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8482 | res.Add(new LSL_Integer((int)me.ControlPermissions)); | 8476 | res.Add(new LSL_Integer((int)me.ControlPermissions)); |
8483 | break; | 8477 | break; |
8484 | } | 8478 | } |
8485 | } | 8479 | } |
8486 | 8480 | ||
8487 | return res; | 8481 | return res; |
8488 | } | 8482 | } |
@@ -8498,7 +8492,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8498 | if (face < 0 || face > m_host.GetNumberOfSides() - 1) | 8492 | if (face < 0 || face > m_host.GetNumberOfSides() - 1) |
8499 | return ScriptBaseClass.LSL_STATUS_OK; | 8493 | return ScriptBaseClass.LSL_STATUS_OK; |
8500 | 8494 | ||
8501 | return SetPrimMediaParams(face, rules); | 8495 | return SetPrimMediaParams(face, rules); |
8502 | } | 8496 | } |
8503 | 8497 | ||
8504 | private LSL_Integer SetPrimMediaParams(int face, LSL_List rules) | 8498 | private LSL_Integer SetPrimMediaParams(int face, LSL_List rules) |
@@ -8587,7 +8581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8587 | me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++); | 8581 | me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++); |
8588 | break; | 8582 | break; |
8589 | } | 8583 | } |
8590 | } | 8584 | } |
8591 | 8585 | ||
8592 | module.SetMediaEntry(m_host, face, me); | 8586 | module.SetMediaEntry(m_host, face, me); |
8593 | 8587 | ||
@@ -8607,7 +8601,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8607 | 8601 | ||
8608 | IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); | 8602 | IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); |
8609 | if (null == module) | 8603 | if (null == module) |
8610 | throw new Exception("Media on a prim functions not available"); | 8604 | throw new Exception("Media on a prim functions not available"); |
8611 | 8605 | ||
8612 | module.ClearMediaEntry(m_host, face); | 8606 | module.ClearMediaEntry(m_host, face); |
8613 | 8607 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index a08b135..6827ede 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1197,7 +1197,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1197 | 1197 | ||
1198 | World.LandChannel.Join(startx,starty,endx,endy,m_host.OwnerID); | 1198 | World.LandChannel.Join(startx,starty,endx,endy,m_host.OwnerID); |
1199 | } | 1199 | } |
1200 | 1200 | ||
1201 | public void osParcelSubdivide(LSL_Vector pos1, LSL_Vector pos2) | 1201 | public void osParcelSubdivide(LSL_Vector pos1, LSL_Vector pos2) |
1202 | { | 1202 | { |
1203 | CheckThreatLevel(ThreatLevel.High, "osParcelSubdivide"); | 1203 | CheckThreatLevel(ThreatLevel.High, "osParcelSubdivide"); |
@@ -1220,7 +1220,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1220 | // can modify it | 1220 | // can modify it |
1221 | 1221 | ||
1222 | ILandObject startLandObject = World.LandChannel.GetLandObject((int)pos.x, (int)pos.y); | 1222 | ILandObject startLandObject = World.LandChannel.GetLandObject((int)pos.x, (int)pos.y); |
1223 | if (startLandObject == null) | 1223 | if (startLandObject == null) |
1224 | { | 1224 | { |
1225 | OSSLShoutError("There is no land at that location"); | 1225 | OSSLShoutError("There is no land at that location"); |
1226 | return; | 1226 | return; |
@@ -1237,7 +1237,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1237 | UUID uuid; | 1237 | UUID uuid; |
1238 | 1238 | ||
1239 | // Process the rules, not sure what the impact would be of changing owner or group | 1239 | // Process the rules, not sure what the impact would be of changing owner or group |
1240 | for (int idx = 0; idx < rules.Length; ) | 1240 | for (int idx = 0; idx < rules.Length;) |
1241 | { | 1241 | { |
1242 | int code = rules.GetLSLIntegerItem(idx++); | 1242 | int code = rules.GetLSLIntegerItem(idx++); |
1243 | string arg = rules.GetLSLStringItem(idx++); | 1243 | string arg = rules.GetLSLStringItem(idx++); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index a5b1124..3b7de53 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -286,7 +286,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
286 | } | 286 | } |
287 | else | 287 | else |
288 | { | 288 | { |
289 | Entities = m_CmdManager.m_ScriptEngine.World.GetEntities(); | 289 | Entities = new List<EntityBase>(m_CmdManager.m_ScriptEngine.World.GetEntities()); |
290 | } | 290 | } |
291 | SceneObjectPart SensePoint = ts.host; | 291 | SceneObjectPart SensePoint = ts.host; |
292 | 292 | ||
@@ -417,7 +417,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
417 | List<SensedEntity> sensedEntities = new List<SensedEntity>(); | 417 | List<SensedEntity> sensedEntities = new List<SensedEntity>(); |
418 | 418 | ||
419 | // If nobody about quit fast | 419 | // If nobody about quit fast |
420 | if(m_CmdManager.m_ScriptEngine.World.GetRootAgentCount() == 0) | 420 | if (m_CmdManager.m_ScriptEngine.World.GetRootAgentCount() == 0) |
421 | return sensedEntities; | 421 | return sensedEntities; |
422 | 422 | ||
423 | SceneObjectPart SensePoint = ts.host; | 423 | SceneObjectPart SensePoint = ts.host; |
@@ -496,7 +496,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
496 | { | 496 | { |
497 | ScenePresence sp; | 497 | ScenePresence sp; |
498 | // Try direct lookup by UUID | 498 | // Try direct lookup by UUID |
499 | if(!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out sp)) | 499 | if (!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out sp)) |
500 | return sensedEntities; | 500 | return sensedEntities; |
501 | senseEntity(sp); | 501 | senseEntity(sp); |
502 | } | 502 | } |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index e5e8a56..e82d297 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -632,7 +632,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
632 | bool postOnRez = (bool)p[4]; | 632 | bool postOnRez = (bool)p[4]; |
633 | StateSource stateSource = (StateSource)p[5]; | 633 | StateSource stateSource = (StateSource)p[5]; |
634 | 634 | ||
635 | lock(m_CompileDict) | 635 | lock (m_CompileDict) |
636 | { | 636 | { |
637 | if (!m_CompileDict.ContainsKey(itemID)) | 637 | if (!m_CompileDict.ContainsKey(itemID)) |
638 | return false; | 638 | return false; |
diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs index e7a8294..f4472c7 100644 --- a/OpenSim/Server/Base/ServerUtils.cs +++ b/OpenSim/Server/Base/ServerUtils.cs | |||
@@ -62,7 +62,7 @@ namespace OpenSim.Server.Base | |||
62 | /// </summary> | 62 | /// </summary> |
63 | /// <param name="dllName"></param> | 63 | /// <param name="dllName"></param> |
64 | /// <param name="args">The arguments which control which constructor is invoked on the plugin</param> | 64 | /// <param name="args">The arguments which control which constructor is invoked on the plugin</param> |
65 | /// <returns></returns> | 65 | /// <returns></returns> |
66 | public static T LoadPlugin<T>(string dllName, Object[] args) where T:class | 66 | public static T LoadPlugin<T>(string dllName, Object[] args) where T:class |
67 | { | 67 | { |
68 | string[] parts = dllName.Split(new char[] {':'}); | 68 | string[] parts = dllName.Split(new char[] {':'}); |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs new file mode 100644 index 0000000..39baa32 --- /dev/null +++ b/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.IO; | ||
31 | using System.Net; | ||
32 | using System.Reflection; | ||
33 | using Nini.Config; | ||
34 | using log4net; | ||
35 | using OpenSim.Server.Base; | ||
36 | using OpenSim.Services.Interfaces; | ||
37 | using OpenSim.Framework.Servers.HttpServer; | ||
38 | using OpenSim.Server.Handlers.Base; | ||
39 | |||
40 | namespace OpenSim.Server.Handlers.Hypergrid | ||
41 | { | ||
42 | public class HeloServiceInConnector : ServiceConnector | ||
43 | { | ||
44 | public HeloServiceInConnector(IConfigSource config, IHttpServer server, string configName) : | ||
45 | base(config, server, configName) | ||
46 | { | ||
47 | server.AddStreamHandler(new HeloServerGetHandler("opensim-robust")); | ||
48 | } | ||
49 | } | ||
50 | |||
51 | public class HeloServerGetHandler : BaseStreamHandler | ||
52 | { | ||
53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
54 | |||
55 | private string m_HandlersType; | ||
56 | |||
57 | public HeloServerGetHandler(string handlersType) : | ||
58 | base("GET", "/helo") | ||
59 | { | ||
60 | m_HandlersType = handlersType; | ||
61 | } | ||
62 | |||
63 | public override byte[] Handle(string path, Stream requestData, | ||
64 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | ||
65 | { | ||
66 | return OKResponse(httpResponse); | ||
67 | } | ||
68 | |||
69 | private byte[] OKResponse(OSHttpResponse httpResponse) | ||
70 | { | ||
71 | m_log.Debug("[HELO]: hi, I was called"); | ||
72 | httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType); | ||
73 | httpResponse.StatusCode = (int)HttpStatusCode.OK; | ||
74 | httpResponse.StatusDescription = "OK"; | ||
75 | return new byte[0]; | ||
76 | } | ||
77 | |||
78 | } | ||
79 | } | ||
diff --git a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs index 34df54a..5c31639 100644 --- a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs | |||
@@ -32,6 +32,8 @@ using System.Collections.Generic; | |||
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Services.Interfaces; | 34 | using OpenSim.Services.Interfaces; |
35 | using OpenSim.Services.Connectors.Hypergrid; | ||
36 | using OpenSim.Services.Connectors.SimianGrid; | ||
35 | 37 | ||
36 | namespace OpenSim.Services.Connectors | 38 | namespace OpenSim.Services.Connectors |
37 | { | 39 | { |
@@ -41,7 +43,7 @@ namespace OpenSim.Services.Connectors | |||
41 | LogManager.GetLogger( | 43 | LogManager.GetLogger( |
42 | MethodBase.GetCurrentMethod().DeclaringType); | 44 | MethodBase.GetCurrentMethod().DeclaringType); |
43 | 45 | ||
44 | private Dictionary<string, AssetServicesConnector> m_connectors = new Dictionary<string, AssetServicesConnector>(); | 46 | private Dictionary<string, IAssetService> m_connectors = new Dictionary<string, IAssetService>(); |
45 | 47 | ||
46 | public HGAssetServiceConnector(IConfigSource source) | 48 | public HGAssetServiceConnector(IConfigSource source) |
47 | { | 49 | { |
@@ -81,7 +83,7 @@ namespace OpenSim.Services.Connectors | |||
81 | 83 | ||
82 | private IAssetService GetConnector(string url) | 84 | private IAssetService GetConnector(string url) |
83 | { | 85 | { |
84 | AssetServicesConnector connector = null; | 86 | IAssetService connector = null; |
85 | lock (m_connectors) | 87 | lock (m_connectors) |
86 | { | 88 | { |
87 | if (m_connectors.ContainsKey(url)) | 89 | if (m_connectors.ContainsKey(url)) |
@@ -90,12 +92,17 @@ namespace OpenSim.Services.Connectors | |||
90 | } | 92 | } |
91 | else | 93 | else |
92 | { | 94 | { |
93 | // We're instantiating this class explicitly, but this won't | 95 | // Still not as flexible as I would like this to be, |
94 | // work in general, because the remote grid may be running | 96 | // but good enough for now |
95 | // an asset server that has a different protocol. | 97 | string connectorType = new HeloServicesConnector(url).Helo(); |
96 | // Eventually we will want a piece of protocol asking | 98 | m_log.DebugFormat("[HG ASSET SERVICE]: HELO returned {0}", connectorType); |
97 | // the remote server about its kind. Definitely cool thing to do! | 99 | if (connectorType == "opensim-simian") |
98 | connector = new AssetServicesConnector(url); | 100 | { |
101 | connector = new SimianAssetServiceConnector(url); | ||
102 | } | ||
103 | else | ||
104 | connector = new AssetServicesConnector(url); | ||
105 | |||
99 | m_connectors.Add(url, connector); | 106 | m_connectors.Add(url, connector); |
100 | } | 107 | } |
101 | } | 108 | } |
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index f5b5982..479a80e 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
86 | paramList.Add(hash); | 86 | paramList.Add(hash); |
87 | 87 | ||
88 | XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); | 88 | XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); |
89 | string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/" ); | 89 | string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/"); |
90 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); | 90 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); |
91 | XmlRpcResponse response = null; | 91 | XmlRpcResponse response = null; |
92 | try | 92 | try |
diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs new file mode 100644 index 0000000..7b166c1 --- /dev/null +++ b/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using log4net; | ||
29 | using System; | ||
30 | using System.Net; | ||
31 | using System.Reflection; | ||
32 | using Nini.Config; | ||
33 | |||
34 | namespace OpenSim.Services.Connectors | ||
35 | { | ||
36 | public class HeloServicesConnector | ||
37 | { | ||
38 | private static readonly ILog m_log = | ||
39 | LogManager.GetLogger( | ||
40 | MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
42 | private string m_ServerURI = String.Empty; | ||
43 | |||
44 | public HeloServicesConnector() | ||
45 | { | ||
46 | } | ||
47 | |||
48 | public HeloServicesConnector(string serverURI) | ||
49 | { | ||
50 | m_ServerURI = serverURI.TrimEnd('/'); | ||
51 | } | ||
52 | |||
53 | |||
54 | public virtual string Helo() | ||
55 | { | ||
56 | HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI + "/helo"); | ||
57 | |||
58 | try | ||
59 | { | ||
60 | WebResponse response = req.GetResponse(); | ||
61 | if (response.Headers.Get("X-Handlers-Provided") == null) // just in case this ever returns a null | ||
62 | return string.Empty; | ||
63 | return response.Headers.Get("X-Handlers-Provided"); | ||
64 | } | ||
65 | catch (Exception e) | ||
66 | { | ||
67 | m_log.DebugFormat("[HELO SERVICE]: Unable to perform HELO request to {0}: {1}", m_ServerURI, e.Message); | ||
68 | } | ||
69 | |||
70 | // fail | ||
71 | return string.Empty; | ||
72 | } | ||
73 | |||
74 | } | ||
75 | } | ||
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index e25e7eb..403ee15 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs | |||
@@ -526,7 +526,7 @@ namespace OpenSim.Services.Connectors | |||
526 | InventoryFolderBase folder = new InventoryFolderBase(); | 526 | InventoryFolderBase folder = new InventoryFolderBase(); |
527 | 527 | ||
528 | try | 528 | try |
529 | { | 529 | { |
530 | folder.ParentID = new UUID(data["ParentID"].ToString()); | 530 | folder.ParentID = new UUID(data["ParentID"].ToString()); |
531 | folder.Type = short.Parse(data["Type"].ToString()); | 531 | folder.Type = short.Parse(data["Type"].ToString()); |
532 | folder.Version = ushort.Parse(data["Version"].ToString()); | 532 | folder.Version = ushort.Parse(data["Version"].ToString()); |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs index a871d07..67a06f3 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs | |||
@@ -26,11 +26,9 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | 29 | using System.Reflection; |
31 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
32 | using OpenSim.Region.Framework.Scenes; | 31 | using OpenSim.Region.Framework.Scenes; |
33 | using OpenSim.Services.Interfaces; | ||
34 | using OpenMetaverse; | 32 | using OpenMetaverse; |
35 | using log4net; | 33 | using log4net; |
36 | 34 | ||
@@ -71,7 +69,10 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
71 | public void OnMakeRootAgent(ScenePresence sp) | 69 | public void OnMakeRootAgent(ScenePresence sp) |
72 | { | 70 | { |
73 | m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); | 71 | m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); |
74 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | 72 | Util.FireAndForget(delegate(object o) |
73 | { | ||
74 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
75 | }); | ||
75 | } | 76 | } |
76 | 77 | ||
77 | public void OnNewClient(IClientAPI client) | 78 | public void OnNewClient(IClientAPI client) |
@@ -107,7 +108,11 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
107 | 108 | ||
108 | void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) | 109 | void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) |
109 | { | 110 | { |
110 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | 111 | // Asynchronously update the position stored in the session table for this agent |
112 | Util.FireAndForget(delegate(object o) | ||
113 | { | ||
114 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
115 | }); | ||
111 | } | 116 | } |
112 | } | 117 | } |
113 | } | 118 | } |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 6d5b30e..30d3147 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | |||
@@ -84,6 +84,11 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
84 | CommonInit(source); | 84 | CommonInit(source); |
85 | } | 85 | } |
86 | 86 | ||
87 | public SimianAssetServiceConnector(string url) | ||
88 | { | ||
89 | m_serverUrl = url; | ||
90 | } | ||
91 | |||
87 | public void Initialise(IConfigSource source) | 92 | public void Initialise(IConfigSource source) |
88 | { | 93 | { |
89 | IConfig moduleConfig = source.Configs["Modules"]; | 94 | IConfig moduleConfig = source.Configs["Modules"]; |
@@ -119,6 +124,12 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
119 | 124 | ||
120 | public AssetBase Get(string id) | 125 | public AssetBase Get(string id) |
121 | { | 126 | { |
127 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
128 | { | ||
129 | m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI configured"); | ||
130 | throw new InvalidOperationException(); | ||
131 | } | ||
132 | |||
122 | // Cache fetch | 133 | // Cache fetch |
123 | if (m_cache != null) | 134 | if (m_cache != null) |
124 | { | 135 | { |
@@ -145,6 +156,12 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
145 | /// <returns></returns> | 156 | /// <returns></returns> |
146 | public AssetMetadata GetMetadata(string id) | 157 | public AssetMetadata GetMetadata(string id) |
147 | { | 158 | { |
159 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
160 | { | ||
161 | m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI configured"); | ||
162 | throw new InvalidOperationException(); | ||
163 | } | ||
164 | |||
148 | AssetMetadata metadata = null; | 165 | AssetMetadata metadata = null; |
149 | 166 | ||
150 | // Cache fetch | 167 | // Cache fetch |
@@ -216,6 +233,12 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
216 | /// <returns>True if the id was parseable, false otherwise</returns> | 233 | /// <returns>True if the id was parseable, false otherwise</returns> |
217 | public bool Get(string id, Object sender, AssetRetrieved handler) | 234 | public bool Get(string id, Object sender, AssetRetrieved handler) |
218 | { | 235 | { |
236 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
237 | { | ||
238 | m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI configured"); | ||
239 | throw new InvalidOperationException(); | ||
240 | } | ||
241 | |||
219 | // Cache fetch | 242 | // Cache fetch |
220 | if (m_cache != null) | 243 | if (m_cache != null) |
221 | { | 244 | { |
@@ -246,6 +269,12 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
246 | /// <returns></returns> | 269 | /// <returns></returns> |
247 | public string Store(AssetBase asset) | 270 | public string Store(AssetBase asset) |
248 | { | 271 | { |
272 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
273 | { | ||
274 | m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI configured"); | ||
275 | throw new InvalidOperationException(); | ||
276 | } | ||
277 | |||
249 | bool storedInCache = false; | 278 | bool storedInCache = false; |
250 | string errorMessage = null; | 279 | string errorMessage = null; |
251 | 280 | ||
@@ -378,6 +407,12 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
378 | /// <returns></returns> | 407 | /// <returns></returns> |
379 | public bool Delete(string id) | 408 | public bool Delete(string id) |
380 | { | 409 | { |
410 | if (String.IsNullOrEmpty(m_serverUrl)) | ||
411 | { | ||
412 | m_log.Error("[SIMIAN ASSET CONNECTOR]: No AssetServerURI configured"); | ||
413 | throw new InvalidOperationException(); | ||
414 | } | ||
415 | |||
381 | //string errorMessage = String.Empty; | 416 | //string errorMessage = String.Empty; |
382 | string url = m_serverUrl + id; | 417 | string url = m_serverUrl + id; |
383 | 418 | ||
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index 3505c64..4d0d53e 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | |||
@@ -28,8 +28,6 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Collections.Specialized; | 30 | using System.Collections.Specialized; |
31 | using System.IO; | ||
32 | using System.Net; | ||
33 | using System.Reflection; | 31 | using System.Reflection; |
34 | using log4net; | 32 | using log4net; |
35 | using Mono.Addins; | 33 | using Mono.Addins; |
@@ -37,7 +35,6 @@ using Nini.Config; | |||
37 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
38 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Server.Base; | ||
41 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
42 | using OpenMetaverse; | 39 | using OpenMetaverse; |
43 | using OpenMetaverse.StructuredData; | 40 | using OpenMetaverse.StructuredData; |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs index 5b18aef..6f2d735 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianFriendsServiceConnector.cs | |||
@@ -30,13 +30,10 @@ using System.Collections.Generic; | |||
30 | using System.Collections.Specialized; | 30 | using System.Collections.Specialized; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using log4net; | 32 | using log4net; |
33 | using Mono.Addins; | ||
34 | using Nini.Config; | 33 | using Nini.Config; |
35 | using OpenMetaverse; | 34 | using OpenMetaverse; |
36 | using OpenMetaverse.StructuredData; | 35 | using OpenMetaverse.StructuredData; |
37 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
38 | using OpenSim.Region.Framework.Interfaces; | ||
39 | using OpenSim.Region.Framework.Scenes; | ||
40 | using OpenSim.Services.Interfaces; | 37 | using OpenSim.Services.Interfaces; |
41 | 38 | ||
42 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; | 39 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 470eccd..21ad4ab 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -37,7 +37,6 @@ using OpenMetaverse.StructuredData; | |||
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Server.Base; | ||
41 | using OpenSim.Services.Interfaces; | 40 | using OpenSim.Services.Interfaces; |
42 | 41 | ||
43 | namespace OpenSim.Services.Connectors.SimianGrid | 42 | namespace OpenSim.Services.Connectors.SimianGrid |
@@ -91,6 +90,11 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
91 | CommonInit(source); | 90 | CommonInit(source); |
92 | } | 91 | } |
93 | 92 | ||
93 | public SimianInventoryServiceConnector(string url) | ||
94 | { | ||
95 | m_serverUrl = url; | ||
96 | } | ||
97 | |||
94 | public void Initialise(IConfigSource source) | 98 | public void Initialise(IConfigSource source) |
95 | { | 99 | { |
96 | IConfig moduleConfig = source.Configs["Modules"]; | 100 | IConfig moduleConfig = source.Configs["Modules"]; |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 077be3c..a344594 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -28,17 +28,14 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Collections.Specialized; | 30 | using System.Collections.Specialized; |
31 | using System.Net; | ||
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using log4net; | 32 | using log4net; |
34 | using Mono.Addins; | 33 | using Mono.Addins; |
35 | using Nini.Config; | 34 | using Nini.Config; |
36 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Servers.HttpServer; | ||
38 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
41 | using OpenSim.Server.Base; | ||
42 | using OpenMetaverse; | 39 | using OpenMetaverse; |
43 | using OpenMetaverse.StructuredData; | 40 | using OpenMetaverse.StructuredData; |
44 | 41 | ||
@@ -358,25 +355,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
358 | return null; | 355 | return null; |
359 | } | 356 | } |
360 | 357 | ||
361 | // private OSDMap GetSessionData(UUID sessionID) | ||
362 | // { | ||
363 | // m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for session " + sessionID); | ||
364 | // | ||
365 | // NameValueCollection requestArgs = new NameValueCollection | ||
366 | // { | ||
367 | // { "RequestMethod", "GetSession" }, | ||
368 | // { "SessionID", sessionID.ToString() } | ||
369 | // }; | ||
370 | // | ||
371 | // OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | ||
372 | // if (response["Success"].AsBoolean()) | ||
373 | // return response; | ||
374 | // else | ||
375 | // m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve session data for session " + sessionID); | ||
376 | // | ||
377 | // return null; | ||
378 | // } | ||
379 | |||
380 | private List<PresenceInfo> GetSessions(UUID userID) | 358 | private List<PresenceInfo> GetSessions(UUID userID) |
381 | { | 359 | { |
382 | List<PresenceInfo> presences = new List<PresenceInfo>(1); | 360 | List<PresenceInfo> presences = new List<PresenceInfo>(1); |
@@ -429,39 +407,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
429 | return success; | 407 | return success; |
430 | } | 408 | } |
431 | 409 | ||
432 | ///// <summary> | ||
433 | ///// Fetch the last known avatar location with GetSession and persist it | ||
434 | ///// as user data with AddUserData | ||
435 | ///// </summary> | ||
436 | //private bool SetLastLocation(UUID sessionID) | ||
437 | //{ | ||
438 | // NameValueCollection requestArgs = new NameValueCollection | ||
439 | // { | ||
440 | // { "RequestMethod", "GetSession" }, | ||
441 | // { "SessionID", sessionID.ToString() } | ||
442 | // }; | ||
443 | |||
444 | // OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | ||
445 | // bool success = response["Success"].AsBoolean(); | ||
446 | |||
447 | // if (success) | ||
448 | // { | ||
449 | // UUID userID = response["UserID"].AsUUID(); | ||
450 | // UUID sceneID = response["SceneID"].AsUUID(); | ||
451 | // Vector3 position = response["ScenePosition"].AsVector3(); | ||
452 | // Vector3 lookAt = response["SceneLookAt"].AsVector3(); | ||
453 | |||
454 | // return SetLastLocation(userID, sceneID, position, lookAt); | ||
455 | // } | ||
456 | // else | ||
457 | // { | ||
458 | // m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve presence information for session " + sessionID + | ||
459 | // " while saving last location: " + response["Message"].AsString()); | ||
460 | // } | ||
461 | |||
462 | // return success; | ||
463 | //} | ||
464 | |||
465 | private PresenceInfo ResponseToPresenceInfo(OSDMap sessionResponse, OSDMap userResponse) | 410 | private PresenceInfo ResponseToPresenceInfo(OSDMap sessionResponse, OSDMap userResponse) |
466 | { | 411 | { |
467 | if (sessionResponse == null) | 412 | if (sessionResponse == null) |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs index 0ef4974..b7e8538 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs | |||
@@ -291,8 +291,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
291 | // Check if the user is online | 291 | // Check if the user is online |
292 | if (client.Scene is Scene) | 292 | if (client.Scene is Scene) |
293 | { | 293 | { |
294 | OpenSim.Services.Interfaces.PresenceInfo[] presences = ((Scene)client.Scene).PresenceService.GetAgents(new string[] { avatarID.ToString() }); | 294 | OpenSim.Services.Interfaces.PresenceInfo presence = ((Scene)client.Scene).PresenceService.GetAgent(avatarID); |
295 | if (presences != null && presences.Length > 0) | 295 | if (presence != null) |
296 | flags |= ProfileFlags.Online; | 296 | flags |= ProfileFlags.Online; |
297 | } | 297 | } |
298 | 298 | ||
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 694aa72..ddd2322 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs | |||
@@ -28,7 +28,6 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Collections.Specialized; | 30 | using System.Collections.Specialized; |
31 | using System.IO; | ||
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
34 | using OpenSim.Region.Framework.Interfaces; | 33 | using OpenSim.Region.Framework.Interfaces; |
@@ -49,13 +48,15 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
49 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
50 | public class SimianUserAccountServiceConnector : IUserAccountService, ISharedRegionModule | 49 | public class SimianUserAccountServiceConnector : IUserAccountService, ISharedRegionModule |
51 | { | 50 | { |
51 | private const double CACHE_EXPIRATION_SECONDS = 120.0; | ||
52 | |||
52 | private static readonly ILog m_log = | 53 | private static readonly ILog m_log = |
53 | LogManager.GetLogger( | 54 | LogManager.GetLogger( |
54 | MethodBase.GetCurrentMethod().DeclaringType); | 55 | MethodBase.GetCurrentMethod().DeclaringType); |
55 | 56 | ||
56 | private string m_serverUrl = String.Empty; | 57 | private string m_serverUrl = String.Empty; |
57 | private ExpiringCache<UUID, UserAccount> m_accountCache; | 58 | private ExpiringCache<UUID, UserAccount> m_accountCache = new ExpiringCache<UUID,UserAccount>(); |
58 | private bool m_Enabled = false; | 59 | private bool m_Enabled; |
59 | 60 | ||
60 | #region ISharedRegionModule | 61 | #region ISharedRegionModule |
61 | 62 | ||
@@ -141,7 +142,15 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
141 | { "UserID", userID.ToString() } | 142 | { "UserID", userID.ToString() } |
142 | }; | 143 | }; |
143 | 144 | ||
144 | return GetUser(requestArgs); | 145 | account = GetUser(requestArgs); |
146 | |||
147 | if (account == null) | ||
148 | { | ||
149 | // Store null responses too, to avoid repeated lookups for missing accounts | ||
150 | m_accountCache.AddOrUpdate(userID, null, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); | ||
151 | } | ||
152 | |||
153 | return account; | ||
145 | } | 154 | } |
146 | 155 | ||
147 | public List<UserAccount> GetUserAccounts(UUID scopeID, string query) | 156 | public List<UserAccount> GetUserAccounts(UUID scopeID, string query) |
@@ -216,7 +225,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
216 | if (success) | 225 | if (success) |
217 | { | 226 | { |
218 | // Cache the user account info | 227 | // Cache the user account info |
219 | m_accountCache.AddOrUpdate(data.PrincipalID, data, DateTime.Now + TimeSpan.FromMinutes(2.0d)); | 228 | m_accountCache.AddOrUpdate(data.PrincipalID, data, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); |
220 | } | 229 | } |
221 | else | 230 | else |
222 | { | 231 | { |
@@ -281,7 +290,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
281 | GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName); | 290 | GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName); |
282 | 291 | ||
283 | // Cache the user account info | 292 | // Cache the user account info |
284 | m_accountCache.AddOrUpdate(account.PrincipalID, account, DateTime.Now + TimeSpan.FromMinutes(2.0d)); | 293 | m_accountCache.AddOrUpdate(account.PrincipalID, account, DateTime.Now + TimeSpan.FromSeconds(CACHE_EXPIRATION_SECONDS)); |
285 | 294 | ||
286 | return account; | 295 | return account; |
287 | } | 296 | } |
diff --git a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs new file mode 100644 index 0000000..87c49d3 --- /dev/null +++ b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs | |||
@@ -0,0 +1,112 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using OpenMetaverse; | ||
31 | using log4net; | ||
32 | using Mono.Addins; | ||
33 | using Nini.Config; | ||
34 | using System.Reflection; | ||
35 | using OpenSim.Services.Base; | ||
36 | using OpenSim.Services.Interfaces; | ||
37 | using OpenSim.Data; | ||
38 | using OpenSim.Framework; | ||
39 | using OpenSim.Region.Framework.Interfaces; | ||
40 | using OpenSim.Region.Framework.Scenes; | ||
41 | |||
42 | namespace OpenSim.Services.Connectors | ||
43 | { | ||
44 | public class EstateDataService : ServiceBase, IEstateDataService | ||
45 | { | ||
46 | private static readonly ILog m_log = | ||
47 | LogManager.GetLogger( | ||
48 | MethodBase.GetCurrentMethod().DeclaringType); | ||
49 | |||
50 | protected IEstateDataStore m_database; | ||
51 | |||
52 | public EstateDataService(IConfigSource config) | ||
53 | : base(config) | ||
54 | { | ||
55 | string dllName = String.Empty; | ||
56 | string connString = String.Empty; | ||
57 | |||
58 | // Try reading the [DatabaseService] section, if it exists | ||
59 | IConfig dbConfig = config.Configs["DatabaseService"]; | ||
60 | if (dbConfig != null) | ||
61 | { | ||
62 | dllName = dbConfig.GetString("StorageProvider", String.Empty); | ||
63 | connString = dbConfig.GetString("EstateConnectionString", String.Empty); | ||
64 | if (String.IsNullOrEmpty(connString)) | ||
65 | connString = dbConfig.GetString("ConnectionString", String.Empty); | ||
66 | } | ||
67 | |||
68 | // We tried, but this doesn't exist. We can't proceed | ||
69 | if (dllName == String.Empty) | ||
70 | throw new Exception("No StorageProvider configured"); | ||
71 | |||
72 | m_database = LoadPlugin<IEstateDataStore>(dllName, new Object[] { connString }); | ||
73 | if (m_database == null) | ||
74 | throw new Exception("Could not find a storage interface in the given module"); | ||
75 | } | ||
76 | |||
77 | public EstateSettings LoadEstateSettings(UUID regionID, bool create) | ||
78 | { | ||
79 | return m_database.LoadEstateSettings(regionID, create); | ||
80 | } | ||
81 | |||
82 | public EstateSettings LoadEstateSettings(int estateID) | ||
83 | { | ||
84 | return m_database.LoadEstateSettings(estateID); | ||
85 | } | ||
86 | |||
87 | public void StoreEstateSettings(EstateSettings es) | ||
88 | { | ||
89 | m_database.StoreEstateSettings(es); | ||
90 | } | ||
91 | |||
92 | public List<int> GetEstates(string search) | ||
93 | { | ||
94 | return m_database.GetEstates(search); | ||
95 | } | ||
96 | |||
97 | public bool LinkRegion(UUID regionID, int estateID) | ||
98 | { | ||
99 | return m_database.LinkRegion(regionID, estateID); | ||
100 | } | ||
101 | |||
102 | public List<UUID> GetRegions(int estateID) | ||
103 | { | ||
104 | return m_database.GetRegions(estateID); | ||
105 | } | ||
106 | |||
107 | public bool DeleteEstate(int estateID) | ||
108 | { | ||
109 | return m_database.DeleteEstate(estateID); | ||
110 | } | ||
111 | } | ||
112 | } | ||
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs new file mode 100644 index 0000000..946f7e4 --- /dev/null +++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs | |||
@@ -0,0 +1,140 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using OpenMetaverse; | ||
31 | using log4net; | ||
32 | using Mono.Addins; | ||
33 | using Nini.Config; | ||
34 | using System.Reflection; | ||
35 | using OpenSim.Services.Base; | ||
36 | using OpenSim.Services.Interfaces; | ||
37 | using OpenSim.Data; | ||
38 | using OpenSim.Framework; | ||
39 | using OpenSim.Region.Framework.Interfaces; | ||
40 | using OpenSim.Region.Framework.Scenes; | ||
41 | |||
42 | namespace OpenSim.Services.Connectors | ||
43 | { | ||
44 | public class SimulationDataService : ServiceBase, ISimulationDataService | ||
45 | { | ||
46 | private static readonly ILog m_log = | ||
47 | LogManager.GetLogger( | ||
48 | MethodBase.GetCurrentMethod().DeclaringType); | ||
49 | |||
50 | protected ISimulationDataStore m_database; | ||
51 | |||
52 | public SimulationDataService(IConfigSource config) | ||
53 | : base(config) | ||
54 | { | ||
55 | string dllName = String.Empty; | ||
56 | string connString = String.Empty; | ||
57 | |||
58 | // Try reading the [DatabaseService] section, if it exists | ||
59 | IConfig dbConfig = config.Configs["DatabaseService"]; | ||
60 | if (dbConfig != null) | ||
61 | { | ||
62 | dllName = dbConfig.GetString("StorageProvider", String.Empty); | ||
63 | connString = dbConfig.GetString("ConnectionString", String.Empty); | ||
64 | } | ||
65 | |||
66 | // We tried, but this doesn't exist. We can't proceed | ||
67 | if (dllName == String.Empty) | ||
68 | throw new Exception("No StorageProvider configured"); | ||
69 | |||
70 | m_database = LoadPlugin<ISimulationDataStore>(dllName, new Object[] { connString }); | ||
71 | if (m_database == null) | ||
72 | throw new Exception("Could not find a storage interface in the given module"); | ||
73 | } | ||
74 | |||
75 | public void StoreObject(SceneObjectGroup obj, UUID regionUUID) | ||
76 | { | ||
77 | m_database.StoreObject(obj, regionUUID); | ||
78 | } | ||
79 | |||
80 | public void RemoveObject(UUID uuid, UUID regionUUID) | ||
81 | { | ||
82 | m_database.RemoveObject(uuid, regionUUID); | ||
83 | } | ||
84 | |||
85 | public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) | ||
86 | { | ||
87 | m_database.StorePrimInventory(primID, items); | ||
88 | } | ||
89 | |||
90 | public List<SceneObjectGroup> LoadObjects(UUID regionUUID) | ||
91 | { | ||
92 | return m_database.LoadObjects(regionUUID); | ||
93 | } | ||
94 | |||
95 | public void StoreTerrain(double[,] terrain, UUID regionID) | ||
96 | { | ||
97 | m_database.StoreTerrain(terrain, regionID); | ||
98 | } | ||
99 | |||
100 | public double[,] LoadTerrain(UUID regionID) | ||
101 | { | ||
102 | return m_database.LoadTerrain(regionID); | ||
103 | } | ||
104 | |||
105 | public void StoreLandObject(ILandObject Parcel) | ||
106 | { | ||
107 | m_database.StoreLandObject(Parcel); | ||
108 | } | ||
109 | |||
110 | public void RemoveLandObject(UUID globalID) | ||
111 | { | ||
112 | m_database.RemoveLandObject(globalID); | ||
113 | } | ||
114 | |||
115 | public List<LandData> LoadLandObjects(UUID regionUUID) | ||
116 | { | ||
117 | return m_database.LoadLandObjects(regionUUID); | ||
118 | } | ||
119 | |||
120 | public void StoreRegionSettings(RegionSettings rs) | ||
121 | { | ||
122 | m_database.StoreRegionSettings(rs); | ||
123 | } | ||
124 | |||
125 | public RegionSettings LoadRegionSettings(UUID regionUUID) | ||
126 | { | ||
127 | return m_database.LoadRegionSettings(regionUUID); | ||
128 | } | ||
129 | |||
130 | public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) | ||
131 | { | ||
132 | return m_database.LoadRegionWindlightSettings(regionUUID); | ||
133 | } | ||
134 | |||
135 | public void StoreRegionWindlightSettings(RegionLightShareData wl) | ||
136 | { | ||
137 | m_database.StoreRegionWindlightSettings(wl); | ||
138 | } | ||
139 | } | ||
140 | } | ||
diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs index 86bca79..e543337 100644 --- a/OpenSim/Services/InventoryService/InventoryService.cs +++ b/OpenSim/Services/InventoryService/InventoryService.cs | |||
@@ -276,11 +276,11 @@ namespace OpenSim.Services.InventoryService | |||
276 | List<InventoryFolderBase> folders = RequestSubFolders(root.ID); | 276 | List<InventoryFolderBase> folders = RequestSubFolders(root.ID); |
277 | 277 | ||
278 | foreach (InventoryFolderBase folder in folders) | 278 | foreach (InventoryFolderBase folder in folders) |
279 | { | 279 | { |
280 | if (folder.Type == (short)type) | 280 | if (folder.Type == (short)type) |
281 | { | 281 | { |
282 | // m_log.DebugFormat( | 282 | // m_log.DebugFormat( |
283 | // "[INVENTORY SERVICE]: Found folder {0} type {1}", folder.Name, (AssetType)folder.Type); | 283 | // "[INVENTORY SERVICE]: Found folder {0} type {1}", folder.Name, (AssetType)folder.Type); |
284 | 284 | ||
285 | return folder; | 285 | return folder; |
286 | } | 286 | } |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 5ccb912..1e4b6c2 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -314,7 +314,7 @@ namespace OpenSim.Services.LLLoginService | |||
314 | { | 314 | { |
315 | // something went wrong, make something up, so that we don't have to test this anywhere else | 315 | // something went wrong, make something up, so that we don't have to test this anywhere else |
316 | guinfo = new GridUserInfo(); | 316 | guinfo = new GridUserInfo(); |
317 | guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30); | 317 | guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30); |
318 | } | 318 | } |
319 | 319 | ||
320 | // | 320 | // |
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index 326e502..f376cf8 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs | |||
@@ -97,10 +97,10 @@ namespace OpenSim.Services.UserAccountService | |||
97 | public UserAccount GetUserAccount(UUID scopeID, string firstName, | 97 | public UserAccount GetUserAccount(UUID scopeID, string firstName, |
98 | string lastName) | 98 | string lastName) |
99 | { | 99 | { |
100 | // m_log.DebugFormat( | 100 | // m_log.DebugFormat( |
101 | // "[USER ACCOUNT SERVICE]: Retrieving account by username for {0} {1}, scope {2}", | 101 | // "[USER ACCOUNT SERVICE]: Retrieving account by username for {0} {1}, scope {2}", |
102 | // firstName, lastName, scopeID); | 102 | // firstName, lastName, scopeID); |
103 | 103 | ||
104 | UserAccountData[] d; | 104 | UserAccountData[] d; |
105 | 105 | ||
106 | if (scopeID != UUID.Zero) | 106 | if (scopeID != UUID.Zero) |
@@ -235,10 +235,10 @@ namespace OpenSim.Services.UserAccountService | |||
235 | 235 | ||
236 | public bool StoreUserAccount(UserAccount data) | 236 | public bool StoreUserAccount(UserAccount data) |
237 | { | 237 | { |
238 | // m_log.DebugFormat( | 238 | // m_log.DebugFormat( |
239 | // "[USER ACCOUNT SERVICE]: Storing user account for {0} {1} {2}, scope {3}", | 239 | // "[USER ACCOUNT SERVICE]: Storing user account for {0} {1} {2}, scope {3}", |
240 | // data.FirstName, data.LastName, data.PrincipalID, data.ScopeID); | 240 | // data.FirstName, data.LastName, data.PrincipalID, data.ScopeID); |
241 | 241 | ||
242 | UserAccountData d = new UserAccountData(); | 242 | UserAccountData d = new UserAccountData(); |
243 | 243 | ||
244 | d.FirstName = data.FirstName; | 244 | d.FirstName = data.FirstName; |
@@ -285,7 +285,7 @@ namespace OpenSim.Services.UserAccountService | |||
285 | #endregion | 285 | #endregion |
286 | 286 | ||
287 | #region Console commands | 287 | #region Console commands |
288 | 288 | ||
289 | /// <summary> | 289 | /// <summary> |
290 | /// Handle the create user command from the console. | 290 | /// Handle the create user command from the console. |
291 | /// </summary> | 291 | /// </summary> |
@@ -297,12 +297,14 @@ namespace OpenSim.Services.UserAccountService | |||
297 | string password; | 297 | string password; |
298 | string email; | 298 | string email; |
299 | 299 | ||
300 | List<char> excluded = new List<char>(new char[]{' '}); | ||
301 | |||
300 | if (cmdparams.Length < 3) | 302 | if (cmdparams.Length < 3) |
301 | firstName = MainConsole.Instance.CmdPrompt("First name", "Default"); | 303 | firstName = MainConsole.Instance.CmdPrompt("First name", "Default", excluded); |
302 | else firstName = cmdparams[2]; | 304 | else firstName = cmdparams[2]; |
303 | 305 | ||
304 | if (cmdparams.Length < 4) | 306 | if (cmdparams.Length < 4) |
305 | lastName = MainConsole.Instance.CmdPrompt("Last name", "User"); | 307 | lastName = MainConsole.Instance.CmdPrompt("Last name", "User", excluded); |
306 | else lastName = cmdparams[3]; | 308 | else lastName = cmdparams[3]; |
307 | 309 | ||
308 | if (cmdparams.Length < 5) | 310 | if (cmdparams.Length < 5) |
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs index 2a055cc..de6e815 100644 --- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs +++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | |||
@@ -35,11 +35,86 @@ using OpenSim.Region.Framework.Scenes; | |||
35 | 35 | ||
36 | namespace OpenSim.Data.Null | 36 | namespace OpenSim.Data.Null |
37 | { | 37 | { |
38 | public class NullDataService : ISimulationDataService | ||
39 | { | ||
40 | private NullDataStore m_store; | ||
41 | |||
42 | public NullDataService() | ||
43 | { | ||
44 | m_store = new NullDataStore(); | ||
45 | } | ||
46 | |||
47 | public void StoreObject(SceneObjectGroup obj, UUID regionUUID) | ||
48 | { | ||
49 | m_store.StoreObject(obj, regionUUID); | ||
50 | } | ||
51 | |||
52 | public void RemoveObject(UUID uuid, UUID regionUUID) | ||
53 | { | ||
54 | m_store.RemoveObject(uuid, regionUUID); | ||
55 | } | ||
56 | |||
57 | public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) | ||
58 | { | ||
59 | m_store.StorePrimInventory(primID, items); | ||
60 | } | ||
61 | |||
62 | public List<SceneObjectGroup> LoadObjects(UUID regionUUID) | ||
63 | { | ||
64 | return m_store.LoadObjects(regionUUID); | ||
65 | } | ||
66 | |||
67 | public void StoreTerrain(double[,] terrain, UUID regionID) | ||
68 | { | ||
69 | m_store.StoreTerrain(terrain, regionID); | ||
70 | } | ||
71 | |||
72 | public double[,] LoadTerrain(UUID regionID) | ||
73 | { | ||
74 | return m_store.LoadTerrain(regionID); | ||
75 | } | ||
76 | |||
77 | public void StoreLandObject(ILandObject Parcel) | ||
78 | { | ||
79 | m_store.StoreLandObject(Parcel); | ||
80 | } | ||
81 | |||
82 | public void RemoveLandObject(UUID globalID) | ||
83 | { | ||
84 | m_store.RemoveLandObject(globalID); | ||
85 | } | ||
86 | |||
87 | public List<LandData> LoadLandObjects(UUID regionUUID) | ||
88 | { | ||
89 | return m_store.LoadLandObjects(regionUUID); | ||
90 | } | ||
91 | |||
92 | public void StoreRegionSettings(RegionSettings rs) | ||
93 | { | ||
94 | m_store.StoreRegionSettings(rs); | ||
95 | } | ||
96 | |||
97 | public RegionSettings LoadRegionSettings(UUID regionUUID) | ||
98 | { | ||
99 | return m_store.LoadRegionSettings(regionUUID); | ||
100 | } | ||
101 | |||
102 | public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) | ||
103 | { | ||
104 | return m_store.LoadRegionWindlightSettings(regionUUID); | ||
105 | } | ||
106 | |||
107 | public void StoreRegionWindlightSettings(RegionLightShareData wl) | ||
108 | { | ||
109 | m_store.StoreRegionWindlightSettings(wl); | ||
110 | } | ||
111 | } | ||
112 | |||
38 | /// <summary> | 113 | /// <summary> |
39 | /// Mock region data plugin. This obeys the api contract for persistence but stores everything in memory, so that | 114 | /// Mock region data plugin. This obeys the api contract for persistence but stores everything in memory, so that |
40 | /// tests can check correct persistence. | 115 | /// tests can check correct persistence. |
41 | /// </summary> | 116 | /// </summary> |
42 | public class NullDataStore : IRegionDataStore | 117 | public class NullDataStore : ISimulationDataStore |
43 | { | 118 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 119 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 120 | ||
@@ -99,7 +174,7 @@ namespace OpenSim.Data.Null | |||
99 | } | 174 | } |
100 | 175 | ||
101 | public void RemoveObject(UUID obj, UUID regionUUID) | 176 | public void RemoveObject(UUID obj, UUID regionUUID) |
102 | { | 177 | { |
103 | // All parts belonging to the object with the uuid are removed. | 178 | // All parts belonging to the object with the uuid are removed. |
104 | List<SceneObjectPart> parts = new List<SceneObjectPart>(m_sceneObjectParts.Values); | 179 | List<SceneObjectPart> parts = new List<SceneObjectPart>(m_sceneObjectParts.Values); |
105 | foreach (SceneObjectPart part in parts) | 180 | foreach (SceneObjectPart part in parts) |
@@ -108,13 +183,12 @@ namespace OpenSim.Data.Null | |||
108 | { | 183 | { |
109 | m_log.DebugFormat( | 184 | m_log.DebugFormat( |
110 | "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", | 185 | "[MOCK REGION DATA PLUGIN]: Removing part {0} {1} as part of object {2} from {3}", |
111 | part.Name, part.UUID, obj, regionUUID); | 186 | part.Name, part.UUID, obj, regionUUID); |
112 | m_sceneObjectParts.Remove(part.UUID); | 187 | m_sceneObjectParts.Remove(part.UUID); |
113 | } | 188 | } |
114 | } | 189 | } |
115 | } | 190 | } |
116 | 191 | ||
117 | // see IRegionDatastore | ||
118 | public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) | 192 | public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) |
119 | { | 193 | { |
120 | m_primItems[primID] = items; | 194 | m_primItems[primID] = items; |
@@ -130,7 +204,7 @@ namespace OpenSim.Data.Null | |||
130 | if (prim.IsRoot) | 204 | if (prim.IsRoot) |
131 | { | 205 | { |
132 | m_log.DebugFormat( | 206 | m_log.DebugFormat( |
133 | "[MOCK REGION DATA PLUGIN]: Loading root part {0} {1} in {2}", prim.Name, prim.UUID, regionUUID); | 207 | "[MOCK REGION DATA PLUGIN]: Loading root part {0} {1} in {2}", prim.Name, prim.UUID, regionUUID); |
134 | objects[prim.UUID] = new SceneObjectGroup(prim); | 208 | objects[prim.UUID] = new SceneObjectGroup(prim); |
135 | } | 209 | } |
136 | } | 210 | } |
diff --git a/OpenSim/Tests/Common/Mock/TestScene.cs b/OpenSim/Tests/Common/Mock/TestScene.cs index 615e519..0e1433a 100644 --- a/OpenSim/Tests/Common/Mock/TestScene.cs +++ b/OpenSim/Tests/Common/Mock/TestScene.cs | |||
@@ -31,6 +31,7 @@ using OpenSim.Framework; | |||
31 | using OpenSim.Framework.Communications; | 31 | using OpenSim.Framework.Communications; |
32 | using OpenSim.Framework.Servers; | 32 | using OpenSim.Framework.Servers; |
33 | using OpenSim.Region.Framework; | 33 | using OpenSim.Region.Framework; |
34 | using OpenSim.Region.Framework.Interfaces; | ||
34 | using OpenSim.Region.Framework.Scenes; | 35 | using OpenSim.Region.Framework.Scenes; |
35 | 36 | ||
36 | namespace OpenSim.Tests.Common.Mock | 37 | namespace OpenSim.Tests.Common.Mock |
@@ -39,20 +40,15 @@ namespace OpenSim.Tests.Common.Mock | |||
39 | { | 40 | { |
40 | public TestScene( | 41 | public TestScene( |
41 | RegionInfo regInfo, AgentCircuitManager authen, | 42 | RegionInfo regInfo, AgentCircuitManager authen, |
42 | SceneCommunicationService sceneGridService, StorageManager storeManager, | 43 | SceneCommunicationService sceneGridService, ISimulationDataService simDataService, IEstateDataService estateDataService, |
43 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, | 44 | ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, |
44 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) | 45 | bool SeeIntoRegionFromNeighbor, IConfigSource config, string simulatorVersion) |
45 | : base(regInfo, authen, sceneGridService, storeManager, moduleLoader, | 46 | : base(regInfo, authen, sceneGridService, simDataService, estateDataService, moduleLoader, |
46 | dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion) | 47 | dumpAssetsToFile, physicalPrim, SeeIntoRegionFromNeighbor, config, simulatorVersion) |
47 | { | 48 | { |
48 | } | 49 | } |
49 | 50 | ||
50 | /// <summary> | 51 | /// <summary> |
51 | /// Allow retrieval for test check purposes | ||
52 | /// </summary> | ||
53 | public StorageManager StorageManager { get { return m_storageManager; } } | ||
54 | |||
55 | /// <summary> | ||
56 | /// Temporarily override session authentication for tests (namely teleport). | 52 | /// Temporarily override session authentication for tests (namely teleport). |
57 | /// </summary> | 53 | /// </summary> |
58 | /// | 54 | /// |
@@ -69,6 +65,6 @@ namespace OpenSim.Tests.Common.Mock | |||
69 | public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter | 65 | public AsyncSceneObjectGroupDeleter SceneObjectGroupDeleter |
70 | { | 66 | { |
71 | get { return m_asyncSceneObjectDeleter; } | 67 | get { return m_asyncSceneObjectDeleter; } |
72 | } | 68 | } |
73 | } | 69 | } |
74 | } \ No newline at end of file | 70 | } \ No newline at end of file |
diff --git a/OpenSim/Tests/Common/Setup/AssetHelpers.cs b/OpenSim/Tests/Common/Setup/AssetHelpers.cs index f9a80b0..8647cfe 100644 --- a/OpenSim/Tests/Common/Setup/AssetHelpers.cs +++ b/OpenSim/Tests/Common/Setup/AssetHelpers.cs | |||
@@ -54,8 +54,8 @@ namespace OpenSim.Tests.Common | |||
54 | { | 54 | { |
55 | AssetBase asset = CreateAsset(UUID.Random(), AssetType.Notecard, "hello", creatorId); | 55 | AssetBase asset = CreateAsset(UUID.Random(), AssetType.Notecard, "hello", creatorId); |
56 | scene.AssetService.Store(asset); | 56 | scene.AssetService.Store(asset); |
57 | return asset; | 57 | return asset; |
58 | } | 58 | } |
59 | 59 | ||
60 | /// <summary> | 60 | /// <summary> |
61 | /// Create an asset from the given scene object. | 61 | /// Create an asset from the given scene object. |
diff --git a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs index 9318a27..fc9db03 100644 --- a/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs +++ b/OpenSim/Tests/Common/Setup/SceneSetupHelpers.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Tests.Common.Setup | |||
58 | public class SceneSetupHelpers | 58 | public class SceneSetupHelpers |
59 | { | 59 | { |
60 | // These static variables in order to allow regions to be linked by shared modules and same | 60 | // These static variables in order to allow regions to be linked by shared modules and same |
61 | // CommunicationsManager. | 61 | // CommunicationsManager. |
62 | private static ISharedRegionModule m_assetService = null; | 62 | private static ISharedRegionModule m_assetService = null; |
63 | // private static ISharedRegionModule m_authenticationService = null; | 63 | // private static ISharedRegionModule m_authenticationService = null; |
64 | private static ISharedRegionModule m_inventoryService = null; | 64 | private static ISharedRegionModule m_inventoryService = null; |
@@ -69,19 +69,19 @@ namespace OpenSim.Tests.Common.Setup | |||
69 | /// <summary> | 69 | /// <summary> |
70 | /// Set up a test scene | 70 | /// Set up a test scene |
71 | /// </summary> | 71 | /// </summary> |
72 | /// | 72 | /// |
73 | /// Automatically starts service threads, as would the normal runtime. | 73 | /// Automatically starts service threads, as would the normal runtime. |
74 | /// | 74 | /// |
75 | /// <returns></returns> | 75 | /// <returns></returns> |
76 | public static TestScene SetupScene() | 76 | public static TestScene SetupScene() |
77 | { | 77 | { |
78 | return SetupScene(""); | 78 | return SetupScene(""); |
79 | } | 79 | } |
80 | 80 | ||
81 | /// <summary> | 81 | /// <summary> |
82 | /// Set up a test scene | 82 | /// Set up a test scene |
83 | /// </summary> | 83 | /// </summary> |
84 | /// | 84 | /// |
85 | /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> | 85 | /// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> |
86 | /// <returns></returns> | 86 | /// <returns></returns> |
87 | public static TestScene SetupScene(String realServices) | 87 | public static TestScene SetupScene(String realServices) |
@@ -94,7 +94,7 @@ namespace OpenSim.Tests.Common.Setup | |||
94 | ///// <summary> | 94 | ///// <summary> |
95 | ///// Set up a test scene | 95 | ///// Set up a test scene |
96 | ///// </summary> | 96 | ///// </summary> |
97 | ///// | 97 | ///// |
98 | ///// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> | 98 | ///// <param name="realServices">Starts real inventory and asset services, as opposed to mock ones, if true</param> |
99 | ///// <param name="cm">This should be the same if simulating two scenes within a standalone</param> | 99 | ///// <param name="cm">This should be the same if simulating two scenes within a standalone</param> |
100 | ///// <returns></returns> | 100 | ///// <returns></returns> |
@@ -157,23 +157,24 @@ namespace OpenSim.Tests.Common.Setup | |||
157 | AgentCircuitManager acm = new AgentCircuitManager(); | 157 | AgentCircuitManager acm = new AgentCircuitManager(); |
158 | SceneCommunicationService scs = new SceneCommunicationService(); | 158 | SceneCommunicationService scs = new SceneCommunicationService(); |
159 | 159 | ||
160 | StorageManager sm = new StorageManager("OpenSim.Tests.Common.dll", "", ""); | 160 | ISimulationDataService simDataService = OpenSim.Server.Base.ServerUtils.LoadPlugin<ISimulationDataService>("OpenSim.Tests.Common.dll", null); |
161 | IEstateDataService estateDataService = null; | ||
161 | IConfigSource configSource = new IniConfigSource(); | 162 | IConfigSource configSource = new IniConfigSource(); |
162 | 163 | ||
163 | TestScene testScene = new TestScene( | 164 | TestScene testScene = new TestScene( |
164 | regInfo, acm, scs, sm, null, false, false, false, configSource, null); | 165 | regInfo, acm, scs, simDataService, estateDataService, null, false, false, false, configSource, null); |
165 | 166 | ||
166 | INonSharedRegionModule capsModule = new CapabilitiesModule(); | 167 | INonSharedRegionModule capsModule = new CapabilitiesModule(); |
167 | capsModule.Initialise(new IniConfigSource()); | 168 | capsModule.Initialise(new IniConfigSource()); |
168 | testScene.AddRegionModule(capsModule.Name, capsModule); | 169 | testScene.AddRegionModule(capsModule.Name, capsModule); |
169 | capsModule.AddRegion(testScene); | 170 | capsModule.AddRegion(testScene); |
170 | 171 | ||
171 | IRegionModule godsModule = new GodsModule(); | 172 | IRegionModule godsModule = new GodsModule(); |
172 | godsModule.Initialise(testScene, new IniConfigSource()); | 173 | godsModule.Initialise(testScene, new IniConfigSource()); |
173 | testScene.AddModule(godsModule.Name, godsModule); | 174 | testScene.AddModule(godsModule.Name, godsModule); |
174 | realServices = realServices.ToLower(); | 175 | realServices = realServices.ToLower(); |
175 | // IConfigSource config = new IniConfigSource(); | 176 | // IConfigSource config = new IniConfigSource(); |
176 | 177 | ||
177 | // If we have a brand new scene, need to initialize shared region modules | 178 | // If we have a brand new scene, need to initialize shared region modules |
178 | if ((m_assetService == null && m_inventoryService == null) || newScene) | 179 | if ((m_assetService == null && m_inventoryService == null) || newScene) |
179 | { | 180 | { |
@@ -184,13 +185,13 @@ namespace OpenSim.Tests.Common.Setup | |||
184 | 185 | ||
185 | // For now, always started a 'real' authentication service | 186 | // For now, always started a 'real' authentication service |
186 | StartAuthenticationService(testScene, true); | 187 | StartAuthenticationService(testScene, true); |
187 | 188 | ||
188 | if (realServices.Contains("inventory")) | 189 | if (realServices.Contains("inventory")) |
189 | StartInventoryService(testScene, true); | 190 | StartInventoryService(testScene, true); |
190 | else | 191 | else |
191 | StartInventoryService(testScene, false); | 192 | StartInventoryService(testScene, false); |
192 | 193 | ||
193 | StartGridService(testScene, true); | 194 | StartGridService(testScene, true); |
194 | StartUserAccountService(testScene); | 195 | StartUserAccountService(testScene); |
195 | StartPresenceService(testScene); | 196 | StartPresenceService(testScene); |
196 | } | 197 | } |
@@ -207,7 +208,7 @@ namespace OpenSim.Tests.Common.Setup | |||
207 | m_presenceService.RegionLoaded(testScene); | 208 | m_presenceService.RegionLoaded(testScene); |
208 | 209 | ||
209 | } | 210 | } |
210 | 211 | ||
211 | m_inventoryService.PostInitialise(); | 212 | m_inventoryService.PostInitialise(); |
212 | m_assetService.PostInitialise(); | 213 | m_assetService.PostInitialise(); |
213 | m_userAccountService.PostInitialise(); | 214 | m_userAccountService.PostInitialise(); |
@@ -250,7 +251,7 @@ namespace OpenSim.Tests.Common.Setup | |||
250 | else | 251 | else |
251 | config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService"); | 252 | config.Configs["AssetService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockAssetService"); |
252 | config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); | 253 | config.Configs["AssetService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); |
253 | assetService.Initialise(config); | 254 | assetService.Initialise(config); |
254 | assetService.AddRegion(testScene); | 255 | assetService.AddRegion(testScene); |
255 | assetService.RegionLoaded(testScene); | 256 | assetService.RegionLoaded(testScene); |
256 | testScene.AddRegionModule(assetService.Name, assetService); | 257 | testScene.AddRegionModule(assetService.Name, assetService); |
@@ -277,7 +278,7 @@ namespace OpenSim.Tests.Common.Setup | |||
277 | testScene.AddRegionModule(service.Name, service); | 278 | testScene.AddRegionModule(service.Name, service); |
278 | //m_authenticationService = service; | 279 | //m_authenticationService = service; |
279 | } | 280 | } |
280 | 281 | ||
281 | private static void StartInventoryService(Scene testScene, bool real) | 282 | private static void StartInventoryService(Scene testScene, bool real) |
282 | { | 283 | { |
283 | ISharedRegionModule inventoryService = new LocalInventoryServicesConnector(); | 284 | ISharedRegionModule inventoryService = new LocalInventoryServicesConnector(); |
@@ -285,7 +286,7 @@ namespace OpenSim.Tests.Common.Setup | |||
285 | config.AddConfig("Modules"); | 286 | config.AddConfig("Modules"); |
286 | config.AddConfig("InventoryService"); | 287 | config.AddConfig("InventoryService"); |
287 | config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); | 288 | config.Configs["Modules"].Set("InventoryServices", "LocalInventoryServicesConnector"); |
288 | 289 | ||
289 | if (real) | 290 | if (real) |
290 | { | 291 | { |
291 | config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService"); | 292 | config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Services.InventoryService.dll:InventoryService"); |
@@ -294,7 +295,7 @@ namespace OpenSim.Tests.Common.Setup | |||
294 | { | 295 | { |
295 | config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService"); | 296 | config.Configs["InventoryService"].Set("LocalServiceModule", "OpenSim.Tests.Common.dll:MockInventoryService"); |
296 | } | 297 | } |
297 | 298 | ||
298 | config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); | 299 | config.Configs["InventoryService"].Set("StorageProvider", "OpenSim.Tests.Common.dll"); |
299 | inventoryService.Initialise(config); | 300 | inventoryService.Initialise(config); |
300 | inventoryService.AddRegion(testScene); | 301 | inventoryService.AddRegion(testScene); |
@@ -338,14 +339,14 @@ namespace OpenSim.Tests.Common.Setup | |||
338 | config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); | 339 | config.Configs["UserAccountService"].Set("StorageProvider", "OpenSim.Data.Null.dll"); |
339 | config.Configs["UserAccountService"].Set( | 340 | config.Configs["UserAccountService"].Set( |
340 | "LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService"); | 341 | "LocalServiceModule", "OpenSim.Services.UserAccountService.dll:UserAccountService"); |
341 | 342 | ||
342 | if (m_userAccountService == null) | 343 | if (m_userAccountService == null) |
343 | { | 344 | { |
344 | ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector(); | 345 | ISharedRegionModule userAccountService = new LocalUserAccountServicesConnector(); |
345 | userAccountService.Initialise(config); | 346 | userAccountService.Initialise(config); |
346 | m_userAccountService = userAccountService; | 347 | m_userAccountService = userAccountService; |
347 | } | 348 | } |
348 | 349 | ||
349 | m_userAccountService.AddRegion(testScene); | 350 | m_userAccountService.AddRegion(testScene); |
350 | m_userAccountService.RegionLoaded(testScene); | 351 | m_userAccountService.RegionLoaded(testScene); |
351 | testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService); | 352 | testScene.AddRegionModule(m_userAccountService.Name, m_userAccountService); |
@@ -559,5 +560,4 @@ namespace OpenSim.Tests.Common.Setup | |||
559 | sogd.InventoryDeQueueAndDelete(); | 560 | sogd.InventoryDeQueueAndDelete(); |
560 | } | 561 | } |
561 | } | 562 | } |
562 | |||
563 | } | 563 | } |
diff --git a/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs b/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs index 915af7e..135c50e 100644 --- a/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserInventoryTestUtils.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Tests.Common | |||
42 | 42 | ||
43 | public static InventoryItemBase CreateInventoryItem( | 43 | public static InventoryItemBase CreateInventoryItem( |
44 | Scene scene, string itemName, UUID itemId, string folderPath, UUID userId) | 44 | Scene scene, string itemName, UUID itemId, string folderPath, UUID userId) |
45 | { | 45 | { |
46 | InventoryItemBase item = new InventoryItemBase(); | 46 | InventoryItemBase item = new InventoryItemBase(); |
47 | item.Name = itemName; | 47 | item.Name = itemName; |
48 | item.AssetID = AssetHelpers.CreateAsset(scene, userId).FullID; | 48 | item.AssetID = AssetHelpers.CreateAsset(scene, userId).FullID; |
@@ -52,7 +52,7 @@ namespace OpenSim.Tests.Common | |||
52 | InventoryFolderBase objsFolder = scene.InventoryService.GetFolderForType(userId, AssetType.Object); | 52 | InventoryFolderBase objsFolder = scene.InventoryService.GetFolderForType(userId, AssetType.Object); |
53 | 53 | ||
54 | item.Folder = objsFolder.ID; | 54 | item.Folder = objsFolder.ID; |
55 | scene.AddInventoryItem(item); | 55 | scene.AddInventoryItem(item); |
56 | 56 | ||
57 | return item; | 57 | return item; |
58 | } | 58 | } |
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs index 26156f3..d01521d 100644 --- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs +++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs | |||
@@ -53,7 +53,7 @@ namespace OpenSim.Tests.Common.Setup | |||
53 | // UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099"); | 53 | // UUID userId = UUID.Parse("00000000-0000-0000-0000-000000000099"); |
54 | // return CreateUserWithInventory(commsManager, userId, callback); | 54 | // return CreateUserWithInventory(commsManager, userId, callback); |
55 | // } | 55 | // } |
56 | // | 56 | // |
57 | // /// <summary> | 57 | // /// <summary> |
58 | // /// Create a test user with a standard inventory | 58 | // /// Create a test user with a standard inventory |
59 | // /// </summary> | 59 | // /// </summary> |
@@ -108,11 +108,11 @@ namespace OpenSim.Tests.Common.Setup | |||
108 | // { | 108 | // { |
109 | // LocalUserServices lus = (LocalUserServices)commsManager.UserService; | 109 | // LocalUserServices lus = (LocalUserServices)commsManager.UserService; |
110 | // lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId); | 110 | // lus.AddUser(firstName, lastName, password, "bill@bailey.com", 1000, 1000, userId); |
111 | // | 111 | // |
112 | // CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); | 112 | // CachedUserInfo userInfo = commsManager.UserProfileCacheService.GetUserDetails(userId); |
113 | // userInfo.OnInventoryReceived += callback; | 113 | // userInfo.OnInventoryReceived += callback; |
114 | // userInfo.FetchInventory(); | 114 | // userInfo.FetchInventory(); |
115 | // | 115 | // |
116 | // return userInfo; | 116 | // return userInfo; |
117 | // } | 117 | // } |
118 | 118 | ||
@@ -140,6 +140,6 @@ namespace OpenSim.Tests.Common.Setup | |||
140 | scene.UserAccountService.StoreUserAccount(ua); | 140 | scene.UserAccountService.StoreUserAccount(ua); |
141 | scene.InventoryService.CreateUserInventory(ua.PrincipalID); | 141 | scene.InventoryService.CreateUserInventory(ua.PrincipalID); |
142 | scene.AuthenticationService.SetPassword(ua.PrincipalID, pw); | 142 | scene.AuthenticationService.SetPassword(ua.PrincipalID, pw); |
143 | } | 143 | } |
144 | } | 144 | } |
145 | } \ No newline at end of file | 145 | } \ No newline at end of file |
diff --git a/Prebuild/AUTHORS b/Prebuild/AUTHORS new file mode 100644 index 0000000..9e86ac0 --- /dev/null +++ b/Prebuild/AUTHORS | |||
@@ -0,0 +1,10 @@ | |||
1 | Dave Hudson (jendave@yahoo.com), | ||
2 | Matthew Holmes (matthew@wildfiregames.com) | ||
3 | Dan Moorehead (dan05a@gmail.com) | ||
4 | Rob Loach (http://www.robloach.net) | ||
5 | C.J. Adams-Collier (cjac@colliertech.org) | ||
6 | |||
7 | Patch Contributers | ||
8 | lbsa71 | ||
9 | chi11ken | ||
10 | sdague | ||
diff --git a/Prebuild/COPYING b/Prebuild/COPYING new file mode 100644 index 0000000..c57c080 --- /dev/null +++ b/Prebuild/COPYING | |||
@@ -0,0 +1,65 @@ | |||
1 | BSD License | ||
2 | Copyright (c)2004-2008 | ||
3 | |||
4 | See AUTHORS file for list of copyright holders | ||
5 | |||
6 | Dave Hudson (jendave@yahoo.com), | ||
7 | Matthew Holmes (matthew@wildfiregames.com) | ||
8 | Dan Moorehead (dan05a@gmail.com) | ||
9 | Rob Loach (http://www.robloach.net) | ||
10 | C.J. Adams-Collier (cjac@colliertech.org) | ||
11 | |||
12 | http://dnpb.sourceforge.net | ||
13 | All rights reserved. | ||
14 | |||
15 | Redistribution and use in source and binary forms, with or without | ||
16 | modification, are permitted provided that the following conditions | ||
17 | are met: | ||
18 | |||
19 | 1. Redistributions of source code must retain the above copyright notice, | ||
20 | this list of conditions and the following disclaimer. | ||
21 | |||
22 | 2. Redistributions in binary form must reproduce the above copyright notice, | ||
23 | this list of conditions and the following disclaimer in the documentation | ||
24 | and/or other materials provided with the distribution. | ||
25 | |||
26 | 3. The names of the authors may not be used to endorse or promote | ||
27 | products derived from this software without specific prior written | ||
28 | permission. | ||
29 | |||
30 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
31 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
32 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
33 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
34 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
35 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
36 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
37 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
38 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
39 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
40 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
41 | POSSIBILITY OF SUCH DAMAGE. | ||
42 | |||
43 | --- | ||
44 | |||
45 | Portions of src/Core/Targets/AutotoolsTarget.cs | ||
46 | // Copyright (C) 2006 Novell, Inc (http://www.novell.com) | ||
47 | // | ||
48 | // Permission is hereby granted, free of charge, to any person obtaining | ||
49 | // a copy of this software and associated documentation files (the | ||
50 | // "Software"), to deal in the Software without restriction, including | ||
51 | // without limitation the rights to use, copy, modify, merge, publish, | ||
52 | // distribute, sublicense, and/or sell copies of the Software, and to | ||
53 | // permit persons to whom the Software is furnished to do so, subject to | ||
54 | // the following conditions: | ||
55 | // | ||
56 | // The above copyright notice and this permission notice shall be | ||
57 | // included in all copies or substantial portions of the Software. | ||
58 | // | ||
59 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
60 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
61 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
62 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
63 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
64 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
65 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
diff --git a/Prebuild/ChangeLog b/Prebuild/ChangeLog new file mode 100644 index 0000000..bb8e7b0 --- /dev/null +++ b/Prebuild/ChangeLog | |||
@@ -0,0 +1,461 @@ | |||
1 | 2008-12-09T02:15 D. Moonfire <d.moonfire@mfgames.com> | ||
2 | * src/Core/Kernel.cs | ||
3 | - Added a /ppi target to get the results of processing but before | ||
4 | processing the actual results. | ||
5 | * src/Core/Preprocessor.cs | ||
6 | - Applied the patch from kanato with formatting changes. | ||
7 | - Uses the <?include file="" ?> format. | ||
8 | * tests/ | ||
9 | - Added some lightweight tests to test the functionality of the | ||
10 | include patch. | ||
11 | |||
12 | 2008-06-19T09:37 John Anderson <sontek@gmail.com> | ||
13 | * src/Core/Kernel.cs | ||
14 | - Only Loop through targets that are not abstract. | ||
15 | * src/Core/Targets/VSGenericTarget.cs | ||
16 | - Marked abstract and removed the Target attribute. | ||
17 | |||
18 | 2008-06-16T17:37 John Anderson <sontek@gmail.com> | ||
19 | * src/Core/Nodes/ProjectNode.cs,data/prebuild-1.7.xsd | ||
20 | - Added the ability to hardcode guid's in the projects | ||
21 | |||
22 | 2008-05-21T0737 C.J. Adams-Collier <cjac@colliertech.org> | ||
23 | * src/Core/Targets/AutotoolsTarget.cs | ||
24 | - catch exception when unable to compile AssemblyInfo.cs | ||
25 | |||
26 | 2008-05-07T17:29 John Anderson <sontek@gmail.com> | ||
27 | * src/Core/Targets/VSGenericTarget.cs | ||
28 | - Generate asp.net output in bin\ folder (asp.net requires it there) | ||
29 | |||
30 | 2008-04-30T17:29 John Anderson <sontek@gmail.com> | ||
31 | * src/Core/Nodes/DatabaseReferenceNode.cs, | ||
32 | src/Core/Nodes/Datanode.cs, | ||
33 | src/Core/Nodes/FileNode.cs, | ||
34 | src/Core/Nodes/FileNodes.cs, | ||
35 | src/Core/Nodes/MatchNode.cs, | ||
36 | src/Core/Targets/VS2008Target.cs, | ||
37 | src/data/prebuild-1.7.xsd | ||
38 | - Refactored the project generation code to handle web projects and more | ||
39 | logically handle embedded resources and designer files. | ||
40 | |||
41 | 2008-04-30T17:29 Joseph Lombrozo <digitaljeebus@gmail.com> | ||
42 | * src/Core/Nodes/SolutionNode.cs | ||
43 | - Had solutions inherit Configurations in the same way that Projects do. | ||
44 | |||
45 | 2008-04-29T06:35 Joseph Lombrozo <digitaljeebus@gmail.com> | ||
46 | * src/Core/Targets/VS2008Target.cs, | ||
47 | src/Core/Nodes/DatabaseProjectNode.cs, | ||
48 | src/Core/Nodes/DatabaseReferenceNode.cs, | ||
49 | src/data/prebuild-1.7.xsd | ||
50 | - Added database references to database projects. | ||
51 | - Prevented nested solutions from being written to disk. | ||
52 | |||
53 | 2008-04-29T05:43 Joseph Lombrozo <digitaljeebus@gmail.com> | ||
54 | * src/Core/Targets/VS2008Target.cs | ||
55 | - Enabled embedded solutions to contain Files. | ||
56 | |||
57 | 2008-04-29T04:13 Joseph Lombrozo <digitaljeebus@gmail.com> | ||
58 | * src/Core/VSVersion.cs | ||
59 | - Fixed spelling mistake in enum comment. | ||
60 | * src/Core/Attributes/DataNodeAttribute.cs | ||
61 | - Allowed the DataNodeAttribute to be attached to a single class | ||
62 | more than once, allowing one class to be used to parse more than | ||
63 | one node at a time. | ||
64 | * src/Core/Kernel.cs | ||
65 | - Changed CacheNodeTypes() to allow for multiple DataNodeAttribute | ||
66 | instances in one class. Refactored ProcessFile(...) to return Solutions, | ||
67 | rather than adding them to the Kernel. | ||
68 | * src/Core/Nodes/SolutionNode.cs | ||
69 | - Added Guid (for embedded folders) | ||
70 | - Added DatabaseProjects, Solutions and Processes to the SolutionNode | ||
71 | when parsing. | ||
72 | * src/Core/Nodes/ProjectNode.cs | ||
73 | - Added FrameworkVersion property to allow for 2.0/3.0/3.5 differentiation. | ||
74 | * src/Core/Targets/VS2008Target.cs, src/data/prebuild-1.7.xsd | ||
75 | - Added ability to have embedded solutions, and externally referenced | ||
76 | prebuild scripts. | ||
77 | |||
78 | 2008-04-24T04:33 John M. Anderson <sontek@gmail.com> | ||
79 | * src/Core/Targets/VS2003Target.cs, src/Core/Targets/VSVersion.cs | ||
80 | - Moved the VSVersion enum into its own file. | ||
81 | * src/Core/Targets/VS2008Target.cs | ||
82 | - added support for VS2008 | ||
83 | * src/Core/Nodes/ProjectNode.cs | ||
84 | - Added initial support for ASP.NET projects | ||
85 | * src/Core/Nodes/DatabaseProjectNode.cs | ||
86 | - Added support for Visual Studio database projects | ||
87 | |||
88 | 2008-02-19T07:08 C.J. Adams-Collier <cjac@colliertech.org> | ||
89 | * TODO | ||
90 | - added some tasks from Sam Hocevar | ||
91 | * src/Core/Targets/AutotoolsTarget.cs | ||
92 | - added a missing end paren | ||
93 | * COPYING | ||
94 | - Removed Randy Ridge's name from the copyright. Looks to me like | ||
95 | his name was present only because the file was nabbed from Tao | ||
96 | |||
97 | 2008-02-09T20:29 C.J. Adams-Collier <cjac@colliertech.org> | ||
98 | * COPYING | ||
99 | - added MIT/X11 license due to inclusion of code from Monodevelop | ||
100 | * THANKS | ||
101 | - added Lluis Sanchez Gual and Todd Berman - I yoinked code from | ||
102 | their pkg-config .pc file parser to build AutotoolsTarget.cs. | ||
103 | Sorry it took me so long to remember to add mention of you guys! | ||
104 | * src/Core/Targets/AutotoolsTarget.cs | ||
105 | - added MIT/X11 license. see above. | ||
106 | |||
107 | 2008-02-07T08:27 C.J. Adams-Collier <cjac@colliertech.org> | ||
108 | * AUTHORS | ||
109 | - consolidated names and contact info found laying around the | ||
110 | source | ||
111 | * src/Core/Kernel.cs | ||
112 | - updated copyright date | ||
113 | - re-formatted license for 80-column editor | ||
114 | - updated log banner to indicate new date, new authors | ||
115 | * src/Core/Targets/AutotoolsTarget.cs | ||
116 | - clarified reasoning behind use of constants in | ||
117 | AutotoolsTarget.ParsePCFile | ||
118 | - reduced length of some long lines using newline/indent | ||
119 | - added log messages for parsing .pc files, emitting solutions, | ||
120 | projects | ||
121 | - robustified the inter-package dependency resolution target | ||
122 | - log warning when we can't find assembly for <Reference /> | ||
123 | - clarified code for case of inability to find embedded | ||
124 | autotools.xml | ||
125 | * src/data/autotools.xml | ||
126 | - adding system lookup of resgen2 to configure.ac | ||
127 | - fixed .resource -> .resources typo | ||
128 | - added a rule to create <foo>.response file containing all sources | ||
129 | - using @<foo>.response on $(CSC) command line instead of listing | ||
130 | all source files | ||
131 | * src/Properties/AssemblyInfo.cs | ||
132 | - re-formatted license for an 80-column editor | ||
133 | - added more authors to the AssemblyCopyright attribute | ||
134 | - bumped version to 2.0.3 | ||
135 | * prebuild.xml | ||
136 | - bumped version to 2.0.3 | ||
137 | * scripts/autotools.sh | ||
138 | - if 'mono' is in the path, run Prebuild.exe with it | ||
139 | - using dirname to capture correct path to prebuild.xml &c | ||
140 | |||
141 | 2008-02-06T17:18 C.J. Adams-Collier <cjac@colliertech.org> | ||
142 | * src/Core/Targets/NAntTarget.cs | ||
143 | - re-formatted the license for an 80-column editor | ||
144 | - added myself to the copyright | ||
145 | - added a fix submitted by Gryc Ueusp <gryc.ueusp@gmail.com> | ||
146 | * src/Core/Targets/AutotoolsTarget.cs | ||
147 | - updated copyright to include 2008 | ||
148 | * THANKS | ||
149 | - created file, added Gryc Ueusp <gryc.ueusp@gmail.com> | ||
150 | |||
151 | 2008-01-01T14:50 C.J. Adams-Collier <cjac@colliertech.org> | ||
152 | * src/data/autotools.xml | ||
153 | - fixed .resx -> .resource compilation | ||
154 | - fixed failing edge case where Project is an unsigned Library | ||
155 | - added $(RESOURCE_SRC) to list of extra dist files | ||
156 | * src/Core/Targets/AutotoolsTarget.cs | ||
157 | - removed embeddedResources from extraDistFiles list | ||
158 | |||
159 | 2007-04-18T07:49 C.J. Adams-Collier <cjac@colliertech.org> | ||
160 | * src/data/prebuild-1.7.xsd | ||
161 | - removed default version from references | ||
162 | |||
163 | 2007-04-06T12:42 C.J. Adams-Collier <cjac@colliertech.org> | ||
164 | * src/data/autotools.xml | ||
165 | - added support for /doc: output when XmlDocFile is not empty | ||
166 | - not printing \t \\n on lines that have no content | ||
167 | - gacutil now installs the root assembly instead of the one under | ||
168 | bin/Debug or whatever | ||
169 | |||
170 | 2007-04-04T22:12 C.J. Adams-Collier <cjac@colliertech.org> | ||
171 | * src/Core/Targets/AutotoolsTarget.cs | ||
172 | - removed debugging Console.WriteLine() | ||
173 | * src/data/autotools.xml | ||
174 | - ensuring that install-sh and missing get distributed | ||
175 | - explicitly stating that the sources, snk, resources and binary | ||
176 | references live under $(srcdir) | ||
177 | - corrected uninstall target | ||
178 | - verified distcheck completes successfully | ||
179 | |||
180 | 2007-04-03T21:56 C.J. Adams-Collier <cjac@colliertech.org> | ||
181 | * src/Core/Targets/AutotoolsTarget.cs | ||
182 | - added a using for System.Diagnostics | ||
183 | - added enum ClrVersion for use with the pkg-config parser | ||
184 | - added class SystemPackage for use with the pkg-config parser | ||
185 | - removed explicit "private" property of members since it is implied | ||
186 | - flushing the stream-writer before it's closed | ||
187 | - removed excess braces around an if statement | ||
188 | ! NormalizeAsmName(), AddAssembly(), GetAssembliesWithLibInfo(), | ||
189 | GetAssembliesWithoutLibInfo(), ProcessPiece(), | ||
190 | GetVariableFromPkgConfig(), ParsePCFile(), | ||
191 | RegisterSystemAssemblies(), RunInitialization() | ||
192 | - pulled the above from MonoDevelop to parse the system pkgconfig | ||
193 | files and determine /pkg: arguments. Original sources are here: | ||
194 | http://svn.myrealbox.com/source/trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/SystemAssemblyService.cs | ||
195 | http://svn.myrealbox.com/source/trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/ClrVersion.cs | ||
196 | ! WriteProject() | ||
197 | - now gathering project version from AssemblyInfo.cs if it is part | ||
198 | of the project | ||
199 | - changed the declaration of the ArrayList's in the method | ||
200 | - now copying assembly .config files to the project, distributing, | ||
201 | installing | ||
202 | - making sure all needed files live under the Project directory | ||
203 | - copying strongname keys to project directory | ||
204 | - parsing AssemblyInfo.cs to determine assembly version | ||
205 | - removing all references to ".." | ||
206 | - removed superfluous if(project.References.Count > 0) around | ||
207 | for(int refNum = 0; refNum < project.References.Count; refNum++) | ||
208 | - removed use of runtimeLibs | ||
209 | - adding hook to copy sibling project's generated assemblies to | ||
210 | this project during Make time | ||
211 | - added extra dist target to ensure all files required to build | ||
212 | get distributed during "make dist" | ||
213 | - added new xslt processing args: | ||
214 | -- assemblyName | ||
215 | -- extraDistFiles | ||
216 | -- pkgLibs (/pkg:foo) | ||
217 | -- localCopyTargets (to copy sibling assemblies at Make time) | ||
218 | -- projectVersion (if determined from AssemblyInfo.cs) | ||
219 | -- hasAssemblyConfig (if there's a assembly.exe.config present) | ||
220 | ! Write() | ||
221 | - calling RunInitialization() to gather pkg-config data | ||
222 | * src/data/autotools.xml | ||
223 | - accepting new args passed from AutotoolsTarget.cs | ||
224 | - modernized configure.ac a bit | ||
225 | - using a version of tar that allows >99-char filenames | ||
226 | - added ASSEMBLY_NAME variable | ||
227 | - using assembly name rather than project name for gac installation | ||
228 | - generated assembly is now assembly name and not project name | ||
229 | - accepting /pkg: flags gathered from AutotoolsTarget.cs | ||
230 | - adding Makefile targets to copy sibling project assemblies to . | ||
231 | - fixed Debug, Release targets | ||
232 | - adding support for strongname key signing | ||
233 | - adding /unsafe support | ||
234 | - adding a clean make target | ||
235 | - only running gacutil /u if the assembly being uninstalled is in gac | ||
236 | - added some templates to determine each Configuration's .snk | ||
237 | - added explanation as to why .exe assemblies live in $prefix/lib | ||
238 | * src/Properties/AssemblyInfo.cs | ||
239 | - bumped assembly version | ||
240 | * prebuild.xml | ||
241 | - bumped assembly version | ||
242 | |||
243 | 2007-03-29T18:03 C.J. Adams-Collier <cjac@colliertech.org> | ||
244 | * src/Core/Targets/AutotoolsTarget.cs | ||
245 | ! WriteProject() | ||
246 | - re-named incorrectly-named variable gacLibs to systemLibs | ||
247 | - added another reference list, runtimeLibs which contains the | ||
248 | libs we will need at runtime. we use this to build a MONO_PATH | ||
249 | - added monoPath to the xslt args list | ||
250 | * src/data/autotools.xml | ||
251 | ! <ProjectMakefileAm /> | ||
252 | - renamed gacLibs to systemLibs | ||
253 | - added the sources to the dist list | ||
254 | - added logic to install libs that aren't strongnamed | ||
255 | ! <ProjectWrapperScriptIn /> | ||
256 | - accepting a param to update the MONO_PATH | ||
257 | |||
258 | 2007-03-28T19:46 C.J. Adams-Collier <cjac@colliertech.org> | ||
259 | * src/Core/Targets/MonoDevelopTarget.cs | ||
260 | ! CleanProject() | ||
261 | - using Assembly.LoadWithPartialName to locate the assembly | ||
262 | * src/Core/Targets/AutotoolsTarget.cs | ||
263 | ! WriteCombine() | ||
264 | - no longer using $PWD to determine a project's source dir; this | ||
265 | doesn't work with <Process /> elements | ||
266 | - passing the solution name to all templates - fixes | ||
267 | multi-solution prebuild systems | ||
268 | ! WriteProject() | ||
269 | - no longer using $PWD to determine a project's source dir; this | ||
270 | doesn't work with <Process /> elements | ||
271 | - passing the solution name to all templates - fixes | ||
272 | multi-solution prebuild systems | ||
273 | - copying strongname key to the autotools directory | ||
274 | - using Assembly.LoadWithPartialName to locate assemblies | ||
275 | * src/data/autotools.xml | ||
276 | ! <ProjectConfigureAc /> | ||
277 | - fixed the .pc AC_CONFIG_FILES macro | ||
278 | ! <ProjectMakefileAm /> | ||
279 | - added solution name param | ||
280 | - wrapping if type=exe check around script install macro | ||
281 | - added type=lib check and .pc file install macro | ||
282 | - added support for Configuration-specific builds (Debug, Release, etc) | ||
283 | - added strongname keyfile code | ||
284 | - TODO: support non-strongnamed library installation | ||
285 | ! <ProjectWrapperScriptIn /> | ||
286 | - added space preservation attribute to stylesheet element | ||
287 | - added a lower-case project name variable | ||
288 | - added solution name param | ||
289 | - made for-each template more specific | ||
290 | ! <SolutionAutogenSh /> | ||
291 | - added solution name param | ||
292 | ! <SolutionConfigureAc /> | ||
293 | - added solution name param | ||
294 | ! <SolutionMakefileAm /> | ||
295 | - added solution name param | ||
296 | ! <ProjectPcIn /> | ||
297 | - added solution name param | ||
298 | |||
299 | 2007-03-27T09:33 C.J. Adams-Collier <cjac@colliertech.org> | ||
300 | * src/Core/Targets/AutotoolsTarget.cs | ||
301 | - now processing the wrapper script if type is "Exe" or "WinExe" | ||
302 | * src/data/autotools.xml | ||
303 | ! <ProjectConfigureAc /> | ||
304 | - being more exact about where text escaping is used | ||
305 | - using the correct variable name for the GACUTIL_FLAGS template | ||
306 | - using correct test="" for the AC_CONFIG_FILES macros | ||
307 | ! <ProjectMakefileAm /> | ||
308 | - uncommented the bin_SCRIPTS section now that the script is being | ||
309 | generated correctly | ||
310 | ! <ProjectWrapperScriptIn /> | ||
311 | - fixed whitespace at beginning of file, before #! | ||
312 | - using lower-case packageName to indicate installation location | ||
313 | |||
314 | 2007-03-27T09:33 C.J. Adams-Collier <cjac@colliertech.org> | ||
315 | * src/data/autotools.xml | ||
316 | ! <ProjectConfigureAc /> | ||
317 | * added a lcProjectName which is $projectName lower-cased | ||
318 | * moved autoconf template specifier near AC_OUTPUT | ||
319 | * AC_OUTPUT with args is deprecated. now using AC_CONFIG_FILES | ||
320 | * placed AC_CONFIG_FILES() calls for wrapper script or pkg-config | ||
321 | file in xslt project type checks | ||
322 | ! <ProjectMakefileAm /> | ||
323 | * commented out bin_SCRIPTS | ||
324 | * added a lcProjectName which is $projectName lower-cased | ||
325 | * using $lcProjectName instead of the longer version | ||
326 | |||
327 | 2007-03-27T08:39 C.J. Adams-Collier <cjac@colliertech.org> | ||
328 | * src/data/autotools.xml | ||
329 | ! <ProjectMakefileAm /> | ||
330 | - added whitespace-preservation | ||
331 | - added the missing projectName param | ||
332 | - replaced bin_SCRIPTS with something that worked | ||
333 | |||
334 | 2007-03-27T07:56 C.J. Adams-Collier <cjac@colliertech.org> | ||
335 | * src/data/autotools.xml | ||
336 | ! <ProjectConfigureAc /> | ||
337 | - cleaned up duplicate checks | ||
338 | - placed initialization macros above system check macros | ||
339 | - added some more messages about what's going on | ||
340 | - added GACUTIL_FLAGS variable including /package option | ||
341 | ! <ProjectMakefileAm /> | ||
342 | - added an incomplete bin_SCRIPTS | ||
343 | - RCS check says "building" instead of "compiling" | ||
344 | ! <SolutionConfigureAc /> | ||
345 | - removed macros that are useful only for projects | ||
346 | ! <ProjectWrapperScriptIn /> | ||
347 | - created this element on this revision | ||
348 | - this is a wrapper shell script that lives in the $PATH and runs | ||
349 | the CIL assembly | ||
350 | |||
351 | 2007-03-26T20:18 C.J. Adams-Collier <cjac@colliertech.org> | ||
352 | * src/Core/Targets/AutotoolsTarget.cs | ||
353 | - creating new template arguments to contain the list of libs to | ||
354 | reference: source, binary & GAC | ||
355 | - source libs are included as part of this solution (untested) | ||
356 | - binary libs are distributed with the source (untested) | ||
357 | - GAC libs are assumed to be in the GAC or other lib path (tested) | ||
358 | * src/data/autotools.xml | ||
359 | - created new params through which to accept reference info | ||
360 | - created a working $(CSC) line | ||
361 | - added a TODO item for ordering project dependency for | ||
362 | AC_CONFIG_SUBDIRS code | ||
363 | |||
364 | 2007-03-26T08:41 C.J. Adams-Collier <cjac@colliertech.org> | ||
365 | * src/Core/Targets/AutotoolsTarget.cs | ||
366 | - now creating list of source files in managed code and passing | ||
367 | them to the template via <xsl:param>s | ||
368 | * src/data/prebuild-1.7.xsd | ||
369 | - updated the header comment to 2007 | ||
370 | * src/data/autotools.xml | ||
371 | ! <ProjectConfigureAc> | ||
372 | - copied checks from Solution-level configure.ac | ||
373 | - copied solution-level config status | ||
374 | ! <ProjectMakefileAm> | ||
375 | - added <xsl:param> elements for file list to be passed through | ||
376 | - made a temporary target for the assembly we're building | ||
377 | - added this target to the deps of "all:" | ||
378 | ! <SolutionConfigureAc> | ||
379 | - changed status header/footer from "- - -" to "===" | ||
380 | |||
381 | 2007-03-23T08:33 C.J. Adams-Collier <cjac@colliertech.org> | ||
382 | Added version attribute handling code for Property element | ||
383 | Added description element handling code | ||
384 | * prebuild.xml | ||
385 | - added /Prebuild/Solution/Property/@version attribute | ||
386 | - added /Prebuild/Solution/Property/Description element | ||
387 | * src/Core/Nodes/ProjectNode.cs | ||
388 | - added some docs where they were missing and obvious | ||
389 | - added code to handle @version | ||
390 | * src/Core/Nodes/DescriptionNode.cs | ||
391 | - new file. Used to handle /Prebuild/Solution/Property/Description | ||
392 | * src/Core/Targets/AutotoolsTarget.cs | ||
393 | - added mkdirDashP(), a recursive directory creation method | ||
394 | - WriteProject() now copies the files to autotools/ | ||
395 | * src/data/prebuild-1.7.xsd | ||
396 | - added /Prebuild/Solution/Property/Description element | ||
397 | - added /Prebuild/Solution/Property/@version attribute | ||
398 | * src/data/autotools.xml | ||
399 | - removed excess <xsl:value-of select="$projectName"/> | ||
400 | - explicitly using dnpb: prefix | ||
401 | |||
402 | 2007-03-23T04:31 C.J. Adams-Collier <cjac@colliertech.org> | ||
403 | Merged code from my stripped-down test | ||
404 | Adding support for the /Prebuild/Solution/Project/Author element | ||
405 | * prebuild.xml | ||
406 | - added Author elements | ||
407 | - cleaned up the really long Project element | ||
408 | * src/Core/Nodes/ProjectNode.cs | ||
409 | - added Author tag processing code | ||
410 | * src/Core/Nodes/AuthorNode.cs | ||
411 | - Created to process Author elements | ||
412 | - based off of ReferencePathNode.cs | ||
413 | * src/Core/Targets/AutotoolsTarget.cs | ||
414 | - merged code from https://svn.colliertech.org/mono/dnpbAutotools/dnpbAutotools/test.cs | ||
415 | - renamed old WriteCombine to WriteCombineOld | ||
416 | - renamed old WriteProject to WriteProjectOld | ||
417 | * src/data/prebuild-1.7.xsd | ||
418 | - added Author element to Project | ||
419 | * src/data/autotools.xml | ||
420 | - lower-cased utf | ||
421 | |||
422 | |||
423 | 2007-03-22T13:58 C.J. Adams-Collier <cjac@colliertech.org> | ||
424 | Exposing an XmlDocument that represents the prebuild.xml file | ||
425 | passed to the program | ||
426 | |||
427 | * src/Core/Kernel.cs | ||
428 | - created an object member called XmlDocument m_CurrentDoc | ||
429 | - created a property to access its value | ||
430 | - using m_CurrentDoc to load up the prebuild.xml file rather than | ||
431 | a local variable called "doc" | ||
432 | |||
433 | 2007-03-22 C.J. Adams-Collier <cjac@colliertech.org> | ||
434 | * prebuild.xml | ||
435 | - added autotools.xml created at https://svn.colliertech.org/mono/dnpbAutotools/dnpbAutotools/autotools.xml | ||
436 | * src/data/autotools.xml | ||
437 | - the same | ||
438 | * src/Core/Targets/MonoDevelopTarget.cs | ||
439 | - fixed bug introduced in r206 | ||
440 | |||
441 | 2007-03-07 C.J. Adams-Collier <cjcollier@colliertech.org> | ||
442 | * src/data/prebuild-1.7.xsd | ||
443 | - added version attribute to Solution and Project elements | ||
444 | |||
445 | 2006-11-04T00:38 C.J. Adams-Collier <cjcollier@colliertech.org> | ||
446 | * placing AssemblyInfo.cs into Properties/ | ||
447 | * Fixed double-mention of the package name | ||
448 | |||
449 | 2006-11-03T15:23 C.J. Adams-Collier <cjcollier@colliertech.org> | ||
450 | * corrected a problem in the Include.am generation code | ||
451 | * created the new .exe | ||
452 | * copied it to the root of the build | ||
453 | |||
454 | 2006-11-03T14:57 C.J. Adams-Collier <cjcollier@colliertech.org> | ||
455 | * Updated the .exe file | ||
456 | |||
457 | 2006-11-03 C.J. Adams-Collier <cjcollier@colliertech.org> | ||
458 | * Added a TODO file | ||
459 | * Added a ChangeLog file | ||
460 | * applied some fixes for autotools gac and pkg-config installation | ||
461 | problems | ||
diff --git a/Prebuild/INSTALL b/Prebuild/INSTALL new file mode 100644 index 0000000..23e5f25 --- /dev/null +++ b/Prebuild/INSTALL | |||
@@ -0,0 +1,236 @@ | |||
1 | Installation Instructions | ||
2 | ************************* | ||
3 | |||
4 | Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free | ||
5 | Software Foundation, Inc. | ||
6 | |||
7 | This file is free documentation; the Free Software Foundation gives | ||
8 | unlimited permission to copy, distribute and modify it. | ||
9 | |||
10 | Basic Installation | ||
11 | ================== | ||
12 | |||
13 | These are generic installation instructions. | ||
14 | |||
15 | The `configure' shell script attempts to guess correct values for | ||
16 | various system-dependent variables used during compilation. It uses | ||
17 | those values to create a `Makefile' in each directory of the package. | ||
18 | It may also create one or more `.h' files containing system-dependent | ||
19 | definitions. Finally, it creates a shell script `config.status' that | ||
20 | you can run in the future to recreate the current configuration, and a | ||
21 | file `config.log' containing compiler output (useful mainly for | ||
22 | debugging `configure'). | ||
23 | |||
24 | It can also use an optional file (typically called `config.cache' | ||
25 | and enabled with `--cache-file=config.cache' or simply `-C') that saves | ||
26 | the results of its tests to speed up reconfiguring. (Caching is | ||
27 | disabled by default to prevent problems with accidental use of stale | ||
28 | cache files.) | ||
29 | |||
30 | If you need to do unusual things to compile the package, please try | ||
31 | to figure out how `configure' could check whether to do them, and mail | ||
32 | diffs or instructions to the address given in the `README' so they can | ||
33 | be considered for the next release. If you are using the cache, and at | ||
34 | some point `config.cache' contains results you don't want to keep, you | ||
35 | may remove or edit it. | ||
36 | |||
37 | The file `configure.ac' (or `configure.in') is used to create | ||
38 | `configure' by a program called `autoconf'. You only need | ||
39 | `configure.ac' if you want to change it or regenerate `configure' using | ||
40 | a newer version of `autoconf'. | ||
41 | |||
42 | The simplest way to compile this package is: | ||
43 | |||
44 | 1. `cd' to the directory containing the package's source code and type | ||
45 | `./configure' to configure the package for your system. If you're | ||
46 | using `csh' on an old version of System V, you might need to type | ||
47 | `sh ./configure' instead to prevent `csh' from trying to execute | ||
48 | `configure' itself. | ||
49 | |||
50 | Running `configure' takes awhile. While running, it prints some | ||
51 | messages telling which features it is checking for. | ||
52 | |||
53 | 2. Type `make' to compile the package. | ||
54 | |||
55 | 3. Optionally, type `make check' to run any self-tests that come with | ||
56 | the package. | ||
57 | |||
58 | 4. Type `make install' to install the programs and any data files and | ||
59 | documentation. | ||
60 | |||
61 | 5. You can remove the program binaries and object files from the | ||
62 | source code directory by typing `make clean'. To also remove the | ||
63 | files that `configure' created (so you can compile the package for | ||
64 | a different kind of computer), type `make distclean'. There is | ||
65 | also a `make maintainer-clean' target, but that is intended mainly | ||
66 | for the package's developers. If you use it, you may have to get | ||
67 | all sorts of other programs in order to regenerate files that came | ||
68 | with the distribution. | ||
69 | |||
70 | Compilers and Options | ||
71 | ===================== | ||
72 | |||
73 | Some systems require unusual options for compilation or linking that the | ||
74 | `configure' script does not know about. Run `./configure --help' for | ||
75 | details on some of the pertinent environment variables. | ||
76 | |||
77 | You can give `configure' initial values for configuration parameters | ||
78 | by setting variables in the command line or in the environment. Here | ||
79 | is an example: | ||
80 | |||
81 | ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix | ||
82 | |||
83 | *Note Defining Variables::, for more details. | ||
84 | |||
85 | Compiling For Multiple Architectures | ||
86 | ==================================== | ||
87 | |||
88 | You can compile the package for more than one kind of computer at the | ||
89 | same time, by placing the object files for each architecture in their | ||
90 | own directory. To do this, you must use a version of `make' that | ||
91 | supports the `VPATH' variable, such as GNU `make'. `cd' to the | ||
92 | directory where you want the object files and executables to go and run | ||
93 | the `configure' script. `configure' automatically checks for the | ||
94 | source code in the directory that `configure' is in and in `..'. | ||
95 | |||
96 | If you have to use a `make' that does not support the `VPATH' | ||
97 | variable, you have to compile the package for one architecture at a | ||
98 | time in the source code directory. After you have installed the | ||
99 | package for one architecture, use `make distclean' before reconfiguring | ||
100 | for another architecture. | ||
101 | |||
102 | Installation Names | ||
103 | ================== | ||
104 | |||
105 | By default, `make install' installs the package's commands under | ||
106 | `/usr/local/bin', include files under `/usr/local/include', etc. You | ||
107 | can specify an installation prefix other than `/usr/local' by giving | ||
108 | `configure' the option `--prefix=PREFIX'. | ||
109 | |||
110 | You can specify separate installation prefixes for | ||
111 | architecture-specific files and architecture-independent files. If you | ||
112 | pass the option `--exec-prefix=PREFIX' to `configure', the package uses | ||
113 | PREFIX as the prefix for installing programs and libraries. | ||
114 | Documentation and other data files still use the regular prefix. | ||
115 | |||
116 | In addition, if you use an unusual directory layout you can give | ||
117 | options like `--bindir=DIR' to specify different values for particular | ||
118 | kinds of files. Run `configure --help' for a list of the directories | ||
119 | you can set and what kinds of files go in them. | ||
120 | |||
121 | If the package supports it, you can cause programs to be installed | ||
122 | with an extra prefix or suffix on their names by giving `configure' the | ||
123 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. | ||
124 | |||
125 | Optional Features | ||
126 | ================= | ||
127 | |||
128 | Some packages pay attention to `--enable-FEATURE' options to | ||
129 | `configure', where FEATURE indicates an optional part of the package. | ||
130 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE | ||
131 | is something like `gnu-as' or `x' (for the X Window System). The | ||
132 | `README' should mention any `--enable-' and `--with-' options that the | ||
133 | package recognizes. | ||
134 | |||
135 | For packages that use the X Window System, `configure' can usually | ||
136 | find the X include and library files automatically, but if it doesn't, | ||
137 | you can use the `configure' options `--x-includes=DIR' and | ||
138 | `--x-libraries=DIR' to specify their locations. | ||
139 | |||
140 | Specifying the System Type | ||
141 | ========================== | ||
142 | |||
143 | There may be some features `configure' cannot figure out automatically, | ||
144 | but needs to determine by the type of machine the package will run on. | ||
145 | Usually, assuming the package is built to be run on the _same_ | ||
146 | architectures, `configure' can figure that out, but if it prints a | ||
147 | message saying it cannot guess the machine type, give it the | ||
148 | `--build=TYPE' option. TYPE can either be a short name for the system | ||
149 | type, such as `sun4', or a canonical name which has the form: | ||
150 | |||
151 | CPU-COMPANY-SYSTEM | ||
152 | |||
153 | where SYSTEM can have one of these forms: | ||
154 | |||
155 | OS KERNEL-OS | ||
156 | |||
157 | See the file `config.sub' for the possible values of each field. If | ||
158 | `config.sub' isn't included in this package, then this package doesn't | ||
159 | need to know the machine type. | ||
160 | |||
161 | If you are _building_ compiler tools for cross-compiling, you should | ||
162 | use the option `--target=TYPE' to select the type of system they will | ||
163 | produce code for. | ||
164 | |||
165 | If you want to _use_ a cross compiler, that generates code for a | ||
166 | platform different from the build platform, you should specify the | ||
167 | "host" platform (i.e., that on which the generated programs will | ||
168 | eventually be run) with `--host=TYPE'. | ||
169 | |||
170 | Sharing Defaults | ||
171 | ================ | ||
172 | |||
173 | If you want to set default values for `configure' scripts to share, you | ||
174 | can create a site shell script called `config.site' that gives default | ||
175 | values for variables like `CC', `cache_file', and `prefix'. | ||
176 | `configure' looks for `PREFIX/share/config.site' if it exists, then | ||
177 | `PREFIX/etc/config.site' if it exists. Or, you can set the | ||
178 | `CONFIG_SITE' environment variable to the location of the site script. | ||
179 | A warning: not all `configure' scripts look for a site script. | ||
180 | |||
181 | Defining Variables | ||
182 | ================== | ||
183 | |||
184 | Variables not defined in a site shell script can be set in the | ||
185 | environment passed to `configure'. However, some packages may run | ||
186 | configure again during the build, and the customized values of these | ||
187 | variables may be lost. In order to avoid this problem, you should set | ||
188 | them in the `configure' command line, using `VAR=value'. For example: | ||
189 | |||
190 | ./configure CC=/usr/local2/bin/gcc | ||
191 | |||
192 | causes the specified `gcc' to be used as the C compiler (unless it is | ||
193 | overridden in the site shell script). Here is a another example: | ||
194 | |||
195 | /bin/bash ./configure CONFIG_SHELL=/bin/bash | ||
196 | |||
197 | Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent | ||
198 | configuration-related scripts to be executed by `/bin/bash'. | ||
199 | |||
200 | `configure' Invocation | ||
201 | ====================== | ||
202 | |||
203 | `configure' recognizes the following options to control how it operates. | ||
204 | |||
205 | `--help' | ||
206 | `-h' | ||
207 | Print a summary of the options to `configure', and exit. | ||
208 | |||
209 | `--version' | ||
210 | `-V' | ||
211 | Print the version of Autoconf used to generate the `configure' | ||
212 | script, and exit. | ||
213 | |||
214 | `--cache-file=FILE' | ||
215 | Enable the cache: use and save the results of the tests in FILE, | ||
216 | traditionally `config.cache'. FILE defaults to `/dev/null' to | ||
217 | disable caching. | ||
218 | |||
219 | `--config-cache' | ||
220 | `-C' | ||
221 | Alias for `--cache-file=config.cache'. | ||
222 | |||
223 | `--quiet' | ||
224 | `--silent' | ||
225 | `-q' | ||
226 | Do not print messages saying which checks are being made. To | ||
227 | suppress all normal output, redirect it to `/dev/null' (any error | ||
228 | messages will still be shown). | ||
229 | |||
230 | `--srcdir=DIR' | ||
231 | Look for the package's source code in directory DIR. Usually | ||
232 | `configure' can determine that directory automatically. | ||
233 | |||
234 | `configure' also accepts some other, not widely useful, options. Run | ||
235 | `configure --help' for more details. | ||
236 | |||
diff --git a/Prebuild/NEWS b/Prebuild/NEWS new file mode 100644 index 0000000..3ab3108 --- /dev/null +++ b/Prebuild/NEWS | |||
@@ -0,0 +1,200 @@ | |||
1 | Prebuild is an XML-driven pre-build tool allowing developers to easily generate project or make files for major IDE's and .NET development tools including: Visual Studio 2005, Visual Studio 2003, Visual Studio 2002, SharpDevelop, MonoDevelop, and NAnt. | ||
2 | |||
3 | Documentation and downloads are available at http://dnpb.sourceforge.net. | ||
4 | |||
5 | Prebuild is licensed under the BSD license. | ||
6 | |||
7 | [ XXXXXXX XX, XXX - 1.3.2 ] | ||
8 | + Added Keyfile signing to NAnt target and VS2005 target | ||
9 | + Updated XSD file to 1.7 | ||
10 | + Boo and VisualBasic Language support in VS2005 target | ||
11 | + Added basic Autotools target. It creates a non-recursive Autotools system. | ||
12 | ! Multiple files can be excluded from the Match node | ||
13 | ! VS2005 now handles .resx files correctly. | ||
14 | ! NAnt and Autotools now handle defines | ||
15 | ! NAnt and Autotools now handle resources | ||
16 | + Conditional XML variables can be passed through the command line. | ||
17 | + Added /install and /remove command line flags to install and remove assemblies from the GAC | ||
18 | + Many fixes to VS2005 target | ||
19 | |||
20 | [ July 21, 2006 - 1.3.1 ] | ||
21 | ! VS2005 fixes from Rob Loach | ||
22 | ! NAnt fixes from Rob Loach and David Hudson | ||
23 | ! XML doc fixes from Rob Loach | ||
24 | + Added SharpDevelop2 target (really just uses VS2005 target) | ||
25 | ! Fixed bug with BuildEvents in Monodevelop target | ||
26 | + Passing /yes will default to answering yes to any warnings | ||
27 | |||
28 | [ February 28, 2006 - 1.3 ] | ||
29 | + Added MonoDevelop target. | ||
30 | + Added NAnt target. | ||
31 | + Lots of fixes to all targets. | ||
32 | * Cleaned up the code using FXCop. | ||
33 | * Updated schema to 1.6 to fix a typo and add a new parameter. | ||
34 | * jendave is now the maintainer of the project. RobLoach has been added as a developer. | ||
35 | * Removed references to 'dnpb'. | ||
36 | + Added rudimentary support for pre- and post- build scripts | ||
37 | * Updated examples. | ||
38 | |||
39 | [ August 5, 2004 - 1.2 ] | ||
40 | + Added Visual Studio Express (vs2005express) target contributed by Borrillis and modified for use with different languages | ||
41 | + Added the allowedgroups command line option followed by a pipe-delimited list of project group filter flags (eg. Group1|Group2) allow optional filtering of all projects that dont have at least one of these flags | ||
42 | + Added the filterGroups XML attribute to the project node and updated the scheme to v1.5 for this addition, it is used to specified the delimited list of filter groups to which a project belongs | ||
43 | * Modified the removedir command line option to allow for a pipe-delimited list of directory names | ||
44 | ! Modified the resource loading code to search for resourced without the prepended namespace (as Visual Studio .NET does it) to allow for it to be compiled with SharpDevelop as well | ||
45 | + Added the GenerateXmlDocFile boolean option to the Options XML element | ||
46 | * Changed the behavior of the XmlDocFile option so that if not specified it uses the assemblyName (without file extension) + .xml for the file name instead of just not generating the file since the new GenerateXmlDocFile takes care of this | ||
47 | |||
48 | [ January 3, 2004 - 1.1 ] | ||
49 | ! Replaced regex use for more efficient manual parsing to allow use on non-windows platforms with Mono which has Regex problems | ||
50 | + Added the checkOsVars attribute to the root element for enabling interpolation for Enviroment variables in the form ${var}, otherwise no checking is performed for efficiency-sake | ||
51 | * Make the version attribute on the root element optional as it isn't used and not needed since the schema url contains the version | ||
52 | |||
53 | [ December 30, 2004 - 1.1 ] | ||
54 | ! Applied Leed's fix for SharpDevelop references | ||
55 | + Rewrote much of the processing for better validation and without the use of a temp file | ||
56 | + Added support for configurations at the project level which are named All. They now apply changes to all Solution level defined configs | ||
57 | * Changed all spaces into tabs | ||
58 | + Added support for the None build action | ||
59 | * Replaced all sequence's in the XML schema for all's because the order doesn't matter since the xml file is loaded into an XmlDocument | ||
60 | |||
61 | [ December 25, 2004 - 1.0 ] | ||
62 | + Added the /removedir option for cleaning directories like obj before file releases | ||
63 | + Changed WriteTempXml() and the new DeleteTempXml() methods to be compiled only in DEBUG builds | ||
64 | * Made path optional for Match elements (defaults to current directory) and updates schema for it | ||
65 | ! Fixed XML example in the readme.txt | ||
66 | + Added example xml files to docs directory | ||
67 | * Updated license.txt to add Dan Moorehead and update copyright years | ||
68 | + Updated prebuild.xml to take advantage of the default path attribute for match elements | ||
69 | + Updated Clean to delete the obj directories | ||
70 | |||
71 | [ December 25, 2004 - 0.13 ] | ||
72 | + Added dnpb.exe so that it can be used to generate the project files | ||
73 | + Added dnpb.ico | ||
74 | * Added parameterless Write statement to Log for writing a single line | ||
75 | * Changed scehema to version 1.3 for support of icon attribute | ||
76 | * Added support for All configuration name under a Project node signifying common settings for all configurations | ||
77 | ! Fixed the SupressWarnings by adding the corresponding field to OptionsNode | ||
78 | * Wrote documentation in docs/readme.txt | ||
79 | * Added Dan Moorehead to copyrights and extended date from 2004 to 2004-2005 | ||
80 | * Updated prebuild.xml | ||
81 | * Optimized Log class | ||
82 | * Updated OutputUsage() | ||
83 | * /clean targets all by default | ||
84 | * No log file is used by default, /log without value specified uses default file name | ||
85 | + Added support for the /pause which pauses the utility after execution to observe output | ||
86 | |||
87 | |||
88 | [ September 27, 2004 - 0.12.2a ] | ||
89 | ! Fixed a nasty bug when trying to delete our temp file for pre-processing. | ||
90 | |||
91 | [ September 15, 2004 - 0.12.2 ] | ||
92 | + Expanded platform identification, thanks to the NAnt guys for shedding some | ||
93 | light on how to properly check for UNIX platforms! Thanks guys! | ||
94 | * POSIX OS identifier changed to UNIX. Valid OS names are now "Win32", "UNIX", | ||
95 | and "Unknown". | ||
96 | ! Fixed SharpDevelop target to properly use the 'rootNamespace' attribute of | ||
97 | the Project tag. | ||
98 | + New command-line switch, /ppo, forces DNPB to pre-process the file and write | ||
99 | the pre-processed file. This allows you to test/debug your pre-processor | ||
100 | macros. No other processing will be done. You can specify a target file as | ||
101 | a paramter for the /ppo switch, or DNPB will write the file 'preprocessed.xml' | ||
102 | if you do not specify a file. | ||
103 | + The Match tag now has a 'buildAction' attribute which functions exactly like | ||
104 | the attribute of the same name for the File tag. | ||
105 | |||
106 | [ August 5, 2004 - 0.12.1 ] | ||
107 | + Added environment variable expansion for all values. Environment variables | ||
108 | should be listed in the form ${VAR}. | ||
109 | |||
110 | [ July 30, 2004 - 0.12.0 ] | ||
111 | + Added preprocessing via XML processing information tags. Available tags | ||
112 | are: <?if <exp> ?>, <?elseif <exp> ?>, <?else ?> and <?endif ?>. The | ||
113 | current expression parser is very basic, but will be replaced with a more | ||
114 | capable parser over time. Current operators available are: =, !=, <, >, | ||
115 | <=, >=. Current test variables available: OS, RuntimeVersion, RuntimeMajor, | ||
116 | RuntimeMinor, RuntimeRevision. | ||
117 | |||
118 | [ July 27, 2004 - 0.11.4 ] | ||
119 | + Added 'useRegex' attribute to the Match tag. Matches can now use regular | ||
120 | expressions to match filenames. | ||
121 | + Added the 'assemblyName' attribute to the Project tag. Projects can now | ||
122 | set their output assembly name. | ||
123 | ! Fixed several bugs in the way that Project tags inheirt their parent | ||
124 | Solutions configuration options. This operation should now work fully as | ||
125 | intended. | ||
126 | ! Due to some wierdness, Project Guid's are now stored as part of the Project | ||
127 | node and created at parse time. | ||
128 | |||
129 | [ May 11, 2004 - 0.11.3 ] | ||
130 | ! Fixed a bug where I was writing the wrong property name for a projects root | ||
131 | namespace. | ||
132 | ! Removed a DEBUG statement I had left in the code in 0.11.2. | ||
133 | ! Fixed a bug in the VS2002 writer which caused the version variables to not | ||
134 | be overriden correctly. | ||
135 | + Added the rootNamespace property to the <Project> element, allowing you to | ||
136 | specify the root namespace. | ||
137 | * /target and /clean are now mutually exclusive command line switches, and | ||
138 | they both now take the all option. In the case of /target all, all build | ||
139 | file for all targets will be created. In the case of /clean all, the user | ||
140 | will be prompted to make sure they want to do it, and if so, will clean | ||
141 | all build files for all targets. | ||
142 | |||
143 | [ April 22, 2004 - 0.11.2 ] | ||
144 | ! Fixed a bug with the /file command-line operator. Was using the unresolved | ||
145 | file path rather then the resolved one, was making the attempt to open the | ||
146 | dnpb file fail. | ||
147 | ! Fixed a bug in the schema that required at least 1 solution and 1 reference | ||
148 | path. We can do just fine with 0 of either of these. Some files may be all | ||
149 | <Process> statements and not have any <Solution> tags. | ||
150 | ! Fixed a bug that caused the project references not to be written with the | ||
151 | SharpDevelop target. | ||
152 | * Changed the schema to version 1.2, allowing for Configuration nodes to exist | ||
153 | under project nodes. The inheritance of values is hierarchical. Meaning, if | ||
154 | you define a configuration named Debug at the Soltion level, and one by the | ||
155 | same name at the Project level, the one at the Project level will first | ||
156 | inherit the options of the Solution level configuration, then set it's own | ||
157 | options. If you define a configuration at the Project level and it does not | ||
158 | exist at the Solution level, it will be created at the Solution level. | ||
159 | * Project references should now work correctly across the board. Note that due | ||
160 | to a restriction in Visual Studio, you can only reference projects in the same | ||
161 | solution. | ||
162 | |||
163 | [ April 21, 2004 - 0.11.1 ] | ||
164 | ! Fixed a problem with resolving paths in various targets. Was not properly | ||
165 | setting the CWD. | ||
166 | * Schema updated to 1.1, moving the ReferencePath element from the Options | ||
167 | element to the Project element. This makes more logical sense, given that | ||
168 | reference paths are resolved relative to the project path. Any prebuild.xml | ||
169 | file referecning verison 1.0 will fail! Please update to the 1.1 schema. | ||
170 | |||
171 | [ April 19, 2004 - 0.11.0 ] | ||
172 | * Added several attributes across the code to make FxCop happy | ||
173 | ! Fixed bugs in reference paths being written in the VS targets. | ||
174 | ! Fixed a bug in ProjectNode which was doing two CWDStack.Push() calls instead of | ||
175 | a Push/Pop pair. Was wreaking havoc with <Process> tags. | ||
176 | ! Fixed some bugs in the path tracking, both the Project and Solution nodes now | ||
177 | have a FullPath property, which is the full path to the file resolved at load | ||
178 | time. This should fix all path relativity problems. | ||
179 | + Added new /clean switch, allowing the target to clean up any files it generated. | ||
180 | in accordance, the ITarget interface has been updated to support a new Clean() | ||
181 | method. | ||
182 | + Completed addition of the <Process> tag, to allow the referencing of external | ||
183 | prebuild.xml files. | ||
184 | + Added the runtime attribute to the Project element. This allows the developer | ||
185 | to specify which runtime a project should target (Mono or Microsoft). This is | ||
186 | of course ignored in certain targets like the Visual Studio targets. | ||
187 | + Added the SharpDevelop target. | ||
188 | |||
189 | [ April 13, 2004 - 0.10.1a ] | ||
190 | + Added the buildAction attribute to the File node. This is needed for dnpb | ||
191 | to even be able to bootstrap itself (dnpb-1.0.xsd must be an embedded resource) | ||
192 | |||
193 | [ April 13, 2004 - 0.10.1 ] | ||
194 | * First Release | ||
195 | |||
196 | [ Key ] | ||
197 | * = Change or information | ||
198 | + = Addition | ||
199 | ! = Bug Fix | ||
200 | |||
diff --git a/Prebuild/README b/Prebuild/README new file mode 100644 index 0000000..e8a2d69 --- /dev/null +++ b/Prebuild/README | |||
@@ -0,0 +1,274 @@ | |||
1 | Prebuild Instructions | ||
2 | |||
3 | Prebuild is an XML-driven pre-build tool allowing developers to easily generate project or make files for major IDE's and .NET development tools including: Visual Studio 2005, Visual Studio 2003, Visual Studio 2002, SharpDevelop, SharpDevelop2, MonoDevelop, and NAnt. | ||
4 | |||
5 | _______________________________________________________________________________ | ||
6 | Overview | ||
7 | |||
8 | Prebuild can be either be run from the command line to generate the | ||
9 | project and make files or you can execute the included batch (*.bat) | ||
10 | and Unix Shell script (*.sh) files. | ||
11 | |||
12 | _______________________________________________________________________________ | ||
13 | The currently supported developement tools and their associated batch | ||
14 | and shell script files. | ||
15 | |||
16 | Visual Studio .NET 2005 (VS2005.bat) | ||
17 | Visual Studio .NET 2003 (VS2003.bat) | ||
18 | Visual Studio .NET 2002 (VS2002.bat) | ||
19 | SharpDevelop (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/ | ||
20 | SharpDevelop2 (SharpDevelop.bat) - http://www.icsharpcode.net/OpenSource/SD/ | ||
21 | MonoDevelop (MonoDevelop.sh) - http://www.monodevelop.com/ | ||
22 | NAnt (nant.sh and nant.bat) - http://nant.sourceforge.net/ | ||
23 | Autotools (autotools.bat and autotools.sh) - http://en.wikipedia.org/wiki/GNU_build_system | ||
24 | |||
25 | Notes: | ||
26 | |||
27 | A Unix Shell script is provided for MonoDevelop, as it does not run on | ||
28 | Windows at this time. | ||
29 | |||
30 | Visual Studio .NET 2005 and the Visual Express IDE's can import | ||
31 | solutions from older versions of Visual Studio .NET. | ||
32 | |||
33 | Makefiles are not currently supported. | ||
34 | |||
35 | _______________________________________________________________________________ | ||
36 | Command Line Syntax: | ||
37 | |||
38 | Example: | ||
39 | > Prebuild /target vs2003 | ||
40 | |||
41 | This will generate the project files for Visual Studio.NET 2003 and | ||
42 | place the redirect the log to a file named PrebuildLog.txt in the | ||
43 | parent directory | ||
44 | |||
45 | |||
46 | The syntax structure is as below, where commandParameter is optional | ||
47 | depending on the command and you can provide several option-value | ||
48 | pairs. | ||
49 | |||
50 | Note: The '> ' signifies the command prompt, do not enter this literally | ||
51 | |||
52 | > Prebuild /<option> <commandParameter> | ||
53 | |||
54 | > Prebuild /target vs2003 /pause | ||
55 | |||
56 | > Prebuild /target vs2003 /log ../Log.txt /pause /ppo /file ProjectConfig.xml | ||
57 | |||
58 | > Prebuild /target sharpdev /log | ||
59 | |||
60 | > Prebuild /removedir obj|bin | ||
61 | |||
62 | > Prebuild /target vs2003 /allowedgroups Group1|Group2 | ||
63 | |||
64 | > Prebuild /clean | ||
65 | |||
66 | > Prebuild /clean /yes | ||
67 | |||
68 | > Prebuild /clean vs2003 | ||
69 | |||
70 | _______________________________________________________________________________ | ||
71 | Command Line Options: | ||
72 | |||
73 | /usage - Shows the help information on how to use Prebuild and what | ||
74 | the different options are and what they do | ||
75 | |||
76 | /clean - The project files generated for the target type specified as | ||
77 | a parameter for this option will be deleted. If no value is specified | ||
78 | or if 'all' is specified, then project files for all the target types | ||
79 | will be deleted. | ||
80 | |||
81 | /target - Specified the name of the development tool for which project | ||
82 | or make files will be generated. Possible parameter values include: | ||
83 | vs2003, vs2002, sharpdev | ||
84 | |||
85 | /file - Specifies the name of the XML which defines what files are to | ||
86 | be referenced by the generated project files as well as configures the | ||
87 | options for them. If not specified, prebuild.xml in the current | ||
88 | directory will be used as the default. | ||
89 | |||
90 | /log - Specified the log file that should be written to for build | ||
91 | errors. If this option is not specified, no log file is generated, | ||
92 | but if just no value is specified, then the defaul filename will be | ||
93 | used for the log (Prebuild.log). | ||
94 | |||
95 | /ppo - Preprocesses the xml file to test for syntax errors or problems | ||
96 | but doesn't generate the files | ||
97 | |||
98 | /pause - Shows the console until you press a key so that you can view | ||
99 | the messages written while performing the specified actions. | ||
100 | |||
101 | This allows you to check if an errors occurred and - if so - what it | ||
102 | was. | ||
103 | |||
104 | /showtargets - Shows a list of all the targets that can be specified | ||
105 | as values for the /clean and /target commands. | ||
106 | |||
107 | /allowedgroups - This is followed by a pipe-delimited list of project | ||
108 | group filter flags (eg. Group1|Group2) allow optional filtering of all | ||
109 | projects that dont have at least one of these flags | ||
110 | |||
111 | /removedir - This is followed by a pipe-delimited list of directory | ||
112 | names that will be deleted while recursivly searching the directory of | ||
113 | the prebuild application and its child directories (eg. use obj|bin to | ||
114 | delete all output and temporary directories before file releases) | ||
115 | |||
116 | /yes - Answer yes to any warnings (e.g. when cleaning all projects). | ||
117 | |||
118 | _______________________________________________________________________________ | ||
119 | Example Batch Files and Shell Scripts | ||
120 | |||
121 | NOTE: Common batch and shell script files are included with Prebuild source and file releases. | ||
122 | ______________________________ | ||
123 | MonoDevelop | ||
124 | |||
125 | #!/bin/sh | ||
126 | # Generates a solution (.mds) and a set of project files (.mdp) | ||
127 | |||
128 | # for MonoDevelop, a Mono port of SharpDevelop | ||
129 | # (http://icsharpcode.net/OpenSource/SD/Default.aspx) | ||
130 | |||
131 | ./Prebuild /target monodev /pause | ||
132 | |||
133 | ______________________________ | ||
134 | Visual Studio .NET 2003 | ||
135 | |||
136 | @rem Generates a solution (.sln) and a set of project files (.csproj) | ||
137 | @rem for Microsoft Visual Studio .NET 2002 | ||
138 | Prebuild /target vs2003 /pause | ||
139 | |||
140 | Notes: | ||
141 | Text after lines that start with @rem are comments and are not evaluated | ||
142 | You can also place pause on the last line instead of specifing the /pause command. | ||
143 | |||
144 | _______________________________________________________________________________ | ||
145 | Example XML Configuration File | ||
146 | |||
147 | Note: | ||
148 | |||
149 | XML Comments (<!-- Comment -->) are used to markup the prebuild.xml | ||
150 | file with notes | ||
151 | |||
152 | The below file may be out-of-date, however the RealmForge Prebuild | ||
153 | file serves as an up-to-date and extensive example. | ||
154 | |||
155 | It can be viewed using Tigris.org's WebSVN | ||
156 | (http://realmforge.tigris.org/source/browse/realmforge/trunk/src/prebuild.xml) | ||
157 | by just clicking on the "view file" link for the latest revision. | ||
158 | |||
159 | _________________________________ | ||
160 | |||
161 | <?xml version="1.0" encoding="utf-8"?> | ||
162 | <!--The version of the XML schema specified in the version and xmlns attributes should match the one for which the version of Prebuild.exe used was compiled for. In this example it is the version 1.3 schema, you can find the XSD schema file at the url specified in the xmlns attribute. --> | ||
163 | <Prebuild version="1.6" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.6.xsd"> | ||
164 | <Solution name="RealmForge"> <!--The title and file name for the solution, combine, workspace, or project group (depending on what development tool you are using)--> | ||
165 | <!--Configurations found as children of Solution are used as templates for the configurations found in the project, this allows you to avoid writing the same options in each project (and maintaining each of these). You can provide defaults and then override them in the configurations defined for each project. All options are optional.--> | ||
166 | <Configuration name="Debug"> | ||
167 | <Options> | ||
168 | <!-- simple logically expressions can be evaluated, if, else, elseif, and endif are valid statements. Note that it is not neccisary to define POSIX or WIN32 --> | ||
169 | <?if OS = "Win32" ?> | ||
170 | <CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines> | ||
171 | <?else ?> | ||
172 | <CompilerDefines>DEBUG;TRACE;POSIX</CompilerDefines> | ||
173 | <?endif ?> | ||
174 | <OptimizeCode>false</OptimizeCode> | ||
175 | <CheckUnderflowOverflow>false</CheckUnderflowOverflow> | ||
176 | <AllowUnsafe>false</AllowUnsafe> | ||
177 | <WarningLevel>4</WarningLevel> | ||
178 | <!-The filter for the number of warnings or errors shown and the tolerance level as to what is an error. This is value from 0 to 4 where 4 is the most strict (least tolerent).--> | ||
179 | |||
180 | <WarningsAsErrors>false</WarningsAsErrors> | ||
181 | <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> | ||
182 | <!-- A semicolon ';' delimited list of the warnings that are filtered and not shown in the output window during compiling a project. Only include the number portion of the warning codes that are shown in output during compilation (eg CS1591, should be entered as 1591)--> | ||
183 | |||
184 | <OutputPath>..\bin</OutputPath> | ||
185 | <DebugInformation>true</DebugInformation> | ||
186 | <RegisterComInterop>false</RegisterComInterop> | ||
187 | <IncrementalBuild>true</IncrementalBuild> | ||
188 | <BaseAddress>285212672</BaseAddress> | ||
189 | <FileAlignment>4096</FileAlignment> | ||
190 | <NoStdLib>false</NoStdLib> | ||
191 | <XmlDocFile>Docs.xml</XmlDocFile> | ||
192 | </Options> | ||
193 | </Configuration> | ||
194 | <Configuration name="Release"> <!-- You can define multple configurations that projects can have, but there is no way to define which one is selected by default as this is a part of the user preferences for a project, not the solution or project files --> | ||
195 | <Options> | ||
196 | <CompilerDefines>TRACE</CompilerDefines> | ||
197 | <OptimizeCode>true</OptimizeCode> | ||
198 | <CheckUnderflowOverflow>false</CheckUnderflowOverflow> | ||
199 | <AllowUnsafe>false</AllowUnsafe> | ||
200 | <WarningLevel>4</WarningLevel> | ||
201 | <WarningsAsErrors>false</WarningsAsErrors> | ||
202 | <SuppressWarnings>1591;219;1573;1572;168</SuppressWarnings> | ||
203 | <OutputPath>..\bin</OutputPath> | ||
204 | <DebugInformation>false</DebugInformation> | ||
205 | <RegisterComInterop>false</RegisterComInterop> | ||
206 | <IncrementalBuild>true</IncrementalBuild> | ||
207 | <BaseAddress>285212672</BaseAddress> | ||
208 | <FileAlignment>4096</FileAlignment> | ||
209 | <NoStdLib>false</NoStdLib> | ||
210 | <GenerateXmlDocFile>true</GenerateXmlDocFile> | ||
211 | <XmlDocFile>Docs.xml</XmlDocFile> | ||
212 | </Options> | ||
213 | </Configuration> | ||
214 | |||
215 | <!-- One of the projects that is included in the Solution --> | ||
216 | <Project name="RealmForge.Utility" Language="VisualBasic" path="Utility" type="Library" assemblyName="RealmForge.Utility" rootNamespace="RealmForge"> | ||
217 | <Configuration name="Debug"> | ||
218 | <Options> | ||
219 | <OutputPath>..\bin\lib\Utility</OutputPath> | ||
220 | <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> | ||
221 | </Options> | ||
222 | </Configuration> | ||
223 | <Configuration name="Release"> | ||
224 | <Options> | ||
225 | <OutputPath>..\bin\lib\Utility</OutputPath> | ||
226 | <XmlDocFile>RealmForge.Utility.xml</XmlDocFile> | ||
227 | </Options> | ||
228 | </Configuration> | ||
229 | <ReferencePath>../bin</ReferencePath> | ||
230 | <Reference name="System"/> | ||
231 | <Reference name="System.Data"/> | ||
232 | <Reference name="System.Drawing"/> | ||
233 | <Reference name="System.Xml"/> | ||
234 | <Reference name="System.Runtime.Serialization.Formatters.Soap"/> | ||
235 | <Reference name="ICSharpCode.SharpZipLib"/> | ||
236 | <Files> | ||
237 | <Match path="." pattern="*.vb" recurse="true"/> | ||
238 | </Files> | ||
239 | </Project> | ||
240 | |||
241 | <!-- Another projects that is included in the Solution --> | ||
242 | <Project name="DemoGame" Language="C#" path="DemoGame" type="WinExe" icon="..\bin\RealmForge.ico" assemblyName="DemoGame" rootNamespace="RealmForge"> | ||
243 | <!-- icon is used to define the location of the .ico file that is embeeded in the assembly when the project is compiled. This is relative to the project path --> | ||
244 | <!--type defines the type of project, valid types are Library (.dll), WinExe (.exe), and Exe (.exe). WinExe is not windows specific, it just defines that it is a GUI application and that no Console or Command window will show when it is started--> | ||
245 | |||
246 | <Configuration name="Debug"> | ||
247 | <Options> | ||
248 | <OutputPath>..\bin</OutputPath> | ||
249 | <XmlDocFile>DemoGame.xml</XmlDocFile> | ||
250 | </Options> | ||
251 | </Configuration> | ||
252 | <Configuration name="Release"> | ||
253 | <Options> | ||
254 | <OutputPath>..\bin</OutputPath> | ||
255 | <XmlDocFile>DemoGame.xml</XmlDocFile> | ||
256 | </Options> | ||
257 | </Configuration> | ||
258 | <ReferencePath>../bin</ReferencePath> | ||
259 | <Reference name="System"/> <!-- Assemblies that are located in the GAC (installed, global) can be referenced--> | ||
260 | <Reference name="ode"/> <!-- Assemblies that are located in the output directory to which the file is built can be referenced --> | ||
261 | <Reference name="RealmForge.Utility"/> <!-- When you reference the name of another project, then that project (and it's output) will be referenced instead of looking for a pre-built assembly--> | ||
262 | <Files> | ||
263 | <Match path="." pattern="*.cs" recurse="true"/> | ||
264 | <Match path="." pattern="*.bmp" recurse="true" buildAction="EmbeddedResource"/> | ||
265 | <Match path="." pattern="[^a]*\.(png|jpg)" useRegex="true" buildAction="EmbeddedResource"/> | ||
266 | |||
267 | <!-- Uses a regex or regular expression to find all files that end with .png or .jpg but dont have the letter 'a' in their name and add them to the project as EmbeddedResource's. Because recurse enabled (default is false), only the values in the files in that are directly in the project directory (not child directories) are checked.--> | ||
268 | <!--EmbeddedResource, Content, and Compile are valid buildAction's--> | ||
269 | </Files> | ||
270 | </Project> | ||
271 | |||
272 | </Solution> | ||
273 | </Prebuild> | ||
274 | |||
diff --git a/Prebuild/THANKS b/Prebuild/THANKS new file mode 100644 index 0000000..576467c --- /dev/null +++ b/Prebuild/THANKS | |||
@@ -0,0 +1,18 @@ | |||
1 | Gryc Ueusp <gryc.ueusp@gmail.com> | ||
2 | |||
3 | caught a problem with the NAnt target's .build output which caused | ||
4 | the Ubuntu build servers to choke on prebuild-generated packages | ||
5 | |||
6 | Todd Berman <tberman@sevenl.net> | ||
7 | Lluis Sanchez Gual <lluis@novell.com> | ||
8 | |||
9 | pkg-config .pc file parser used in AutotoolsTarget.cs was ripped off | ||
10 | from work contributed to MonoDevelop by Lluis and Todd. It came | ||
11 | from | ||
12 | |||
13 | src/core/MonoDevelop.Core/MonoDevelop.Core/SystemPackage.cs (Lluis) | ||
14 | |||
15 | and | ||
16 | |||
17 | src/core/MonoDevelop.Core/MonoDevelop.Core/SystemAssemblyService.cs | ||
18 | (Lluis && Todd) | ||
diff --git a/Prebuild/TODO b/Prebuild/TODO new file mode 100644 index 0000000..33b19a1 --- /dev/null +++ b/Prebuild/TODO | |||
@@ -0,0 +1,43 @@ | |||
1 | * monodev target should be able to detect whether the project is 1.x | ||
2 | or 2.x runtime | ||
3 | |||
4 | * remove target which links ../project/foo.dll to each project's build | ||
5 | root | ||
6 | |||
7 | * generate .config files | ||
8 | |||
9 | * Fix the autotools target so that | ||
10 | sub generate_project_files { ... } | ||
11 | sub generate_solution_files { ... } | ||
12 | sub generate_multi_solution_files { ... } | ||
13 | sub generate_project { | ||
14 | ... | ||
15 | generate_project_files(); | ||
16 | } | ||
17 | sub generate_solution { | ||
18 | foreach $project ( @projects ){ | ||
19 | mkdir "$project/"; | ||
20 | pushd "$project/"; | ||
21 | generate_project(); | ||
22 | popd; | ||
23 | } | ||
24 | generate_solution_files(); | ||
25 | } | ||
26 | sub generate_multi_solution { | ||
27 | foreach $solution ( @solutions ){ | ||
28 | mkdir "$solution/"; | ||
29 | pushd "$solution/"; | ||
30 | generate_solution(); | ||
31 | popd; | ||
32 | } | ||
33 | generate_multi_solution_files(); | ||
34 | } | ||
35 | |||
36 | if(numProjects == 1){ | ||
37 | generate_project(); | ||
38 | }elsif(numSolutions == 1){ | ||
39 | generate_solution(); | ||
40 | }else{ | ||
41 | generate_multi_solution(); | ||
42 | } | ||
43 | |||
diff --git a/Prebuild/prebuild b/Prebuild/prebuild new file mode 100755 index 0000000..0dc648d --- /dev/null +++ b/Prebuild/prebuild | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | exec mono [PREFIX]/prebuild.exe "$@" | ||
diff --git a/Prebuild/prebuild.xml b/Prebuild/prebuild.xml index 1f81086..d14b94f 100644 --- a/Prebuild/prebuild.xml +++ b/Prebuild/prebuild.xml | |||
@@ -1,73 +1,73 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | 1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7"> | 2 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.9.xsd" version="1.9"> |
3 | <Solution name="Prebuild" version="2.0.4"> | 3 | <Solution name="Prebuild" version="2.0.4"> |
4 | <Configuration name="Debug"> | 4 | <Configuration name="Debug"> |
5 | <Options> | 5 | <Options> |
6 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | 6 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> |
7 | <OptimizeCode>false</OptimizeCode> | 7 | <OptimizeCode>false</OptimizeCode> |
8 | <OutputPath>bin/Debug</OutputPath> | 8 | <OutputPath>bin/Debug</OutputPath> |
9 | <DebugInformation>true</DebugInformation> | 9 | <DebugInformation>true</DebugInformation> |
10 | <SuppressWarnings>1595</SuppressWarnings> | 10 | <SuppressWarnings>1595</SuppressWarnings> |
11 | </Options> | 11 | </Options> |
12 | </Configuration> | 12 | </Configuration> |
13 | <Configuration name="Release"> | 13 | <Configuration name="Release"> |
14 | <Options> | 14 | <Options> |
15 | <CompilerDefines>TRACE</CompilerDefines> | 15 | <CompilerDefines>TRACE</CompilerDefines> |
16 | <OutputPath>bin/Release</OutputPath> | 16 | <OutputPath>bin/Release</OutputPath> |
17 | <OptimizeCode>true</OptimizeCode> | 17 | <OptimizeCode>true</OptimizeCode> |
18 | <DebugInformation>false</DebugInformation> | 18 | <DebugInformation>false</DebugInformation> |
19 | <SuppressWarnings>1595</SuppressWarnings> | 19 | <SuppressWarnings>1595</SuppressWarnings> |
20 | </Options> | 20 | </Options> |
21 | </Configuration> | 21 | </Configuration> |
22 | <Files> | 22 | <Files> |
23 | <File>prebuild.xml</File> | 23 | <File>prebuild.xml</File> |
24 | <File>prebuild</File> | 24 | <File>prebuild</File> |
25 | </Files> | 25 | </Files> |
26 | <Project name="Prebuild" | 26 | <Project name="Prebuild" |
27 | path="src" | 27 | path="src" |
28 | language="C#" | 28 | language="C#" |
29 | assemblyName="prebuild" | 29 | assemblyName="prebuild" |
30 | icon="App.ico" | 30 | icon="App.ico" |
31 | type="Exe" | 31 | type="Exe" |
32 | rootNamespace="Prebuild" | 32 | rootNamespace="Prebuild" |
33 | startupObject="Prebuild.Prebuild" | 33 | startupObject="Prebuild.Prebuild" |
34 | version="2.0.3" | 34 | version="2.0.3" |
35 | > | 35 | > |
36 | <Author>Matthew Holmes (matthew@wildfiregames.com)</Author> | 36 | <Author>Matthew Holmes (matthew@wildfiregames.com)</Author> |
37 | <Author>Dan Moorehead (dan05a@gmail.com)</Author> | 37 | <Author>Dan Moorehead (dan05a@gmail.com)</Author> |
38 | <Author>Dave Hudson (jendave@yahoo.com)</Author> | 38 | <Author>Dave Hudson (jendave@yahoo.com)</Author> |
39 | <Author>Rob Loach (http://robloach.net)</Author> | 39 | <Author>Rob Loach (http://robloach.net)</Author> |
40 | <Author>C.J. Adams-Collier (cjac@colliertech.org)</Author> | 40 | <Author>C.J. Adams-Collier (cjac@colliertech.org)</Author> |
41 | <Description>The Prebuild project generator</Description> | 41 | <Description>The Prebuild project generator</Description> |
42 | <Configuration name="Debug"> | 42 | <Configuration name="Debug"> |
43 | <Options> | 43 | <Options> |
44 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | 44 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> |
45 | <OptimizeCode>false</OptimizeCode> | 45 | <OptimizeCode>false</OptimizeCode> |
46 | <OutputPath>bin/Debug</OutputPath> | 46 | <OutputPath>bin/Debug</OutputPath> |
47 | <DebugInformation>true</DebugInformation> | 47 | <DebugInformation>true</DebugInformation> |
48 | <KeyFile>Prebuild.snk</KeyFile> | 48 | <KeyFile>Prebuild.snk</KeyFile> |
49 | <SuppressWarnings>1595</SuppressWarnings> | 49 | <SuppressWarnings>1595</SuppressWarnings> |
50 | </Options> | 50 | </Options> |
51 | </Configuration> | 51 | </Configuration> |
52 | <Configuration name="Release"> | 52 | <Configuration name="Release"> |
53 | <Options> | 53 | <Options> |
54 | <CompilerDefines>TRACE</CompilerDefines> | 54 | <CompilerDefines>TRACE</CompilerDefines> |
55 | <OutputPath>bin/Release</OutputPath> | 55 | <OutputPath>bin/Release</OutputPath> |
56 | <OptimizeCode>true</OptimizeCode> | 56 | <OptimizeCode>true</OptimizeCode> |
57 | <DebugInformation>false</DebugInformation> | 57 | <DebugInformation>false</DebugInformation> |
58 | <KeyFile>Prebuild.snk</KeyFile> | 58 | <KeyFile>Prebuild.snk</KeyFile> |
59 | <SuppressWarnings>1595</SuppressWarnings> | 59 | <SuppressWarnings>1595</SuppressWarnings> |
60 | </Options> | 60 | </Options> |
61 | </Configuration> | 61 | </Configuration> |
62 | <Reference name="System.EnterpriseServices" /> | 62 | <Reference name="System.EnterpriseServices" /> |
63 | <Reference name="System.Xml" /> | 63 | <Reference name="System.Xml" /> |
64 | <Reference name="System" /> | 64 | <Reference name="System" /> |
65 | <Files> | 65 | <Files> |
66 | <Match pattern="App.ico" buildAction="EmbeddedResource"/> | 66 | <Match pattern="App.ico" buildAction="EmbeddedResource"/> |
67 | <Match path="data" pattern="prebuild-1.7.xsd" buildAction="EmbeddedResource"/> | 67 | <Match path="data" pattern="prebuild-1.9.xsd" buildAction="EmbeddedResource"/> |
68 | <Match path="data" pattern="autotools.xml" buildAction="EmbeddedResource"/> | 68 | <Match path="data" pattern="autotools.xml" buildAction="EmbeddedResource"/> |
69 | <Match pattern="*.cs" recurse="true"/> | 69 | <Match pattern="*.cs" recurse="true"/> |
70 | </Files> | 70 | </Files> |
71 | </Project> | 71 | </Project> |
72 | </Solution> | 72 | </Solution> |
73 | </Prebuild> | 73 | </Prebuild> |
diff --git a/Prebuild/scripts/VS2010.bat b/Prebuild/scripts/VS2010.bat new file mode 100644 index 0000000..1b98818 --- /dev/null +++ b/Prebuild/scripts/VS2010.bat | |||
@@ -0,0 +1,4 @@ | |||
1 | @rem Generates a solution (.sln) and a set of project files (.csproj, .vbproj, etc.) | ||
2 | @rem for Microsoft Visual Studio .NET 2010 | ||
3 | cd .. | ||
4 | Prebuild.exe /target vs2010 /file prebuild.xml /pause | ||
diff --git a/Prebuild/src/Core/Kernel.cs b/Prebuild/src/Core/Kernel.cs index 95ef04e..67051d5 100644 --- a/Prebuild/src/Core/Kernel.cs +++ b/Prebuild/src/Core/Kernel.cs | |||
@@ -36,21 +36,17 @@ POSSIBILITY OF SUCH DAMAGE. | |||
36 | */ | 36 | */ |
37 | #endregion | 37 | #endregion |
38 | 38 | ||
39 | #define NO_VALIDATE | ||
40 | |||
39 | using System; | 41 | using System; |
40 | using System.Collections.Generic; | 42 | using System.Collections.Generic; |
41 | using System.Diagnostics; | ||
42 | using System.Collections; | ||
43 | using System.Collections.Specialized; | ||
44 | using System.IO; | 43 | using System.IO; |
45 | using System.Reflection; | 44 | using System.Reflection; |
46 | using System.Xml; | 45 | using System.Xml; |
47 | using System.Xml.Schema; | 46 | using System.Xml.Schema; |
48 | using System.Text; | ||
49 | |||
50 | using Prebuild.Core.Attributes; | 47 | using Prebuild.Core.Attributes; |
51 | using Prebuild.Core.Interfaces; | 48 | using Prebuild.Core.Interfaces; |
52 | using Prebuild.Core.Nodes; | 49 | using Prebuild.Core.Nodes; |
53 | using Prebuild.Core.Parse; | ||
54 | using Prebuild.Core.Utilities; | 50 | using Prebuild.Core.Utilities; |
55 | 51 | ||
56 | namespace Prebuild.Core | 52 | namespace Prebuild.Core |
@@ -77,7 +73,7 @@ namespace Prebuild.Core | |||
77 | /// <summary> | 73 | /// <summary> |
78 | /// This must match the version of the schema that is embeeded | 74 | /// This must match the version of the schema that is embeeded |
79 | /// </summary> | 75 | /// </summary> |
80 | private const string m_SchemaVersion = "1.7"; | 76 | private const string m_SchemaVersion = "1.9"; |
81 | private const string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd"; | 77 | private const string m_Schema = "prebuild-" + m_SchemaVersion + ".xsd"; |
82 | private const string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema; | 78 | private const string m_SchemaURI = "http://dnpb.sourceforge.net/schemas/" + m_Schema; |
83 | bool disposed; | 79 | bool disposed; |
@@ -87,9 +83,9 @@ namespace Prebuild.Core | |||
87 | private Log m_Log; | 83 | private Log m_Log; |
88 | private CurrentDirectory m_CurrentWorkingDirectory; | 84 | private CurrentDirectory m_CurrentWorkingDirectory; |
89 | private XmlSchemaCollection m_Schemas; | 85 | private XmlSchemaCollection m_Schemas; |
90 | 86 | ||
91 | private Hashtable m_Targets; | 87 | private readonly Dictionary<string, ITarget> m_Targets = new Dictionary<string, ITarget>(); |
92 | private Hashtable m_Nodes; | 88 | private readonly Dictionary<string, NodeEntry> m_Nodes = new Dictionary<string, NodeEntry>(); |
93 | 89 | ||
94 | readonly List<SolutionNode> m_Solutions = new List<SolutionNode>(); | 90 | readonly List<SolutionNode> m_Solutions = new List<SolutionNode>(); |
95 | string m_Target; | 91 | string m_Target; |
@@ -163,7 +159,7 @@ namespace Prebuild.Core | |||
163 | /// Gets the targets. | 159 | /// Gets the targets. |
164 | /// </summary> | 160 | /// </summary> |
165 | /// <value>The targets.</value> | 161 | /// <value>The targets.</value> |
166 | public Hashtable Targets | 162 | public Dictionary<string, ITarget> Targets |
167 | { | 163 | { |
168 | get | 164 | get |
169 | { | 165 | { |
@@ -259,7 +255,7 @@ namespace Prebuild.Core | |||
259 | 255 | ||
260 | private void LoadSchema() | 256 | private void LoadSchema() |
261 | { | 257 | { |
262 | Assembly assembly = this.GetType().Assembly; | 258 | Assembly assembly = GetType().Assembly; |
263 | Stream stream = assembly.GetManifestResourceStream("Prebuild.data." + m_Schema); | 259 | Stream stream = assembly.GetManifestResourceStream("Prebuild.data." + m_Schema); |
264 | if(stream == null) | 260 | if(stream == null) |
265 | { | 261 | { |
@@ -319,23 +315,24 @@ namespace Prebuild.Core | |||
319 | 315 | ||
320 | private void LogBanner() | 316 | private void LogBanner() |
321 | { | 317 | { |
322 | m_Log.Write("Prebuild v" + this.Version); | 318 | m_Log.Write("Prebuild v" + Version); |
323 | m_Log.Write("Copyright (c) 2004-2008"); | 319 | m_Log.Write("Copyright (c) 2004-2010"); |
324 | m_Log.Write("Matthew Holmes (matthew@wildfiregames.com),"); | 320 | m_Log.Write("Matthew Holmes (matthew@wildfiregames.com),"); |
325 | m_Log.Write("Dan Moorehead (dan05a@gmail.com),"); | 321 | m_Log.Write("Dan Moorehead (dan05a@gmail.com),"); |
326 | m_Log.Write("David Hudson (jendave@yahoo.com),"); | 322 | m_Log.Write("David Hudson (jendave@yahoo.com),"); |
327 | m_Log.Write("Rob Loach (http://www.robloach.net),"); | 323 | m_Log.Write("Rob Loach (http://www.robloach.net),"); |
328 | m_Log.Write("C.J. Adams-Collier (cjac@colliertech.org),"); | 324 | m_Log.Write("C.J. Adams-Collier (cjac@colliertech.org),"); |
329 | 325 | m_Log.Write("John Hurliman (john.hurliman@intel.com),"); | |
330 | m_Log.Write("See 'prebuild /usage' for help"); | 326 | |
331 | m_Log.Write(); | 327 | m_Log.Write("See 'prebuild /usage' for help"); |
328 | m_Log.Write(); | ||
332 | } | 329 | } |
333 | 330 | ||
334 | 331 | ||
335 | 332 | ||
336 | private void ProcessFile(string file) | 333 | private void ProcessFile(string file) |
337 | { | 334 | { |
338 | ProcessFile(file, this.m_Solutions); | 335 | ProcessFile(file, m_Solutions); |
339 | } | 336 | } |
340 | 337 | ||
341 | public void ProcessFile(ProcessNode node, SolutionNode parent) | 338 | public void ProcessFile(ProcessNode node, SolutionNode parent) |
@@ -381,12 +378,12 @@ namespace Prebuild.Core | |||
381 | Core.Parse.Preprocessor pre = new Core.Parse.Preprocessor(); | 378 | Core.Parse.Preprocessor pre = new Core.Parse.Preprocessor(); |
382 | 379 | ||
383 | //register command line arguments as XML variables | 380 | //register command line arguments as XML variables |
384 | IDictionaryEnumerator dict = m_CommandLine.GetEnumerator(); | 381 | IEnumerator<KeyValuePair<string, string>> dict = m_CommandLine.GetEnumerator(); |
385 | while (dict.MoveNext()) | 382 | while (dict.MoveNext()) |
386 | { | 383 | { |
387 | string name = dict.Key.ToString().Trim(); | 384 | string name = dict.Current.Key.Trim(); |
388 | if (name.Length > 0) | 385 | if (name.Length > 0) |
389 | pre.RegisterVariable(name, dict.Value.ToString()); | 386 | pre.RegisterVariable(name, dict.Current.Value); |
390 | } | 387 | } |
391 | 388 | ||
392 | string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML | 389 | string xml = pre.Process(reader);//remove script and evaulate pre-proccessing to get schema-conforming XML |
@@ -422,6 +419,10 @@ namespace Prebuild.Core | |||
422 | m_CurrentDoc = new XmlDocument(); | 419 | m_CurrentDoc = new XmlDocument(); |
423 | try | 420 | try |
424 | { | 421 | { |
422 | #if NO_VALIDATE | ||
423 | XmlReader validator = XmlReader.Create(new StringReader(xml)); | ||
424 | m_CurrentDoc.Load(validator); | ||
425 | #else | ||
425 | XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml))); | 426 | XmlValidatingReader validator = new XmlValidatingReader(new XmlTextReader(new StringReader(xml))); |
426 | 427 | ||
427 | //validate while reading from string into XmlDocument DOM structure in memory | 428 | //validate while reading from string into XmlDocument DOM structure in memory |
@@ -430,6 +431,7 @@ namespace Prebuild.Core | |||
430 | validator.Schemas.Add(schema); | 431 | validator.Schemas.Add(schema); |
431 | } | 432 | } |
432 | m_CurrentDoc.Load(validator); | 433 | m_CurrentDoc.Load(validator); |
434 | #endif | ||
433 | } | 435 | } |
434 | catch(XmlException e) | 436 | catch(XmlException e) |
435 | { | 437 | { |
@@ -541,7 +543,7 @@ namespace Prebuild.Core | |||
541 | return null; | 543 | return null; |
542 | } | 544 | } |
543 | 545 | ||
544 | NodeEntry ne = (NodeEntry)m_Nodes[node.Name]; | 546 | NodeEntry ne = m_Nodes[node.Name]; |
545 | return ne.Type; | 547 | return ne.Type; |
546 | } | 548 | } |
547 | 549 | ||
@@ -578,11 +580,11 @@ namespace Prebuild.Core | |||
578 | { | 580 | { |
579 | if(!m_Nodes.ContainsKey(node.Name)) | 581 | if(!m_Nodes.ContainsKey(node.Name)) |
580 | { | 582 | { |
581 | //throw new XmlException("Unknown XML node: " + node.Name); | 583 | Console.WriteLine("WARNING: Unknown XML node: " + node.Name); |
582 | return null; | 584 | return null; |
583 | } | 585 | } |
584 | 586 | ||
585 | NodeEntry ne = (NodeEntry)m_Nodes[node.Name]; | 587 | NodeEntry ne = m_Nodes[node.Name]; |
586 | Type type = ne.Type; | 588 | Type type = ne.Type; |
587 | //DataNodeAttribute dna = ne.Attribute; | 589 | //DataNodeAttribute dna = ne.Attribute; |
588 | 590 | ||
@@ -624,10 +626,8 @@ namespace Prebuild.Core | |||
624 | /// <param name="args">The args.</param> | 626 | /// <param name="args">The args.</param> |
625 | public void Initialize(LogTargets target, string[] args) | 627 | public void Initialize(LogTargets target, string[] args) |
626 | { | 628 | { |
627 | m_Targets = new Hashtable(); | 629 | CacheTargets(GetType().Assembly); |
628 | CacheTargets(this.GetType().Assembly); | 630 | CacheNodeTypes(GetType().Assembly); |
629 | m_Nodes = new Hashtable(); | ||
630 | CacheNodeTypes(this.GetType().Assembly); | ||
631 | CacheVersion(); | 631 | CacheVersion(); |
632 | 632 | ||
633 | m_CommandLine = new CommandLineCollection(args); | 633 | m_CommandLine = new CommandLineCollection(args); |
@@ -750,11 +750,11 @@ namespace Prebuild.Core | |||
750 | } | 750 | } |
751 | else | 751 | else |
752 | { | 752 | { |
753 | if (!m_Targets.Contains(target)) { | 753 | if (!m_Targets.ContainsKey(target)) { |
754 | m_Log.Write(LogType.Error, "Unknown Target \"{0}\"", target); | 754 | m_Log.Write(LogType.Error, "Unknown Target \"{0}\"", target); |
755 | return; | 755 | return; |
756 | } | 756 | } |
757 | ITarget targ = (ITarget)m_Targets[target]; | 757 | ITarget targ = m_Targets[target]; |
758 | 758 | ||
759 | if(clean) | 759 | if(clean) |
760 | { | 760 | { |
@@ -793,18 +793,19 @@ namespace Prebuild.Core | |||
793 | /// </remarks> | 793 | /// </remarks> |
794 | protected virtual void Dispose(bool disposing) | 794 | protected virtual void Dispose(bool disposing) |
795 | { | 795 | { |
796 | if (!this.disposed) | 796 | if (!disposed) |
797 | { | 797 | { |
798 | if (disposing) | 798 | if (disposing) |
799 | { | 799 | { |
800 | if (this.m_Log != null) | 800 | GC.SuppressFinalize(this); |
801 | if (m_Log != null) | ||
801 | { | 802 | { |
802 | this.m_Log.Close(); | 803 | m_Log.Close(); |
803 | this.m_Log = null; | 804 | m_Log = null; |
804 | } | 805 | } |
805 | } | 806 | } |
806 | } | 807 | } |
807 | this.disposed = true; | 808 | disposed = true; |
808 | } | 809 | } |
809 | 810 | ||
810 | /// <summary> | 811 | /// <summary> |
@@ -812,7 +813,7 @@ namespace Prebuild.Core | |||
812 | /// </summary> | 813 | /// </summary> |
813 | ~Kernel() | 814 | ~Kernel() |
814 | { | 815 | { |
815 | this.Dispose(false); | 816 | Dispose(false); |
816 | } | 817 | } |
817 | 818 | ||
818 | /// <summary> | 819 | /// <summary> |
diff --git a/Prebuild/src/Core/Nodes/AuthorNode.cs b/Prebuild/src/Core/Nodes/AuthorNode.cs index 20e72c0..4c415bb 100644 --- a/Prebuild/src/Core/Nodes/AuthorNode.cs +++ b/Prebuild/src/Core/Nodes/AuthorNode.cs | |||
@@ -24,8 +24,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Xml; | 27 | using System.Xml; |
30 | 28 | ||
31 | using Prebuild.Core.Attributes; | 29 | using Prebuild.Core.Attributes; |
diff --git a/Prebuild/src/Core/Nodes/CleanFilesNode.cs b/Prebuild/src/Core/Nodes/CleanFilesNode.cs new file mode 100644 index 0000000..71405f9 --- /dev/null +++ b/Prebuild/src/Core/Nodes/CleanFilesNode.cs | |||
@@ -0,0 +1,80 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections.Generic; | ||
28 | using System.Xml; | ||
29 | |||
30 | using Prebuild.Core.Attributes; | ||
31 | using Prebuild.Core.Interfaces; | ||
32 | using Prebuild.Core.Utilities; | ||
33 | |||
34 | namespace Prebuild.Core.Nodes | ||
35 | { | ||
36 | [DataNode("CleanFiles")] | ||
37 | public class CleanFilesNode : DataNode | ||
38 | { | ||
39 | #region Fields | ||
40 | |||
41 | private string m_Pattern; | ||
42 | |||
43 | #endregion | ||
44 | |||
45 | #region Properties | ||
46 | |||
47 | /// <summary> | ||
48 | /// Gets the signature. | ||
49 | /// </summary> | ||
50 | /// <value>The signature.</value> | ||
51 | public string Pattern | ||
52 | { | ||
53 | get | ||
54 | { | ||
55 | return m_Pattern; | ||
56 | } | ||
57 | } | ||
58 | |||
59 | #endregion | ||
60 | |||
61 | #region Public Methods | ||
62 | |||
63 | /// <summary> | ||
64 | /// Parses the specified node. | ||
65 | /// </summary> | ||
66 | /// <param name="node">The node.</param> | ||
67 | public override void Parse(XmlNode node) | ||
68 | { | ||
69 | if (node == null) | ||
70 | { | ||
71 | throw new ArgumentNullException("node"); | ||
72 | } | ||
73 | |||
74 | m_Pattern = Helper.AttributeValue(node, "pattern", String.Empty); ; | ||
75 | m_Pattern = m_Pattern.Trim(); | ||
76 | } | ||
77 | |||
78 | #endregion | ||
79 | } | ||
80 | } \ No newline at end of file | ||
diff --git a/Prebuild/src/Core/Nodes/CleanupNode.cs b/Prebuild/src/Core/Nodes/CleanupNode.cs new file mode 100644 index 0000000..b8131b0 --- /dev/null +++ b/Prebuild/src/Core/Nodes/CleanupNode.cs | |||
@@ -0,0 +1,85 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2007 C.J. Adams-Collier (cjac@colliertech.org) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System; | ||
27 | using System.Collections.Generic; | ||
28 | using System.Xml; | ||
29 | |||
30 | using Prebuild.Core.Attributes; | ||
31 | using Prebuild.Core.Interfaces; | ||
32 | |||
33 | namespace Prebuild.Core.Nodes | ||
34 | { | ||
35 | [DataNode("Cleanup")] | ||
36 | public class CleanupNode : DataNode | ||
37 | { | ||
38 | #region Fields | ||
39 | |||
40 | private List<CleanFilesNode> m_CleanFiles = new List<CleanFilesNode>(); | ||
41 | |||
42 | #endregion | ||
43 | |||
44 | #region Properties | ||
45 | |||
46 | /// <summary> | ||
47 | /// Gets the signature. | ||
48 | /// </summary> | ||
49 | /// <value>The signature.</value> | ||
50 | public List<CleanFilesNode> CleanFiles | ||
51 | { | ||
52 | get | ||
53 | { | ||
54 | return m_CleanFiles; | ||
55 | } | ||
56 | } | ||
57 | |||
58 | #endregion | ||
59 | |||
60 | #region Public Methods | ||
61 | |||
62 | /// <summary> | ||
63 | /// Parses the specified node. | ||
64 | /// </summary> | ||
65 | /// <param name="node">The node.</param> | ||
66 | public override void Parse(XmlNode node) | ||
67 | { | ||
68 | if( node == null ) | ||
69 | { | ||
70 | throw new ArgumentNullException("node"); | ||
71 | } | ||
72 | |||
73 | foreach (XmlNode child in node.ChildNodes) | ||
74 | { | ||
75 | IDataNode dataNode = Kernel.Instance.ParseNode(child, this); | ||
76 | if (dataNode is CleanFilesNode) | ||
77 | { | ||
78 | m_CleanFiles.Add((CleanFilesNode)dataNode); | ||
79 | } | ||
80 | } | ||
81 | } | ||
82 | |||
83 | #endregion | ||
84 | } | ||
85 | } \ No newline at end of file | ||
diff --git a/Prebuild/src/Core/Nodes/ConfigurationNode.cs b/Prebuild/src/Core/Nodes/ConfigurationNode.cs index 67d78d5..cd2f740 100644 --- a/Prebuild/src/Core/Nodes/ConfigurationNode.cs +++ b/Prebuild/src/Core/Nodes/ConfigurationNode.cs | |||
@@ -41,6 +41,7 @@ namespace Prebuild.Core.Nodes | |||
41 | #region Fields | 41 | #region Fields |
42 | 42 | ||
43 | private string m_Name = "unknown"; | 43 | private string m_Name = "unknown"; |
44 | private string m_Platform = "AnyCPU"; | ||
44 | private OptionsNode m_Options; | 45 | private OptionsNode m_Options; |
45 | 46 | ||
46 | #endregion | 47 | #endregion |
@@ -84,6 +85,33 @@ namespace Prebuild.Core.Nodes | |||
84 | } | 85 | } |
85 | 86 | ||
86 | /// <summary> | 87 | /// <summary> |
88 | /// Identifies the platform for this specific configuration. | ||
89 | /// </summary> | ||
90 | public string Platform | ||
91 | { | ||
92 | get | ||
93 | { | ||
94 | return m_Platform; | ||
95 | } | ||
96 | set | ||
97 | { | ||
98 | switch ((value + "").ToLower()) | ||
99 | { | ||
100 | case "x86": | ||
101 | case "x64": | ||
102 | m_Platform = value; | ||
103 | break; | ||
104 | case "itanium": | ||
105 | m_Platform = "Itanium"; | ||
106 | break; | ||
107 | default: | ||
108 | m_Platform = "AnyCPU"; | ||
109 | break; | ||
110 | } | ||
111 | } | ||
112 | } | ||
113 | |||
114 | /// <summary> | ||
87 | /// Gets the name. | 115 | /// Gets the name. |
88 | /// </summary> | 116 | /// </summary> |
89 | /// <value>The name.</value> | 117 | /// <value>The name.</value> |
@@ -96,6 +124,22 @@ namespace Prebuild.Core.Nodes | |||
96 | } | 124 | } |
97 | 125 | ||
98 | /// <summary> | 126 | /// <summary> |
127 | /// Gets the name and platform for the configuration. | ||
128 | /// </summary> | ||
129 | /// <value>The name and platform.</value> | ||
130 | public string NameAndPlatform | ||
131 | { | ||
132 | get | ||
133 | { | ||
134 | string platform = m_Platform; | ||
135 | if (platform == "AnyCPU") | ||
136 | platform = "Any CPU"; | ||
137 | |||
138 | return String.Format("{0}|{1}", m_Name, platform); | ||
139 | } | ||
140 | } | ||
141 | |||
142 | /// <summary> | ||
99 | /// Gets or sets the options. | 143 | /// Gets or sets the options. |
100 | /// </summary> | 144 | /// </summary> |
101 | /// <value>The options.</value> | 145 | /// <value>The options.</value> |
@@ -122,7 +166,9 @@ namespace Prebuild.Core.Nodes | |||
122 | public override void Parse(XmlNode node) | 166 | public override void Parse(XmlNode node) |
123 | { | 167 | { |
124 | m_Name = Helper.AttributeValue(node, "name", m_Name); | 168 | m_Name = Helper.AttributeValue(node, "name", m_Name); |
125 | if( node == null ) | 169 | Platform = Helper.AttributeValue(node, "platform", m_Platform); |
170 | |||
171 | if (node == null) | ||
126 | { | 172 | { |
127 | throw new ArgumentNullException("node"); | 173 | throw new ArgumentNullException("node"); |
128 | } | 174 | } |
@@ -159,6 +205,7 @@ namespace Prebuild.Core.Nodes | |||
159 | { | 205 | { |
160 | ConfigurationNode ret = new ConfigurationNode(); | 206 | ConfigurationNode ret = new ConfigurationNode(); |
161 | ret.m_Name = m_Name; | 207 | ret.m_Name = m_Name; |
208 | ret.m_Platform = m_Platform; | ||
162 | m_Options.CopyTo(ret.m_Options); | 209 | m_Options.CopyTo(ret.m_Options); |
163 | return ret; | 210 | return ret; |
164 | } | 211 | } |
diff --git a/Prebuild/src/Core/Nodes/ConfigurationNodeCollection.cs b/Prebuild/src/Core/Nodes/ConfigurationNodeCollection.cs new file mode 100644 index 0000000..1c38d9e --- /dev/null +++ b/Prebuild/src/Core/Nodes/ConfigurationNodeCollection.cs | |||
@@ -0,0 +1,71 @@ | |||
1 | #region BSD License | ||
2 | /* | ||
3 | Copyright (c) 2004-2005 Matthew Holmes (matthew@wildfiregames.com), Dan Moorehead (dan05a@gmail.com) | ||
4 | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
6 | provided that the following conditions are met: | ||
7 | |||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
9 | and the following disclaimer. | ||
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
11 | and the following disclaimer in the documentation and/or other materials provided with the | ||
12 | distribution. | ||
13 | * The name of the author may not be used to endorse or promote products derived from this software | ||
14 | without specific prior written permission. | ||
15 | |||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
23 | */ | ||
24 | #endregion | ||
25 | |||
26 | using System.Collections.Generic; | ||
27 | |||
28 | namespace Prebuild.Core.Nodes | ||
29 | { | ||
30 | /// <summary> | ||
31 | /// Implements a specialized list of configuration nodes which allows for lookup via | ||
32 | /// configuration name and platform. | ||
33 | /// </summary> | ||
34 | public class ConfigurationNodeCollection : List<ConfigurationNode> | ||
35 | { | ||
36 | #region Properties | ||
37 | |||
38 | public ConfigurationNode this[string nameAndPlatform] | ||
39 | { | ||
40 | get | ||
41 | { | ||
42 | foreach (ConfigurationNode configurationNode in this) | ||
43 | { | ||
44 | if (configurationNode.NameAndPlatform == nameAndPlatform) | ||
45 | { | ||
46 | return configurationNode; | ||
47 | } | ||
48 | } | ||
49 | |||
50 | return null; | ||
51 | } | ||
52 | |||
53 | set | ||
54 | { | ||
55 | // See if the node | ||
56 | ConfigurationNode configurationNode = this[nameAndPlatform]; | ||
57 | |||
58 | if (configurationNode != null) | ||
59 | { | ||
60 | this[IndexOf(configurationNode)] = value; | ||
61 | } | ||
62 | else | ||
63 | { | ||
64 | Add(value); | ||
65 | } | ||
66 | } | ||
67 | } | ||
68 | |||
69 | #endregion | ||
70 | } | ||
71 | } | ||
diff --git a/Prebuild/src/Core/Nodes/DataNode.cs b/Prebuild/src/Core/Nodes/DataNode.cs index 763e6c3..318b13c 100644 --- a/Prebuild/src/Core/Nodes/DataNode.cs +++ b/Prebuild/src/Core/Nodes/DataNode.cs | |||
@@ -104,7 +104,7 @@ namespace Prebuild.Core.Nodes | |||
104 | 104 | ||
105 | foreach (string type in WebTypes) | 105 | foreach (string type in WebTypes) |
106 | { | 106 | { |
107 | if (path.EndsWith(string.Format("{0}{1}", type, extension))) | 107 | if (path.EndsWith(type)) |
108 | { | 108 | { |
109 | return SubType.CodeBehind; | 109 | return SubType.CodeBehind; |
110 | } | 110 | } |
diff --git a/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs b/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs index 27c2051..278ecd8 100644 --- a/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs +++ b/Prebuild/src/Core/Nodes/DatabaseProjectNode.cs | |||
@@ -1,5 +1,4 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections; | ||
3 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
4 | using System.Text; | 3 | using System.Text; |
5 | using System.Xml; | 4 | using System.Xml; |
diff --git a/Prebuild/src/Core/Nodes/DescriptionNode.cs b/Prebuild/src/Core/Nodes/DescriptionNode.cs index 353a5ae..d1293a0 100644 --- a/Prebuild/src/Core/Nodes/DescriptionNode.cs +++ b/Prebuild/src/Core/Nodes/DescriptionNode.cs | |||
@@ -24,8 +24,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Xml; | 27 | using System.Xml; |
30 | 28 | ||
31 | using Prebuild.Core.Attributes; | 29 | using Prebuild.Core.Attributes; |
diff --git a/Prebuild/src/Core/Nodes/FileNode.cs b/Prebuild/src/Core/Nodes/FileNode.cs index 1520fcb..01cea1e 100644 --- a/Prebuild/src/Core/Nodes/FileNode.cs +++ b/Prebuild/src/Core/Nodes/FileNode.cs | |||
@@ -54,7 +54,15 @@ namespace Prebuild.Core.Nodes | |||
54 | /// <summary> | 54 | /// <summary> |
55 | /// | 55 | /// |
56 | /// </summary> | 56 | /// </summary> |
57 | EmbeddedResource | 57 | EmbeddedResource, |
58 | /// <summary> | ||
59 | /// | ||
60 | /// </summary> | ||
61 | ApplicationDefinition, | ||
62 | /// <summary> | ||
63 | /// | ||
64 | /// </summary> | ||
65 | Page | ||
58 | } | 66 | } |
59 | 67 | ||
60 | /// <summary> | 68 | /// <summary> |
@@ -264,6 +272,12 @@ namespace Prebuild.Core.Nodes | |||
264 | m_Valid = false; | 272 | m_Valid = false; |
265 | Kernel.Instance.Log.Write(LogType.Warning, "File does not exist: {0}", m_Path); | 273 | Kernel.Instance.Log.Write(LogType.Warning, "File does not exist: {0}", m_Path); |
266 | } | 274 | } |
275 | |||
276 | if (System.IO.Path.GetExtension(m_Path) == ".settings") | ||
277 | { | ||
278 | m_SubType = SubType.Settings; | ||
279 | m_BuildAction = BuildAction.None; | ||
280 | } | ||
267 | } | 281 | } |
268 | 282 | ||
269 | #endregion | 283 | #endregion |
diff --git a/Prebuild/src/Core/Nodes/FilesNode.cs b/Prebuild/src/Core/Nodes/FilesNode.cs index dc306c2..23a716c 100644 --- a/Prebuild/src/Core/Nodes/FilesNode.cs +++ b/Prebuild/src/Core/Nodes/FilesNode.cs | |||
@@ -24,8 +24,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | 27 | using System.Collections.Generic; |
28 | using System.Collections.Specialized; | ||
29 | using System.Xml; | 28 | using System.Xml; |
30 | 29 | ||
31 | using Prebuild.Core.Attributes; | 30 | using Prebuild.Core.Attributes; |
@@ -42,41 +41,19 @@ namespace Prebuild.Core.Nodes | |||
42 | { | 41 | { |
43 | #region Fields | 42 | #region Fields |
44 | 43 | ||
45 | private StringCollection m_Files; | 44 | private readonly List<string> m_Files = new List<string>(); |
46 | private Hashtable m_BuildActions; | 45 | private readonly Dictionary<string,BuildAction> m_BuildActions = new Dictionary<string, BuildAction>(); |
47 | private Hashtable m_SubTypes; | 46 | private readonly Dictionary<string, SubType> m_SubTypes = new Dictionary<string, SubType>(); |
48 | private Hashtable m_ResourceNames; | 47 | private readonly Dictionary<string, string> m_ResourceNames = new Dictionary<string, string>(); |
49 | private Hashtable m_CopyToOutputs; | 48 | private readonly Dictionary<string, CopyToOutput> m_CopyToOutputs = new Dictionary<string, CopyToOutput>(); |
50 | private Hashtable m_Links; | 49 | private readonly Dictionary<string, bool> m_Links = new Dictionary<string, bool>(); |
51 | private Hashtable m_LinkPaths; | 50 | private readonly Dictionary<string, string> m_LinkPaths = new Dictionary<string, string>(); |
52 | private Hashtable m_PreservePaths; | 51 | private readonly Dictionary<string, bool> m_PreservePaths = new Dictionary<string, bool>(); |
53 | |||
54 | #endregion | ||
55 | |||
56 | #region Constructors | ||
57 | |||
58 | /// <summary> | ||
59 | /// | ||
60 | /// </summary> | ||
61 | public FilesNode() | ||
62 | { | ||
63 | m_Files = new StringCollection(); | ||
64 | m_BuildActions = new Hashtable(); | ||
65 | m_SubTypes = new Hashtable(); | ||
66 | m_ResourceNames = new Hashtable(); | ||
67 | m_CopyToOutputs = new Hashtable(); | ||
68 | m_Links = new Hashtable(); | ||
69 | m_LinkPaths = new Hashtable(); | ||
70 | m_PreservePaths = new Hashtable(); | ||
71 | } | ||
72 | 52 | ||
73 | #endregion | 53 | #endregion |
74 | 54 | ||
75 | #region Properties | 55 | #region Properties |
76 | 56 | ||
77 | /// <summary> | ||
78 | /// | ||
79 | /// </summary> | ||
80 | public int Count | 57 | public int Count |
81 | { | 58 | { |
82 | get | 59 | get |
@@ -89,11 +66,6 @@ namespace Prebuild.Core.Nodes | |||
89 | 66 | ||
90 | #region Public Methods | 67 | #region Public Methods |
91 | 68 | ||
92 | /// <summary> | ||
93 | /// | ||
94 | /// </summary> | ||
95 | /// <param name="file"></param> | ||
96 | /// <returns></returns> | ||
97 | public BuildAction GetBuildAction(string file) | 69 | public BuildAction GetBuildAction(string file) |
98 | { | 70 | { |
99 | if(!m_BuildActions.ContainsKey(file)) | 71 | if(!m_BuildActions.ContainsKey(file)) |
@@ -101,41 +73,41 @@ namespace Prebuild.Core.Nodes | |||
101 | return BuildAction.Compile; | 73 | return BuildAction.Compile; |
102 | } | 74 | } |
103 | 75 | ||
104 | return (BuildAction)m_BuildActions[file]; | 76 | return m_BuildActions[file]; |
105 | } | 77 | } |
106 | 78 | ||
107 | public CopyToOutput GetCopyToOutput(string file) | 79 | public CopyToOutput GetCopyToOutput(string file) |
108 | { | 80 | { |
109 | if (!this.m_CopyToOutputs.ContainsKey(file)) | 81 | if (!m_CopyToOutputs.ContainsKey(file)) |
110 | { | 82 | { |
111 | return CopyToOutput.Never; | 83 | return CopyToOutput.Never; |
112 | } | 84 | } |
113 | return (CopyToOutput) this.m_CopyToOutputs[file]; | 85 | return m_CopyToOutputs[file]; |
114 | } | 86 | } |
115 | 87 | ||
116 | public bool GetIsLink(string file) | 88 | public bool GetIsLink(string file) |
117 | { | 89 | { |
118 | if (!this.m_Links.ContainsKey(file)) | 90 | if (!m_Links.ContainsKey(file)) |
119 | { | 91 | { |
120 | return false; | 92 | return false; |
121 | } | 93 | } |
122 | return (bool) this.m_Links[file]; | 94 | return m_Links[file]; |
123 | } | 95 | } |
124 | 96 | ||
97 | public bool Contains(string file) | ||
98 | { | ||
99 | return m_Files.Contains(file); | ||
100 | } | ||
101 | |||
125 | public string GetLinkPath( string file ) | 102 | public string GetLinkPath( string file ) |
126 | { | 103 | { |
127 | if ( !this.m_LinkPaths.ContainsKey( file ) ) | 104 | if ( !m_LinkPaths.ContainsKey( file ) ) |
128 | { | 105 | { |
129 | return string.Empty; | 106 | return string.Empty; |
130 | } | 107 | } |
131 | return (string)this.m_LinkPaths[ file ]; | 108 | return m_LinkPaths[ file ]; |
132 | } | 109 | } |
133 | 110 | ||
134 | /// <summary> | ||
135 | /// | ||
136 | /// </summary> | ||
137 | /// <param name="file"></param> | ||
138 | /// <returns></returns> | ||
139 | public SubType GetSubType(string file) | 111 | public SubType GetSubType(string file) |
140 | { | 112 | { |
141 | if(!m_SubTypes.ContainsKey(file)) | 113 | if(!m_SubTypes.ContainsKey(file)) |
@@ -143,29 +115,19 @@ namespace Prebuild.Core.Nodes | |||
143 | return SubType.Code; | 115 | return SubType.Code; |
144 | } | 116 | } |
145 | 117 | ||
146 | return (SubType)m_SubTypes[file]; | 118 | return m_SubTypes[file]; |
147 | } | 119 | } |
148 | 120 | ||
149 | /// <summary> | ||
150 | /// | ||
151 | /// </summary> | ||
152 | /// <param name="file"></param> | ||
153 | /// <returns></returns> | ||
154 | public string GetResourceName(string file) | 121 | public string GetResourceName(string file) |
155 | { | 122 | { |
156 | if(!m_ResourceNames.ContainsKey(file)) | 123 | if(!m_ResourceNames.ContainsKey(file)) |
157 | { | 124 | { |
158 | return ""; | 125 | return string.Empty; |
159 | } | 126 | } |
160 | 127 | ||
161 | return (string)m_ResourceNames[file]; | 128 | return m_ResourceNames[file]; |
162 | } | 129 | } |
163 | 130 | ||
164 | /// <summary> | ||
165 | /// | ||
166 | /// </summary> | ||
167 | /// <param name="file"></param> | ||
168 | /// <returns></returns> | ||
169 | public bool GetPreservePath( string file ) | 131 | public bool GetPreservePath( string file ) |
170 | { | 132 | { |
171 | if ( !m_PreservePaths.ContainsKey( file ) ) | 133 | if ( !m_PreservePaths.ContainsKey( file ) ) |
@@ -173,13 +135,9 @@ namespace Prebuild.Core.Nodes | |||
173 | return false; | 135 | return false; |
174 | } | 136 | } |
175 | 137 | ||
176 | return (bool)m_PreservePaths[ file ]; | 138 | return m_PreservePaths[ file ]; |
177 | } | 139 | } |
178 | 140 | ||
179 | /// <summary> | ||
180 | /// | ||
181 | /// </summary> | ||
182 | /// <param name="node"></param> | ||
183 | public override void Parse(XmlNode node) | 141 | public override void Parse(XmlNode node) |
184 | { | 142 | { |
185 | if( node == null ) | 143 | if( node == null ) |
@@ -200,10 +158,10 @@ namespace Prebuild.Core.Nodes | |||
200 | m_BuildActions[fileNode.Path] = fileNode.BuildAction; | 158 | m_BuildActions[fileNode.Path] = fileNode.BuildAction; |
201 | m_SubTypes[fileNode.Path] = fileNode.SubType; | 159 | m_SubTypes[fileNode.Path] = fileNode.SubType; |
202 | m_ResourceNames[fileNode.Path] = fileNode.ResourceName; | 160 | m_ResourceNames[fileNode.Path] = fileNode.ResourceName; |
203 | this.m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath; | 161 | m_PreservePaths[ fileNode.Path ] = fileNode.PreservePath; |
204 | this.m_Links[ fileNode.Path ] = fileNode.IsLink; | 162 | m_Links[ fileNode.Path ] = fileNode.IsLink; |
205 | this.m_LinkPaths[ fileNode.Path ] = fileNode.LinkPath; | 163 | m_LinkPaths[ fileNode.Path ] = fileNode.LinkPath; |
206 | this.m_CopyToOutputs[ fileNode.Path ] = fileNode.CopyToOutput; | 164 | m_CopyToOutputs[ fileNode.Path ] = fileNode.CopyToOutput; |
207 | 165 | ||
208 | } | 166 | } |
209 | } | 167 | } |
@@ -216,13 +174,16 @@ namespace Prebuild.Core.Nodes | |||
216 | if (!m_Files.Contains(file)) | 174 | if (!m_Files.Contains(file)) |
217 | { | 175 | { |
218 | m_Files.Add(file); | 176 | m_Files.Add(file); |
219 | m_BuildActions[ file ] = matchNode.BuildAction == null ? GetBuildActionByFileName(file) : matchNode.BuildAction; | 177 | if (matchNode.BuildAction == null) |
220 | m_SubTypes[file] = matchNode.SubType == null ? GetSubTypeByFileName(file) : matchNode.SubType.Value; | 178 | m_BuildActions[file] = GetBuildActionByFileName(file); |
179 | else | ||
180 | m_BuildActions[file] = matchNode.BuildAction.Value; | ||
181 | m_SubTypes[file] = matchNode.SubType == null ? GetSubTypeByFileName(file) : matchNode.SubType.Value; | ||
221 | m_ResourceNames[ file ] = matchNode.ResourceName; | 182 | m_ResourceNames[ file ] = matchNode.ResourceName; |
222 | this.m_PreservePaths[ file ] = matchNode.PreservePath; | 183 | m_PreservePaths[ file ] = matchNode.PreservePath; |
223 | this.m_Links[ file ] = matchNode.IsLink; | 184 | m_Links[ file ] = matchNode.IsLink; |
224 | this.m_LinkPaths[ file ] = matchNode.LinkPath; | 185 | m_LinkPaths[ file ] = matchNode.LinkPath; |
225 | this.m_CopyToOutputs[ file ] = matchNode.CopyToOutput; | 186 | m_CopyToOutputs[ file ] = matchNode.CopyToOutput; |
226 | 187 | ||
227 | } | 188 | } |
228 | } | 189 | } |
@@ -232,11 +193,7 @@ namespace Prebuild.Core.Nodes | |||
232 | 193 | ||
233 | // TODO: Check in to why StringCollection's enumerator doesn't implement | 194 | // TODO: Check in to why StringCollection's enumerator doesn't implement |
234 | // IEnumerator? | 195 | // IEnumerator? |
235 | /// <summary> | 196 | public IEnumerator<string> GetEnumerator() |
236 | /// | ||
237 | /// </summary> | ||
238 | /// <returns></returns> | ||
239 | public StringEnumerator GetEnumerator() | ||
240 | { | 197 | { |
241 | return m_Files.GetEnumerator(); | 198 | return m_Files.GetEnumerator(); |
242 | } | 199 | } |
diff --git a/Prebuild/src/Core/Nodes/MatchNode.cs b/Prebuild/src/Core/Nodes/MatchNode.cs index 656d7d0..9735265 100644 --- a/Prebuild/src/Core/Nodes/MatchNode.cs +++ b/Prebuild/src/Core/Nodes/MatchNode.cs | |||
@@ -25,7 +25,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections.Generic; | 27 | using System.Collections.Generic; |
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | 28 | using System.IO; |
30 | using System.Text.RegularExpressions; | 29 | using System.Text.RegularExpressions; |
31 | using System.Xml; | 30 | using System.Xml; |
@@ -33,7 +32,6 @@ using System.Xml; | |||
33 | using Prebuild.Core.Attributes; | 32 | using Prebuild.Core.Attributes; |
34 | using Prebuild.Core.Interfaces; | 33 | using Prebuild.Core.Interfaces; |
35 | using Prebuild.Core.Utilities; | 34 | using Prebuild.Core.Utilities; |
36 | using System.Collections; | ||
37 | 35 | ||
38 | namespace Prebuild.Core.Nodes | 36 | namespace Prebuild.Core.Nodes |
39 | { | 37 | { |
@@ -45,7 +43,7 @@ namespace Prebuild.Core.Nodes | |||
45 | { | 43 | { |
46 | #region Fields | 44 | #region Fields |
47 | 45 | ||
48 | private readonly StringCollection m_Files = new StringCollection(); | 46 | private readonly List<string> m_Files = new List<string>(); |
49 | private Regex m_Regex; | 47 | private Regex m_Regex; |
50 | private BuildAction? m_BuildAction; | 48 | private BuildAction? m_BuildAction; |
51 | private SubType? m_SubType; | 49 | private SubType? m_SubType; |
@@ -63,7 +61,7 @@ namespace Prebuild.Core.Nodes | |||
63 | /// <summary> | 61 | /// <summary> |
64 | /// | 62 | /// |
65 | /// </summary> | 63 | /// </summary> |
66 | public StringCollection Files | 64 | public IEnumerable<string> Files |
67 | { | 65 | { |
68 | get | 66 | get |
69 | { | 67 | { |
@@ -97,7 +95,7 @@ namespace Prebuild.Core.Nodes | |||
97 | { | 95 | { |
98 | get | 96 | get |
99 | { | 97 | { |
100 | return this.m_CopyToOutput; | 98 | return m_CopyToOutput; |
101 | } | 99 | } |
102 | } | 100 | } |
103 | 101 | ||
@@ -105,7 +103,7 @@ namespace Prebuild.Core.Nodes | |||
105 | { | 103 | { |
106 | get | 104 | get |
107 | { | 105 | { |
108 | return this.m_Link; | 106 | return m_Link; |
109 | } | 107 | } |
110 | } | 108 | } |
111 | 109 | ||
@@ -113,7 +111,7 @@ namespace Prebuild.Core.Nodes | |||
113 | { | 111 | { |
114 | get | 112 | get |
115 | { | 113 | { |
116 | return this.m_LinkPath; | 114 | return m_LinkPath; |
117 | } | 115 | } |
118 | } | 116 | } |
119 | /// <summary> | 117 | /// <summary> |
@@ -149,21 +147,35 @@ namespace Prebuild.Core.Nodes | |||
149 | private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, List<ExcludeNode> exclusions) | 147 | private void RecurseDirectories(string path, string pattern, bool recurse, bool useRegex, List<ExcludeNode> exclusions) |
150 | { | 148 | { |
151 | Match match; | 149 | Match match; |
152 | Boolean excludeFile; | 150 | try |
153 | try | ||
154 | { | 151 | { |
155 | string[] files; | 152 | string[] files; |
156 | 153 | ||
157 | if(!useRegex) | 154 | Boolean excludeFile; |
155 | if(!useRegex) | ||
158 | { | 156 | { |
159 | files = Directory.GetFiles(path, pattern); | 157 | try |
158 | { | ||
159 | files = Directory.GetFiles(path, pattern); | ||
160 | } | ||
161 | catch (IOException) | ||
162 | { | ||
163 | // swallow weird IOException error when running in a virtual box | ||
164 | // guest OS on a network share when the host OS is not Windows. | ||
165 | // This seems to happen on network shares | ||
166 | // when no files match, and may be related to this report: | ||
167 | // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=254546 | ||
168 | |||
169 | files = null; | ||
170 | } | ||
171 | |||
160 | if(files != null) | 172 | if(files != null) |
161 | { | 173 | { |
162 | string fileTemp; | 174 | foreach (string file in files) |
163 | foreach (string file in files) | ||
164 | { | 175 | { |
165 | excludeFile = false; | 176 | excludeFile = false; |
166 | if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\") | 177 | string fileTemp; |
178 | if (file.Substring(0,2) == "./" || file.Substring(0,2) == ".\\") | ||
167 | { | 179 | { |
168 | fileTemp = file.Substring(2); | 180 | fileTemp = file.Substring(2); |
169 | } | 181 | } |
@@ -187,47 +199,64 @@ namespace Prebuild.Core.Nodes | |||
187 | 199 | ||
188 | } | 200 | } |
189 | } | 201 | } |
190 | else | 202 | |
191 | { | 203 | // don't call return here, because we may need to recursively search directories below |
192 | return; | 204 | // this one, even if no matches were found in this directory. |
193 | } | ||
194 | } | 205 | } |
195 | else | 206 | else |
196 | { | 207 | { |
197 | files = Directory.GetFiles(path); | 208 | try |
198 | foreach(string file in files) | 209 | { |
199 | { | 210 | files = Directory.GetFiles(path); |
200 | excludeFile = false; | 211 | } |
201 | 212 | catch (IOException) | |
202 | match = m_Regex.Match(file); | 213 | { |
203 | if(match.Success) | 214 | // swallow weird IOException error when running in a virtual box |
204 | { | 215 | // guest OS on a network share. |
205 | // Check all excludions and set flag if there are any hits. | 216 | files = null; |
206 | foreach ( ExcludeNode exclude in exclusions ) | 217 | } |
207 | { | 218 | |
208 | Regex exRegEx = new Regex( exclude.Pattern ); | 219 | if (files != null) |
209 | match = exRegEx.Match( file ); | 220 | { |
210 | excludeFile |= !match.Success; | 221 | foreach (string file in files) |
211 | } | 222 | { |
223 | excludeFile = false; | ||
212 | 224 | ||
213 | if ( !excludeFile ) | 225 | match = m_Regex.Match(file); |
226 | if (match.Success) | ||
214 | { | 227 | { |
215 | m_Files.Add( file ); | 228 | // Check all excludions and set flag if there are any hits. |
229 | foreach (ExcludeNode exclude in exclusions) | ||
230 | { | ||
231 | Regex exRegEx = new Regex(exclude.Pattern); | ||
232 | match = exRegEx.Match(file); | ||
233 | excludeFile |= !match.Success; | ||
234 | } | ||
235 | |||
236 | if (!excludeFile) | ||
237 | { | ||
238 | m_Files.Add(file); | ||
239 | } | ||
216 | } | 240 | } |
217 | } | 241 | } |
218 | } | 242 | } |
219 | } | 243 | } |
220 | 244 | ||
221 | if(recurse) | 245 | if(recurse) |
222 | { | 246 | { |
223 | string[] dirs = Directory.GetDirectories(path); | 247 | string[] dirs = Directory.GetDirectories(path); |
224 | if(dirs != null && dirs.Length > 0) | 248 | if(dirs != null && dirs.Length > 0) |
225 | { | 249 | { |
226 | foreach(string str in dirs) | 250 | foreach (string str in dirs) |
227 | { | 251 | { |
228 | RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex, exclusions); | 252 | // hack to skip subversion folders. Not having this can cause |
229 | } | 253 | // a significant performance hit when running on a network drive. |
230 | } | 254 | if (str.EndsWith(".svn")) |
255 | continue; | ||
256 | |||
257 | RecurseDirectories(Helper.NormalizePath(str), pattern, recurse, useRegex, exclusions); | ||
258 | } | ||
259 | } | ||
231 | } | 260 | } |
232 | } | 261 | } |
233 | catch(DirectoryNotFoundException) | 262 | catch(DirectoryNotFoundException) |
@@ -266,14 +295,14 @@ namespace Prebuild.Core.Nodes | |||
266 | //string subType = Helper.AttributeValue(node, "subType", string.Empty); | 295 | //string subType = Helper.AttributeValue(node, "subType", string.Empty); |
267 | //if (subType != String.Empty) | 296 | //if (subType != String.Empty) |
268 | // m_SubType = (SubType)Enum.Parse(typeof(SubType), subType); | 297 | // m_SubType = (SubType)Enum.Parse(typeof(SubType), subType); |
269 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName.ToString()); | 298 | m_ResourceName = Helper.AttributeValue(node, "resourceName", m_ResourceName); |
270 | this.m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", this.m_CopyToOutput.ToString())); | 299 | m_CopyToOutput = (CopyToOutput) Enum.Parse(typeof(CopyToOutput), Helper.AttributeValue(node, "copyToOutput", m_CopyToOutput.ToString())); |
271 | this.m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); | 300 | m_Link = bool.Parse(Helper.AttributeValue(node, "link", bool.FalseString)); |
272 | if ( this.m_Link == true ) | 301 | if ( m_Link ) |
273 | { | 302 | { |
274 | this.m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty ); | 303 | m_LinkPath = Helper.AttributeValue( node, "linkPath", string.Empty ); |
275 | } | 304 | } |
276 | this.m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); | 305 | m_PreservePath = bool.Parse( Helper.AttributeValue( node, "preservePath", bool.FalseString ) ); |
277 | 306 | ||
278 | 307 | ||
279 | if(path != null && path.Length == 0) | 308 | if(path != null && path.Length == 0) |
@@ -318,11 +347,19 @@ namespace Prebuild.Core.Nodes | |||
318 | 347 | ||
319 | RecurseDirectories( path, pattern, recurse, useRegex, m_Exclusions ); | 348 | RecurseDirectories( path, pattern, recurse, useRegex, m_Exclusions ); |
320 | 349 | ||
321 | if(m_Files.Count < 1) | 350 | if (m_Files.Count < 1) |
322 | { | 351 | { |
323 | throw new WarningException("Match returned no files: {0}{1}", Helper.EndPath(path), pattern); | 352 | // Include the project name when the match node returns no matches to provide extra |
324 | } | 353 | // debug info. |
325 | m_Regex = null; | 354 | ProjectNode project = Parent.Parent as ProjectNode; |
355 | string projectName = ""; | ||
356 | |||
357 | if (project != null) | ||
358 | projectName = " in project " + project.AssemblyName; | ||
359 | |||
360 | throw new WarningException("Match" + projectName + " returned no files: {0}{1}", Helper.EndPath(path), pattern); | ||
361 | } | ||
362 | m_Regex = null; | ||
326 | } | 363 | } |
327 | 364 | ||
328 | #endregion | 365 | #endregion |
diff --git a/Prebuild/src/Core/Nodes/OptionsNode.cs b/Prebuild/src/Core/Nodes/OptionsNode.cs index b63034b..577de71 100644 --- a/Prebuild/src/Core/Nodes/OptionsNode.cs +++ b/Prebuild/src/Core/Nodes/OptionsNode.cs | |||
@@ -24,8 +24,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | 27 | using System.Collections.Generic; |
28 | using System.Collections.Specialized; | ||
29 | using System.Reflection; | 28 | using System.Reflection; |
30 | using System.Xml; | 29 | using System.Xml; |
31 | 30 | ||
@@ -43,7 +42,7 @@ namespace Prebuild.Core.Nodes | |||
43 | { | 42 | { |
44 | #region Fields | 43 | #region Fields |
45 | 44 | ||
46 | private static Hashtable m_OptionFields; | 45 | private static readonly Dictionary<string,FieldInfo> m_OptionFields = new Dictionary<string, FieldInfo>(); |
47 | 46 | ||
48 | [OptionNode("CompilerDefines")] | 47 | [OptionNode("CompilerDefines")] |
49 | private string m_CompilerDefines = ""; | 48 | private string m_CompilerDefines = ""; |
@@ -495,7 +494,7 @@ namespace Prebuild.Core.Nodes | |||
495 | } | 494 | } |
496 | } | 495 | } |
497 | 496 | ||
498 | private StringCollection m_FieldsDefined; | 497 | private readonly List<string> m_FieldsDefined = new List<string>(); |
499 | 498 | ||
500 | #endregion | 499 | #endregion |
501 | 500 | ||
@@ -508,7 +507,6 @@ namespace Prebuild.Core.Nodes | |||
508 | { | 507 | { |
509 | Type t = typeof(OptionsNode); | 508 | Type t = typeof(OptionsNode); |
510 | 509 | ||
511 | m_OptionFields = new Hashtable(); | ||
512 | foreach(FieldInfo f in t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance)) | 510 | foreach(FieldInfo f in t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance)) |
513 | { | 511 | { |
514 | object[] attrs = f.GetCustomAttributes(typeof(OptionNodeAttribute), false); | 512 | object[] attrs = f.GetCustomAttributes(typeof(OptionNodeAttribute), false); |
@@ -522,14 +520,6 @@ namespace Prebuild.Core.Nodes | |||
522 | } | 520 | } |
523 | } | 521 | } |
524 | 522 | ||
525 | /// <summary> | ||
526 | /// Initializes a new instance of the <see cref="OptionsNode"/> class. | ||
527 | /// </summary> | ||
528 | public OptionsNode() | ||
529 | { | ||
530 | m_FieldsDefined = new StringCollection(); | ||
531 | } | ||
532 | |||
533 | #endregion | 523 | #endregion |
534 | 524 | ||
535 | #region Properties | 525 | #region Properties |
@@ -547,7 +537,7 @@ namespace Prebuild.Core.Nodes | |||
547 | return null; | 537 | return null; |
548 | } | 538 | } |
549 | 539 | ||
550 | FieldInfo f = (FieldInfo)m_OptionFields[index]; | 540 | FieldInfo f = m_OptionFields[index]; |
551 | return f.GetValue(this); | 541 | return f.GetValue(this); |
552 | } | 542 | } |
553 | } | 543 | } |
@@ -591,7 +581,7 @@ namespace Prebuild.Core.Nodes | |||
591 | return; | 581 | return; |
592 | } | 582 | } |
593 | 583 | ||
594 | FieldInfo f = (FieldInfo)m_OptionFields[nodeName]; | 584 | FieldInfo f = m_OptionFields[nodeName]; |
595 | f.SetValue(this, Helper.TranslateValue(f.FieldType, val)); | 585 | f.SetValue(this, Helper.TranslateValue(f.FieldType, val)); |
596 | FlagDefined(f.Name); | 586 | FlagDefined(f.Name); |
597 | } | 587 | } |
diff --git a/Prebuild/src/Core/Nodes/ProcessNode.cs b/Prebuild/src/Core/Nodes/ProcessNode.cs index 6bfbe16..8ca8e49 100644 --- a/Prebuild/src/Core/Nodes/ProcessNode.cs +++ b/Prebuild/src/Core/Nodes/ProcessNode.cs | |||
@@ -24,8 +24,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Xml; | 27 | using System.Xml; |
30 | 28 | ||
31 | using Prebuild.Core.Attributes; | 29 | using Prebuild.Core.Attributes; |
diff --git a/Prebuild/src/Core/Nodes/ProjectNode.cs b/Prebuild/src/Core/Nodes/ProjectNode.cs index 04af7a3..fb92b32 100644 --- a/Prebuild/src/Core/Nodes/ProjectNode.cs +++ b/Prebuild/src/Core/Nodes/ProjectNode.cs | |||
@@ -24,7 +24,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Generic; | 27 | using System.Collections.Generic; |
29 | using System.IO; | 28 | using System.IO; |
30 | using System.Xml; | 29 | using System.Xml; |
@@ -90,10 +89,10 @@ namespace Prebuild.Core.Nodes | |||
90 | /// .NET 3.5 | 89 | /// .NET 3.5 |
91 | /// </summary> | 90 | /// </summary> |
92 | v3_5, | 91 | v3_5, |
93 | /// <summary> | 92 | /// <summary> |
94 | /// .NET 4.0 | 93 | /// .NET 4.0 |
95 | /// </summary> | 94 | /// </summary> |
96 | v4_0, | 95 | v4_0, |
97 | } | 96 | } |
98 | /// <summary> | 97 | /// <summary> |
99 | /// The Node object representing /Prebuild/Solution/Project elements | 98 | /// The Node object representing /Prebuild/Solution/Project elements |
@@ -121,7 +120,7 @@ namespace Prebuild.Core.Nodes | |||
121 | private Guid m_Guid; | 120 | private Guid m_Guid; |
122 | private string m_DebugStartParameters; | 121 | private string m_DebugStartParameters; |
123 | 122 | ||
124 | private Hashtable m_Configurations = new Hashtable(); | 123 | private readonly Dictionary<string, ConfigurationNode> m_Configurations = new Dictionary<string, ConfigurationNode>(); |
125 | private readonly List<ReferencePathNode> m_ReferencePaths = new List<ReferencePathNode>(); | 124 | private readonly List<ReferencePathNode> m_ReferencePaths = new List<ReferencePathNode>(); |
126 | private readonly List<ReferenceNode> m_References = new List<ReferenceNode>(); | 125 | private readonly List<ReferenceNode> m_References = new List<ReferenceNode>(); |
127 | private readonly List<AuthorNode> m_Authors = new List<AuthorNode>(); | 126 | private readonly List<AuthorNode> m_Authors = new List<AuthorNode>(); |
@@ -149,7 +148,7 @@ namespace Prebuild.Core.Nodes | |||
149 | { | 148 | { |
150 | get | 149 | get |
151 | { | 150 | { |
152 | return this.m_Framework; | 151 | return m_Framework; |
153 | } | 152 | } |
154 | } | 153 | } |
155 | /// <summary> | 154 | /// <summary> |
@@ -283,7 +282,7 @@ namespace Prebuild.Core.Nodes | |||
283 | } | 282 | } |
284 | } | 283 | } |
285 | 284 | ||
286 | private bool m_GenerateAssemblyInfoFile = false; | 285 | private bool m_GenerateAssemblyInfoFile; |
287 | 286 | ||
288 | /// <summary> | 287 | /// <summary> |
289 | /// | 288 | /// |
@@ -328,11 +327,11 @@ namespace Prebuild.Core.Nodes | |||
328 | /// Gets the configurations. | 327 | /// Gets the configurations. |
329 | /// </summary> | 328 | /// </summary> |
330 | /// <value>The configurations.</value> | 329 | /// <value>The configurations.</value> |
331 | public IList Configurations | 330 | public List<ConfigurationNode> Configurations |
332 | { | 331 | { |
333 | get | 332 | get |
334 | { | 333 | { |
335 | ArrayList tmp = new ArrayList(ConfigurationsTable.Values); | 334 | List<ConfigurationNode> tmp = new List<ConfigurationNode>(ConfigurationsTable.Values); |
336 | tmp.Sort(); | 335 | tmp.Sort(); |
337 | return tmp; | 336 | return tmp; |
338 | } | 337 | } |
@@ -342,7 +341,7 @@ namespace Prebuild.Core.Nodes | |||
342 | /// Gets the configurations table. | 341 | /// Gets the configurations table. |
343 | /// </summary> | 342 | /// </summary> |
344 | /// <value>The configurations table.</value> | 343 | /// <value>The configurations table.</value> |
345 | public Hashtable ConfigurationsTable | 344 | public Dictionary<string, ConfigurationNode> ConfigurationsTable |
346 | { | 345 | { |
347 | get | 346 | get |
348 | { | 347 | { |
@@ -420,7 +419,7 @@ namespace Prebuild.Core.Nodes | |||
420 | SolutionNode parent = (SolutionNode)base.Parent; | 419 | SolutionNode parent = (SolutionNode)base.Parent; |
421 | foreach(ConfigurationNode conf in parent.Configurations) | 420 | foreach(ConfigurationNode conf in parent.Configurations) |
422 | { | 421 | { |
423 | m_Configurations[conf.Name] = conf.Clone(); | 422 | m_Configurations[conf.NameAndPlatform] = (ConfigurationNode) conf.Clone(); |
424 | } | 423 | } |
425 | } | 424 | } |
426 | } | 425 | } |
@@ -455,19 +454,19 @@ namespace Prebuild.Core.Nodes | |||
455 | if(String.Compare(conf.Name, "all", true) == 0) //apply changes to all, this may not always be applied first, | 454 | if(String.Compare(conf.Name, "all", true) == 0) //apply changes to all, this may not always be applied first, |
456 | //so it *may* override changes to the same properties for configurations defines at the project level | 455 | //so it *may* override changes to the same properties for configurations defines at the project level |
457 | { | 456 | { |
458 | foreach(ConfigurationNode confNode in this.m_Configurations.Values) | 457 | foreach(ConfigurationNode confNode in m_Configurations.Values) |
459 | { | 458 | { |
460 | conf.CopyTo(confNode);//update the config templates defines at the project level with the overrides | 459 | conf.CopyTo(confNode);//update the config templates defines at the project level with the overrides |
461 | } | 460 | } |
462 | } | 461 | } |
463 | if(m_Configurations.ContainsKey(conf.Name)) | 462 | if(m_Configurations.ContainsKey(conf.NameAndPlatform)) |
464 | { | 463 | { |
465 | ConfigurationNode parentConf = (ConfigurationNode)m_Configurations[conf.Name]; | 464 | ConfigurationNode parentConf = m_Configurations[conf.NameAndPlatform]; |
466 | conf.CopyTo(parentConf);//update the config templates defines at the project level with the overrides | 465 | conf.CopyTo(parentConf);//update the config templates defines at the project level with the overrides |
467 | } | 466 | } |
468 | else | 467 | else |
469 | { | 468 | { |
470 | m_Configurations[conf.Name] = conf; | 469 | m_Configurations[conf.NameAndPlatform] = conf; |
471 | } | 470 | } |
472 | } | 471 | } |
473 | 472 | ||
@@ -504,12 +503,12 @@ namespace Prebuild.Core.Nodes | |||
504 | m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); | 503 | m_GenerateAssemblyInfoFile = Helper.ParseBoolean(node, "generateAssemblyInfoFile", false); |
505 | m_DebugStartParameters = Helper.AttributeValue(node, "debugStartParameters", string.Empty); | 504 | m_DebugStartParameters = Helper.AttributeValue(node, "debugStartParameters", string.Empty); |
506 | 505 | ||
507 | if(m_AssemblyName == null || m_AssemblyName.Length < 1) | 506 | if(string.IsNullOrEmpty(m_AssemblyName)) |
508 | { | 507 | { |
509 | m_AssemblyName = m_Name; | 508 | m_AssemblyName = m_Name; |
510 | } | 509 | } |
511 | 510 | ||
512 | if(m_RootNamespace == null || m_RootNamespace.Length < 1) | 511 | if(string.IsNullOrEmpty(m_RootNamespace)) |
513 | { | 512 | { |
514 | m_RootNamespace = m_Name; | 513 | m_RootNamespace = m_Name; |
515 | } | 514 | } |
@@ -572,7 +571,7 @@ namespace Prebuild.Core.Nodes | |||
572 | public int CompareTo(object obj) | 571 | public int CompareTo(object obj) |
573 | { | 572 | { |
574 | ProjectNode that = (ProjectNode)obj; | 573 | ProjectNode that = (ProjectNode)obj; |
575 | return this.m_Name.CompareTo(that.m_Name); | 574 | return m_Name.CompareTo(that.m_Name); |
576 | } | 575 | } |
577 | 576 | ||
578 | #endregion | 577 | #endregion |
diff --git a/Prebuild/src/Core/Nodes/ReferencePathNode.cs b/Prebuild/src/Core/Nodes/ReferencePathNode.cs index f0543c2..7331cd7 100644 --- a/Prebuild/src/Core/Nodes/ReferencePathNode.cs +++ b/Prebuild/src/Core/Nodes/ReferencePathNode.cs | |||
@@ -24,8 +24,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.Xml; | 27 | using System.Xml; |
30 | 28 | ||
31 | using Prebuild.Core.Attributes; | 29 | using Prebuild.Core.Attributes; |
diff --git a/Prebuild/src/Core/Nodes/SolutionNode.cs b/Prebuild/src/Core/Nodes/SolutionNode.cs index 2a1b8e2..10c0223 100644 --- a/Prebuild/src/Core/Nodes/SolutionNode.cs +++ b/Prebuild/src/Core/Nodes/SolutionNode.cs | |||
@@ -24,10 +24,8 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Generic; | 27 | using System.Collections.Generic; |
29 | using System.Diagnostics; | 28 | using System.Diagnostics; |
30 | using System.IO; | ||
31 | using System.Xml; | 29 | using System.Xml; |
32 | 30 | ||
33 | using Prebuild.Core.Attributes; | 31 | using Prebuild.Core.Attributes; |
@@ -50,18 +48,19 @@ namespace Prebuild.Core.Nodes | |||
50 | private string m_Name = "unknown"; | 48 | private string m_Name = "unknown"; |
51 | private string m_Path = ""; | 49 | private string m_Path = ""; |
52 | private string m_FullPath = ""; | 50 | private string m_FullPath = ""; |
53 | private string m_ActiveConfig = "Debug"; | 51 | private string m_ActiveConfig; |
54 | private string m_Version = "1.0.0"; | 52 | private string m_Version = "1.0.0"; |
55 | 53 | ||
56 | private OptionsNode m_Options; | 54 | private OptionsNode m_Options; |
57 | private FilesNode m_Files; | 55 | private FilesNode m_Files; |
58 | private readonly Hashtable m_Configurations = new Hashtable(); | 56 | private readonly ConfigurationNodeCollection m_Configurations = new ConfigurationNodeCollection(); |
59 | private readonly Hashtable m_Projects = new Hashtable(); | 57 | private readonly Dictionary<string, ProjectNode> m_Projects = new Dictionary<string, ProjectNode>(); |
60 | private readonly Hashtable m_DatabaseProjects = new Hashtable(); | 58 | private readonly Dictionary<string, DatabaseProjectNode> m_DatabaseProjects = new Dictionary<string, DatabaseProjectNode>(); |
61 | private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>(); | 59 | private readonly List<ProjectNode> m_ProjectsOrder = new List<ProjectNode>(); |
62 | private readonly Hashtable m_Solutions = new Hashtable(); | 60 | private readonly Dictionary<string, SolutionNode> m_Solutions = new Dictionary<string, SolutionNode>(); |
61 | private CleanupNode m_Cleanup; | ||
63 | 62 | ||
64 | #endregion | 63 | #endregion |
65 | 64 | ||
66 | #region Properties | 65 | #region Properties |
67 | public override IDataNode Parent | 66 | public override IDataNode Parent |
@@ -77,7 +76,7 @@ namespace Prebuild.Core.Nodes | |||
77 | SolutionNode solution = (SolutionNode)value; | 76 | SolutionNode solution = (SolutionNode)value; |
78 | foreach (ConfigurationNode conf in solution.Configurations) | 77 | foreach (ConfigurationNode conf in solution.Configurations) |
79 | { | 78 | { |
80 | m_Configurations[conf.Name] = conf.Clone(); | 79 | m_Configurations[conf.Name] = (ConfigurationNode) conf.Clone(); |
81 | } | 80 | } |
82 | } | 81 | } |
83 | 82 | ||
@@ -85,6 +84,18 @@ namespace Prebuild.Core.Nodes | |||
85 | } | 84 | } |
86 | } | 85 | } |
87 | 86 | ||
87 | public CleanupNode Cleanup | ||
88 | { | ||
89 | get | ||
90 | { | ||
91 | return m_Cleanup; | ||
92 | } | ||
93 | set | ||
94 | { | ||
95 | m_Cleanup = value; | ||
96 | } | ||
97 | } | ||
98 | |||
88 | public Guid Guid | 99 | public Guid Guid |
89 | { | 100 | { |
90 | get | 101 | get |
@@ -188,13 +199,13 @@ namespace Prebuild.Core.Nodes | |||
188 | /// Gets the configurations. | 199 | /// Gets the configurations. |
189 | /// </summary> | 200 | /// </summary> |
190 | /// <value>The configurations.</value> | 201 | /// <value>The configurations.</value> |
191 | public ICollection Configurations | 202 | public ConfigurationNodeCollection Configurations |
192 | { | 203 | { |
193 | get | 204 | get |
194 | { | 205 | { |
195 | ArrayList tmp = new ArrayList(ConfigurationsTable.Values); | 206 | ConfigurationNodeCollection tmp = new ConfigurationNodeCollection(); |
196 | tmp.Sort(); | 207 | tmp.AddRange(ConfigurationsTable); |
197 | return tmp; | 208 | return tmp; |
198 | } | 209 | } |
199 | } | 210 | } |
200 | 211 | ||
@@ -202,7 +213,7 @@ namespace Prebuild.Core.Nodes | |||
202 | /// Gets the configurations table. | 213 | /// Gets the configurations table. |
203 | /// </summary> | 214 | /// </summary> |
204 | /// <value>The configurations table.</value> | 215 | /// <value>The configurations table.</value> |
205 | public Hashtable ConfigurationsTable | 216 | public ConfigurationNodeCollection ConfigurationsTable |
206 | { | 217 | { |
207 | get | 218 | get |
208 | { | 219 | { |
@@ -212,7 +223,7 @@ namespace Prebuild.Core.Nodes | |||
212 | /// <summary> | 223 | /// <summary> |
213 | /// Gets the database projects. | 224 | /// Gets the database projects. |
214 | /// </summary> | 225 | /// </summary> |
215 | public ICollection DatabaseProjects | 226 | public ICollection<DatabaseProjectNode> DatabaseProjects |
216 | { | 227 | { |
217 | get | 228 | get |
218 | { | 229 | { |
@@ -222,7 +233,7 @@ namespace Prebuild.Core.Nodes | |||
222 | /// <summary> | 233 | /// <summary> |
223 | /// Gets the nested solutions. | 234 | /// Gets the nested solutions. |
224 | /// </summary> | 235 | /// </summary> |
225 | public ICollection Solutions | 236 | public ICollection<SolutionNode> Solutions |
226 | { | 237 | { |
227 | get | 238 | get |
228 | { | 239 | { |
@@ -232,22 +243,22 @@ namespace Prebuild.Core.Nodes | |||
232 | /// <summary> | 243 | /// <summary> |
233 | /// Gets the nested solutions hash table. | 244 | /// Gets the nested solutions hash table. |
234 | /// </summary> | 245 | /// </summary> |
235 | public Hashtable SolutionsTable | 246 | public Dictionary<string, SolutionNode> SolutionsTable |
236 | { | 247 | { |
237 | get | 248 | get |
238 | { | 249 | { |
239 | return this.m_Solutions; | 250 | return m_Solutions; |
240 | } | 251 | } |
241 | } | 252 | } |
242 | /// <summary> | 253 | /// <summary> |
243 | /// Gets the projects. | 254 | /// Gets the projects. |
244 | /// </summary> | 255 | /// </summary> |
245 | /// <value>The projects.</value> | 256 | /// <value>The projects.</value> |
246 | public ICollection Projects | 257 | public ICollection<ProjectNode> Projects |
247 | { | 258 | { |
248 | get | 259 | get |
249 | { | 260 | { |
250 | ArrayList tmp = new ArrayList(m_Projects.Values); | 261 | List<ProjectNode> tmp = new List<ProjectNode>(m_Projects.Values); |
251 | tmp.Sort(); | 262 | tmp.Sort(); |
252 | return tmp; | 263 | return tmp; |
253 | } | 264 | } |
@@ -257,7 +268,7 @@ namespace Prebuild.Core.Nodes | |||
257 | /// Gets the projects table. | 268 | /// Gets the projects table. |
258 | /// </summary> | 269 | /// </summary> |
259 | /// <value>The projects table.</value> | 270 | /// <value>The projects table.</value> |
260 | public Hashtable ProjectsTable | 271 | public Dictionary<string, ProjectNode> ProjectsTable |
261 | { | 272 | { |
262 | get | 273 | get |
263 | { | 274 | { |
@@ -325,16 +336,23 @@ namespace Prebuild.Core.Nodes | |||
325 | } | 336 | } |
326 | else if(dataNode is ConfigurationNode) | 337 | else if(dataNode is ConfigurationNode) |
327 | { | 338 | { |
328 | m_Configurations[((ConfigurationNode)dataNode).Name] = dataNode; | 339 | ConfigurationNode configurationNode = (ConfigurationNode) dataNode; |
340 | m_Configurations[configurationNode.NameAndPlatform] = configurationNode; | ||
341 | |||
342 | // If the active configuration is null, then we populate it. | ||
343 | if (ActiveConfig == null) | ||
344 | { | ||
345 | ActiveConfig = configurationNode.Name; | ||
346 | } | ||
329 | } | 347 | } |
330 | else if(dataNode is ProjectNode) | 348 | else if(dataNode is ProjectNode) |
331 | { | 349 | { |
332 | m_Projects[((ProjectNode)dataNode).Name] = dataNode; | 350 | m_Projects[((ProjectNode)dataNode).Name] = (ProjectNode) dataNode; |
333 | m_ProjectsOrder.Add((ProjectNode)dataNode); | 351 | m_ProjectsOrder.Add((ProjectNode)dataNode); |
334 | } | 352 | } |
335 | else if(dataNode is SolutionNode) | 353 | else if(dataNode is SolutionNode) |
336 | { | 354 | { |
337 | m_Solutions[((SolutionNode)dataNode).Name] = dataNode; | 355 | m_Solutions[((SolutionNode)dataNode).Name] = (SolutionNode) dataNode; |
338 | } | 356 | } |
339 | else if (dataNode is ProcessNode) | 357 | else if (dataNode is ProcessNode) |
340 | { | 358 | { |
@@ -343,7 +361,13 @@ namespace Prebuild.Core.Nodes | |||
343 | } | 361 | } |
344 | else if (dataNode is DatabaseProjectNode) | 362 | else if (dataNode is DatabaseProjectNode) |
345 | { | 363 | { |
346 | m_DatabaseProjects[((DatabaseProjectNode)dataNode).Name] = dataNode; | 364 | m_DatabaseProjects[((DatabaseProjectNode)dataNode).Name] = (DatabaseProjectNode) dataNode; |
365 | } | ||
366 | else if(dataNode is CleanupNode) | ||
367 | { | ||
368 | if(m_Cleanup != null) | ||
369 | throw new WarningException("There can only be one Cleanup node."); | ||
370 | m_Cleanup = (CleanupNode)dataNode; | ||
347 | } | 371 | } |
348 | } | 372 | } |
349 | } | 373 | } |
diff --git a/Prebuild/src/Core/Parse/Preprocessor.cs b/Prebuild/src/Core/Parse/Preprocessor.cs index b2306e4..0648fad 100644 --- a/Prebuild/src/Core/Parse/Preprocessor.cs +++ b/Prebuild/src/Core/Parse/Preprocessor.cs | |||
@@ -24,7 +24,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | 27 | using System.Collections.Generic; |
28 | using System.IO; | 28 | using System.IO; |
29 | using System.Text.RegularExpressions; | 29 | using System.Text.RegularExpressions; |
30 | using System.Xml; | 30 | using System.Xml; |
@@ -83,9 +83,9 @@ namespace Prebuild.Core.Parse | |||
83 | 83 | ||
84 | #region Fields | 84 | #region Fields |
85 | 85 | ||
86 | XmlDocument m_OutDoc; | 86 | readonly XmlDocument m_OutDoc = new XmlDocument(); |
87 | Stack m_IfStack; | 87 | readonly Stack<IfContext> m_IfStack = new Stack<IfContext>(); |
88 | Hashtable m_Variables; | 88 | readonly Dictionary<string, object> m_Variables = new Dictionary<string, object>(); |
89 | 89 | ||
90 | #endregion | 90 | #endregion |
91 | 91 | ||
@@ -96,10 +96,6 @@ namespace Prebuild.Core.Parse | |||
96 | /// </summary> | 96 | /// </summary> |
97 | public Preprocessor() | 97 | public Preprocessor() |
98 | { | 98 | { |
99 | m_OutDoc = new XmlDocument(); | ||
100 | m_IfStack = new Stack(); | ||
101 | m_Variables = new Hashtable(); | ||
102 | |||
103 | RegisterVariable("OS", GetOS()); | 99 | RegisterVariable("OS", GetOS()); |
104 | RegisterVariable("RuntimeVersion", Environment.Version.Major); | 100 | RegisterVariable("RuntimeVersion", Environment.Version.Major); |
105 | RegisterVariable("RuntimeMajor", Environment.Version.Major); | 101 | RegisterVariable("RuntimeMajor", Environment.Version.Major); |
@@ -237,11 +233,10 @@ namespace Prebuild.Core.Parse | |||
237 | string str = ""; | 233 | string str = ""; |
238 | OperatorSymbol oper = OperatorSymbol.None; | 234 | OperatorSymbol oper = OperatorSymbol.None; |
239 | bool inStr = false; | 235 | bool inStr = false; |
240 | char c; | 236 | |
241 | 237 | for(int i = 0; i < exp.Length; i++) | |
242 | for(int i = 0; i < exp.Length; i++) | ||
243 | { | 238 | { |
244 | c = exp[i]; | 239 | char c = exp[i]; |
245 | if(Char.IsWhiteSpace(c)) | 240 | if(Char.IsWhiteSpace(c)) |
246 | { | 241 | { |
247 | continue; | 242 | continue; |
@@ -326,16 +321,16 @@ namespace Prebuild.Core.Parse | |||
326 | { | 321 | { |
327 | throw new WarningException("Expected operator in expression"); | 322 | throw new WarningException("Expected operator in expression"); |
328 | } | 323 | } |
329 | else if(id.Length < 1) | 324 | if(id.Length < 1) |
330 | { | 325 | { |
331 | throw new WarningException("Expected identifier in expression"); | 326 | throw new WarningException("Expected identifier in expression"); |
332 | } | 327 | } |
333 | else if(str.Length < 1) | 328 | if(str.Length < 1) |
334 | { | 329 | { |
335 | throw new WarningException("Expected value in expression"); | 330 | throw new WarningException("Expected value in expression"); |
336 | } | 331 | } |
337 | 332 | ||
338 | bool ret = false; | 333 | bool ret; |
339 | try | 334 | try |
340 | { | 335 | { |
341 | object val = m_Variables[id.ToLower()]; | 336 | object val = m_Variables[id.ToLower()]; |
@@ -344,19 +339,17 @@ namespace Prebuild.Core.Parse | |||
344 | throw new WarningException("Unknown identifier '{0}'", id); | 339 | throw new WarningException("Unknown identifier '{0}'", id); |
345 | } | 340 | } |
346 | 341 | ||
347 | int numVal, numVal2; | 342 | Type t = val.GetType(); |
348 | string strVal, strVal2; | ||
349 | Type t = val.GetType(); | ||
350 | if(t.IsAssignableFrom(typeof(int))) | 343 | if(t.IsAssignableFrom(typeof(int))) |
351 | { | 344 | { |
352 | numVal = (int)val; | 345 | int numVal = (int)val; |
353 | numVal2 = Int32.Parse(str); | 346 | int numVal2 = Int32.Parse(str); |
354 | ret = CompareNum(oper, numVal, numVal2); | 347 | ret = CompareNum(oper, numVal, numVal2); |
355 | } | 348 | } |
356 | else | 349 | else |
357 | { | 350 | { |
358 | strVal = val.ToString(); | 351 | string strVal = val.ToString(); |
359 | strVal2 = str; | 352 | string strVal2 = str; |
360 | ret = CompareStr(oper, strVal, strVal2); | 353 | ret = CompareStr(oper, strVal, strVal2); |
361 | } | 354 | } |
362 | } | 355 | } |
@@ -369,6 +362,70 @@ namespace Prebuild.Core.Parse | |||
369 | return ret; | 362 | return ret; |
370 | } | 363 | } |
371 | 364 | ||
365 | /// <summary> | ||
366 | /// Taken from current Prebuild included in OpenSim 0.7.x | ||
367 | /// </summary> | ||
368 | /// <param name="readerStack"> | ||
369 | /// A <see cref="Stack<XmlReader>"/> | ||
370 | /// </param> | ||
371 | /// <param name="include"> | ||
372 | /// A <see cref="System.String"/> | ||
373 | /// </param> | ||
374 | private static void WildCardInclude (Stack<XmlReader> readerStack, string include) | ||
375 | { | ||
376 | if (!include.Contains ("*")) { | ||
377 | return; | ||
378 | } | ||
379 | |||
380 | // Console.WriteLine("Processing {0}", include); | ||
381 | |||
382 | // Break up the include into pre and post wildcard sections | ||
383 | string preWildcard = include.Substring (0, include.IndexOf ("*")); | ||
384 | string postWildcard = include.Substring (include.IndexOf ("*") + 2); | ||
385 | |||
386 | // If preWildcard is a directory, recurse | ||
387 | if (Directory.Exists (preWildcard)) { | ||
388 | string[] directories = Directory.GetDirectories (preWildcard); | ||
389 | Array.Sort (directories); | ||
390 | Array.Reverse (directories); | ||
391 | foreach (string dirPath in directories) { | ||
392 | //Console.WriteLine ("Scanning : {0}", dirPath); | ||
393 | |||
394 | string includeFile = Path.Combine (dirPath, postWildcard); | ||
395 | if (includeFile.Contains ("*")) { | ||
396 | // postWildcard included another wildcard, recurse. | ||
397 | WildCardInclude (readerStack, includeFile); | ||
398 | } else { | ||
399 | FileInfo file = new FileInfo (includeFile); | ||
400 | if (file.Exists) { | ||
401 | //Console.WriteLine ("Including File: {0}", includeFile); | ||
402 | XmlReader newReader = new XmlTextReader (file.Open (FileMode.Open, FileAccess.Read, FileShare.Read)); | ||
403 | readerStack.Push (newReader); | ||
404 | } | ||
405 | } | ||
406 | } | ||
407 | } else { | ||
408 | // preWildcard is not a path to a directory, so the wildcard is in the filename | ||
409 | string searchFilename = Path.GetFileName (preWildcard.Substring (preWildcard.IndexOf ("/") + 1) + "*" + postWildcard); | ||
410 | Console.WriteLine ("searchFilename: {0}", searchFilename); | ||
411 | |||
412 | string searchDirectory = Path.GetDirectoryName (preWildcard); | ||
413 | Console.WriteLine ("searchDirectory: {0}", searchDirectory); | ||
414 | |||
415 | string[] files = Directory.GetFiles (searchDirectory, searchFilename); | ||
416 | Array.Sort (files); | ||
417 | Array.Reverse (files); | ||
418 | foreach (string includeFile in files) { | ||
419 | FileInfo file = new FileInfo (includeFile); | ||
420 | if (file.Exists) { | ||
421 | // Console.WriteLine ("Including File: {0}", includeFile); | ||
422 | XmlReader newReader = new XmlTextReader (file.Open (FileMode.Open, FileAccess.Read, FileShare.Read)); | ||
423 | readerStack.Push (newReader); | ||
424 | } | ||
425 | } | ||
426 | } | ||
427 | } | ||
428 | |||
372 | #endregion | 429 | #endregion |
373 | 430 | ||
374 | #region Public Methods | 431 | #region Public Methods |
@@ -392,7 +449,7 @@ namespace Prebuild.Core.Parse | |||
392 | /// Performs validation on the xml source as well as evaluates conditional and flow expresions | 449 | /// Performs validation on the xml source as well as evaluates conditional and flow expresions |
393 | /// </summary> | 450 | /// </summary> |
394 | /// <exception cref="ArgumentException">For invalid use of conditional expressions or for invalid XML syntax. If a XmlValidatingReader is passed, then will also throw exceptions for non-schema-conforming xml</exception> | 451 | /// <exception cref="ArgumentException">For invalid use of conditional expressions or for invalid XML syntax. If a XmlValidatingReader is passed, then will also throw exceptions for non-schema-conforming xml</exception> |
395 | /// <param name="reader"></param> | 452 | /// <param name="initialReader"></param> |
396 | /// <returns>the output xml </returns> | 453 | /// <returns>the output xml </returns> |
397 | public string Process(XmlReader initialReader) | 454 | public string Process(XmlReader initialReader) |
398 | { | 455 | { |
@@ -411,13 +468,13 @@ namespace Prebuild.Core.Parse | |||
411 | // readers which lets the <?include?> operation add more | 468 | // readers which lets the <?include?> operation add more |
412 | // readers to generate a multi-file parser and not require | 469 | // readers to generate a multi-file parser and not require |
413 | // XML fragments that a recursive version would use. | 470 | // XML fragments that a recursive version would use. |
414 | Stack readerStack = new Stack(); | 471 | Stack<XmlReader> readerStack = new Stack<XmlReader>(); |
415 | readerStack.Push(initialReader); | 472 | readerStack.Push(initialReader); |
416 | 473 | ||
417 | while(readerStack.Count > 0) | 474 | while(readerStack.Count > 0) |
418 | { | 475 | { |
419 | // Pop off the next reader. | 476 | // Pop off the next reader. |
420 | XmlReader reader = (XmlReader) readerStack.Pop(); | 477 | XmlReader reader = readerStack.Pop(); |
421 | 478 | ||
422 | // Process through this XML reader until it is | 479 | // Process through this XML reader until it is |
423 | // completed (or it is replaced by the include | 480 | // completed (or it is replaced by the include |
@@ -437,7 +494,7 @@ namespace Prebuild.Core.Parse | |||
437 | case "include": | 494 | case "include": |
438 | // use regular expressions to parse out the attributes. | 495 | // use regular expressions to parse out the attributes. |
439 | MatchCollection matches = includeFileRegex.Matches(reader.Value); | 496 | MatchCollection matches = includeFileRegex.Matches(reader.Value); |
440 | 497 | ||
441 | // make sure there is only one file attribute. | 498 | // make sure there is only one file attribute. |
442 | if(matches.Count > 1) | 499 | if(matches.Count > 1) |
443 | { | 500 | { |
@@ -448,38 +505,37 @@ namespace Prebuild.Core.Parse | |||
448 | { | 505 | { |
449 | throw new WarningException("An <?include ?> node was found, but it did not specify the file attribute."); | 506 | throw new WarningException("An <?include ?> node was found, but it did not specify the file attribute."); |
450 | } | 507 | } |
451 | |||
452 | // Push current reader back onto the stack. | ||
453 | readerStack.Push(reader); | ||
454 | |||
455 | // Pull the file out from the regex and make sure it is a valid file before using it. | ||
456 | string filename = matches[0].Groups[1].Value; | ||
457 | 508 | ||
458 | filename = String.Join(Path.DirectorySeparatorChar.ToString(), filename.Split(new char[] { '/', '\\' })); | 509 | // ***** Adding for wildcard handling |
459 | 510 | // Push current reader back onto the stack. | |
460 | if (!filename.Contains("*")) | 511 | readerStack.Push (reader); |
461 | { | 512 | |
462 | FileInfo includeFile = new FileInfo(filename); | 513 | // Pull the file out from the regex and make sure it is a valid file before using it. |
463 | 514 | string filename = matches[0].Groups[1].Value; | |
464 | if (!includeFile.Exists) | 515 | |
465 | { | 516 | filename = String.Join (Path.DirectorySeparatorChar.ToString (), filename.Split (new char[] { '/', '\\' })); |
466 | throw new WarningException("Cannot include file: " + includeFile.FullName); | 517 | |
518 | if (!filename.Contains ("*")) { | ||
519 | |||
520 | FileInfo includeFile = new FileInfo (filename); | ||
521 | if (!includeFile.Exists) { | ||
522 | throw new WarningException ("Cannot include file: " + includeFile.FullName); | ||
467 | } | 523 | } |
468 | 524 | ||
469 | // Create a new reader object for this file, and push it onto the stack | 525 | // Create a new reader object for this file. Then put the old reader back on the stack and start |
470 | XmlReader newReader = new XmlTextReader(includeFile.Open(FileMode.Open, FileAccess.Read, FileShare.Read)); | 526 | // processing using this new XML reader. |
471 | readerStack.Push(newReader); | 527 | |
472 | } | 528 | XmlReader newReader = new XmlTextReader (includeFile.Open (FileMode.Open, FileAccess.Read, FileShare.Read)); |
473 | else | 529 | reader = newReader; |
474 | { | 530 | readerStack.Push (reader); |
475 | WildCardInclude(readerStack, filename); | 531 | |
532 | } else { | ||
533 | WildCardInclude (readerStack, filename); | ||
476 | } | 534 | } |
477 | 535 | ||
478 | // continue reading with whatever reader is on the top of the stack | 536 | reader = (XmlReader)readerStack.Pop (); |
479 | reader = (XmlReader)readerStack.Pop(); | ||
480 | ignore = true; | 537 | ignore = true; |
481 | 538 | break; | |
482 | break; | ||
483 | 539 | ||
484 | case "if": | 540 | case "if": |
485 | m_IfStack.Push(context); | 541 | m_IfStack.Push(context); |
@@ -492,12 +548,12 @@ namespace Prebuild.Core.Parse | |||
492 | { | 548 | { |
493 | throw new WarningException("Unexpected 'elseif' outside of 'if'"); | 549 | throw new WarningException("Unexpected 'elseif' outside of 'if'"); |
494 | } | 550 | } |
495 | else if(context.State != IfState.If && context.State != IfState.ElseIf) | 551 | if(context.State != IfState.If && context.State != IfState.ElseIf) |
496 | { | 552 | { |
497 | throw new WarningException("Unexpected 'elseif' outside of 'if'"); | 553 | throw new WarningException("Unexpected 'elseif' outside of 'if'"); |
498 | } | 554 | } |
499 | 555 | ||
500 | context.State = IfState.ElseIf; | 556 | context.State = IfState.ElseIf; |
501 | if(!context.EverKept) | 557 | if(!context.EverKept) |
502 | { | 558 | { |
503 | context.Keep = ParseExpression(reader.Value); | 559 | context.Keep = ParseExpression(reader.Value); |
@@ -515,12 +571,12 @@ namespace Prebuild.Core.Parse | |||
515 | { | 571 | { |
516 | throw new WarningException("Unexpected 'else' outside of 'if'"); | 572 | throw new WarningException("Unexpected 'else' outside of 'if'"); |
517 | } | 573 | } |
518 | else if(context.State != IfState.If && context.State != IfState.ElseIf) | 574 | if(context.State != IfState.If && context.State != IfState.ElseIf) |
519 | { | 575 | { |
520 | throw new WarningException("Unexpected 'else' outside of 'if'"); | 576 | throw new WarningException("Unexpected 'else' outside of 'if'"); |
521 | } | 577 | } |
522 | 578 | ||
523 | context.State = IfState.Else; | 579 | context.State = IfState.Else; |
524 | context.Keep = !context.EverKept; | 580 | context.Keep = !context.EverKept; |
525 | ignore = true; | 581 | ignore = true; |
526 | break; | 582 | break; |
@@ -531,7 +587,7 @@ namespace Prebuild.Core.Parse | |||
531 | throw new WarningException("Unexpected 'endif' outside of 'if'"); | 587 | throw new WarningException("Unexpected 'endif' outside of 'if'"); |
532 | } | 588 | } |
533 | 589 | ||
534 | context = (IfContext)m_IfStack.Pop(); | 590 | context = m_IfStack.Pop(); |
535 | ignore = true; | 591 | ignore = true; |
536 | break; | 592 | break; |
537 | } | 593 | } |
@@ -591,73 +647,6 @@ namespace Prebuild.Core.Parse | |||
591 | return xmlText.ToString(); | 647 | return xmlText.ToString(); |
592 | } | 648 | } |
593 | 649 | ||
594 | private static void WildCardInclude(Stack readerStack, string include) | ||
595 | { | ||
596 | if (!include.Contains("*")) | ||
597 | { | ||
598 | return; | ||
599 | } | ||
600 | |||
601 | // Console.WriteLine("Processing {0}", include); | ||
602 | |||
603 | // Break up the include into pre and post wildcard sections | ||
604 | string preWildcard = include.Substring(0, include.IndexOf("*")); | ||
605 | string postWildcard = include.Substring(include.IndexOf("*") + 2); | ||
606 | |||
607 | // If preWildcard is a directory, recurse | ||
608 | if (Directory.Exists(preWildcard)) | ||
609 | { | ||
610 | string[] directories = Directory.GetDirectories(preWildcard); | ||
611 | Array.Sort(directories); | ||
612 | Array.Reverse(directories); | ||
613 | foreach (string dirPath in directories ) | ||
614 | { | ||
615 | Console.WriteLine("Scanning : {0}", dirPath); | ||
616 | |||
617 | string includeFile = Path.Combine(dirPath, postWildcard); | ||
618 | if (includeFile.Contains("*")) | ||
619 | { | ||
620 | // postWildcard included another wildcard, recurse. | ||
621 | WildCardInclude(readerStack, includeFile); | ||
622 | } | ||
623 | else | ||
624 | { | ||
625 | FileInfo file = new FileInfo(includeFile); | ||
626 | if (file.Exists) | ||
627 | { | ||
628 | Console.WriteLine("Including File: {0}", includeFile); | ||
629 | XmlReader newReader = new XmlTextReader(file.Open(FileMode.Open, FileAccess.Read, FileShare.Read)); | ||
630 | readerStack.Push(newReader); | ||
631 | } | ||
632 | } | ||
633 | } | ||
634 | } | ||
635 | else | ||
636 | { | ||
637 | // preWildcard is not a path to a directory, so the wildcard is in the filename | ||
638 | string searchFilename = Path.GetFileName(preWildcard.Substring(preWildcard.IndexOf("/") + 1) + "*" + postWildcard); | ||
639 | // Console.WriteLine("searchFilename: {0}", searchFilename); | ||
640 | |||
641 | string searchDirectory = Path.GetDirectoryName(preWildcard); | ||
642 | // Console.WriteLine("searchDirectory: {0}", searchDirectory); | ||
643 | |||
644 | string[] files = Directory.GetFiles(searchDirectory, searchFilename); | ||
645 | Array.Sort(files); | ||
646 | Array.Reverse(files); | ||
647 | foreach (string includeFile in files) | ||
648 | { | ||
649 | FileInfo file = new FileInfo(includeFile); | ||
650 | if (file.Exists) | ||
651 | { | ||
652 | Console.WriteLine("Including File: {0}", includeFile); | ||
653 | XmlReader newReader = new XmlTextReader(file.Open(FileMode.Open, FileAccess.Read, FileShare.Read)); | ||
654 | readerStack.Push(newReader); | ||
655 | } | ||
656 | } | ||
657 | } | ||
658 | |||
659 | } | ||
660 | |||
661 | #endregion | 650 | #endregion |
662 | } | 651 | } |
663 | } | 652 | } |
diff --git a/Prebuild/src/Core/Targets/.NAntTarget.cs.swp b/Prebuild/src/Core/Targets/.NAntTarget.cs.swp new file mode 100644 index 0000000..afec61c --- /dev/null +++ b/Prebuild/src/Core/Targets/.NAntTarget.cs.swp | |||
Binary files differ | |||
diff --git a/Prebuild/src/Core/Targets/AutotoolsTarget.cs b/Prebuild/src/Core/Targets/AutotoolsTarget.cs index 5dcbb38..485e4dd 100644 --- a/Prebuild/src/Core/Targets/AutotoolsTarget.cs +++ b/Prebuild/src/Core/Targets/AutotoolsTarget.cs | |||
@@ -66,9 +66,7 @@ POSSIBILITY OF SUCH DAMAGE. | |||
66 | 66 | ||
67 | #endregion | 67 | #endregion |
68 | using System; | 68 | using System; |
69 | using System.Collections; | ||
70 | using System.Collections.Generic; | 69 | using System.Collections.Generic; |
71 | using System.Collections.Specialized; | ||
72 | using System.IO; | 70 | using System.IO; |
73 | using System.Reflection; | 71 | using System.Reflection; |
74 | using System.Text; | 72 | using System.Text; |
@@ -81,7 +79,6 @@ using System.Diagnostics; | |||
81 | using Prebuild.Core.Attributes; | 79 | using Prebuild.Core.Attributes; |
82 | using Prebuild.Core.Interfaces; | 80 | using Prebuild.Core.Interfaces; |
83 | using Prebuild.Core.Nodes; | 81 | using Prebuild.Core.Nodes; |
84 | using Prebuild.Core.Parse; | ||
85 | using Prebuild.Core.Utilities; | 82 | using Prebuild.Core.Utilities; |
86 | 83 | ||
87 | namespace Prebuild.Core.Targets | 84 | namespace Prebuild.Core.Targets |
@@ -170,16 +167,16 @@ namespace Prebuild.Core.Targets | |||
170 | XmlDocument autotoolsDoc; | 167 | XmlDocument autotoolsDoc; |
171 | XmlUrlResolver xr; | 168 | XmlUrlResolver xr; |
172 | System.Security.Policy.Evidence e; | 169 | System.Security.Policy.Evidence e; |
173 | Hashtable assemblyPathToPackage = new Hashtable(); | 170 | readonly Dictionary<string, SystemPackage> assemblyPathToPackage = new Dictionary<string, SystemPackage>(); |
174 | Hashtable assemblyFullNameToPath = new Hashtable(); | 171 | readonly Dictionary<string, string> assemblyFullNameToPath = new Dictionary<string, string>(); |
175 | Hashtable packagesHash = new Hashtable(); | 172 | readonly Dictionary<string, SystemPackage> packagesHash = new Dictionary<string, SystemPackage>(); |
176 | readonly List<SystemPackage> packages = new List<SystemPackage>(); | 173 | readonly List<SystemPackage> packages = new List<SystemPackage>(); |
177 | 174 | ||
178 | #endregion | 175 | #endregion |
179 | 176 | ||
180 | #region Private Methods | 177 | #region Private Methods |
181 | 178 | ||
182 | private void mkdirDashP(string dirName) | 179 | private static void mkdirDashP(string dirName) |
183 | { | 180 | { |
184 | DirectoryInfo di = new DirectoryInfo(dirName); | 181 | DirectoryInfo di = new DirectoryInfo(dirName); |
185 | if (di.Exists) | 182 | if (di.Exists) |
@@ -193,7 +190,7 @@ namespace Prebuild.Core.Targets | |||
193 | di.Create(); | 190 | di.Create(); |
194 | } | 191 | } |
195 | 192 | ||
196 | private void chkMkDir(string dirName) | 193 | private static void chkMkDir(string dirName) |
197 | { | 194 | { |
198 | System.IO.DirectoryInfo di = | 195 | System.IO.DirectoryInfo di = |
199 | new System.IO.DirectoryInfo(dirName); | 196 | new System.IO.DirectoryInfo(dirName); |
@@ -222,13 +219,12 @@ namespace Prebuild.Core.Targets | |||
222 | (m_Kernel.CurrentDoc, argList, templateWriter, xr); | 219 | (m_Kernel.CurrentDoc, argList, templateWriter, xr); |
223 | } | 220 | } |
224 | 221 | ||
225 | string NormalizeAsmName(string name) | 222 | static string NormalizeAsmName(string name) |
226 | { | 223 | { |
227 | int i = name.IndexOf(", PublicKeyToken=null"); | 224 | int i = name.IndexOf(", PublicKeyToken=null"); |
228 | if (i != -1) | 225 | if (i != -1) |
229 | return name.Substring(0, i).Trim(); | 226 | return name.Substring(0, i).Trim(); |
230 | else | 227 | return name; |
231 | return name; | ||
232 | } | 228 | } |
233 | 229 | ||
234 | private void AddAssembly(string assemblyfile, SystemPackage package) | 230 | private void AddAssembly(string assemblyfile, SystemPackage package) |
@@ -247,7 +243,7 @@ namespace Prebuild.Core.Targets | |||
247 | } | 243 | } |
248 | } | 244 | } |
249 | 245 | ||
250 | private List<string> GetAssembliesWithLibInfo(string line, string file) | 246 | private static List<string> GetAssembliesWithLibInfo(string line, string file) |
251 | { | 247 | { |
252 | List<string> references = new List<string>(); | 248 | List<string> references = new List<string>(); |
253 | List<string> libdirs = new List<string>(); | 249 | List<string> libdirs = new List<string>(); |
@@ -278,7 +274,7 @@ namespace Prebuild.Core.Targets | |||
278 | return retval; | 274 | return retval; |
279 | } | 275 | } |
280 | 276 | ||
281 | private List<string> GetAssembliesWithoutLibInfo(string line, string file) | 277 | private static List<string> GetAssembliesWithoutLibInfo(string line, string file) |
282 | { | 278 | { |
283 | List<string> references = new List<string>(); | 279 | List<string> references = new List<string>(); |
284 | foreach (string reference in line.Split(' ')) | 280 | foreach (string reference in line.Split(' ')) |
@@ -292,7 +288,7 @@ namespace Prebuild.Core.Targets | |||
292 | return references; | 288 | return references; |
293 | } | 289 | } |
294 | 290 | ||
295 | private string ProcessPiece(string piece, string pcfile) | 291 | private static string ProcessPiece(string piece, string pcfile) |
296 | { | 292 | { |
297 | int start = piece.IndexOf("${"); | 293 | int start = piece.IndexOf("${"); |
298 | if (start == -1) | 294 | if (start == -1) |
@@ -307,7 +303,7 @@ namespace Prebuild.Core.Targets | |||
307 | return ProcessPiece(piece.Replace("${" + variable + "}", interp), pcfile); | 303 | return ProcessPiece(piece.Replace("${" + variable + "}", interp), pcfile); |
308 | } | 304 | } |
309 | 305 | ||
310 | private string GetVariableFromPkgConfig(string var, string pcfile) | 306 | private static string GetVariableFromPkgConfig(string var, string pcfile) |
311 | { | 307 | { |
312 | ProcessStartInfo psi = new ProcessStartInfo("pkg-config"); | 308 | ProcessStartInfo psi = new ProcessStartInfo("pkg-config"); |
313 | psi.RedirectStandardOutput = true; | 309 | psi.RedirectStandardOutput = true; |
@@ -327,7 +323,7 @@ namespace Prebuild.Core.Targets | |||
327 | { | 323 | { |
328 | // Don't register the package twice | 324 | // Don't register the package twice |
329 | string pname = Path.GetFileNameWithoutExtension(pcfile); | 325 | string pname = Path.GetFileNameWithoutExtension(pcfile); |
330 | if (packagesHash.Contains(pname)) | 326 | if (packagesHash.ContainsKey(pname)) |
331 | return; | 327 | return; |
332 | 328 | ||
333 | List<string> fullassemblies = null; | 329 | List<string> fullassemblies = null; |
@@ -507,158 +503,6 @@ namespace Prebuild.Core.Targets | |||
507 | WriteProject(solution, project); | 503 | WriteProject(solution, project); |
508 | } | 504 | } |
509 | } | 505 | } |
510 | private static string PrependPath(string path) | ||
511 | { | ||
512 | string tmpPath = Helper.NormalizePath(path, '/'); | ||
513 | Regex regex = new Regex(@"(\w):/(\w+)"); | ||
514 | Match match = regex.Match(tmpPath); | ||
515 | if (match.Success || tmpPath[0] == '.' || tmpPath[0] == '/') | ||
516 | { | ||
517 | tmpPath = Helper.NormalizePath(tmpPath); | ||
518 | } | ||
519 | else | ||
520 | { | ||
521 | tmpPath = Helper.NormalizePath("./" + tmpPath); | ||
522 | } | ||
523 | |||
524 | return tmpPath; | ||
525 | } | ||
526 | |||
527 | private static string BuildReference(SolutionNode solution, | ||
528 | ReferenceNode refr) | ||
529 | { | ||
530 | string ret = ""; | ||
531 | if (solution.ProjectsTable.ContainsKey(refr.Name)) | ||
532 | { | ||
533 | ProjectNode project = | ||
534 | (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
535 | string fileRef = FindFileReference(refr.Name, project); | ||
536 | string finalPath = | ||
537 | Helper.NormalizePath(Helper.MakeFilePath(project.FullPath + | ||
538 | "/$(BUILD_DIR)/$(CONFIG)/", | ||
539 | refr.Name, "dll"), | ||
540 | '/'); | ||
541 | ret += finalPath; | ||
542 | return ret; | ||
543 | } | ||
544 | else | ||
545 | { | ||
546 | ProjectNode project = (ProjectNode)refr.Parent; | ||
547 | string fileRef = FindFileReference(refr.Name, project); | ||
548 | |||
549 | if (refr.Path != null || fileRef != null) | ||
550 | { | ||
551 | string finalPath = ((refr.Path != null) ? | ||
552 | Helper.NormalizePath(refr.Path + "/" + | ||
553 | refr.Name + ".dll", | ||
554 | '/') : | ||
555 | fileRef | ||
556 | ); | ||
557 | ret += Path.Combine(project.Path, finalPath); | ||
558 | return ret; | ||
559 | } | ||
560 | |||
561 | try | ||
562 | { | ||
563 | //Assembly assem = Assembly.Load(refr.Name); | ||
564 | //if (assem != null) | ||
565 | //{ | ||
566 | // int index = refr.Name.IndexOf(","); | ||
567 | // if ( index > 0) | ||
568 | // { | ||
569 | // ret += assem.Location; | ||
570 | // //Console.WriteLine("Location1: " + assem.Location); | ||
571 | // } | ||
572 | // else | ||
573 | // { | ||
574 | // ret += (refr.Name + ".dll"); | ||
575 | // //Console.WriteLine("Location2: " + assem.Location); | ||
576 | // } | ||
577 | //} | ||
578 | //else | ||
579 | //{ | ||
580 | int index = refr.Name.IndexOf(","); | ||
581 | if (index > 0) | ||
582 | { | ||
583 | ret += refr.Name.Substring(0, index) + ".dll"; | ||
584 | //Console.WriteLine("Location3: " + assem.Location); | ||
585 | } | ||
586 | else | ||
587 | { | ||
588 | ret += (refr.Name + ".dll"); | ||
589 | //Console.WriteLine("Location4: " + assem.Location); | ||
590 | } | ||
591 | //} | ||
592 | } | ||
593 | catch (System.NullReferenceException e) | ||
594 | { | ||
595 | e.ToString(); | ||
596 | int index = refr.Name.IndexOf(","); | ||
597 | if (index > 0) | ||
598 | { | ||
599 | ret += refr.Name.Substring(0, index) + ".dll"; | ||
600 | //Console.WriteLine("Location5: " + assem.Location); | ||
601 | } | ||
602 | else | ||
603 | { | ||
604 | ret += (refr.Name + ".dll"); | ||
605 | //Console.WriteLine("Location6: " + assem.Location); | ||
606 | } | ||
607 | } | ||
608 | } | ||
609 | return ret; | ||
610 | } | ||
611 | |||
612 | private static string BuildReferencePath(SolutionNode solution, | ||
613 | ReferenceNode refr) | ||
614 | { | ||
615 | string ret = ""; | ||
616 | if (solution.ProjectsTable.ContainsKey(refr.Name)) | ||
617 | { | ||
618 | ProjectNode project = | ||
619 | (ProjectNode)solution.ProjectsTable[refr.Name]; | ||
620 | string finalPath = | ||
621 | Helper.NormalizePath(Helper.MakeReferencePath(project.FullPath + | ||
622 | "/${build.dir}/"), | ||
623 | '/'); | ||
624 | ret += finalPath; | ||
625 | return ret; | ||
626 | } | ||
627 | else | ||
628 | { | ||
629 | ProjectNode project = (ProjectNode)refr.Parent; | ||
630 | string fileRef = FindFileReference(refr.Name, project); | ||
631 | |||
632 | if (refr.Path != null || fileRef != null) | ||
633 | { | ||
634 | string finalPath = ((refr.Path != null) ? | ||
635 | Helper.NormalizePath(refr.Path, '/') : | ||
636 | fileRef | ||
637 | ); | ||
638 | ret += finalPath; | ||
639 | return ret; | ||
640 | } | ||
641 | |||
642 | try | ||
643 | { | ||
644 | Assembly assem = Assembly.Load(refr.Name); | ||
645 | if (assem != null) | ||
646 | { | ||
647 | ret += ""; | ||
648 | } | ||
649 | else | ||
650 | { | ||
651 | ret += ""; | ||
652 | } | ||
653 | } | ||
654 | catch (System.NullReferenceException e) | ||
655 | { | ||
656 | e.ToString(); | ||
657 | ret += ""; | ||
658 | } | ||
659 | } | ||
660 | return ret; | ||
661 | } | ||
662 | 506 | ||
663 | private static string FindFileReference(string refName, | 507 | private static string FindFileReference(string refName, |
664 | ProjectNode project) | 508 | ProjectNode project) |
@@ -831,7 +675,7 @@ namespace Prebuild.Core.Targets | |||
831 | } | 675 | } |
832 | catch | 676 | catch |
833 | { | 677 | { |
834 | Console.WriteLine("Error! '{0}'", e.ToString()); | 678 | Console.WriteLine("Error! '{0}'", e); |
835 | } | 679 | } |
836 | 680 | ||
837 | } | 681 | } |
@@ -865,7 +709,7 @@ namespace Prebuild.Core.Targets | |||
865 | // Set up references | 709 | // Set up references |
866 | for (int refNum = 0; refNum < project.References.Count; refNum++) | 710 | for (int refNum = 0; refNum < project.References.Count; refNum++) |
867 | { | 711 | { |
868 | ReferenceNode refr = (ReferenceNode)project.References[refNum]; | 712 | ReferenceNode refr = project.References[refNum]; |
869 | Assembly refAssembly = Assembly.LoadWithPartialName(refr.Name); | 713 | Assembly refAssembly = Assembly.LoadWithPartialName(refr.Name); |
870 | 714 | ||
871 | /* Determine which pkg-config (.pc) file refers to | 715 | /* Determine which pkg-config (.pc) file refers to |
@@ -873,25 +717,28 @@ namespace Prebuild.Core.Targets | |||
873 | 717 | ||
874 | SystemPackage package = null; | 718 | SystemPackage package = null; |
875 | 719 | ||
876 | if (packagesHash.Contains(refr.Name)){ | 720 | if (packagesHash.ContainsKey(refr.Name)) |
877 | package = (SystemPackage)packagesHash[refr.Name]; | 721 | { |
878 | 722 | package = packagesHash[refr.Name]; | |
879 | }else{ | ||
880 | string assemblyFullName = string.Empty; | ||
881 | if (refAssembly != null) | ||
882 | assemblyFullName = refAssembly.FullName; | ||
883 | |||
884 | string assemblyFileName = string.Empty; | ||
885 | if (assemblyFullName != string.Empty && | ||
886 | assemblyFullNameToPath.Contains(assemblyFullName) | ||
887 | ) | ||
888 | assemblyFileName = | ||
889 | (string)assemblyFullNameToPath[assemblyFullName]; | ||
890 | 723 | ||
891 | if (assemblyFileName != string.Empty && | 724 | } |
892 | assemblyPathToPackage.Contains(assemblyFileName) | 725 | else |
893 | ) | 726 | { |
894 | package = (SystemPackage)assemblyPathToPackage[assemblyFileName]; | 727 | string assemblyFullName = string.Empty; |
728 | if (refAssembly != null) | ||
729 | assemblyFullName = refAssembly.FullName; | ||
730 | |||
731 | string assemblyFileName = string.Empty; | ||
732 | if (assemblyFullName != string.Empty && | ||
733 | assemblyFullNameToPath.ContainsKey(assemblyFullName) | ||
734 | ) | ||
735 | assemblyFileName = | ||
736 | assemblyFullNameToPath[assemblyFullName]; | ||
737 | |||
738 | if (assemblyFileName != string.Empty && | ||
739 | assemblyPathToPackage.ContainsKey(assemblyFileName) | ||
740 | ) | ||
741 | package = assemblyPathToPackage[assemblyFileName]; | ||
895 | 742 | ||
896 | } | 743 | } |
897 | 744 | ||
@@ -958,7 +805,7 @@ namespace Prebuild.Core.Targets | |||
958 | */ | 805 | */ |
959 | 806 | ||
960 | ProjectNode sourcePrj = | 807 | ProjectNode sourcePrj = |
961 | ((ProjectNode)(solution.ProjectsTable[refr.Name])); | 808 | ((solution.ProjectsTable[refr.Name])); |
962 | 809 | ||
963 | string target = | 810 | string target = |
964 | String.Format("{0}:\n" + | 811 | String.Format("{0}:\n" + |
@@ -1067,564 +914,6 @@ namespace Prebuild.Core.Targets | |||
1067 | transformToFile(Path.Combine(projectDir, project.Name.ToLower() + ".in"), argList, "/Autotools/ProjectWrapperScriptIn"); | 914 | transformToFile(Path.Combine(projectDir, project.Name.ToLower() + ".in"), argList, "/Autotools/ProjectWrapperScriptIn"); |
1068 | } | 915 | } |
1069 | 916 | ||
1070 | private void WriteProjectOld(SolutionNode solution, ProjectNode project) | ||
1071 | { | ||
1072 | string projFile = Helper.MakeFilePath(project.FullPath, "Include", "am"); | ||
1073 | StreamWriter ss = new StreamWriter(projFile); | ||
1074 | ss.NewLine = "\n"; | ||
1075 | |||
1076 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
1077 | Helper.SetCurrentDir(Path.GetDirectoryName(projFile)); | ||
1078 | |||
1079 | using (ss) | ||
1080 | { | ||
1081 | ss.WriteLine(Helper.AssemblyFullName(project.AssemblyName, project.Type) + ":"); | ||
1082 | ss.WriteLine("\tmkdir -p " + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/"); | ||
1083 | foreach (string file in project.Files) | ||
1084 | { | ||
1085 | if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) | ||
1086 | { | ||
1087 | ss.Write("\tresgen "); | ||
1088 | ss.Write(Helper.NormalizePath(Path.Combine(project.Path, file.Substring(0, file.LastIndexOf('.')) + ".resx "), '/')); | ||
1089 | if (project.Files.GetResourceName(file) != "") | ||
1090 | { | ||
1091 | ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources"), '/')); | ||
1092 | } | ||
1093 | else | ||
1094 | { | ||
1095 | ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources"), '/')); | ||
1096 | } | ||
1097 | } | ||
1098 | } | ||
1099 | ss.WriteLine("\t$(CSC)\t/out:" + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/" + Helper.AssemblyFullName(project.AssemblyName, project.Type) + " \\"); | ||
1100 | ss.WriteLine("\t\t/target:" + project.Type.ToString().ToLower() + " \\"); | ||
1101 | if (project.References.Count > 0) | ||
1102 | { | ||
1103 | ss.Write("\t\t/reference:"); | ||
1104 | bool firstref = true; | ||
1105 | foreach (ReferenceNode refr in project.References) | ||
1106 | { | ||
1107 | if (firstref) | ||
1108 | { | ||
1109 | firstref = false; | ||
1110 | } | ||
1111 | else | ||
1112 | { | ||
1113 | ss.Write(","); | ||
1114 | } | ||
1115 | ss.Write("{0}", Helper.NormalizePath(Helper.MakePathRelativeTo(solution.FullPath, BuildReference(solution, refr)), '/')); | ||
1116 | } | ||
1117 | ss.WriteLine(" \\"); | ||
1118 | } | ||
1119 | //ss.WriteLine("\t\tProperties/AssemblyInfo.cs \\"); | ||
1120 | |||
1121 | foreach (string file in project.Files) | ||
1122 | { | ||
1123 | switch (project.Files.GetBuildAction(file)) | ||
1124 | { | ||
1125 | case BuildAction.EmbeddedResource: | ||
1126 | ss.Write("\t\t/resource:"); | ||
1127 | ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, file), '/') + " \\"); | ||
1128 | break; | ||
1129 | default: | ||
1130 | if (project.Files.GetSubType(file) != SubType.Code && project.Files.GetSubType(file) != SubType.Settings) | ||
1131 | { | ||
1132 | ss.Write("\t\t/resource:"); | ||
1133 | if (project.Files.GetResourceName(file) != "") | ||
1134 | { | ||
1135 | ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources"), '/') + "," + project.RootNamespace + "." + project.Files.GetResourceName(file) + ".resources" + " \\"); | ||
1136 | } | ||
1137 | else | ||
1138 | { | ||
1139 | ss.WriteLine(Helper.NormalizePath(Path.Combine(project.Path, project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources"), '/') + "," + project.RootNamespace + "." + file.Substring(0, file.LastIndexOf('.')) + ".resources" + " \\"); | ||
1140 | } | ||
1141 | } | ||
1142 | break; | ||
1143 | } | ||
1144 | } | ||
1145 | |||
1146 | foreach (ConfigurationNode conf in project.Configurations) | ||
1147 | { | ||
1148 | if (conf.Options.KeyFile != "") | ||
1149 | { | ||
1150 | ss.WriteLine("\t\t/keyfile:" + Helper.NormalizePath(Path.Combine(project.Path, conf.Options.KeyFile), '/') + " \\"); | ||
1151 | break; | ||
1152 | } | ||
1153 | } | ||
1154 | foreach (ConfigurationNode conf in project.Configurations) | ||
1155 | { | ||
1156 | if (conf.Options.AllowUnsafe) | ||
1157 | { | ||
1158 | ss.WriteLine("\t\t/unsafe \\"); | ||
1159 | break; | ||
1160 | } | ||
1161 | } | ||
1162 | if (project.AppIcon != "") | ||
1163 | { | ||
1164 | ss.WriteLine("\t\t/win32icon:" + Helper.NormalizePath(Path.Combine(project.Path, project.AppIcon), '/') + " \\"); | ||
1165 | } | ||
1166 | |||
1167 | foreach (ConfigurationNode conf in project.Configurations) | ||
1168 | { | ||
1169 | ss.WriteLine("\t\t/define:{0}", conf.Options.CompilerDefines.Replace(';', ',') + " \\"); | ||
1170 | break; | ||
1171 | } | ||
1172 | |||
1173 | foreach (ConfigurationNode conf in project.Configurations) | ||
1174 | { | ||
1175 | if (GetXmlDocFile(project, conf) != "") | ||
1176 | { | ||
1177 | ss.WriteLine("\t\t/doc:" + Helper.MakePathRelativeTo(solution.FullPath, project.Path) + "/$(BUILD_DIR)/$(CONFIG)/" + project.Name + ".xml \\"); | ||
1178 | break; | ||
1179 | } | ||
1180 | } | ||
1181 | foreach (string file in project.Files) | ||
1182 | { | ||
1183 | switch (project.Files.GetBuildAction(file)) | ||
1184 | { | ||
1185 | case BuildAction.Compile: | ||
1186 | ss.WriteLine("\t\t\\"); | ||
1187 | ss.Write("\t\t" + NormalizePath(Path.Combine(Helper.MakePathRelativeTo(solution.FullPath, project.Path), file))); | ||
1188 | break; | ||
1189 | default: | ||
1190 | break; | ||
1191 | } | ||
1192 | } | ||
1193 | ss.WriteLine(); | ||
1194 | ss.WriteLine(); | ||
1195 | |||
1196 | if (project.Type == ProjectType.Library) | ||
1197 | { | ||
1198 | ss.WriteLine("install-data-local:"); | ||
1199 | ss.WriteLine(" echo \"$(GACUTIL) /i bin/Release/" + project.Name + ".dll /f $(GACUTIL_FLAGS)\"; \\"); | ||
1200 | ss.WriteLine(" $(GACUTIL) /i bin/Release/" + project.Name + ".dll /f $(GACUTIL_FLAGS) || exit 1;"); | ||
1201 | ss.WriteLine(); | ||
1202 | ss.WriteLine("uninstall-local:"); | ||
1203 | ss.WriteLine(" echo \"$(GACUTIL) /u " + project.Name + " $(GACUTIL_FLAGS)\"; \\"); | ||
1204 | ss.WriteLine(" $(GACUTIL) /u " + project.Name + " $(GACUTIL_FLAGS) || exit 1;"); | ||
1205 | ss.WriteLine(); | ||
1206 | } | ||
1207 | ss.WriteLine("CLEANFILES = $(BUILD_DIR)/$(CONFIG)/" + Helper.AssemblyFullName(project.AssemblyName, project.Type) + " $(BUILD_DIR)/$(CONFIG)/" + project.AssemblyName + ".mdb $(BUILD_DIR)/$(CONFIG)/" + project.AssemblyName + ".pdb " + project.AssemblyName + ".xml"); | ||
1208 | ss.WriteLine("EXTRA_DIST = \\"); | ||
1209 | ss.Write(" $(FILES)"); | ||
1210 | foreach (ConfigurationNode conf in project.Configurations) | ||
1211 | { | ||
1212 | if (conf.Options.KeyFile != "") | ||
1213 | { | ||
1214 | ss.Write(" \\"); | ||
1215 | ss.WriteLine("\t" + conf.Options.KeyFile); | ||
1216 | } | ||
1217 | break; | ||
1218 | } | ||
1219 | } | ||
1220 | m_Kernel.CurrentWorkingDirectory.Pop(); | ||
1221 | } | ||
1222 | bool hasLibrary = false; | ||
1223 | |||
1224 | private void WriteCombineOld(SolutionNode solution) | ||
1225 | { | ||
1226 | |||
1227 | /* TODO: These vars should be pulled from the prebuild.xml file */ | ||
1228 | string releaseVersion = "2.0.0"; | ||
1229 | string assemblyVersion = "2.1.0.0"; | ||
1230 | string description = | ||
1231 | "Tao Framework " + solution.Name + " Binding For .NET"; | ||
1232 | |||
1233 | hasLibrary = false; | ||
1234 | m_Kernel.Log.Write("Creating Autotools make files"); | ||
1235 | foreach (ProjectNode project in solution.Projects) | ||
1236 | { | ||
1237 | if (m_Kernel.AllowProject(project.FilterGroups)) | ||
1238 | { | ||
1239 | m_Kernel.Log.Write("...Creating makefile: {0}", project.Name); | ||
1240 | WriteProject(solution, project); | ||
1241 | } | ||
1242 | } | ||
1243 | |||
1244 | m_Kernel.Log.Write(""); | ||
1245 | string combFile = Helper.MakeFilePath(solution.FullPath, "Makefile", "am"); | ||
1246 | StreamWriter ss = new StreamWriter(combFile); | ||
1247 | ss.NewLine = "\n"; | ||
1248 | |||
1249 | m_Kernel.CurrentWorkingDirectory.Push(); | ||
1250 | Helper.SetCurrentDir(Path.GetDirectoryName(combFile)); | ||
1251 | |||
1252 | using (ss) | ||
1253 | { | ||
1254 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1255 | { | ||
1256 | if (project.Type == ProjectType.Library) | ||
1257 | { | ||
1258 | hasLibrary = true; | ||
1259 | break; | ||
1260 | } | ||
1261 | } | ||
1262 | |||
1263 | if (hasLibrary) | ||
1264 | { | ||
1265 | ss.Write("pkgconfig_in_files = "); | ||
1266 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1267 | { | ||
1268 | if (project.Type == ProjectType.Library) | ||
1269 | { | ||
1270 | string combFilepc = Helper.MakeFilePath(solution.FullPath, project.Name, "pc.in"); | ||
1271 | ss.Write(" " + project.Name + ".pc.in "); | ||
1272 | StreamWriter sspc = new StreamWriter(combFilepc); | ||
1273 | sspc.NewLine = "\n"; | ||
1274 | using (sspc) | ||
1275 | { | ||
1276 | sspc.WriteLine("prefix=@prefix@"); | ||
1277 | sspc.WriteLine("exec_prefix=${prefix}"); | ||
1278 | sspc.WriteLine("libdir=${exec_prefix}/lib"); | ||
1279 | sspc.WriteLine(); | ||
1280 | sspc.WriteLine("Name: @PACKAGE_NAME@"); | ||
1281 | sspc.WriteLine("Description: @DESCRIPTION@"); | ||
1282 | sspc.WriteLine("Version: @ASSEMBLY_VERSION@"); | ||
1283 | sspc.WriteLine("Libs: -r:${libdir}/mono/gac/@PACKAGE_NAME@/@ASSEMBLY_VERSION@__@PUBKEY@/@PACKAGE_NAME@.dll"); | ||
1284 | } | ||
1285 | } | ||
1286 | } | ||
1287 | |||
1288 | ss.WriteLine(); | ||
1289 | ss.WriteLine("pkgconfigdir=$(prefix)/lib/pkgconfig"); | ||
1290 | ss.WriteLine("pkgconfig_DATA=$(pkgconfig_in_files:.pc.in=.pc)"); | ||
1291 | } | ||
1292 | ss.WriteLine(); | ||
1293 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1294 | { | ||
1295 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
1296 | ss.WriteLine("-include x {0}", | ||
1297 | Helper.NormalizePath(Helper.MakeFilePath(path, "Include", "am"), '/')); | ||
1298 | } | ||
1299 | ss.WriteLine(); | ||
1300 | ss.WriteLine("all: \\"); | ||
1301 | ss.Write("\t"); | ||
1302 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1303 | { | ||
1304 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
1305 | ss.Write(Helper.AssemblyFullName(project.AssemblyName, project.Type) + " "); | ||
1306 | |||
1307 | } | ||
1308 | ss.WriteLine(); | ||
1309 | if (hasLibrary) | ||
1310 | { | ||
1311 | ss.WriteLine("EXTRA_DIST = \\"); | ||
1312 | ss.WriteLine("\t$(pkgconfig_in_files)"); | ||
1313 | } | ||
1314 | else | ||
1315 | { | ||
1316 | ss.WriteLine("EXTRA_DIST = "); | ||
1317 | } | ||
1318 | ss.WriteLine(); | ||
1319 | ss.WriteLine("DISTCLEANFILES = \\"); | ||
1320 | ss.WriteLine("\tconfigure \\"); | ||
1321 | ss.WriteLine("\tMakefile.in \\"); | ||
1322 | ss.WriteLine("\taclocal.m4"); | ||
1323 | } | ||
1324 | combFile = Helper.MakeFilePath(solution.FullPath, "configure", "ac"); | ||
1325 | StreamWriter ts = new StreamWriter(combFile); | ||
1326 | ts.NewLine = "\n"; | ||
1327 | using (ts) | ||
1328 | { | ||
1329 | if (this.hasLibrary) | ||
1330 | { | ||
1331 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1332 | { | ||
1333 | if (project.Type == ProjectType.Library) | ||
1334 | { | ||
1335 | ts.WriteLine("AC_INIT(" + project.Name + ".pc.in)"); | ||
1336 | break; | ||
1337 | } | ||
1338 | } | ||
1339 | } | ||
1340 | else | ||
1341 | { | ||
1342 | ts.WriteLine("AC_INIT(Makefile.am)"); | ||
1343 | } | ||
1344 | ts.WriteLine("AC_PREREQ(2.53)"); | ||
1345 | ts.WriteLine("AC_CANONICAL_SYSTEM"); | ||
1346 | |||
1347 | ts.WriteLine("PACKAGE_NAME={0}", solution.Name); | ||
1348 | ts.WriteLine("PACKAGE_VERSION={0}", releaseVersion); | ||
1349 | ts.WriteLine("DESCRIPTION=\"{0}\"", description); | ||
1350 | ts.WriteLine("AC_SUBST(DESCRIPTION)"); | ||
1351 | ts.WriteLine("AM_INIT_AUTOMAKE([$PACKAGE_NAME],[$PACKAGE_VERSION],[$DESCRIPTION])"); | ||
1352 | |||
1353 | ts.WriteLine("ASSEMBLY_VERSION={0}", assemblyVersion); | ||
1354 | ts.WriteLine("AC_SUBST(ASSEMBLY_VERSION)"); | ||
1355 | |||
1356 | ts.WriteLine("PUBKEY=`sn -t $PACKAGE_NAME.snk | grep 'Public Key Token' | awk -F: '{print $2}' | sed -e 's/^ //'`"); | ||
1357 | ts.WriteLine("AC_SUBST(PUBKEY)"); | ||
1358 | |||
1359 | ts.WriteLine(); | ||
1360 | ts.WriteLine("AM_MAINTAINER_MODE"); | ||
1361 | ts.WriteLine(); | ||
1362 | ts.WriteLine("dnl AC_PROG_INTLTOOL([0.25])"); | ||
1363 | ts.WriteLine(); | ||
1364 | ts.WriteLine("AC_PROG_INSTALL"); | ||
1365 | ts.WriteLine(); | ||
1366 | ts.WriteLine("MONO_REQUIRED_VERSION=1.1"); | ||
1367 | ts.WriteLine(); | ||
1368 | ts.WriteLine("AC_MSG_CHECKING([whether we're compiling from CVS])"); | ||
1369 | ts.WriteLine("if test -f \"$srcdir/.cvs_version\" ; then"); | ||
1370 | ts.WriteLine(" from_cvs=yes"); | ||
1371 | ts.WriteLine("else"); | ||
1372 | ts.WriteLine(" if test -f \"$srcdir/.svn\" ; then"); | ||
1373 | ts.WriteLine(" from_cvs=yes"); | ||
1374 | ts.WriteLine(" else"); | ||
1375 | ts.WriteLine(" from_cvs=no"); | ||
1376 | ts.WriteLine(" fi"); | ||
1377 | ts.WriteLine("fi"); | ||
1378 | ts.WriteLine(); | ||
1379 | ts.WriteLine("AC_MSG_RESULT($from_cvs)"); | ||
1380 | ts.WriteLine(); | ||
1381 | ts.WriteLine("AC_PATH_PROG(MONO, mono)"); | ||
1382 | ts.WriteLine("AC_PATH_PROG(GMCS, gmcs)"); | ||
1383 | ts.WriteLine("AC_PATH_PROG(GACUTIL, gacutil)"); | ||
1384 | ts.WriteLine(); | ||
1385 | ts.WriteLine("AC_MSG_CHECKING([for mono])"); | ||
1386 | ts.WriteLine("dnl if test \"x$MONO\" = \"x\" ; then"); | ||
1387 | ts.WriteLine("dnl AC_MSG_ERROR([Can't find \"mono\" in your PATH])"); | ||
1388 | ts.WriteLine("dnl else"); | ||
1389 | ts.WriteLine(" AC_MSG_RESULT([found])"); | ||
1390 | ts.WriteLine("dnl fi"); | ||
1391 | ts.WriteLine(); | ||
1392 | ts.WriteLine("AC_MSG_CHECKING([for gmcs])"); | ||
1393 | ts.WriteLine("dnl if test \"x$GMCS\" = \"x\" ; then"); | ||
1394 | ts.WriteLine("dnl AC_MSG_ERROR([Can't find \"gmcs\" in your PATH])"); | ||
1395 | ts.WriteLine("dnl else"); | ||
1396 | ts.WriteLine(" AC_MSG_RESULT([found])"); | ||
1397 | ts.WriteLine("dnl fi"); | ||
1398 | ts.WriteLine(); | ||
1399 | //ts.WriteLine("AC_MSG_CHECKING([for gacutil])"); | ||
1400 | //ts.WriteLine("if test \"x$GACUTIL\" = \"x\" ; then"); | ||
1401 | //ts.WriteLine(" AC_MSG_ERROR([Can't find \"gacutil\" in your PATH])"); | ||
1402 | //ts.WriteLine("else"); | ||
1403 | //ts.WriteLine(" AC_MSG_RESULT([found])"); | ||
1404 | //ts.WriteLine("fi"); | ||
1405 | ts.WriteLine(); | ||
1406 | ts.WriteLine("AC_SUBST(PATH)"); | ||
1407 | ts.WriteLine("AC_SUBST(LD_LIBRARY_PATH)"); | ||
1408 | ts.WriteLine(); | ||
1409 | ts.WriteLine("dnl CSFLAGS=\"-debug -nowarn:1574\""); | ||
1410 | ts.WriteLine("CSFLAGS=\"\""); | ||
1411 | ts.WriteLine("AC_SUBST(CSFLAGS)"); | ||
1412 | ts.WriteLine(); | ||
1413 | // ts.WriteLine("AC_MSG_CHECKING(--disable-sdl argument)"); | ||
1414 | // ts.WriteLine("AC_ARG_ENABLE(sdl,"); | ||
1415 | // ts.WriteLine(" [ --disable-sdl Disable Sdl interface.],"); | ||
1416 | // ts.WriteLine(" [disable_sdl=$disableval],"); | ||
1417 | // ts.WriteLine(" [disable_sdl=\"no\"])"); | ||
1418 | // ts.WriteLine("AC_MSG_RESULT($disable_sdl)"); | ||
1419 | // ts.WriteLine("if test \"$disable_sdl\" = \"yes\"; then"); | ||
1420 | // ts.WriteLine(" AC_DEFINE(FEAT_SDL)"); | ||
1421 | // ts.WriteLine("fi"); | ||
1422 | ts.WriteLine(); | ||
1423 | ts.WriteLine("dnl Find pkg-config"); | ||
1424 | ts.WriteLine("AC_PATH_PROG(PKGCONFIG, pkg-config, no)"); | ||
1425 | ts.WriteLine("if test \"x$PKG_CONFIG\" = \"xno\"; then"); | ||
1426 | ts.WriteLine(" AC_MSG_ERROR([You need to install pkg-config])"); | ||
1427 | ts.WriteLine("fi"); | ||
1428 | ts.WriteLine(); | ||
1429 | ts.WriteLine("PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false)"); | ||
1430 | ts.WriteLine("BUILD_DIR=\"bin\""); | ||
1431 | ts.WriteLine("AC_SUBST(BUILD_DIR)"); | ||
1432 | ts.WriteLine("CONFIG=\"Release\""); | ||
1433 | ts.WriteLine("AC_SUBST(CONFIG)"); | ||
1434 | ts.WriteLine(); | ||
1435 | ts.WriteLine("if test \"x$has_mono\" = \"xtrue\"; then"); | ||
1436 | ts.WriteLine(" AC_PATH_PROG(RUNTIME, mono, no)"); | ||
1437 | ts.WriteLine(" AC_PATH_PROG(CSC, gmcs, no)"); | ||
1438 | ts.WriteLine(" if test `uname -s` = \"Darwin\"; then"); | ||
1439 | ts.WriteLine(" LIB_PREFIX="); | ||
1440 | ts.WriteLine(" LIB_SUFFIX=.dylib"); | ||
1441 | ts.WriteLine(" else"); | ||
1442 | ts.WriteLine(" LIB_PREFIX=.so"); | ||
1443 | ts.WriteLine(" LIB_SUFFIX="); | ||
1444 | ts.WriteLine(" fi"); | ||
1445 | ts.WriteLine("else"); | ||
1446 | ts.WriteLine(" AC_PATH_PROG(CSC, csc.exe, no)"); | ||
1447 | ts.WriteLine(" if test x$CSC = \"xno\"; then"); | ||
1448 | ts.WriteLine(" AC_MSG_ERROR([You need to install either mono or .Net])"); | ||
1449 | ts.WriteLine(" else"); | ||
1450 | ts.WriteLine(" RUNTIME="); | ||
1451 | ts.WriteLine(" LIB_PREFIX="); | ||
1452 | ts.WriteLine(" LIB_SUFFIX=.dylib"); | ||
1453 | ts.WriteLine(" fi"); | ||
1454 | ts.WriteLine("fi"); | ||
1455 | ts.WriteLine(); | ||
1456 | ts.WriteLine("AC_SUBST(LIB_PREFIX)"); | ||
1457 | ts.WriteLine("AC_SUBST(LIB_SUFFIX)"); | ||
1458 | ts.WriteLine(); | ||
1459 | ts.WriteLine("AC_SUBST(BASE_DEPENDENCIES_CFLAGS)"); | ||
1460 | ts.WriteLine("AC_SUBST(BASE_DEPENDENCIES_LIBS)"); | ||
1461 | ts.WriteLine(); | ||
1462 | ts.WriteLine("dnl Find monodoc"); | ||
1463 | ts.WriteLine("MONODOC_REQUIRED_VERSION=1.0"); | ||
1464 | ts.WriteLine("AC_SUBST(MONODOC_REQUIRED_VERSION)"); | ||
1465 | ts.WriteLine("PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, enable_monodoc=yes, enable_monodoc=no)"); | ||
1466 | ts.WriteLine(); | ||
1467 | ts.WriteLine("if test \"x$enable_monodoc\" = \"xyes\"; then"); | ||
1468 | ts.WriteLine(" AC_PATH_PROG(MONODOC, monodoc, no)"); | ||
1469 | ts.WriteLine(" if test x$MONODOC = xno; then"); | ||
1470 | ts.WriteLine(" enable_monodoc=no"); | ||
1471 | ts.WriteLine(" fi"); | ||
1472 | ts.WriteLine("else"); | ||
1473 | ts.WriteLine(" MONODOC="); | ||
1474 | ts.WriteLine("fi"); | ||
1475 | ts.WriteLine(); | ||
1476 | ts.WriteLine("AC_SUBST(MONODOC)"); | ||
1477 | ts.WriteLine("AM_CONDITIONAL(ENABLE_MONODOC, test \"x$enable_monodoc\" = \"xyes\")"); | ||
1478 | ts.WriteLine(); | ||
1479 | ts.WriteLine("AC_PATH_PROG(GACUTIL, gacutil, no)"); | ||
1480 | ts.WriteLine("if test \"x$GACUTIL\" = \"xno\" ; then"); | ||
1481 | ts.WriteLine(" AC_MSG_ERROR([No gacutil tool found])"); | ||
1482 | ts.WriteLine("fi"); | ||
1483 | ts.WriteLine(); | ||
1484 | // foreach(ProjectNode project in solution.ProjectsTableOrder) | ||
1485 | // { | ||
1486 | // if (project.Type == ProjectType.Library) | ||
1487 | // { | ||
1488 | // } | ||
1489 | // } | ||
1490 | ts.WriteLine("GACUTIL_FLAGS='/package $(PACKAGE_NAME) /gacdir $(DESTDIR)$(prefix)'"); | ||
1491 | ts.WriteLine("AC_SUBST(GACUTIL_FLAGS)"); | ||
1492 | ts.WriteLine(); | ||
1493 | ts.WriteLine("winbuild=no"); | ||
1494 | ts.WriteLine("case \"$host\" in"); | ||
1495 | ts.WriteLine(" *-*-mingw*|*-*-cygwin*)"); | ||
1496 | ts.WriteLine(" winbuild=yes"); | ||
1497 | ts.WriteLine(" ;;"); | ||
1498 | ts.WriteLine("esac"); | ||
1499 | ts.WriteLine("AM_CONDITIONAL(WINBUILD, test x$winbuild = xyes)"); | ||
1500 | ts.WriteLine(); | ||
1501 | // ts.WriteLine("dnl Check for SDL"); | ||
1502 | // ts.WriteLine(); | ||
1503 | // ts.WriteLine("AC_PATH_PROG([SDL_CONFIG], [sdl-config])"); | ||
1504 | // ts.WriteLine("have_sdl=no"); | ||
1505 | // ts.WriteLine("if test -n \"${SDL_CONFIG}\"; then"); | ||
1506 | // ts.WriteLine(" have_sdl=yes"); | ||
1507 | // ts.WriteLine(" SDL_CFLAGS=`$SDL_CONFIG --cflags`"); | ||
1508 | // ts.WriteLine(" SDL_LIBS=`$SDL_CONFIG --libs`"); | ||
1509 | // ts.WriteLine(" #"); | ||
1510 | // ts.WriteLine(" # sdl-config sometimes emits an rpath flag pointing at its library"); | ||
1511 | // ts.WriteLine(" # installation directory. We don't want this, as it prevents users from"); | ||
1512 | // ts.WriteLine(" # linking sdl-viewer against, for example, a locally compiled libGL when a"); | ||
1513 | // ts.WriteLine(" # version of the library also exists in SDL's library installation"); | ||
1514 | // ts.WriteLine(" # directory, typically /usr/lib."); | ||
1515 | // ts.WriteLine(" #"); | ||
1516 | // ts.WriteLine(" SDL_LIBS=`echo $SDL_LIBS | sed 's/-Wl,-rpath,[[^ ]]* //'`"); | ||
1517 | // ts.WriteLine("fi"); | ||
1518 | // ts.WriteLine("AC_SUBST([SDL_CFLAGS])"); | ||
1519 | // ts.WriteLine("AC_SUBST([SDL_LIBS])"); | ||
1520 | ts.WriteLine(); | ||
1521 | ts.WriteLine("AC_OUTPUT(["); | ||
1522 | ts.WriteLine("Makefile"); | ||
1523 | // TODO: this does not work quite right. | ||
1524 | //ts.WriteLine("Properties/AssemblyInfo.cs"); | ||
1525 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1526 | { | ||
1527 | if (project.Type == ProjectType.Library) | ||
1528 | { | ||
1529 | ts.WriteLine(project.Name + ".pc"); | ||
1530 | } | ||
1531 | // string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | ||
1532 | // ts.WriteLine(Helper.NormalizePath(Helper.MakeFilePath(path, "Include"),'/')); | ||
1533 | } | ||
1534 | ts.WriteLine("])"); | ||
1535 | ts.WriteLine(); | ||
1536 | ts.WriteLine("#po/Makefile.in"); | ||
1537 | ts.WriteLine(); | ||
1538 | ts.WriteLine("echo \"---\""); | ||
1539 | ts.WriteLine("echo \"Configuration summary\""); | ||
1540 | ts.WriteLine("echo \"\""); | ||
1541 | ts.WriteLine("echo \" * Installation prefix: $prefix\""); | ||
1542 | ts.WriteLine("echo \" * compiler: $CSC\""); | ||
1543 | ts.WriteLine("echo \" * Documentation: $enable_monodoc ($MONODOC)\""); | ||
1544 | ts.WriteLine("echo \" * Package Name: $PACKAGE_NAME\""); | ||
1545 | ts.WriteLine("echo \" * Version: $PACKAGE_VERSION\""); | ||
1546 | ts.WriteLine("echo \" * Public Key: $PUBKEY\""); | ||
1547 | ts.WriteLine("echo \"\""); | ||
1548 | ts.WriteLine("echo \"---\""); | ||
1549 | ts.WriteLine(); | ||
1550 | } | ||
1551 | |||
1552 | ts.NewLine = "\n"; | ||
1553 | foreach (ProjectNode project in solution.ProjectsTableOrder) | ||
1554 | { | ||
1555 | if (project.GenerateAssemblyInfoFile) | ||
1556 | { | ||
1557 | GenerateAssemblyInfoFile(solution, combFile); | ||
1558 | } | ||
1559 | } | ||
1560 | } | ||
1561 | |||
1562 | private static void GenerateAssemblyInfoFile(SolutionNode solution, string combFile) | ||
1563 | { | ||
1564 | System.IO.Directory.CreateDirectory(Helper.MakePathRelativeTo(solution.FullPath, "Properties")); | ||
1565 | combFile = Helper.MakeFilePath(solution.FullPath + "/Properties/", "AssemblyInfo.cs", "in"); | ||
1566 | StreamWriter ai = new StreamWriter(combFile); | ||
1567 | |||
1568 | using (ai) | ||
1569 | { | ||
1570 | ai.WriteLine("#region License"); | ||
1571 | ai.WriteLine("/*"); | ||
1572 | ai.WriteLine("MIT License"); | ||
1573 | ai.WriteLine("Copyright (c)2003-2006 Tao Framework Team"); | ||
1574 | ai.WriteLine("http://www.taoframework.com"); | ||
1575 | ai.WriteLine("All rights reserved."); | ||
1576 | ai.WriteLine(""); | ||
1577 | ai.WriteLine("Permission is hereby granted, free of charge, to any person obtaining a copy"); | ||
1578 | ai.WriteLine("of this software and associated documentation files (the \"Software\"), to deal"); | ||
1579 | ai.WriteLine("in the Software without restriction, including without limitation the rights"); | ||
1580 | ai.WriteLine("to use, copy, modify, merge, publish, distribute, sublicense, and/or sell"); | ||
1581 | ai.WriteLine("copies of the Software, and to permit persons to whom the Software is"); | ||
1582 | ai.WriteLine("furnished to do so, subject to the following conditions:"); | ||
1583 | ai.WriteLine(""); | ||
1584 | ai.WriteLine("The above copyright notice and this permission notice shall be included in all"); | ||
1585 | ai.WriteLine("copies or substantial portions of the Software."); | ||
1586 | ai.WriteLine(""); | ||
1587 | ai.WriteLine("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR"); | ||
1588 | ai.WriteLine("IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,"); | ||
1589 | ai.WriteLine("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE"); | ||
1590 | ai.WriteLine("AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER"); | ||
1591 | ai.WriteLine("LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,"); | ||
1592 | ai.WriteLine("OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE"); | ||
1593 | ai.WriteLine("SOFTWARE."); | ||
1594 | ai.WriteLine("*/"); | ||
1595 | ai.WriteLine("#endregion License"); | ||
1596 | ai.WriteLine(""); | ||
1597 | ai.WriteLine("using System;"); | ||
1598 | ai.WriteLine("using System.Reflection;"); | ||
1599 | ai.WriteLine("using System.Runtime.InteropServices;"); | ||
1600 | ai.WriteLine("using System.Security;"); | ||
1601 | ai.WriteLine("using System.Security.Permissions;"); | ||
1602 | ai.WriteLine(""); | ||
1603 | ai.WriteLine("[assembly: AllowPartiallyTrustedCallers]"); | ||
1604 | ai.WriteLine("[assembly: AssemblyCompany(\"Tao Framework -- http://www.taoframework.com\")]"); | ||
1605 | ai.WriteLine("[assembly: AssemblyConfiguration(\"Retail\")]"); | ||
1606 | ai.WriteLine("[assembly: AssemblyCopyright(\"Copyright (c)2003-2006 Tao Framework Team. All rights reserved.\")]"); | ||
1607 | ai.WriteLine("[assembly: AssemblyCulture(\"\")]"); | ||
1608 | ai.WriteLine("[assembly: AssemblyDefaultAlias(\"@PACKAGE_NAME@\")]"); | ||
1609 | ai.WriteLine("[assembly: AssemblyDelaySign(false)]"); | ||
1610 | ai.WriteLine("[assembly: AssemblyDescription(\"@DESCRIPTION@\")]"); | ||
1611 | ai.WriteLine("[assembly: AssemblyFileVersion(\"@ASSEMBLY_VERSION@\")]"); | ||
1612 | ai.WriteLine("[assembly: AssemblyInformationalVersion(\"@ASSEMBLY_VERSION@\")]"); | ||
1613 | ai.WriteLine("[assembly: AssemblyKeyName(\"\")]"); | ||
1614 | ai.WriteLine("[assembly: AssemblyProduct(\"@PACKAGE_NAME@.dll\")]"); | ||
1615 | ai.WriteLine("[assembly: AssemblyTitle(\"@DESCRIPTION@\")]"); | ||
1616 | ai.WriteLine("[assembly: AssemblyTrademark(\"Tao Framework -- http://www.taoframework.com\")]"); | ||
1617 | ai.WriteLine("[assembly: AssemblyVersion(\"@ASSEMBLY_VERSION@\")]"); | ||
1618 | ai.WriteLine("[assembly: CLSCompliant(true)]"); | ||
1619 | ai.WriteLine("[assembly: ComVisible(false)]"); | ||
1620 | ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]"); | ||
1621 | ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]"); | ||
1622 | ai.WriteLine("[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]"); | ||
1623 | |||
1624 | } | ||
1625 | //return combFile; | ||
1626 | } | ||
1627 | |||
1628 | private void CleanProject(ProjectNode project) | 917 | private void CleanProject(ProjectNode project) |
1629 | { | 918 | { |
1630 | m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); | 919 | m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); |
@@ -1677,7 +966,7 @@ namespace Prebuild.Core.Targets | |||
1677 | m_Kernel.Log.Write("Parsing system pkg-config files"); | 966 | m_Kernel.Log.Write("Parsing system pkg-config files"); |
1678 | RunInitialization(); | 967 | RunInitialization(); |
1679 | 968 | ||
1680 | string streamName = "autotools.xml"; | 969 | const string streamName = "autotools.xml"; |
1681 | string fqStreamName = String.Format("Prebuild.data.{0}", | 970 | string fqStreamName = String.Format("Prebuild.data.{0}", |
1682 | streamName | 971 | streamName |
1683 | ); | 972 | ); |
@@ -1727,10 +1016,9 @@ namespace Prebuild.Core.Targets | |||
1727 | 1016 | ||
1728 | string pwd = Directory.GetCurrentDirectory(); | 1017 | string pwd = Directory.GetCurrentDirectory(); |
1729 | //string pwd = System.Environment.GetEnvironmentVariable("PWD"); | 1018 | //string pwd = System.Environment.GetEnvironmentVariable("PWD"); |
1730 | string rootDir = ""; | ||
1731 | //if (pwd.Length != 0) | 1019 | //if (pwd.Length != 0) |
1732 | //{ | 1020 | //{ |
1733 | rootDir = Path.Combine(pwd, "autotools"); | 1021 | string rootDir = Path.Combine(pwd, "autotools"); |
1734 | //} | 1022 | //} |
1735 | //else | 1023 | //else |
1736 | //{ | 1024 | //{ |
diff --git a/Prebuild/src/Core/Targets/DebugTarget.cs b/Prebuild/src/Core/Targets/DebugTarget.cs index dc4e666..650007e 100644 --- a/Prebuild/src/Core/Targets/DebugTarget.cs +++ b/Prebuild/src/Core/Targets/DebugTarget.cs | |||
@@ -27,7 +27,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: jendave $ |
30 | * $Date: 2006-09-20 09:42:51 +0200 (on, 20 sep 2006) $ | 30 | * $Date: 2006-09-20 08:42:51 +0100 (Wed, 20 Sep 2006) $ |
31 | * $Revision: 164 $ | 31 | * $Revision: 164 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
diff --git a/Prebuild/src/Core/Targets/MakefileTarget.cs b/Prebuild/src/Core/Targets/MakefileTarget.cs index 86676d0..54046dd 100644 --- a/Prebuild/src/Core/Targets/MakefileTarget.cs +++ b/Prebuild/src/Core/Targets/MakefileTarget.cs | |||
@@ -24,8 +24,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | 27 | using System.IO; |
30 | using System.Text.RegularExpressions; | 28 | using System.Text.RegularExpressions; |
31 | 29 | ||
@@ -110,7 +108,7 @@ namespace Prebuild.Core.Targets | |||
110 | { | 108 | { |
111 | string path; | 109 | string path; |
112 | // Project references change with configurations. | 110 | // Project references change with configurations. |
113 | if (solution.ProjectsTable.Contains(refr.Name)) | 111 | if (solution.ProjectsTable.ContainsKey(refr.Name)) |
114 | continue; | 112 | continue; |
115 | path = FindFileReference(refr.Name, project); | 113 | path = FindFileReference(refr.Name, project); |
116 | if (path != null) | 114 | if (path != null) |
@@ -220,7 +218,7 @@ namespace Prebuild.Core.Targets | |||
220 | } | 218 | } |
221 | // Dependencies on other projects. | 219 | // Dependencies on other projects. |
222 | foreach (ReferenceNode refr in project.References) | 220 | foreach (ReferenceNode refr in project.References) |
223 | if (solution.ProjectsTable.Contains(refr.Name)) | 221 | if (solution.ProjectsTable.ContainsKey(refr.Name)) |
224 | { | 222 | { |
225 | ProjectNode refProj = (ProjectNode)solution.ProjectsTable[refr.Name]; | 223 | ProjectNode refProj = (ProjectNode)solution.ProjectsTable[refr.Name]; |
226 | if (ProjectClashes(refProj)) | 224 | if (ProjectClashes(refProj)) |
@@ -256,7 +254,7 @@ namespace Prebuild.Core.Targets | |||
256 | // Build references to other projects. Now that sux. | 254 | // Build references to other projects. Now that sux. |
257 | // We have to reference the other project in the same conf. | 255 | // We have to reference the other project in the same conf. |
258 | foreach (ReferenceNode refr in project.References) | 256 | foreach (ReferenceNode refr in project.References) |
259 | if (solution.ProjectsTable.Contains(refr.Name)) | 257 | if (solution.ProjectsTable.ContainsKey(refr.Name)) |
260 | { | 258 | { |
261 | ProjectNode refProj; | 259 | ProjectNode refProj; |
262 | refProj = (ProjectNode)solution.ProjectsTable[refr.Name]; | 260 | refProj = (ProjectNode)solution.ProjectsTable[refr.Name]; |
@@ -274,7 +272,7 @@ namespace Prebuild.Core.Targets | |||
274 | { | 272 | { |
275 | string outPath, srcPath, destPath; | 273 | string outPath, srcPath, destPath; |
276 | outPath = Helper.NormalizePath((string)conf.Options["OutputPath"]); | 274 | outPath = Helper.NormalizePath((string)conf.Options["OutputPath"]); |
277 | if (solution.ProjectsTable.Contains(refr.Name)) | 275 | if (solution.ProjectsTable.ContainsKey(refr.Name)) |
278 | { | 276 | { |
279 | ProjectNode refProj; | 277 | ProjectNode refProj; |
280 | refProj = (ProjectNode)solution.ProjectsTable[refr.Name]; | 278 | refProj = (ProjectNode)solution.ProjectsTable[refr.Name]; |
diff --git a/Prebuild/src/Core/Targets/MonoDevelopTarget.cs b/Prebuild/src/Core/Targets/MonoDevelopTarget.cs index c8401fd..ea6d2c2 100644 --- a/Prebuild/src/Core/Targets/MonoDevelopTarget.cs +++ b/Prebuild/src/Core/Targets/MonoDevelopTarget.cs | |||
@@ -24,8 +24,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | 27 | using System.IO; |
30 | using System.Reflection; | 28 | using System.Reflection; |
31 | using System.Text.RegularExpressions; | 29 | using System.Text.RegularExpressions; |
@@ -274,7 +272,11 @@ namespace Prebuild.Core.Targets | |||
274 | ss.WriteLine(" <Contents>"); | 272 | ss.WriteLine(" <Contents>"); |
275 | foreach(string file in project.Files) | 273 | foreach(string file in project.Files) |
276 | { | 274 | { |
277 | string buildAction = "Compile"; | 275 | string buildAction; |
276 | string dependson = ""; | ||
277 | string resource_id = ""; | ||
278 | string copyToOutput = ""; | ||
279 | |||
278 | switch(project.Files.GetBuildAction(file)) | 280 | switch(project.Files.GetBuildAction(file)) |
279 | { | 281 | { |
280 | case BuildAction.None: | 282 | case BuildAction.None: |
@@ -294,9 +296,58 @@ namespace Prebuild.Core.Targets | |||
294 | break; | 296 | break; |
295 | } | 297 | } |
296 | 298 | ||
299 | if (project.Files.GetCopyToOutput(file) != CopyToOutput.Never) | ||
300 | buildAction = "FileCopy"; | ||
301 | |||
297 | // Sort of a hack, we try and resolve the path and make it relative, if we can. | 302 | // Sort of a hack, we try and resolve the path and make it relative, if we can. |
298 | string filePath = PrependPath(file); | 303 | string extension = Path.GetExtension(file); |
299 | ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\" dependson=\"\" data=\"\" />", filePath, buildAction); | 304 | string designer_format = string.Format(".Designer{0}", extension); |
305 | |||
306 | if (file.EndsWith(designer_format)) | ||
307 | { | ||
308 | string basename = file.Substring(0, file.LastIndexOf(designer_format)); | ||
309 | string[] extensions = new string[] { ".cs", ".resx", ".settings" }; | ||
310 | |||
311 | foreach(string ext in extensions) | ||
312 | { | ||
313 | if (project.Files.Contains(basename + ext)) | ||
314 | { | ||
315 | dependson = string.Format(" dependson=\"{0}{1}\"", basename, ext); | ||
316 | break; | ||
317 | } | ||
318 | } | ||
319 | } | ||
320 | if (extension == ".resx") | ||
321 | { | ||
322 | buildAction = "EmbedAsResource"; | ||
323 | string basename = file.Substring(0, file.LastIndexOf(".resx")); | ||
324 | |||
325 | // Visual Studio type resx + form dependency | ||
326 | if (project.Files.Contains(basename + ".cs")) | ||
327 | { | ||
328 | dependson = string.Format(" dependson=\"{0}{1}\"", basename, ".cs"); | ||
329 | } | ||
330 | |||
331 | // We need to specify a resources file name to avoid MissingManifestResourceExceptions | ||
332 | // in libraries that are built. | ||
333 | resource_id = string.Format(" resource_id=\"{0}.{1}.resources\"", | ||
334 | project.AssemblyName, basename.Replace("/", ".")); | ||
335 | } | ||
336 | |||
337 | switch(project.Files.GetCopyToOutput(file)) | ||
338 | { | ||
339 | case CopyToOutput.Always: | ||
340 | copyToOutput = string.Format(" copyToOutputDirectory=\"Always\""); | ||
341 | break; | ||
342 | case CopyToOutput.PreserveNewest: | ||
343 | copyToOutput = string.Format(" copyToOutputDirectory=\"PreserveNewest\""); | ||
344 | break; | ||
345 | } | ||
346 | |||
347 | // Sort of a hack, we try and resolve the path and make it relative, if we can. | ||
348 | string filePath = PrependPath(file); | ||
349 | ss.WriteLine(" <File name=\"{0}\" subtype=\"Code\" buildaction=\"{1}\"{2}{3}{4} />", | ||
350 | filePath, buildAction, dependson, resource_id, copyToOutput); | ||
300 | } | 351 | } |
301 | ss.WriteLine(" </Contents>"); | 352 | ss.WriteLine(" </Contents>"); |
302 | 353 | ||
diff --git a/Prebuild/src/Core/Targets/NAntTarget.cs b/Prebuild/src/Core/Targets/NAntTarget.cs index 9a6ee17..d4a33f8 100644 --- a/Prebuild/src/Core/Targets/NAntTarget.cs +++ b/Prebuild/src/Core/Targets/NAntTarget.cs | |||
@@ -36,10 +36,8 @@ POSSIBILITY OF SUCH DAMAGE. | |||
36 | #endregion | 36 | #endregion |
37 | 37 | ||
38 | using System; | 38 | using System; |
39 | using System.Collections; | 39 | using System.Collections.Generic; |
40 | using System.Collections.Specialized; | ||
41 | using System.IO; | 40 | using System.IO; |
42 | using System.Reflection; | ||
43 | using System.Text.RegularExpressions; | 41 | using System.Text.RegularExpressions; |
44 | 42 | ||
45 | using Prebuild.Core.Attributes; | 43 | using Prebuild.Core.Attributes; |
@@ -255,9 +253,12 @@ namespace Prebuild.Core.Targets | |||
255 | ss.WriteLine(" {0}", "</fileset>"); | 253 | ss.WriteLine(" {0}", "</fileset>"); |
256 | ss.WriteLine(" {0}", "</copy>"); | 254 | ss.WriteLine(" {0}", "</copy>"); |
257 | 255 | ||
258 | ss.Write(" <csc"); | 256 | ss.Write(" <csc "); |
259 | ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower()); | 257 | ss.Write(" target=\"{0}\"", project.Type.ToString().ToLower()); |
260 | ss.Write(" debug=\"{0}\"", "${build.debug}"); | 258 | ss.Write(" debug=\"{0}\"", "${build.debug}"); |
259 | ss.Write(" platform=\"${build.platform}\""); | ||
260 | |||
261 | |||
261 | foreach (ConfigurationNode conf in project.Configurations) | 262 | foreach (ConfigurationNode conf in project.Configurations) |
262 | { | 263 | { |
263 | if (conf.Options.KeyFile != "") | 264 | if (conf.Options.KeyFile != "") |
@@ -311,7 +312,12 @@ namespace Prebuild.Core.Targets | |||
311 | { | 312 | { |
312 | ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon, '/')); | 313 | ss.Write(" win32icon=\"{0}\"", Helper.NormalizePath(project.AppIcon, '/')); |
313 | } | 314 | } |
314 | ss.WriteLine(">"); | 315 | // This disables a very different behavior between VS and NAnt. With Nant, |
316 | // If you have using System.Xml; it will ensure System.Xml.dll is referenced, | ||
317 | // but not in VS. This will force the behaviors to match, so when it works | ||
318 | // in nant, it will work in VS. | ||
319 | ss.Write(" noconfig=\"true\""); | ||
320 | ss.WriteLine(">"); | ||
315 | ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace); | 321 | ss.WriteLine(" <resources prefix=\"{0}\" dynamicprefix=\"true\" >", project.RootNamespace); |
316 | foreach (string file in project.Files) | 322 | foreach (string file in project.Files) |
317 | { | 323 | { |
@@ -357,7 +363,20 @@ namespace Prebuild.Core.Targets | |||
357 | foreach (ReferenceNode refr in project.References) | 363 | foreach (ReferenceNode refr in project.References) |
358 | { | 364 | { |
359 | string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)), '/'); | 365 | string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReference(solution, project, refr)), '/'); |
360 | ss.WriteLine(" <include name=\"" + path + "\" />"); | 366 | if (refr.Path != null) { |
367 | if (ExtensionSpecified(refr.Name)) | ||
368 | { | ||
369 | ss.WriteLine (" <include name=\"" + path + refr.Name + "\"/>"); | ||
370 | } | ||
371 | else | ||
372 | { | ||
373 | ss.WriteLine (" <include name=\"" + path + refr.Name + ".dll\"/>"); | ||
374 | } | ||
375 | } | ||
376 | else | ||
377 | { | ||
378 | ss.WriteLine (" <include name=\"" + path + "\" />"); | ||
379 | } | ||
361 | } | 380 | } |
362 | ss.WriteLine(" </references>"); | 381 | ss.WriteLine(" </references>"); |
363 | 382 | ||
@@ -490,15 +509,32 @@ namespace Prebuild.Core.Targets | |||
490 | ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />"); | 509 | ss.WriteLine(" <property name=\"doc.dir\" value=\"doc\" />"); |
491 | ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />"); | 510 | ss.WriteLine(" <property name=\"project.main.dir\" value=\"${project::get-base-directory()}\" />"); |
492 | 511 | ||
493 | // actually use active config out of prebuild.xml | 512 | // Use the active configuration, which is the first configuration name in the prebuild file. |
494 | ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", solution.ActiveConfig); | 513 | Dictionary<string,string> emittedConfigurations = new Dictionary<string, string>(); |
514 | |||
515 | ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", solution.ActiveConfig); | ||
516 | ss.WriteLine(); | ||
495 | 517 | ||
496 | foreach (ConfigurationNode conf in solution.Configurations) | 518 | foreach (ConfigurationNode conf in solution.Configurations) |
497 | { | 519 | { |
498 | ss.WriteLine(); | 520 | // If the name isn't in the emitted configurations, we give a high level target to the |
499 | ss.WriteLine(" <target name=\"{0}\" description=\"\">", conf.Name); | 521 | // platform specific on. This lets "Debug" point to "Debug-AnyCPU". |
522 | if (!emittedConfigurations.ContainsKey(conf.Name)) | ||
523 | { | ||
524 | // Add it to the dictionary so we only emit one. | ||
525 | emittedConfigurations.Add(conf.Name, conf.Platform); | ||
526 | |||
527 | // Write out the target block. | ||
528 | ss.WriteLine(" <target name=\"{0}\" description=\"{0}|{1}\" depends=\"{0}-{1}\">", conf.Name, conf.Platform); | ||
529 | ss.WriteLine(" </target>"); | ||
530 | ss.WriteLine(); | ||
531 | } | ||
532 | |||
533 | // Write out the target for the configuration. | ||
534 | ss.WriteLine(" <target name=\"{0}-{1}\" description=\"{0}|{1}\">", conf.Name, conf.Platform); | ||
500 | ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name); | 535 | ss.WriteLine(" <property name=\"project.config\" value=\"{0}\" />", conf.Name); |
501 | ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower()); | 536 | ss.WriteLine(" <property name=\"build.debug\" value=\"{0}\" />", conf.Options["DebugInformation"].ToString().ToLower()); |
537 | ss.WriteLine("\t\t <property name=\"build.platform\" value=\"{0}\" />", conf.Platform); | ||
502 | ss.WriteLine(" </target>"); | 538 | ss.WriteLine(" </target>"); |
503 | ss.WriteLine(); | 539 | ss.WriteLine(); |
504 | } | 540 | } |
@@ -559,19 +595,19 @@ namespace Prebuild.Core.Targets | |||
559 | if (item is DirectoryInfo) { } | 595 | if (item is DirectoryInfo) { } |
560 | else if (item is FileInfo) | 596 | else if (item is FileInfo) |
561 | { | 597 | { |
562 | if (re.Match(((FileInfo)item).FullName) != | 598 | if (re.Match(item.FullName) != |
563 | System.Text.RegularExpressions.Match.Empty) | 599 | System.Text.RegularExpressions.Match.Empty) |
564 | { | 600 | { |
565 | Console.WriteLine("Including file: " + ((FileInfo)item).FullName); | 601 | Console.WriteLine("Including file: " + item.FullName); |
566 | 602 | ||
567 | using (FileStream fs = new FileStream(((FileInfo)item).FullName, | 603 | using (FileStream fs = new FileStream(item.FullName, |
568 | FileMode.Open, | 604 | FileMode.Open, |
569 | FileAccess.Read, | 605 | FileAccess.Read, |
570 | FileShare.None)) | 606 | FileShare.None)) |
571 | { | 607 | { |
572 | using (StreamReader sr = new StreamReader(fs)) | 608 | using (StreamReader sr = new StreamReader(fs)) |
573 | { | 609 | { |
574 | ss.WriteLine("<!-- included from {0} -->", ((FileInfo)item).FullName); | 610 | ss.WriteLine("<!-- included from {0} -->", (item).FullName); |
575 | while (sr.Peek() != -1) | 611 | while (sr.Peek() != -1) |
576 | { | 612 | { |
577 | ss.WriteLine(sr.ReadLine()); | 613 | ss.WriteLine(sr.ReadLine()); |
@@ -601,6 +637,10 @@ namespace Prebuild.Core.Targets | |||
601 | ss.WriteLine(" <target name=\"clean\" description=\"\">"); | 637 | ss.WriteLine(" <target name=\"clean\" description=\"\">"); |
602 | ss.WriteLine(" <echo message=\"Deleting all builds from all configurations\" />"); | 638 | ss.WriteLine(" <echo message=\"Deleting all builds from all configurations\" />"); |
603 | //ss.WriteLine(" <delete dir=\"${dist.dir}\" failonerror=\"false\" />"); | 639 | //ss.WriteLine(" <delete dir=\"${dist.dir}\" failonerror=\"false\" />"); |
640 | |||
641 | // justincc: FIXME FIXME FIXME - A temporary OpenSim hack to clean up files when "nant clean" is executed. | ||
642 | // Should be replaced with extreme prejudice once anybody finds out if the CleanFiles stuff works or there is | ||
643 | // another working mechanism for specifying this stuff | ||
604 | ss.WriteLine(" <delete failonerror=\"false\">"); | 644 | ss.WriteLine(" <delete failonerror=\"false\">"); |
605 | ss.WriteLine(" <fileset basedir=\"${bin.dir}\">"); | 645 | ss.WriteLine(" <fileset basedir=\"${bin.dir}\">"); |
606 | ss.WriteLine(" <include name=\"OpenSim*.dll\"/>"); | 646 | ss.WriteLine(" <include name=\"OpenSim*.dll\"/>"); |
@@ -611,7 +651,21 @@ namespace Prebuild.Core.Targets | |||
611 | ss.WriteLine(" <exclude name=\"ScriptEngines/Default.lsl\"/>"); | 651 | ss.WriteLine(" <exclude name=\"ScriptEngines/Default.lsl\"/>"); |
612 | ss.WriteLine(" </fileset>"); | 652 | ss.WriteLine(" </fileset>"); |
613 | ss.WriteLine(" </delete>"); | 653 | ss.WriteLine(" </delete>"); |
614 | ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />"); | 654 | |
655 | if (solution.Cleanup != null && solution.Cleanup.CleanFiles.Count > 0) | ||
656 | { | ||
657 | foreach (CleanFilesNode cleanFile in solution.Cleanup.CleanFiles) | ||
658 | { | ||
659 | ss.WriteLine(" <delete failonerror=\"false\">"); | ||
660 | ss.WriteLine(" <fileset basedir=\"${project::get-base-directory()}\">"); | ||
661 | ss.WriteLine(" <include name=\"{0}/*\"/>", cleanFile.Pattern); | ||
662 | ss.WriteLine(" <include name=\"{0}\"/>", cleanFile.Pattern); | ||
663 | ss.WriteLine(" </fileset>"); | ||
664 | ss.WriteLine(" </delete>"); | ||
665 | } | ||
666 | } | ||
667 | |||
668 | ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />"); | ||
615 | foreach (ProjectNode project in solution.Projects) | 669 | foreach (ProjectNode project in solution.Projects) |
616 | { | 670 | { |
617 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | 671 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); |
diff --git a/Prebuild/src/Core/Targets/SharpDevelopTarget.cs b/Prebuild/src/Core/Targets/SharpDevelopTarget.cs index cf7ce02..8e32050 100644 --- a/Prebuild/src/Core/Targets/SharpDevelopTarget.cs +++ b/Prebuild/src/Core/Targets/SharpDevelopTarget.cs | |||
@@ -24,11 +24,8 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | 27 | using System.IO; |
30 | using System.Text.RegularExpressions; | 28 | using System.Text.RegularExpressions; |
31 | using System.Reflection; | ||
32 | 29 | ||
33 | using Prebuild.Core.Attributes; | 30 | using Prebuild.Core.Attributes; |
34 | using Prebuild.Core.Interfaces; | 31 | using Prebuild.Core.Interfaces; |
diff --git a/Prebuild/src/Core/Targets/VS2003Target.cs b/Prebuild/src/Core/Targets/VS2003Target.cs index 1bcb7dc..10e2dc4 100644 --- a/Prebuild/src/Core/Targets/VS2003Target.cs +++ b/Prebuild/src/Core/Targets/VS2003Target.cs | |||
@@ -24,8 +24,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | 27 | using System.Collections.Generic; |
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | 28 | using System.IO; |
30 | 29 | ||
31 | using Prebuild.Core.Attributes; | 30 | using Prebuild.Core.Attributes; |
@@ -47,7 +46,7 @@ namespace Prebuild.Core.Targets | |||
47 | string versionName = "2003"; | 46 | string versionName = "2003"; |
48 | VSVersion version = VSVersion.VS71; | 47 | VSVersion version = VSVersion.VS71; |
49 | 48 | ||
50 | Hashtable m_Tools; | 49 | readonly Dictionary<string, ToolInfo> m_Tools = new Dictionary<string, ToolInfo>(); |
51 | Kernel m_Kernel; | 50 | Kernel m_Kernel; |
52 | 51 | ||
53 | /// <summary> | 52 | /// <summary> |
@@ -58,11 +57,11 @@ namespace Prebuild.Core.Targets | |||
58 | { | 57 | { |
59 | get | 58 | get |
60 | { | 59 | { |
61 | return this.solutionVersion; | 60 | return solutionVersion; |
62 | } | 61 | } |
63 | set | 62 | set |
64 | { | 63 | { |
65 | this.solutionVersion = value; | 64 | solutionVersion = value; |
66 | } | 65 | } |
67 | } | 66 | } |
68 | /// <summary> | 67 | /// <summary> |
@@ -73,11 +72,11 @@ namespace Prebuild.Core.Targets | |||
73 | { | 72 | { |
74 | get | 73 | get |
75 | { | 74 | { |
76 | return this.productVersion; | 75 | return productVersion; |
77 | } | 76 | } |
78 | set | 77 | set |
79 | { | 78 | { |
80 | this.productVersion = value; | 79 | productVersion = value; |
81 | } | 80 | } |
82 | } | 81 | } |
83 | /// <summary> | 82 | /// <summary> |
@@ -88,11 +87,11 @@ namespace Prebuild.Core.Targets | |||
88 | { | 87 | { |
89 | get | 88 | get |
90 | { | 89 | { |
91 | return this.schemaVersion; | 90 | return schemaVersion; |
92 | } | 91 | } |
93 | set | 92 | set |
94 | { | 93 | { |
95 | this.schemaVersion = value; | 94 | schemaVersion = value; |
96 | } | 95 | } |
97 | } | 96 | } |
98 | /// <summary> | 97 | /// <summary> |
@@ -103,11 +102,11 @@ namespace Prebuild.Core.Targets | |||
103 | { | 102 | { |
104 | get | 103 | get |
105 | { | 104 | { |
106 | return this.versionName; | 105 | return versionName; |
107 | } | 106 | } |
108 | set | 107 | set |
109 | { | 108 | { |
110 | this.versionName = value; | 109 | versionName = value; |
111 | } | 110 | } |
112 | } | 111 | } |
113 | /// <summary> | 112 | /// <summary> |
@@ -118,11 +117,11 @@ namespace Prebuild.Core.Targets | |||
118 | { | 117 | { |
119 | get | 118 | get |
120 | { | 119 | { |
121 | return this.version; | 120 | return version; |
122 | } | 121 | } |
123 | set | 122 | set |
124 | { | 123 | { |
125 | this.version = value; | 124 | version = value; |
126 | } | 125 | } |
127 | } | 126 | } |
128 | 127 | ||
@@ -135,8 +134,6 @@ namespace Prebuild.Core.Targets | |||
135 | /// </summary> | 134 | /// </summary> |
136 | public VS2003Target() | 135 | public VS2003Target() |
137 | { | 136 | { |
138 | m_Tools = new Hashtable(); | ||
139 | |||
140 | m_Tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP"); | 137 | m_Tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP"); |
141 | m_Tools["VB.NET"] = new ToolInfo("VB.NET", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic"); | 138 | m_Tools["VB.NET"] = new ToolInfo("VB.NET", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic"); |
142 | } | 139 | } |
@@ -178,23 +175,20 @@ namespace Prebuild.Core.Targets | |||
178 | throw new UnknownLanguageException("Unknown .NET language: " + project.Language); | 175 | throw new UnknownLanguageException("Unknown .NET language: " + project.Language); |
179 | } | 176 | } |
180 | 177 | ||
181 | ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language]; | 178 | ToolInfo toolInfo = m_Tools[project.Language]; |
182 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); | 179 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); |
183 | StreamWriter ps = new StreamWriter(projectFile); | 180 | StreamWriter ps = new StreamWriter(projectFile); |
184 | 181 | ||
185 | m_Kernel.CurrentWorkingDirectory.Push(); | 182 | m_Kernel.CurrentWorkingDirectory.Push(); |
186 | Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); | 183 | Helper.SetCurrentDir(Path.GetDirectoryName(projectFile)); |
187 | 184 | ||
188 | IEnumerator enumerator; | ||
189 | //ConfigurationNode scripts; | ||
190 | |||
191 | using(ps) | 185 | using(ps) |
192 | { | 186 | { |
193 | ps.WriteLine("<VisualStudioProject>"); | 187 | ps.WriteLine("<VisualStudioProject>"); |
194 | ps.WriteLine(" <{0}", toolInfo.XmlTag); | 188 | ps.WriteLine(" <{0}", toolInfo.XmlTag); |
195 | ps.WriteLine("\t\t\t\tProjectType = \"Local\""); | 189 | ps.WriteLine("\t\t\t\tProjectType = \"Local\""); |
196 | ps.WriteLine("\t\t\t\tProductVersion = \"{0}\"", this.ProductVersion); | 190 | ps.WriteLine("\t\t\t\tProductVersion = \"{0}\"", ProductVersion); |
197 | ps.WriteLine("\t\t\t\tSchemaVersion = \"{0}\"", this.SchemaVersion); | 191 | ps.WriteLine("\t\t\t\tSchemaVersion = \"{0}\"", SchemaVersion); |
198 | ps.WriteLine("\t\t\t\tProjectGuid = \"{{{0}}}\"", project.Guid.ToString().ToUpper()); | 192 | ps.WriteLine("\t\t\t\tProjectGuid = \"{{{0}}}\"", project.Guid.ToString().ToUpper()); |
199 | ps.WriteLine("\t\t>"); | 193 | ps.WriteLine("\t\t>"); |
200 | 194 | ||
@@ -209,16 +203,13 @@ namespace Prebuild.Core.Targets | |||
209 | ps.WriteLine("\t\t\t\t DefaultTargetSchema = \"IE50\""); | 203 | ps.WriteLine("\t\t\t\t DefaultTargetSchema = \"IE50\""); |
210 | ps.WriteLine("\t\t\t\t DelaySign = \"false\""); | 204 | ps.WriteLine("\t\t\t\t DelaySign = \"false\""); |
211 | 205 | ||
212 | if(this.Version == VSVersion.VS70) | 206 | if(Version == VSVersion.VS70) |
213 | { | 207 | { |
214 | ps.WriteLine("\t\t\t\t NoStandardLibraries = \"false\""); | 208 | ps.WriteLine("\t\t\t\t NoStandardLibraries = \"false\""); |
215 | } | 209 | } |
216 | 210 | ||
217 | ps.WriteLine("\t\t\t\t OutputType = \"{0}\"", project.Type.ToString()); | 211 | ps.WriteLine("\t\t\t\t OutputType = \"{0}\"", project.Type); |
218 | 212 | ||
219 | enumerator = project.Configurations.GetEnumerator(); | ||
220 | enumerator.Reset(); | ||
221 | enumerator.MoveNext(); | ||
222 | foreach(ConfigurationNode conf in project.Configurations) | 213 | foreach(ConfigurationNode conf in project.Configurations) |
223 | { | 214 | { |
224 | if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) | 215 | if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) |
@@ -266,7 +257,7 @@ namespace Prebuild.Core.Targets | |||
266 | ps.WriteLine("\t\t\t\t FileAlignment = \"{0}\"", conf.Options["FileAlignment"]); | 257 | ps.WriteLine("\t\t\t\t FileAlignment = \"{0}\"", conf.Options["FileAlignment"]); |
267 | ps.WriteLine("\t\t\t\t IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"].ToString().ToLower()); | 258 | ps.WriteLine("\t\t\t\t IncrementalBuild = \"{0}\"", conf.Options["IncrementalBuild"].ToString().ToLower()); |
268 | 259 | ||
269 | if(this.Version == VSVersion.VS71) | 260 | if(Version == VSVersion.VS71) |
270 | { | 261 | { |
271 | ps.WriteLine("\t\t\t\t NoStdLib = \"{0}\"", conf.Options["NoStdLib"].ToString().ToLower()); | 262 | ps.WriteLine("\t\t\t\t NoStdLib = \"{0}\"", conf.Options["NoStdLib"].ToString().ToLower()); |
272 | ps.WriteLine("\t\t\t\t NoWarn = \"{0}\"", conf.Options["SuppressWarnings"].ToString().ToLower()); | 263 | ps.WriteLine("\t\t\t\t NoWarn = \"{0}\"", conf.Options["SuppressWarnings"].ToString().ToLower()); |
@@ -293,9 +284,9 @@ namespace Prebuild.Core.Targets | |||
293 | 284 | ||
294 | if(solution.ProjectsTable.ContainsKey(refr.Name)) | 285 | if(solution.ProjectsTable.ContainsKey(refr.Name)) |
295 | { | 286 | { |
296 | ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name]; | 287 | ProjectNode refProject = solution.ProjectsTable[refr.Name]; |
297 | ps.WriteLine(" Project = \"{{{0}}}\"", refProject.Guid.ToString().ToUpper()); | 288 | ps.WriteLine(" Project = \"{{{0}}}\"", refProject.Guid.ToString().ToUpper()); |
298 | ps.WriteLine(" Package = \"{0}\"", toolInfo.Guid.ToString().ToUpper()); | 289 | ps.WriteLine(" Package = \"{0}\"", toolInfo.Guid.ToUpper()); |
299 | } | 290 | } |
300 | else | 291 | else |
301 | { | 292 | { |
@@ -409,7 +400,7 @@ namespace Prebuild.Core.Targets | |||
409 | 400 | ||
410 | private void WriteSolution(SolutionNode solution) | 401 | private void WriteSolution(SolutionNode solution) |
411 | { | 402 | { |
412 | m_Kernel.Log.Write("Creating Visual Studio {0} solution and project files", this.VersionName); | 403 | m_Kernel.Log.Write("Creating Visual Studio {0} solution and project files", VersionName); |
413 | 404 | ||
414 | foreach(ProjectNode project in solution.Projects) | 405 | foreach(ProjectNode project in solution.Projects) |
415 | { | 406 | { |
@@ -429,7 +420,7 @@ namespace Prebuild.Core.Targets | |||
429 | 420 | ||
430 | using(ss) | 421 | using(ss) |
431 | { | 422 | { |
432 | ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion); | 423 | ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", SolutionVersion); |
433 | foreach(ProjectNode project in solution.Projects) | 424 | foreach(ProjectNode project in solution.Projects) |
434 | { | 425 | { |
435 | if(!m_Tools.ContainsKey(project.Language)) | 426 | if(!m_Tools.ContainsKey(project.Language)) |
@@ -437,7 +428,7 @@ namespace Prebuild.Core.Targets | |||
437 | throw new UnknownLanguageException("Unknown .NET language: " + project.Language); | 428 | throw new UnknownLanguageException("Unknown .NET language: " + project.Language); |
438 | } | 429 | } |
439 | 430 | ||
440 | ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language]; | 431 | ToolInfo toolInfo = m_Tools[project.Language]; |
441 | 432 | ||
442 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); | 433 | string path = Helper.MakePathRelativeTo(solution.FullPath, project.FullPath); |
443 | ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"", | 434 | ss.WriteLine("Project(\"{0}\") = \"{1}\", \"{2}\", \"{{{3}}}\"", |
@@ -464,10 +455,10 @@ namespace Prebuild.Core.Targets | |||
464 | { | 455 | { |
465 | for(int i = 0; i < project.References.Count; i++) | 456 | for(int i = 0; i < project.References.Count; i++) |
466 | { | 457 | { |
467 | ReferenceNode refr = (ReferenceNode)project.References[i]; | 458 | ReferenceNode refr = project.References[i]; |
468 | if(solution.ProjectsTable.ContainsKey(refr.Name)) | 459 | if(solution.ProjectsTable.ContainsKey(refr.Name)) |
469 | { | 460 | { |
470 | ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name]; | 461 | ProjectNode refProject = solution.ProjectsTable[refr.Name]; |
471 | ss.WriteLine("\t\t({{{0}}}).{1} = ({{{2}}})", | 462 | ss.WriteLine("\t\t({{{0}}}).{1} = ({{{2}}})", |
472 | project.Guid.ToString().ToUpper() | 463 | project.Guid.ToString().ToUpper() |
473 | , i, | 464 | , i, |
@@ -519,7 +510,7 @@ namespace Prebuild.Core.Targets | |||
519 | { | 510 | { |
520 | m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); | 511 | m_Kernel.Log.Write("...Cleaning project: {0}", project.Name); |
521 | 512 | ||
522 | ToolInfo toolInfo = (ToolInfo)m_Tools[project.Language]; | 513 | ToolInfo toolInfo = m_Tools[project.Language]; |
523 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); | 514 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); |
524 | string userFile = projectFile + ".user"; | 515 | string userFile = projectFile + ".user"; |
525 | 516 | ||
@@ -529,7 +520,7 @@ namespace Prebuild.Core.Targets | |||
529 | 520 | ||
530 | private void CleanSolution(SolutionNode solution) | 521 | private void CleanSolution(SolutionNode solution) |
531 | { | 522 | { |
532 | m_Kernel.Log.Write("Cleaning Visual Studio {0} solution and project files", this.VersionName, solution.Name); | 523 | m_Kernel.Log.Write("Cleaning Visual Studio {0} solution and project files", VersionName, solution.Name); |
533 | 524 | ||
534 | string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); | 525 | string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); |
535 | string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); | 526 | string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); |
diff --git a/Prebuild/src/Core/Targets/VS2005Target.cs b/Prebuild/src/Core/Targets/VS2005Target.cs index 63461c9..9c70e26 100644 --- a/Prebuild/src/Core/Targets/VS2005Target.cs +++ b/Prebuild/src/Core/Targets/VS2005Target.cs | |||
@@ -24,8 +24,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | 27 | using System.IO; |
30 | using System.Text; | 28 | using System.Text; |
31 | 29 | ||
diff --git a/Prebuild/src/Core/Targets/VS2008Target.cs b/Prebuild/src/Core/Targets/VS2008Target.cs index e685962..fee4f7f 100644 --- a/Prebuild/src/Core/Targets/VS2008Target.cs +++ b/Prebuild/src/Core/Targets/VS2008Target.cs | |||
@@ -1,6 +1,4 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections; | ||
3 | using System.Collections.Specialized; | ||
4 | using System.IO; | 2 | using System.IO; |
5 | using System.Text; | 3 | using System.Text; |
6 | 4 | ||
@@ -27,9 +25,6 @@ namespace Prebuild.Core.Targets | |||
27 | string name = "vs2008"; | 25 | string name = "vs2008"; |
28 | VSVersion version = VSVersion.VS90; | 26 | VSVersion version = VSVersion.VS90; |
29 | 27 | ||
30 | Hashtable tools; | ||
31 | Kernel kernel; | ||
32 | |||
33 | /// <summary> | 28 | /// <summary> |
34 | /// Gets or sets the solution version. | 29 | /// Gets or sets the solution version. |
35 | /// </summary> | 30 | /// </summary> |
@@ -120,7 +115,7 @@ namespace Prebuild.Core.Targets | |||
120 | #region Constructors | 115 | #region Constructors |
121 | 116 | ||
122 | /// <summary> | 117 | /// <summary> |
123 | /// Initializes a new instance of the <see cref="VS2008Target"/> class. | 118 | /// Initializes a new instance of the <see cref="VS2005Target"/> class. |
124 | /// </summary> | 119 | /// </summary> |
125 | public VS2008Target() | 120 | public VS2008Target() |
126 | : base() | 121 | : base() |
diff --git a/Prebuild/src/Core/Targets/VS2010Target.cs b/Prebuild/src/Core/Targets/VS2010Target.cs index 8772d18..b16120c 100644 --- a/Prebuild/src/Core/Targets/VS2010Target.cs +++ b/Prebuild/src/Core/Targets/VS2010Target.cs | |||
@@ -1,6 +1,4 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections; | ||
3 | using System.Collections.Specialized; | ||
4 | using System.IO; | 2 | using System.IO; |
5 | using System.Text; | 3 | using System.Text; |
6 | 4 | ||
@@ -13,98 +11,104 @@ using System.CodeDom.Compiler; | |||
13 | namespace Prebuild.Core.Targets | 11 | namespace Prebuild.Core.Targets |
14 | { | 12 | { |
15 | 13 | ||
16 | /// <summary> | 14 | /// <summary> |
17 | /// | 15 | /// |
18 | /// </summary> | 16 | /// </summary> |
19 | [Target("vs2010")] | 17 | [Target("vs2010")] |
20 | public class VS2010Target : VSGenericTarget | 18 | public class VS2010Target : VSGenericTarget |
21 | { | 19 | { |
22 | #region Fields | 20 | #region Fields |
23 | string solutionVersion = "11.00"; | 21 | |
24 | string productVersion = "9.0.21022"; | 22 | string solutionVersion = "11.00"; |
25 | string schemaVersion = "2.0"; | 23 | string productVersion = "9.0.30729"; |
26 | string versionName = "Visual Studio 2010"; | 24 | string schemaVersion = "2.0"; |
27 | string name = "vs2008"; | 25 | string versionName = "Visual Studio 2010"; |
28 | VSVersion version = VSVersion.VS10; | 26 | string name = "vs2010"; |
27 | VSVersion version = VSVersion.VS10; | ||
29 | 28 | ||
30 | Hashtable tools; | 29 | #endregion |
31 | Kernel kernel; | 30 | |
32 | 31 | #region Properties | |
33 | /// <summary> | 32 | |
34 | /// Gets or sets the solution version. | 33 | /// <summary> |
35 | /// </summary> | 34 | /// Gets or sets the solution version. |
36 | /// <value>The solution version.</value> | 35 | /// </summary> |
37 | public override string SolutionVersion | 36 | /// <value>The solution version.</value> |
38 | { | 37 | public override string SolutionVersion |
39 | get | 38 | { |
40 | { | 39 | get |
41 | return solutionVersion; | 40 | { |
42 | } | 41 | return solutionVersion; |
43 | } | 42 | } |
44 | /// <summary> | 43 | } |
45 | /// Gets or sets the product version. | 44 | |
46 | /// </summary> | 45 | /// <summary> |
47 | /// <value>The product version.</value> | 46 | /// Gets or sets the product version. |
48 | public override string ProductVersion | 47 | /// </summary> |
49 | { | 48 | /// <value>The product version.</value> |
50 | get | 49 | public override string ProductVersion |
51 | { | 50 | { |
52 | return productVersion; | 51 | get |
53 | } | 52 | { |
54 | } | 53 | return productVersion; |
55 | /// <summary> | 54 | } |
56 | /// Gets or sets the schema version. | 55 | } |
57 | /// </summary> | 56 | |
58 | /// <value>The schema version.</value> | 57 | /// <summary> |
59 | public override string SchemaVersion | 58 | /// Gets or sets the schema version. |
60 | { | 59 | /// </summary> |
61 | get | 60 | /// <value>The schema version.</value> |
62 | { | 61 | public override string SchemaVersion |
63 | return schemaVersion; | 62 | { |
64 | } | 63 | get |
65 | } | 64 | { |
66 | /// <summary> | 65 | return schemaVersion; |
67 | /// Gets or sets the name of the version. | 66 | } |
68 | /// </summary> | 67 | } |
69 | /// <value>The name of the version.</value> | 68 | |
70 | public override string VersionName | 69 | /// <summary> |
71 | { | 70 | /// Gets or sets the name of the version. |
72 | get | 71 | /// </summary> |
73 | { | 72 | /// <value>The name of the version.</value> |
74 | return versionName; | 73 | public override string VersionName |
75 | } | 74 | { |
76 | } | 75 | get |
77 | /// <summary> | 76 | { |
78 | /// Gets or sets the version. | 77 | return versionName; |
79 | /// </summary> | 78 | } |
80 | /// <value>The version.</value> | 79 | } |
81 | public override VSVersion Version | 80 | |
82 | { | 81 | /// <summary> |
83 | get | 82 | /// Gets or sets the version. |
84 | { | 83 | /// </summary> |
85 | return version; | 84 | /// <value>The version.</value> |
86 | } | 85 | public override VSVersion Version |
87 | } | 86 | { |
88 | /// <summary> | 87 | get |
89 | /// Gets the name. | 88 | { |
90 | /// </summary> | 89 | return version; |
91 | /// <value>The name.</value> | 90 | } |
92 | public override string Name | 91 | } |
93 | { | 92 | |
94 | get | 93 | /// <summary> |
95 | { | 94 | /// Gets the name. |
96 | return name; | 95 | /// </summary> |
97 | } | 96 | /// <value>The name.</value> |
98 | } | 97 | public override string Name |
98 | { | ||
99 | get | ||
100 | { | ||
101 | return name; | ||
102 | } | ||
103 | } | ||
99 | 104 | ||
100 | protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) | 105 | protected override string GetToolsVersionXml(FrameworkVersion frameworkVersion) |
101 | { | 106 | { |
102 | switch (frameworkVersion) | 107 | switch (frameworkVersion) |
103 | { | 108 | { |
104 | case FrameworkVersion.v4_0: | 109 | case FrameworkVersion.v4_0: |
105 | return "ToolsVersion=\"4.0\""; | ||
106 | case FrameworkVersion.v3_5: | 110 | case FrameworkVersion.v3_5: |
107 | return "ToolsVersion=\"3.5\""; | 111 | return "ToolsVersion=\"4.0\""; |
108 | case FrameworkVersion.v3_0: | 112 | case FrameworkVersion.v3_0: |
109 | return "ToolsVersion=\"3.0\""; | 113 | return "ToolsVersion=\"3.0\""; |
110 | default: | 114 | default: |
@@ -117,18 +121,18 @@ namespace Prebuild.Core.Targets | |||
117 | get { return "# Visual Studio 2010"; } | 121 | get { return "# Visual Studio 2010"; } |
118 | } | 122 | } |
119 | 123 | ||
120 | #endregion | 124 | #endregion |
121 | 125 | ||
122 | #region Constructors | 126 | #region Constructors |
123 | 127 | ||
124 | /// <summary> | 128 | /// <summary> |
125 | /// Initializes a new instance of the <see cref="VS2010Target"/> class. | 129 | /// Initializes a new instance of the <see cref="VS2005Target"/> class. |
126 | /// </summary> | 130 | /// </summary> |
127 | public VS2010Target() | 131 | public VS2010Target() |
128 | : base() | 132 | : base() |
129 | { | 133 | { |
130 | } | 134 | } |
131 | 135 | ||
132 | #endregion | 136 | #endregion |
133 | } | 137 | } |
134 | } | 138 | } |
diff --git a/Prebuild/src/Core/Targets/VSGenericTarget.cs b/Prebuild/src/Core/Targets/VSGenericTarget.cs index fdcc2b9..cd3f5bb 100644 --- a/Prebuild/src/Core/Targets/VSGenericTarget.cs +++ b/Prebuild/src/Core/Targets/VSGenericTarget.cs | |||
@@ -5,32 +5,27 @@ Copyright (c) 2008 Matthew Holmes (matthew@wildfiregames.com), John Anderson (so | |||
5 | Redistribution and use in source and binary forms, with or without modification, are permitted | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted |
6 | provided that the following conditions are met: | 6 | provided that the following conditions are met: |
7 | 7 | ||
8 | * Redistributions of source code must retain the above copyright notice, this list of conditions | 8 | * Redistributions of source code must retain the above copyright notice, this list of conditions |
9 | and the following disclaimer. | 9 | and the following disclaimer. |
10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | 10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions |
11 | and the following disclaimer in the documentation and/or other materials provided with the | 11 | and the following disclaimer in the documentation and/or other materials provided with the |
12 | distribution. | 12 | distribution. |
13 | * The name of the author may not be used to endorse or promote products derived from this software | 13 | * The name of the author may not be used to endorse or promote products derived from this software |
14 | without specific prior written permission. | 14 | without specific prior written permission. |
15 | 15 | ||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | 16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, |
17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 17 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 19 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 20 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | 21 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Generic; | 27 | using System.Collections.Generic; |
29 | using System.Collections.Specialized; | ||
30 | using System.IO; | 28 | using System.IO; |
31 | using System.Text; | ||
32 | |||
33 | using Prebuild.Core.Attributes; | ||
34 | using Prebuild.Core.Interfaces; | 29 | using Prebuild.Core.Interfaces; |
35 | using Prebuild.Core.Nodes; | 30 | using Prebuild.Core.Nodes; |
36 | using Prebuild.Core.Utilities; | 31 | using Prebuild.Core.Utilities; |
@@ -46,59 +41,59 @@ namespace Prebuild.Core.Targets | |||
46 | { | 41 | { |
47 | #region Fields | 42 | #region Fields |
48 | 43 | ||
49 | readonly Hashtable tools = new Hashtable(); | 44 | readonly Dictionary<string, ToolInfo> tools = new Dictionary<string, ToolInfo>(); |
50 | Kernel kernel; | 45 | Kernel kernel; |
51 | #endregion | 46 | #endregion |
52 | 47 | ||
53 | #region Properties | 48 | #region Properties |
54 | /// <summary> | 49 | /// <summary> |
55 | /// Gets or sets the solution version. | 50 | /// Gets or sets the solution version. |
56 | /// </summary> | 51 | /// </summary> |
57 | /// <value>The solution version.</value> | 52 | /// <value>The solution version.</value> |
58 | public abstract string SolutionVersion { get; } | 53 | public abstract string SolutionVersion { get; } |
59 | /// <summary> | 54 | /// <summary> |
60 | /// Gets or sets the product version. | 55 | /// Gets or sets the product version. |
61 | /// </summary> | 56 | /// </summary> |
62 | /// <value>The product version.</value> | 57 | /// <value>The product version.</value> |
63 | public abstract string ProductVersion { get; } | 58 | public abstract string ProductVersion { get; } |
64 | /// <summary> | 59 | /// <summary> |
65 | /// Gets or sets the schema version. | 60 | /// Gets or sets the schema version. |
66 | /// </summary> | 61 | /// </summary> |
67 | /// <value>The schema version.</value> | 62 | /// <value>The schema version.</value> |
68 | public abstract string SchemaVersion { get; } | 63 | public abstract string SchemaVersion { get; } |
69 | /// <summary> | 64 | /// <summary> |
70 | /// Gets or sets the name of the version. | 65 | /// Gets or sets the name of the version. |
71 | /// </summary> | 66 | /// </summary> |
72 | /// <value>The name of the version.</value> | 67 | /// <value>The name of the version.</value> |
73 | public abstract string VersionName { get; } | 68 | public abstract string VersionName { get; } |
74 | /// <summary> | 69 | /// <summary> |
75 | /// Gets or sets the version. | 70 | /// Gets or sets the version. |
76 | /// </summary> | 71 | /// </summary> |
77 | /// <value>The version.</value> | 72 | /// <value>The version.</value> |
78 | public abstract VSVersion Version { get; } | 73 | public abstract VSVersion Version { get; } |
79 | /// <summary> | 74 | /// <summary> |
80 | /// Gets the name. | 75 | /// Gets the name. |
81 | /// </summary> | 76 | /// </summary> |
82 | /// <value>The name.</value> | 77 | /// <value>The name.</value> |
83 | public abstract string Name { get; } | 78 | public abstract string Name { get; } |
84 | 79 | ||
85 | protected abstract string GetToolsVersionXml(FrameworkVersion version); | 80 | protected abstract string GetToolsVersionXml(FrameworkVersion version); |
86 | public abstract string SolutionTag { get; } | 81 | public abstract string SolutionTag { get; } |
87 | 82 | ||
88 | #endregion | 83 | #endregion |
89 | 84 | ||
90 | #region Constructors | 85 | #region Constructors |
91 | 86 | ||
92 | /// <summary> | 87 | /// <summary> |
93 | /// Initializes a new instance of the <see cref="VSGenericTarget"/> class. | 88 | /// Initializes a new instance of the <see cref="VSGenericTarget"/> class. |
94 | /// </summary> | 89 | /// </summary> |
95 | protected VSGenericTarget() | 90 | protected VSGenericTarget() |
96 | { | 91 | { |
97 | this.tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP", "$(MSBuildBinPath)\\Microsoft.CSHARP.Targets"); | 92 | tools["C#"] = new ToolInfo("C#", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}", "csproj", "CSHARP", "$(MSBuildBinPath)\\Microsoft.CSHARP.Targets"); |
98 | this.tools["Database"] = new ToolInfo("Database", "{4F174C21-8C12-11D0-8340-0000F80270F8}", "dbp", "UNKNOWN"); | 93 | tools["Database"] = new ToolInfo("Database", "{4F174C21-8C12-11D0-8340-0000F80270F8}", "dbp", "UNKNOWN"); |
99 | this.tools["Boo"] = new ToolInfo("Boo", "{45CEA7DC-C2ED-48A6-ACE0-E16144C02365}", "booproj", "Boo", "$(BooBinPath)\\Boo.Microsoft.Build.targets"); | 94 | tools["Boo"] = new ToolInfo("Boo", "{45CEA7DC-C2ED-48A6-ACE0-E16144C02365}", "booproj", "Boo", "$(BooBinPath)\\Boo.Microsoft.Build.targets"); |
100 | this.tools["VisualBasic"] = new ToolInfo("VisualBasic", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic", "$(MSBuildBinPath)\\Microsoft.VisualBasic.Targets"); | 95 | tools["VisualBasic"] = new ToolInfo("VisualBasic", "{F184B08F-C81C-45F6-A57F-5ABD9991F28F}", "vbproj", "VisualBasic", "$(MSBuildBinPath)\\Microsoft.VisualBasic.Targets"); |
101 | this.tools["Folder"] = new ToolInfo("Folder", "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", null, null); | 96 | tools["Folder"] = new ToolInfo("Folder", "{2150E333-8FDC-42A3-9474-1A3956D46DE8}", null, null); |
102 | } | 97 | } |
103 | 98 | ||
104 | #endregion | 99 | #endregion |
@@ -124,7 +119,7 @@ namespace Prebuild.Core.Targets | |||
124 | } | 119 | } |
125 | catch (ArgumentException) | 120 | catch (ArgumentException) |
126 | { | 121 | { |
127 | this.kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path); | 122 | kernel.Log.Write(LogType.Warning, "Could not resolve reference path: {0}", node.Path); |
128 | } | 123 | } |
129 | } | 124 | } |
130 | 125 | ||
@@ -144,7 +139,7 @@ namespace Prebuild.Core.Targets | |||
144 | private static ProjectNode FindProjectInSolutionRecursively(string name, SolutionNode solution) | 139 | private static ProjectNode FindProjectInSolutionRecursively(string name, SolutionNode solution) |
145 | { | 140 | { |
146 | if (solution.ProjectsTable.ContainsKey(name)) | 141 | if (solution.ProjectsTable.ContainsKey(name)) |
147 | return (ProjectNode)solution.ProjectsTable[name]; | 142 | return solution.ProjectsTable[name]; |
148 | 143 | ||
149 | foreach (SolutionNode child in solution.Solutions) | 144 | foreach (SolutionNode child in solution.Solutions) |
150 | { | 145 | { |
@@ -163,7 +158,7 @@ namespace Prebuild.Core.Targets | |||
163 | throw new UnknownLanguageException("Unknown .NET language: " + project.Language); | 158 | throw new UnknownLanguageException("Unknown .NET language: " + project.Language); |
164 | } | 159 | } |
165 | 160 | ||
166 | ToolInfo toolInfo = (ToolInfo)tools[project.Language]; | 161 | ToolInfo toolInfo = tools[project.Language]; |
167 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); | 162 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); |
168 | StreamWriter ps = new StreamWriter(projectFile); | 163 | StreamWriter ps = new StreamWriter(projectFile); |
169 | 164 | ||
@@ -173,83 +168,83 @@ namespace Prebuild.Core.Targets | |||
173 | #region Project File | 168 | #region Project File |
174 | using (ps) | 169 | using (ps) |
175 | { | 170 | { |
176 | ps.WriteLine("<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" ToolsVersion=\"{0}\">", this.Version == VSVersion.VS10 ? "4.0" : "3.5"); | 171 | ps.WriteLine("<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\" {0}>", GetToolsVersionXml(project.FrameworkVersion)); |
177 | ps.WriteLine(" <PropertyGroup>"); | 172 | ps.WriteLine(" <PropertyGroup>"); |
178 | ps.WriteLine(" <ProjectType>Local</ProjectType>"); | 173 | ps.WriteLine(" <ProjectType>Local</ProjectType>"); |
179 | ps.WriteLine(" <ProductVersion>{0}</ProductVersion>", this.ProductVersion); | 174 | ps.WriteLine(" <ProductVersion>{0}</ProductVersion>", ProductVersion); |
180 | ps.WriteLine(" <SchemaVersion>{0}</SchemaVersion>", this.SchemaVersion); | 175 | ps.WriteLine(" <SchemaVersion>{0}</SchemaVersion>", SchemaVersion); |
181 | ps.WriteLine(" <ProjectGuid>{{{0}}}</ProjectGuid>", project.Guid.ToString().ToUpper()); | 176 | ps.WriteLine(" <ProjectGuid>{{{0}}}</ProjectGuid>", project.Guid.ToString().ToUpper()); |
182 | 177 | ||
183 | // Visual Studio has a hard coded guid for the project type | 178 | // Visual Studio has a hard coded guid for the project type |
184 | if (project.Type == ProjectType.Web) | 179 | if (project.Type == ProjectType.Web) |
185 | ps.WriteLine(" <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>"); | 180 | ps.WriteLine(" <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>"); |
186 | ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); | 181 | ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); |
187 | ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>"); | 182 | ps.WriteLine(" <ApplicationIcon>{0}</ApplicationIcon>", project.AppIcon); |
188 | ps.WriteLine(" <ApplicationIcon>{0}</ApplicationIcon>", project.AppIcon); | 183 | ps.WriteLine(" <AssemblyKeyContainerName>"); |
189 | ps.WriteLine(" <AssemblyKeyContainerName>"); | 184 | ps.WriteLine(" </AssemblyKeyContainerName>"); |
190 | ps.WriteLine(" </AssemblyKeyContainerName>"); | 185 | ps.WriteLine(" <AssemblyName>{0}</AssemblyName>", project.AssemblyName); |
191 | ps.WriteLine(" <AssemblyName>{0}</AssemblyName>", project.AssemblyName); | ||
192 | foreach (ConfigurationNode conf in project.Configurations) | 186 | foreach (ConfigurationNode conf in project.Configurations) |
193 | { | 187 | { |
194 | if (conf.Options.KeyFile != "") | 188 | if (conf.Options.KeyFile != "") |
195 | { | 189 | { |
196 | ps.WriteLine(" <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>", conf.Options.KeyFile); | 190 | ps.WriteLine(" <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>", conf.Options.KeyFile); |
197 | ps.WriteLine(" <SignAssembly>true</SignAssembly>"); | 191 | ps.WriteLine(" <SignAssembly>true</SignAssembly>"); |
198 | break; | 192 | break; |
199 | } | 193 | } |
200 | } | 194 | } |
201 | ps.WriteLine(" <DefaultClientScript>JScript</DefaultClientScript>"); | 195 | ps.WriteLine(" <DefaultClientScript>JScript</DefaultClientScript>"); |
202 | ps.WriteLine(" <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>"); | 196 | ps.WriteLine(" <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>"); |
203 | ps.WriteLine(" <DefaultTargetSchema>IE50</DefaultTargetSchema>"); | 197 | ps.WriteLine(" <DefaultTargetSchema>IE50</DefaultTargetSchema>"); |
204 | ps.WriteLine(" <DelaySign>false</DelaySign>"); | 198 | ps.WriteLine(" <DelaySign>false</DelaySign>"); |
205 | ps.WriteLine(" <TargetFrameworkVersion>{0}</TargetFrameworkVersion>", project.FrameworkVersion.ToString().Replace("_", ".")); | 199 | ps.WriteLine(" <TargetFrameworkVersion>{0}</TargetFrameworkVersion>", project.FrameworkVersion.ToString().Replace("_", ".")); |
206 | 200 | ||
207 | ps.WriteLine(" <OutputType>{0}</OutputType>", project.Type == ProjectType.Web ? ProjectType.Library.ToString() : project.Type.ToString()); | 201 | ps.WriteLine(" <OutputType>{0}</OutputType>", project.Type == ProjectType.Web ? ProjectType.Library.ToString() : project.Type.ToString()); |
208 | ps.WriteLine(" <AppDesignerFolder>{0}</AppDesignerFolder>", project.DesignerFolder); | 202 | ps.WriteLine(" <AppDesignerFolder>{0}</AppDesignerFolder>", project.DesignerFolder); |
209 | ps.WriteLine(" <RootNamespace>{0}</RootNamespace>", project.RootNamespace); | 203 | ps.WriteLine(" <RootNamespace>{0}</RootNamespace>", project.RootNamespace); |
210 | ps.WriteLine(" <StartupObject>{0}</StartupObject>", project.StartupObject); | 204 | ps.WriteLine(" <StartupObject>{0}</StartupObject>", project.StartupObject); |
211 | if (string.IsNullOrEmpty(project.DebugStartParameters)) | 205 | if (string.IsNullOrEmpty(project.DebugStartParameters)) |
212 | { | 206 | { |
213 | ps.WriteLine(" <StartArguments>{0}</StartArguments>", project.DebugStartParameters); | 207 | ps.WriteLine(" <StartArguments>{0}</StartArguments>", project.DebugStartParameters); |
214 | } | 208 | } |
215 | ps.WriteLine(" <FileUpgradeFlags>"); | 209 | ps.WriteLine(" <FileUpgradeFlags>"); |
216 | ps.WriteLine(" </FileUpgradeFlags>"); | 210 | ps.WriteLine(" </FileUpgradeFlags>"); |
217 | 211 | ||
218 | ps.WriteLine(" </PropertyGroup>"); | 212 | ps.WriteLine(" </PropertyGroup>"); |
219 | 213 | ||
220 | foreach (ConfigurationNode conf in project.Configurations) | 214 | foreach (ConfigurationNode conf in project.Configurations) |
221 | { | 215 | { |
222 | ps.Write(" <PropertyGroup "); | 216 | ps.Write(" <PropertyGroup "); |
223 | ps.WriteLine("Condition=\" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \">", conf.Name); | 217 | ps.WriteLine("Condition=\" '$(Configuration)|$(Platform)' == '{0}|{1}' \">", conf.Name, conf.Platform); |
224 | ps.WriteLine(" <AllowUnsafeBlocks>{0}</AllowUnsafeBlocks>", conf.Options["AllowUnsafe"]); | 218 | ps.WriteLine(" <AllowUnsafeBlocks>{0}</AllowUnsafeBlocks>", conf.Options["AllowUnsafe"]); |
225 | ps.WriteLine(" <BaseAddress>{0}</BaseAddress>", conf.Options["BaseAddress"]); | 219 | ps.WriteLine(" <BaseAddress>{0}</BaseAddress>", conf.Options["BaseAddress"]); |
226 | ps.WriteLine(" <CheckForOverflowUnderflow>{0}</CheckForOverflowUnderflow>", conf.Options["CheckUnderflowOverflow"]); | 220 | ps.WriteLine(" <CheckForOverflowUnderflow>{0}</CheckForOverflowUnderflow>", conf.Options["CheckUnderflowOverflow"]); |
227 | ps.WriteLine(" <ConfigurationOverrideFile>"); | 221 | ps.WriteLine(" <ConfigurationOverrideFile>"); |
228 | ps.WriteLine(" </ConfigurationOverrideFile>"); | 222 | ps.WriteLine(" </ConfigurationOverrideFile>"); |
229 | ps.WriteLine(" <DefineConstants>{0}</DefineConstants>", conf.Options["CompilerDefines"]); | 223 | ps.WriteLine(" <DefineConstants>{0}</DefineConstants>", conf.Options["CompilerDefines"]); |
230 | ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", Helper.NormalizePath(conf.Options["XmlDocFile"].ToString())); | 224 | ps.WriteLine(" <DocumentationFile>{0}</DocumentationFile>", Helper.NormalizePath(conf.Options["XmlDocFile"].ToString())); |
231 | ps.WriteLine(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]); | 225 | ps.WriteLine(" <DebugSymbols>{0}</DebugSymbols>", conf.Options["DebugInformation"]); |
232 | ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]); | 226 | ps.WriteLine(" <FileAlignment>{0}</FileAlignment>", conf.Options["FileAlignment"]); |
233 | ps.WriteLine(" <Optimize>{0}</Optimize>", conf.Options["OptimizeCode"]); | 227 | ps.WriteLine(" <Optimize>{0}</Optimize>", conf.Options["OptimizeCode"]); |
234 | if (project.Type != ProjectType.Web) | 228 | if (project.Type != ProjectType.Web) |
235 | ps.WriteLine(" <OutputPath>{0}</OutputPath>", | 229 | ps.WriteLine(" <OutputPath>{0}</OutputPath>", |
236 | Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString()))); | 230 | Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString()))); |
237 | else | 231 | else |
238 | ps.WriteLine(" <OutputPath>{0}</OutputPath>", | 232 | ps.WriteLine(" <OutputPath>{0}</OutputPath>", |
239 | Helper.EndPath(Helper.NormalizePath("bin\\"))); | 233 | Helper.EndPath(Helper.NormalizePath("bin\\"))); |
240 | 234 | ||
241 | ps.WriteLine(" <RegisterForComInterop>{0}</RegisterForComInterop>", conf.Options["RegisterComInterop"]); | 235 | ps.WriteLine(" <RegisterForComInterop>{0}</RegisterForComInterop>", conf.Options["RegisterComInterop"]); |
242 | ps.WriteLine(" <RemoveIntegerChecks>{0}</RemoveIntegerChecks>", conf.Options["RemoveIntegerChecks"]); | 236 | ps.WriteLine(" <RemoveIntegerChecks>{0}</RemoveIntegerChecks>", conf.Options["RemoveIntegerChecks"]); |
243 | ps.WriteLine(" <TreatWarningsAsErrors>{0}</TreatWarningsAsErrors>", conf.Options["WarningsAsErrors"]); | 237 | ps.WriteLine(" <TreatWarningsAsErrors>{0}</TreatWarningsAsErrors>", conf.Options["WarningsAsErrors"]); |
244 | ps.WriteLine(" <WarningLevel>{0}</WarningLevel>", conf.Options["WarningLevel"]); | 238 | ps.WriteLine(" <WarningLevel>{0}</WarningLevel>", conf.Options["WarningLevel"]); |
245 | ps.WriteLine(" <NoStdLib>{0}</NoStdLib>", conf.Options["NoStdLib"]); | 239 | ps.WriteLine(" <NoStdLib>{0}</NoStdLib>", conf.Options["NoStdLib"]); |
246 | ps.WriteLine(" <NoWarn>{0}</NoWarn>", conf.Options["SuppressWarnings"]); | 240 | ps.WriteLine(" <NoWarn>{0}</NoWarn>", conf.Options["SuppressWarnings"]); |
247 | ps.WriteLine(" </PropertyGroup>"); | 241 | ps.WriteLine(" <PlatformTarget>{0}</PlatformTarget>", conf.Platform); |
242 | ps.WriteLine(" </PropertyGroup>"); | ||
248 | } | 243 | } |
249 | 244 | ||
250 | //ps.WriteLine(" </Settings>"); | 245 | //ps.WriteLine(" </Settings>"); |
251 | 246 | ||
252 | List<ProjectNode> projectReferences = new List<ProjectNode>(); | 247 | Dictionary<ReferenceNode, ProjectNode> projectReferences = new Dictionary<ReferenceNode, ProjectNode>(); |
253 | List<ReferenceNode> otherReferences = new List<ReferenceNode>(); | 248 | List<ReferenceNode> otherReferences = new List<ReferenceNode>(); |
254 | 249 | ||
255 | foreach (ReferenceNode refr in project.References) | 250 | foreach (ReferenceNode refr in project.References) |
@@ -259,57 +254,75 @@ namespace Prebuild.Core.Targets | |||
259 | if (projectNode == null) | 254 | if (projectNode == null) |
260 | otherReferences.Add(refr); | 255 | otherReferences.Add(refr); |
261 | else | 256 | else |
262 | projectReferences.Add(projectNode); | 257 | projectReferences.Add(refr, projectNode); |
263 | } | 258 | } |
264 | // Assembly References | 259 | // Assembly References |
265 | ps.WriteLine(" <ItemGroup>"); | 260 | ps.WriteLine(" <ItemGroup>"); |
266 | 261 | ||
267 | foreach (ReferenceNode refr in otherReferences) | 262 | foreach (ReferenceNode refr in otherReferences) |
268 | { | 263 | { |
269 | ps.Write(" <Reference"); | 264 | ps.Write(" <Reference"); |
270 | ps.Write(" Include=\""); | 265 | ps.Write(" Include=\""); |
271 | ps.Write(refr.Name); | 266 | ps.Write(refr.Name); |
272 | ps.WriteLine("\" >"); | 267 | ps.WriteLine("\" >"); |
273 | ps.Write(" <Name>"); | 268 | ps.Write(" <Name>"); |
274 | ps.Write(refr.Name); | 269 | ps.Write(refr.Name); |
275 | ps.WriteLine("</Name>"); | 270 | ps.WriteLine("</Name>"); |
276 | // TODO: Allow reference to *.exe files | 271 | |
277 | ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy); | 272 | if(!String.IsNullOrEmpty(refr.Path)) |
278 | ps.WriteLine(" </Reference>"); | 273 | { |
274 | // Use absolute path to assembly (for determining assembly type) | ||
275 | string absolutePath = Path.Combine(project.FullPath, refr.Path); | ||
276 | if(File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "exe"))) { | ||
277 | // Assembly is an executable (exe) | ||
278 | ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "exe")); | ||
279 | } else if(File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "dll"))) { | ||
280 | // Assembly is an library (dll) | ||
281 | ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); | ||
282 | } else { | ||
283 | string referencePath = Helper.MakeFilePath(refr.Path, refr.Name, "dll"); | ||
284 | kernel.Log.Write(LogType.Warning, "Reference \"{0}\": The specified file doesn't exist.", referencePath); | ||
285 | ps.WriteLine(" <HintPath>{0}</HintPath>", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); | ||
286 | } | ||
287 | } | ||
288 | |||
289 | ps.WriteLine(" <Private>{0}</Private>", refr.LocalCopy); | ||
290 | ps.WriteLine(" </Reference>"); | ||
279 | } | 291 | } |
280 | ps.WriteLine(" </ItemGroup>"); | 292 | ps.WriteLine(" </ItemGroup>"); |
281 | 293 | ||
282 | //Project References | 294 | //Project References |
283 | ps.WriteLine(" <ItemGroup>"); | 295 | ps.WriteLine(" <ItemGroup>"); |
284 | foreach (ProjectNode projectReference in projectReferences) | 296 | foreach (KeyValuePair<ReferenceNode, ProjectNode> pair in projectReferences) |
285 | { | 297 | { |
286 | ToolInfo tool = (ToolInfo)tools[projectReference.Language]; | 298 | ToolInfo tool = tools[pair.Value.Language]; |
287 | if (tools == null) | 299 | if (tools == null) |
288 | throw new UnknownLanguageException(); | 300 | throw new UnknownLanguageException(); |
289 | 301 | ||
290 | string path = | 302 | string path = |
291 | Helper.MakePathRelativeTo(project.FullPath, | 303 | Helper.MakePathRelativeTo(project.FullPath, |
292 | Helper.MakeFilePath(projectReference.FullPath, projectReference.Name, tool.FileExtension)); | 304 | Helper.MakeFilePath(pair.Value.FullPath, pair.Value.Name, tool.FileExtension)); |
293 | ps.WriteLine(" <ProjectReference Include=\"{0}\">", path); | 305 | ps.WriteLine(" <ProjectReference Include=\"{0}\">", path); |
294 | 306 | ||
295 | // TODO: Allow reference to visual basic projects | 307 | // TODO: Allow reference to visual basic projects |
296 | ps.WriteLine(" <Name>{0}</Name>", projectReference.Name); | 308 | ps.WriteLine(" <Name>{0}</Name>", pair.Value.Name); |
297 | ps.WriteLine(" <Project>{0}</Project>", projectReference.Guid.ToString("B").ToUpper()); | 309 | ps.WriteLine(" <Project>{0}</Project>", pair.Value.Guid.ToString("B").ToUpper()); |
298 | ps.WriteLine(" <Package>{0}</Package>", tool.Guid.ToUpper()); | 310 | ps.WriteLine(" <Package>{0}</Package>", tool.Guid.ToUpper()); |
299 | 311 | ||
300 | ps.WriteLine(" <Private>False</Private>" ); | 312 | //This is the Copy Local flag in VS |
313 | ps.WriteLine(" <Private>{0}</Private>", pair.Key.LocalCopy); | ||
301 | 314 | ||
302 | ps.WriteLine(" </ProjectReference>"); | 315 | ps.WriteLine(" </ProjectReference>"); |
303 | } | 316 | } |
304 | ps.WriteLine(" </ItemGroup>"); | 317 | ps.WriteLine(" </ItemGroup>"); |
305 | 318 | ||
306 | // ps.WriteLine(" </Build>"); | 319 | // ps.WriteLine(" </Build>"); |
307 | ps.WriteLine(" <ItemGroup>"); | 320 | ps.WriteLine(" <ItemGroup>"); |
308 | 321 | ||
309 | // ps.WriteLine(" <Include>"); | 322 | // ps.WriteLine(" <Include>"); |
310 | List<string> list = new List<string>(); | 323 | List<string> list = new List<string>(); |
311 | 324 | ||
312 | foreach (string path in project.Files) | 325 | foreach (string path in project.Files) |
313 | { | 326 | { |
314 | string lower = path.ToLower(); | 327 | string lower = path.ToLower(); |
315 | if (lower.EndsWith(".resx")) | 328 | if (lower.EndsWith(".resx")) |
@@ -318,93 +331,106 @@ namespace Prebuild.Core.Targets | |||
318 | if (!list.Contains(codebehind)) | 331 | if (!list.Contains(codebehind)) |
319 | list.Add(codebehind); | 332 | list.Add(codebehind); |
320 | } | 333 | } |
334 | |||
321 | } | 335 | } |
322 | 336 | ||
323 | foreach (string file in project.Files) | 337 | foreach (string filePath in project.Files) |
324 | { | 338 | { |
325 | // if (file == "Properties\\Bind.Designer.cs") | 339 | // if (file == "Properties\\Bind.Designer.cs") |
326 | // { | 340 | // { |
327 | // Console.WriteLine("Wait a minute!"); | 341 | // Console.WriteLine("Wait a minute!"); |
328 | // Console.WriteLine(project.Files.GetSubType(file).ToString()); | 342 | // Console.WriteLine(project.Files.GetSubType(file).ToString()); |
329 | // } | 343 | // } |
330 | 344 | SubType subType = project.Files.GetSubType(filePath); | |
331 | SubType subType = project.Files.GetSubType(file); | 345 | |
346 | // Visual Studio chokes on file names if forward slash is used as a path separator | ||
347 | // instead of backslash. So we must make sure that all file paths written to the | ||
348 | // project file use \ as a path separator. | ||
349 | string file = filePath.Replace(@"/", @"\"); | ||
332 | 350 | ||
333 | if (subType != SubType.Code && subType != SubType.Settings && subType != SubType.Designer | 351 | if (subType != SubType.Code && subType != SubType.Settings && subType != SubType.Designer |
334 | && subType != SubType.CodeBehind) | 352 | && subType != SubType.CodeBehind) |
335 | { | 353 | { |
336 | ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); | 354 | ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx"); |
337 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file)); | 355 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file)); |
338 | ps.WriteLine(" <SubType>Designer</SubType>"); | 356 | ps.WriteLine(" <SubType>Designer</SubType>"); |
339 | ps.WriteLine(" </EmbeddedResource>"); | 357 | ps.WriteLine(" </EmbeddedResource>"); |
340 | // | 358 | // |
341 | } | 359 | } |
342 | 360 | ||
343 | if (subType == SubType.Designer) | 361 | if (subType == SubType.Designer) |
344 | { | 362 | { |
345 | ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file); | 363 | ps.WriteLine(" <EmbeddedResource Include=\"{0}\">", file); |
346 | ps.WriteLine(" <SubType>" + subType + "</SubType>"); | ||
347 | ps.WriteLine(" <Generator>ResXFileCodeGenerator</Generator>"); | ||
348 | 364 | ||
349 | string autogen_name = file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs"; | 365 | string autogen_name = file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs"; |
350 | string dependent_name = file.Substring(0, file.LastIndexOf('.')) + ".cs"; | 366 | string dependent_name = filePath.Substring(0, file.LastIndexOf('.')) + ".cs"; |
351 | |||
352 | ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", autogen_name); | ||
353 | 367 | ||
354 | // Check for a parent .cs file with the same name as this designer file | 368 | // Check for a parent .cs file with the same name as this designer file |
355 | if (File.Exists(dependent_name)) | 369 | if (File.Exists(Helper.NormalizePath(dependent_name))) |
356 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name)); | 370 | { |
371 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name)); | ||
372 | } | ||
373 | else | ||
374 | { | ||
375 | ps.WriteLine(" <Generator>ResXFileCodeGenerator</Generator>"); | ||
376 | ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", Path.GetFileName(autogen_name)); | ||
377 | ps.WriteLine(" <SubType>" + subType + "</SubType>"); | ||
378 | } | ||
357 | 379 | ||
358 | ps.WriteLine(" </EmbeddedResource>"); | 380 | ps.WriteLine(" </EmbeddedResource>"); |
359 | if (File.Exists(autogen_name)) | 381 | if (File.Exists(Helper.NormalizePath(autogen_name))) |
360 | { | 382 | { |
361 | ps.WriteLine(" <Compile Include=\"{0}\">", autogen_name); | 383 | ps.WriteLine(" <Compile Include=\"{0}\">", autogen_name); |
362 | ps.WriteLine(" <AutoGen>True</AutoGen>"); | 384 | //ps.WriteLine(" <DesignTime>True</DesignTime>"); |
363 | ps.WriteLine(" <DesignTime>True</DesignTime>"); | 385 | |
364 | 386 | // If a parent .cs file exists, link this autogen file to it. Otherwise link | |
365 | // If a parent .cs file exists, link this autogen file to it. Otherwise link | 387 | // to the designer file |
366 | // to the designer file | 388 | if (File.Exists(dependent_name)) |
367 | if (File.Exists(dependent_name)) | 389 | { |
368 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name)); | 390 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(dependent_name)); |
369 | else | 391 | } |
370 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file)); | 392 | else |
371 | 393 | { | |
372 | ps.WriteLine(" </Compile>"); | 394 | ps.WriteLine(" <AutoGen>True</AutoGen>"); |
395 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(filePath)); | ||
396 | } | ||
397 | |||
398 | ps.WriteLine(" </Compile>"); | ||
373 | } | 399 | } |
374 | list.Add(autogen_name); | 400 | list.Add(autogen_name); |
375 | } | 401 | } |
376 | if (subType == SubType.Settings) | 402 | if (subType == SubType.Settings) |
377 | { | 403 | { |
378 | ps.Write(" <{0} ", project.Files.GetBuildAction(file)); | 404 | ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); |
379 | ps.WriteLine("Include=\"{0}\">", file); | 405 | ps.WriteLine("Include=\"{0}\">", file); |
380 | string fileName = Path.GetFileName(file); | 406 | string fileName = Path.GetFileName(filePath); |
381 | if (project.Files.GetBuildAction(file) == BuildAction.None) | 407 | if (project.Files.GetBuildAction(filePath) == BuildAction.None) |
382 | { | 408 | { |
383 | ps.WriteLine(" <Generator>SettingsSingleFileGenerator</Generator>"); | 409 | ps.WriteLine(" <Generator>SettingsSingleFileGenerator</Generator>"); |
384 | ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs"); | 410 | ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs"); |
385 | } | 411 | } |
386 | else | 412 | else |
387 | { | 413 | { |
388 | ps.WriteLine(" <SubType>Code</SubType>"); | 414 | ps.WriteLine(" <SubType>Code</SubType>"); |
389 | ps.WriteLine(" <AutoGen>True</AutoGen>"); | 415 | ps.WriteLine(" <AutoGen>True</AutoGen>"); |
390 | ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>"); | 416 | ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>"); |
391 | string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.')); | 417 | string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.')); |
392 | string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.')); | 418 | string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.')); |
393 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(fileNameShorter + ".settings")); | 419 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(fileNameShorter + ".settings")); |
394 | } | 420 | } |
395 | ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file)); | 421 | ps.WriteLine(" </{0}>", project.Files.GetBuildAction(filePath)); |
396 | } | 422 | } |
397 | else if (subType != SubType.Designer) | 423 | else if (subType != SubType.Designer) |
398 | { | 424 | { |
399 | string path = Helper.NormalizePath(file); | 425 | string path = Helper.NormalizePath(file); |
400 | string path_lower = path.ToLower(); | 426 | string path_lower = path.ToLower(); |
401 | 427 | ||
402 | if (!list.Contains(file)) | 428 | if (!list.Contains(filePath)) |
403 | { | 429 | { |
404 | ps.Write(" <{0} ", project.Files.GetBuildAction(path)); | 430 | ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); |
405 | 431 | ||
406 | int startPos = 0; | 432 | int startPos = 0; |
407 | if (project.Files.GetPreservePath(file)) | 433 | if (project.Files.GetPreservePath(filePath)) |
408 | { | 434 | { |
409 | while ((@"./\").IndexOf(file.Substring(startPos, 1)) != -1) | 435 | while ((@"./\").IndexOf(file.Substring(startPos, 1)) != -1) |
410 | startPos++; | 436 | startPos++; |
@@ -415,60 +441,75 @@ namespace Prebuild.Core.Targets | |||
415 | startPos = file.LastIndexOf(Path.GetFileName(path)); | 441 | startPos = file.LastIndexOf(Path.GetFileName(path)); |
416 | } | 442 | } |
417 | 443 | ||
418 | ps.WriteLine("Include=\"{0}\">", path); | 444 | // be sure to write out the path with backslashes so VS recognizes |
445 | // the file properly. | ||
446 | ps.WriteLine("Include=\"{0}\">", file); | ||
419 | 447 | ||
420 | int last_period_index = file.LastIndexOf('.'); | 448 | int last_period_index = file.LastIndexOf('.'); |
421 | string short_file_name = file.Substring(0, last_period_index); | 449 | string short_file_name = file.Substring(0, last_period_index); |
422 | string extension = Path.GetExtension(path); | 450 | string extension = Path.GetExtension(path); |
423 | string designer_format = string.Format(".designer{0}", extension); | 451 | // make this upper case, so that when File.Exists tests for the |
452 | // existence of a designer file on a case-sensitive platform, | ||
453 | // it is correctly identified. | ||
454 | string designer_format = string.Format(".Designer{0}", extension); | ||
424 | 455 | ||
425 | if (path_lower.EndsWith(designer_format)) | 456 | if (path_lower.EndsWith(designer_format.ToLowerInvariant())) |
426 | { | 457 | { |
427 | int designer_index = path_lower.IndexOf(designer_format); | 458 | int designer_index = path.IndexOf(designer_format); |
428 | string file_name = path.Substring(0, designer_index); | 459 | string file_name = path.Substring(0, designer_index); |
429 | 460 | ||
430 | if (File.Exists(file_name)) | 461 | // There are two corrections to the next lines: |
431 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name)); | 462 | // 1. Fix the connection between a designer file and a form |
463 | // or usercontrol that don't have an associated resx file. | ||
464 | // 2. Connect settings files to associated designer files. | ||
465 | if (File.Exists(file_name + extension)) | ||
466 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + extension)); | ||
432 | else if (File.Exists(file_name + ".resx")) | 467 | else if (File.Exists(file_name + ".resx")) |
433 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".resx")); | 468 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".resx")); |
469 | else if (File.Exists(file_name + ".settings")) | ||
470 | { | ||
471 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".settings")); | ||
472 | ps.WriteLine(" <AutoGen>True</AutoGen>"); | ||
473 | ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>"); | ||
474 | } | ||
434 | } | 475 | } |
435 | else if (subType == SubType.CodeBehind) | 476 | else if (subType == SubType.CodeBehind) |
436 | { | 477 | { |
437 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(short_file_name)); | 478 | ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(short_file_name)); |
438 | } | 479 | } |
439 | if (project.Files.GetIsLink(file)) | 480 | if (project.Files.GetIsLink(filePath)) |
440 | { | 481 | { |
441 | string alias = project.Files.GetLinkPath(file); | 482 | string alias = project.Files.GetLinkPath(filePath); |
442 | alias += file.Substring(startPos); | 483 | alias += file.Substring(startPos); |
443 | alias = Helper.NormalizePath(alias); | 484 | alias = Helper.NormalizePath(alias); |
444 | ps.WriteLine(" <Link>{0}</Link>", alias); | 485 | ps.WriteLine(" <Link>{0}</Link>", alias); |
445 | } | 486 | } |
446 | else if (project.Files.GetBuildAction(file) != BuildAction.None) | 487 | else if (project.Files.GetBuildAction(filePath) != BuildAction.None) |
447 | { | 488 | { |
448 | if (project.Files.GetBuildAction(file) != BuildAction.EmbeddedResource) | 489 | if (project.Files.GetBuildAction(filePath) != BuildAction.EmbeddedResource) |
449 | { | 490 | { |
450 | ps.WriteLine(" <SubType>{0}</SubType>", subType); | 491 | ps.WriteLine(" <SubType>{0}</SubType>", subType); |
451 | } | 492 | } |
452 | } | 493 | } |
453 | 494 | ||
454 | if (project.Files.GetCopyToOutput(file) != CopyToOutput.Never) | 495 | if (project.Files.GetCopyToOutput(filePath) != CopyToOutput.Never) |
455 | { | 496 | { |
456 | ps.WriteLine(" <CopyToOutputDirectory>{0}</CopyToOutputDirectory>", project.Files.GetCopyToOutput(file)); | 497 | ps.WriteLine(" <CopyToOutputDirectory>{0}</CopyToOutputDirectory>", project.Files.GetCopyToOutput(filePath)); |
457 | } | 498 | } |
458 | 499 | ||
459 | ps.WriteLine(" </{0}>", project.Files.GetBuildAction(file)); | 500 | ps.WriteLine(" </{0}>", project.Files.GetBuildAction(filePath)); |
460 | } | 501 | } |
461 | } | 502 | } |
462 | } | 503 | } |
463 | 504 | ||
464 | ps.WriteLine(" </ItemGroup>"); | 505 | ps.WriteLine(" </ItemGroup>"); |
465 | ps.WriteLine(" <Import Project=\"" + toolInfo.ImportProject + "\" />"); | 506 | ps.WriteLine(" <Import Project=\"" + toolInfo.ImportProject + "\" />"); |
466 | ps.WriteLine(" <PropertyGroup>"); | 507 | ps.WriteLine(" <PropertyGroup>"); |
467 | ps.WriteLine(" <PreBuildEvent>"); | 508 | ps.WriteLine(" <PreBuildEvent>"); |
468 | ps.WriteLine(" </PreBuildEvent>"); | 509 | ps.WriteLine(" </PreBuildEvent>"); |
469 | ps.WriteLine(" <PostBuildEvent>"); | 510 | ps.WriteLine(" <PostBuildEvent>"); |
470 | ps.WriteLine(" </PostBuildEvent>"); | 511 | ps.WriteLine(" </PostBuildEvent>"); |
471 | ps.WriteLine(" </PropertyGroup>"); | 512 | ps.WriteLine(" </PropertyGroup>"); |
472 | ps.WriteLine("</Project>"); | 513 | ps.WriteLine("</Project>"); |
473 | } | 514 | } |
474 | #endregion | 515 | #endregion |
@@ -478,23 +519,36 @@ namespace Prebuild.Core.Targets | |||
478 | ps = new StreamWriter(projectFile + ".user"); | 519 | ps = new StreamWriter(projectFile + ".user"); |
479 | using (ps) | 520 | using (ps) |
480 | { | 521 | { |
522 | // Get the first configuration from the project. | ||
523 | ConfigurationNode firstConfiguration = null; | ||
524 | |||
525 | if (project.Configurations.Count > 0) | ||
526 | { | ||
527 | firstConfiguration = project.Configurations[0]; | ||
528 | } | ||
529 | |||
481 | ps.WriteLine("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"); | 530 | ps.WriteLine("<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"); |
482 | //ps.WriteLine( "<VisualStudioProject>" ); | 531 | //ps.WriteLine( "<VisualStudioProject>" ); |
483 | //ps.WriteLine(" <{0}>", toolInfo.XMLTag); | 532 | //ps.WriteLine(" <{0}>", toolInfo.XMLTag); |
484 | //ps.WriteLine(" <Build>"); | 533 | //ps.WriteLine(" <Build>"); |
485 | ps.WriteLine(" <PropertyGroup>"); | 534 | ps.WriteLine(" <PropertyGroup>"); |
486 | //ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project)); | 535 | //ps.WriteLine(" <Settings ReferencePath=\"{0}\">", MakeRefPath(project)); |
487 | ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); | 536 | |
488 | ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>"); | 537 | if (firstConfiguration != null) |
489 | ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project)); | 538 | { |
490 | ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", this.ProductVersion); | 539 | ps.WriteLine(" <Configuration Condition=\" '$(Configuration)' == '' \">{0}</Configuration>", firstConfiguration.Name); |
491 | ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>"); | 540 | ps.WriteLine(" <Platform Condition=\" '$(Platform)' == '' \">{0}</Platform>", firstConfiguration.Platform); |
492 | ps.WriteLine(" <ProjectTrust>0</ProjectTrust>"); | 541 | } |
493 | ps.WriteLine(" </PropertyGroup>"); | 542 | |
543 | ps.WriteLine(" <ReferencePath>{0}</ReferencePath>", MakeRefPath(project)); | ||
544 | ps.WriteLine(" <LastOpenVersion>{0}</LastOpenVersion>", ProductVersion); | ||
545 | ps.WriteLine(" <ProjectView>ProjectFiles</ProjectView>"); | ||
546 | ps.WriteLine(" <ProjectTrust>0</ProjectTrust>"); | ||
547 | ps.WriteLine(" </PropertyGroup>"); | ||
494 | foreach (ConfigurationNode conf in project.Configurations) | 548 | foreach (ConfigurationNode conf in project.Configurations) |
495 | { | 549 | { |
496 | ps.Write(" <PropertyGroup"); | 550 | ps.Write(" <PropertyGroup"); |
497 | ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|AnyCPU' \"", conf.Name); | 551 | ps.Write(" Condition = \" '$(Configuration)|$(Platform)' == '{0}|{1}' \"", conf.Name, conf.Platform); |
498 | ps.WriteLine(" />"); | 552 | ps.WriteLine(" />"); |
499 | } | 553 | } |
500 | ps.WriteLine("</Project>"); | 554 | ps.WriteLine("</Project>"); |
@@ -504,9 +558,9 @@ namespace Prebuild.Core.Targets | |||
504 | kernel.CurrentWorkingDirectory.Pop(); | 558 | kernel.CurrentWorkingDirectory.Pop(); |
505 | } | 559 | } |
506 | 560 | ||
507 | private void WriteSolution(SolutionNode solution, bool writeSolutionToDisk) | 561 | private void WriteSolution(SolutionNode solution, bool writeSolutionToDisk) |
508 | { | 562 | { |
509 | kernel.Log.Write("Creating {0} solution and project files", this.VersionName); | 563 | kernel.Log.Write("Creating {0} solution and project files", VersionName); |
510 | 564 | ||
511 | foreach (SolutionNode child in solution.Solutions) | 565 | foreach (SolutionNode child in solution.Solutions) |
512 | { | 566 | { |
@@ -531,13 +585,13 @@ namespace Prebuild.Core.Targets | |||
531 | kernel.Log.Write(""); | 585 | kernel.Log.Write(""); |
532 | string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); | 586 | string solutionFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); |
533 | 587 | ||
534 | using (StreamWriter ss = new StreamWriter(solutionFile)) | 588 | using (StreamWriter ss = new StreamWriter(solutionFile)) |
535 | { | 589 | { |
536 | kernel.CurrentWorkingDirectory.Push(); | 590 | kernel.CurrentWorkingDirectory.Push(); |
537 | Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile)); | 591 | Helper.SetCurrentDir(Path.GetDirectoryName(solutionFile)); |
538 | 592 | ||
539 | ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", this.SolutionVersion); | 593 | ss.WriteLine("Microsoft Visual Studio Solution File, Format Version {0}", SolutionVersion); |
540 | ss.WriteLine(SolutionTag); | 594 | ss.WriteLine(SolutionTag); |
541 | 595 | ||
542 | WriteProjectDeclarations(ss, solution, solution); | 596 | WriteProjectDeclarations(ss, solution, solution); |
543 | 597 | ||
@@ -546,7 +600,7 @@ namespace Prebuild.Core.Targets | |||
546 | ss.WriteLine("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution"); | 600 | ss.WriteLine("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution"); |
547 | foreach (ConfigurationNode conf in solution.Configurations) | 601 | foreach (ConfigurationNode conf in solution.Configurations) |
548 | { | 602 | { |
549 | ss.WriteLine("\t\t{0}|Any CPU = {0}|Any CPU", conf.Name); | 603 | ss.WriteLine("\t\t{0} = {0}", conf.NameAndPlatform); |
550 | } | 604 | } |
551 | ss.WriteLine("\tEndGlobalSection"); | 605 | ss.WriteLine("\tEndGlobalSection"); |
552 | 606 | ||
@@ -571,7 +625,7 @@ namespace Prebuild.Core.Targets | |||
571 | } | 625 | } |
572 | } | 626 | } |
573 | 627 | ||
574 | private void WriteProjectDeclarations(StreamWriter writer, SolutionNode actualSolution, SolutionNode embeddedSolution) | 628 | private void WriteProjectDeclarations(TextWriter writer, SolutionNode actualSolution, SolutionNode embeddedSolution) |
575 | { | 629 | { |
576 | foreach (SolutionNode childSolution in embeddedSolution.Solutions) | 630 | foreach (SolutionNode childSolution in embeddedSolution.Solutions) |
577 | { | 631 | { |
@@ -595,7 +649,7 @@ namespace Prebuild.Core.Targets | |||
595 | } | 649 | } |
596 | } | 650 | } |
597 | 651 | ||
598 | private static void WriteNestedProjectMap(StreamWriter writer, SolutionNode embeddedSolution) | 652 | private static void WriteNestedProjectMap(TextWriter writer, SolutionNode embeddedSolution) |
599 | { | 653 | { |
600 | foreach (ProjectNode project in embeddedSolution.Projects) | 654 | foreach (ProjectNode project in embeddedSolution.Projects) |
601 | { | 655 | { |
@@ -614,31 +668,31 @@ namespace Prebuild.Core.Targets | |||
614 | } | 668 | } |
615 | } | 669 | } |
616 | 670 | ||
617 | private static void WriteNestedProject(StreamWriter writer, SolutionNode solution, Guid projectGuid) | 671 | private static void WriteNestedProject(TextWriter writer, SolutionNode solution, Guid projectGuid) |
618 | { | 672 | { |
619 | WriteNestedFolder(writer, solution.Guid, projectGuid); | 673 | WriteNestedFolder(writer, solution.Guid, projectGuid); |
620 | } | 674 | } |
621 | 675 | ||
622 | private static void WriteNestedFolder(StreamWriter writer, Guid parentGuid, Guid childGuid) | 676 | private static void WriteNestedFolder(TextWriter writer, Guid parentGuid, Guid childGuid) |
623 | { | 677 | { |
624 | writer.WriteLine("\t\t{0} = {1}", | 678 | writer.WriteLine("\t\t{0} = {1}", |
625 | childGuid.ToString("B").ToUpper(), | 679 | childGuid.ToString("B").ToUpper(), |
626 | parentGuid.ToString("B").ToUpper()); | 680 | parentGuid.ToString("B").ToUpper()); |
627 | } | 681 | } |
628 | 682 | ||
629 | private static void WriteConfigurationLines(ICollection configurations, SolutionNode solution, StreamWriter ss) | 683 | private static void WriteConfigurationLines(IEnumerable<ConfigurationNode> configurations, SolutionNode solution, TextWriter ss) |
630 | { | 684 | { |
631 | foreach (ProjectNode project in solution.Projects) | 685 | foreach (ProjectNode project in solution.Projects) |
632 | { | 686 | { |
633 | foreach (ConfigurationNode conf in configurations) | 687 | foreach (ConfigurationNode conf in configurations) |
634 | { | 688 | { |
635 | ss.WriteLine("\t\t{0}.{1}|Any CPU.ActiveCfg = {1}|Any CPU", | 689 | ss.WriteLine("\t\t{0}.{1}.ActiveCfg = {1}", |
636 | project.Guid.ToString("B").ToUpper(), | 690 | project.Guid.ToString("B").ToUpper(), |
637 | conf.Name); | 691 | conf.NameAndPlatform); |
638 | 692 | ||
639 | ss.WriteLine("\t\t{0}.{1}|Any CPU.Build.0 = {1}|Any CPU", | 693 | ss.WriteLine("\t\t{0}.{1}.Build.0 = {1}", |
640 | project.Guid.ToString("B").ToUpper(), | 694 | project.Guid.ToString("B").ToUpper(), |
641 | conf.Name); | 695 | conf.NameAndPlatform); |
642 | } | 696 | } |
643 | } | 697 | } |
644 | 698 | ||
@@ -648,54 +702,37 @@ namespace Prebuild.Core.Targets | |||
648 | } | 702 | } |
649 | } | 703 | } |
650 | 704 | ||
651 | private void WriteSolutionFiles(SolutionNode solution, StreamWriter ss) | 705 | private void WriteSolutionFiles(SolutionNode solution, TextWriter ss) |
652 | { | 706 | { |
653 | if (solution.Files != null && solution.Files.Count > 0) | 707 | if(solution.Files != null && solution.Files.Count > 0) |
654 | { | 708 | WriteProject(ss, "Folder", solution.Guid, "Solution Files", "Solution Files", solution.Files); |
655 | WriteProject(ss, "Folder", solution.Guid, "Solution Files", "Solution Files", solution.Files); | ||
656 | } | ||
657 | } | 709 | } |
658 | 710 | ||
659 | private void WriteEmbeddedSolution(StreamWriter writer, SolutionNode embeddedSolution) | 711 | private void WriteEmbeddedSolution(TextWriter writer, SolutionNode embeddedSolution) |
660 | { | 712 | { |
661 | WriteProject(writer, "Folder", embeddedSolution.Guid, embeddedSolution.Name, embeddedSolution.Name, embeddedSolution.Files); | 713 | WriteProject(writer, "Folder", embeddedSolution.Guid, embeddedSolution.Name, embeddedSolution.Name, embeddedSolution.Files); |
662 | } | 714 | } |
663 | 715 | ||
664 | private void WriteProject(SolutionNode solution, StreamWriter ss, ProjectNode project) | 716 | private void WriteProject(SolutionNode solution, TextWriter ss, ProjectNode project) |
665 | { | 717 | { |
666 | WriteProject(ss, solution, project.Language, project.Guid, project.Name, project.FullPath); | 718 | WriteProject(ss, solution, project.Language, project.Guid, project.Name, project.FullPath); |
667 | } | 719 | } |
668 | 720 | ||
669 | private void WriteProject(SolutionNode solution, StreamWriter ss, DatabaseProjectNode dbProject) | 721 | private void WriteProject(SolutionNode solution, TextWriter ss, DatabaseProjectNode dbProject) |
670 | { | 722 | { |
671 | if (solution.Files != null && solution.Files.Count > 0) | 723 | if (solution.Files != null && solution.Files.Count > 0) |
672 | WriteProject(ss, solution, "Database", dbProject.Guid, dbProject.Name, dbProject.FullPath); | 724 | WriteProject(ss, solution, "Database", dbProject.Guid, dbProject.Name, dbProject.FullPath); |
673 | } | 725 | } |
674 | 726 | ||
675 | private static bool ExtensionSpecified(string refName) | ||
676 | { | ||
677 | return refName.EndsWith(".dll") || refName.EndsWith(".exe"); | ||
678 | } | ||
679 | |||
680 | private static string GetProjectExtension(ProjectNode project) | ||
681 | { | ||
682 | string extension = ".dll"; | ||
683 | if (project.Type == ProjectType.Exe) | ||
684 | { | ||
685 | extension = ".exe"; | ||
686 | } | ||
687 | return extension; | ||
688 | } | ||
689 | |||
690 | const string ProjectDeclarationBeginFormat = "Project(\"{0}\") = \"{1}\", \"{2}\", \"{3}\""; | 727 | const string ProjectDeclarationBeginFormat = "Project(\"{0}\") = \"{1}\", \"{2}\", \"{3}\""; |
691 | const string ProjectDeclarationEndFormat = "EndProject"; | 728 | const string ProjectDeclarationEndFormat = "EndProject"; |
692 | 729 | ||
693 | private void WriteProject(StreamWriter ss, SolutionNode solution, string language, Guid guid, string name, string projectFullPath) | 730 | private void WriteProject(TextWriter ss, SolutionNode solution, string language, Guid guid, string name, string projectFullPath) |
694 | { | 731 | { |
695 | if (!tools.ContainsKey(language)) | 732 | if (!tools.ContainsKey(language)) |
696 | throw new UnknownLanguageException("Unknown .NET language: " + language); | 733 | throw new UnknownLanguageException("Unknown .NET language: " + language); |
697 | 734 | ||
698 | ToolInfo toolInfo = (ToolInfo)tools[language]; | 735 | ToolInfo toolInfo = tools[language]; |
699 | 736 | ||
700 | string path = Helper.MakePathRelativeTo(solution.FullPath, projectFullPath); | 737 | string path = Helper.MakePathRelativeTo(solution.FullPath, projectFullPath); |
701 | 738 | ||
@@ -704,23 +741,23 @@ namespace Prebuild.Core.Targets | |||
704 | WriteProject(ss, language, guid, name, path); | 741 | WriteProject(ss, language, guid, name, path); |
705 | } | 742 | } |
706 | 743 | ||
707 | private void WriteProject(StreamWriter writer, string language, Guid projectGuid, string name, string location) | 744 | private void WriteProject(TextWriter writer, string language, Guid projectGuid, string name, string location) |
708 | { | 745 | { |
709 | WriteProject(writer, language, projectGuid, name, location, null); | 746 | WriteProject(writer, language, projectGuid, name, location, null); |
710 | } | 747 | } |
711 | 748 | ||
712 | private void WriteProject(StreamWriter writer, string language, Guid projectGuid, string name, string location, FilesNode files) | 749 | private void WriteProject(TextWriter writer, string language, Guid projectGuid, string name, string location, FilesNode files) |
713 | { | 750 | { |
714 | if (!tools.ContainsKey(language)) | 751 | if (!tools.ContainsKey(language)) |
715 | throw new UnknownLanguageException("Unknown .NET language: " + language); | 752 | throw new UnknownLanguageException("Unknown .NET language: " + language); |
716 | 753 | ||
717 | ToolInfo toolInfo = (ToolInfo)tools[language]; | 754 | ToolInfo toolInfo = tools[language]; |
718 | 755 | ||
719 | writer.WriteLine(ProjectDeclarationBeginFormat, | 756 | writer.WriteLine(ProjectDeclarationBeginFormat, |
720 | toolInfo.Guid, | 757 | toolInfo.Guid, |
721 | name, | 758 | name, |
722 | location, | 759 | location, |
723 | projectGuid.ToString("B").ToUpper()); | 760 | projectGuid.ToString("B").ToUpper()); |
724 | 761 | ||
725 | if (files != null) | 762 | if (files != null) |
726 | { | 763 | { |
@@ -738,7 +775,7 @@ namespace Prebuild.Core.Targets | |||
738 | private void WriteDatabaseProject(SolutionNode solution, DatabaseProjectNode project) | 775 | private void WriteDatabaseProject(SolutionNode solution, DatabaseProjectNode project) |
739 | { | 776 | { |
740 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "dbp"); | 777 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, "dbp"); |
741 | IndentedTextWriter ps = new IndentedTextWriter(new StreamWriter(projectFile), " "); | 778 | IndentedTextWriter ps = new IndentedTextWriter(new StreamWriter(projectFile), " "); |
742 | 779 | ||
743 | kernel.CurrentWorkingDirectory.Push(); | 780 | kernel.CurrentWorkingDirectory.Push(); |
744 | 781 | ||
@@ -777,12 +814,10 @@ namespace Prebuild.Core.Targets | |||
777 | kernel.CurrentWorkingDirectory.Pop(); | 814 | kernel.CurrentWorkingDirectory.Pop(); |
778 | } | 815 | } |
779 | 816 | ||
780 | private bool ContainsSqlFiles(string folder) | 817 | private static bool ContainsSqlFiles(string folder) |
781 | { | 818 | { |
782 | foreach (string file in Directory.GetFiles(folder, "*.sql")) | 819 | if(Directory.GetFiles(folder, "*.sql").Length > 0) |
783 | { | ||
784 | return true; // if the folder contains 1 .sql file, that's good enough | 820 | return true; // if the folder contains 1 .sql file, that's good enough |
785 | } | ||
786 | 821 | ||
787 | foreach (string child in Directory.GetDirectories(folder)) | 822 | foreach (string child in Directory.GetDirectories(folder)) |
788 | { | 823 | { |
@@ -793,7 +828,7 @@ namespace Prebuild.Core.Targets | |||
793 | return false; | 828 | return false; |
794 | } | 829 | } |
795 | 830 | ||
796 | private void WriteDatabaseFoldersAndFiles(IndentedTextWriter writer, string folder) | 831 | private static void WriteDatabaseFoldersAndFiles(IndentedTextWriter writer, string folder) |
797 | { | 832 | { |
798 | foreach (string child in Directory.GetDirectories(folder)) | 833 | foreach (string child in Directory.GetDirectories(folder)) |
799 | { | 834 | { |
@@ -816,7 +851,7 @@ namespace Prebuild.Core.Targets | |||
816 | { | 851 | { |
817 | kernel.Log.Write("...Cleaning project: {0}", project.Name); | 852 | kernel.Log.Write("...Cleaning project: {0}", project.Name); |
818 | 853 | ||
819 | ToolInfo toolInfo = (ToolInfo)tools[project.Language]; | 854 | ToolInfo toolInfo = tools[project.Language]; |
820 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); | 855 | string projectFile = Helper.MakeFilePath(project.FullPath, project.Name, toolInfo.FileExtension); |
821 | string userFile = projectFile + ".user"; | 856 | string userFile = projectFile + ".user"; |
822 | 857 | ||
@@ -826,7 +861,7 @@ namespace Prebuild.Core.Targets | |||
826 | 861 | ||
827 | private void CleanSolution(SolutionNode solution) | 862 | private void CleanSolution(SolutionNode solution) |
828 | { | 863 | { |
829 | kernel.Log.Write("Cleaning {0} solution and project files", this.VersionName, solution.Name); | 864 | kernel.Log.Write("Cleaning {0} solution and project files", VersionName, solution.Name); |
830 | 865 | ||
831 | string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); | 866 | string slnFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "sln"); |
832 | string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); | 867 | string suoFile = Helper.MakeFilePath(solution.FullPath, solution.Name, "suo"); |
diff --git a/Prebuild/src/Core/Targets/VSVersion.cs b/Prebuild/src/Core/Targets/VSVersion.cs index 59549b0..699b5ca 100644 --- a/Prebuild/src/Core/Targets/VSVersion.cs +++ b/Prebuild/src/Core/Targets/VSVersion.cs | |||
@@ -45,10 +45,10 @@ namespace Prebuild.Core.Targets | |||
45 | /// <summary> | 45 | /// <summary> |
46 | /// Visual Studio 2008 | 46 | /// Visual Studio 2008 |
47 | /// </summary> | 47 | /// </summary> |
48 | VS90, | 48 | VS90, |
49 | /// <summary> | 49 | /// <summary> |
50 | /// Visual Studio 2010 | 50 | /// Visual Studio 2010 |
51 | /// </summary> | 51 | /// </summary> |
52 | VS10 | 52 | VS10 |
53 | } | 53 | } |
54 | } | 54 | } |
diff --git a/Prebuild/src/Core/Targets/XcodeTarget.cs b/Prebuild/src/Core/Targets/XcodeTarget.cs index d96f65b..5393cec 100644 --- a/Prebuild/src/Core/Targets/XcodeTarget.cs +++ b/Prebuild/src/Core/Targets/XcodeTarget.cs | |||
@@ -24,8 +24,6 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | ||
28 | using System.Collections.Specialized; | ||
29 | using System.IO; | 27 | using System.IO; |
30 | using System.Reflection; | 28 | using System.Reflection; |
31 | using System.Text.RegularExpressions; | 29 | using System.Text.RegularExpressions; |
diff --git a/Prebuild/src/Core/Utilities/CommandLineCollection.cs b/Prebuild/src/Core/Utilities/CommandLineCollection.cs index 22752aa..786fa1e 100644 --- a/Prebuild/src/Core/Utilities/CommandLineCollection.cs +++ b/Prebuild/src/Core/Utilities/CommandLineCollection.cs | |||
@@ -23,10 +23,8 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
23 | */ | 23 | */ |
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | ||
27 | using System.Collections; | 26 | using System.Collections; |
28 | using System.Collections.Specialized; | 27 | using System.Collections.Generic; |
29 | using System.Diagnostics; | ||
30 | 28 | ||
31 | namespace Prebuild.Core.Utilities | 29 | namespace Prebuild.Core.Utilities |
32 | { | 30 | { |
@@ -34,15 +32,15 @@ namespace Prebuild.Core.Utilities | |||
34 | /// The CommandLine class parses and interprets the command-line arguments passed to | 32 | /// The CommandLine class parses and interprets the command-line arguments passed to |
35 | /// prebuild. | 33 | /// prebuild. |
36 | /// </summary> | 34 | /// </summary> |
37 | public class CommandLineCollection | 35 | public class CommandLineCollection : IEnumerable<KeyValuePair<string, string>> |
38 | { | 36 | { |
39 | #region Fields | 37 | #region Fields |
40 | 38 | ||
41 | // The raw OS arguments | 39 | // The raw OS arguments |
42 | private string[] m_RawArgs; | 40 | private readonly string[] m_RawArgs; |
43 | 41 | ||
44 | // Command-line argument storage | 42 | // Command-line argument storage |
45 | private Hashtable m_Arguments; | 43 | private readonly Dictionary<string, string> m_Arguments = new Dictionary<string, string>(); |
46 | 44 | ||
47 | #endregion | 45 | #endregion |
48 | 46 | ||
@@ -54,8 +52,7 @@ namespace Prebuild.Core.Utilities | |||
54 | public CommandLineCollection(string[] args) | 52 | public CommandLineCollection(string[] args) |
55 | { | 53 | { |
56 | m_RawArgs = args; | 54 | m_RawArgs = args; |
57 | m_Arguments = new Hashtable(); | 55 | |
58 | |||
59 | Parse(); | 56 | Parse(); |
60 | } | 57 | } |
61 | 58 | ||
@@ -69,11 +66,11 @@ namespace Prebuild.Core.Utilities | |||
69 | return; | 66 | return; |
70 | 67 | ||
71 | int idx = 0; | 68 | int idx = 0; |
72 | string arg = null, lastArg = null; | 69 | string lastArg = null; |
73 | 70 | ||
74 | while(idx <m_RawArgs.Length) | 71 | while(idx <m_RawArgs.Length) |
75 | { | 72 | { |
76 | arg = m_RawArgs[idx]; | 73 | string arg = m_RawArgs[idx]; |
77 | 74 | ||
78 | if(arg.Length > 2 && arg[0] == '/') | 75 | if(arg.Length > 2 && arg[0] == '/') |
79 | { | 76 | { |
@@ -119,16 +116,13 @@ namespace Prebuild.Core.Utilities | |||
119 | /// null string if no parameter was specified, and the value if a parameter was specified</remarks> | 116 | /// null string if no parameter was specified, and the value if a parameter was specified</remarks> |
120 | public string this[string index] | 117 | public string this[string index] |
121 | { | 118 | { |
122 | get | 119 | get |
123 | { | 120 | { |
124 | if(m_Arguments.ContainsKey(index)) | 121 | if(m_Arguments.ContainsKey(index)) |
125 | { | 122 | { |
126 | return (string)(m_Arguments[index]); | 123 | return (m_Arguments[index]); |
127 | } | ||
128 | else | ||
129 | { | ||
130 | return null; | ||
131 | } | 124 | } |
125 | return null; | ||
132 | } | 126 | } |
133 | } | 127 | } |
134 | 128 | ||
@@ -143,11 +137,16 @@ namespace Prebuild.Core.Utilities | |||
143 | /// An <see cref="T:System.Collections.IDictionaryEnumerator"/> | 137 | /// An <see cref="T:System.Collections.IDictionaryEnumerator"/> |
144 | /// that can be used to iterate through the collection. | 138 | /// that can be used to iterate through the collection. |
145 | /// </returns> | 139 | /// </returns> |
146 | public IDictionaryEnumerator GetEnumerator() | 140 | public IEnumerator<KeyValuePair<string, string>> GetEnumerator() |
147 | { | 141 | { |
148 | return m_Arguments.GetEnumerator(); | 142 | return m_Arguments.GetEnumerator(); |
149 | } | 143 | } |
150 | 144 | ||
151 | #endregion | 145 | IEnumerator IEnumerable.GetEnumerator() |
146 | { | ||
147 | return GetEnumerator(); | ||
148 | } | ||
149 | |||
150 | #endregion | ||
152 | } | 151 | } |
153 | } | 152 | } |
diff --git a/Prebuild/src/Core/Utilities/CurrentDirectory.cs b/Prebuild/src/Core/Utilities/CurrentDirectory.cs index 5fabdf0..9624c35 100644 --- a/Prebuild/src/Core/Utilities/CurrentDirectory.cs +++ b/Prebuild/src/Core/Utilities/CurrentDirectory.cs | |||
@@ -24,7 +24,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | 27 | using System.Collections.Generic; |
28 | 28 | ||
29 | namespace Prebuild.Core.Utilities | 29 | namespace Prebuild.Core.Utilities |
30 | { | 30 | { |
@@ -35,19 +35,7 @@ namespace Prebuild.Core.Utilities | |||
35 | { | 35 | { |
36 | #region Fields | 36 | #region Fields |
37 | 37 | ||
38 | private Stack m_Stack; | 38 | private readonly Stack<string> m_Stack = new Stack<string>(); |
39 | |||
40 | #endregion | ||
41 | |||
42 | #region Constructors | ||
43 | |||
44 | /// <summary> | ||
45 | /// Initializes a new instance of the <see cref="CurrentDirectory"/> class. | ||
46 | /// </summary> | ||
47 | public CurrentDirectory() | ||
48 | { | ||
49 | m_Stack = new Stack(); | ||
50 | } | ||
51 | 39 | ||
52 | #endregion | 40 | #endregion |
53 | 41 | ||
@@ -71,7 +59,7 @@ namespace Prebuild.Core.Utilities | |||
71 | return; | 59 | return; |
72 | } | 60 | } |
73 | 61 | ||
74 | string cwd = (string)m_Stack.Pop(); | 62 | string cwd = m_Stack.Pop(); |
75 | Helper.SetCurrentDir(cwd); | 63 | Helper.SetCurrentDir(cwd); |
76 | } | 64 | } |
77 | 65 | ||
diff --git a/Prebuild/src/Core/Utilities/Helper.cs b/Prebuild/src/Core/Utilities/Helper.cs index 9a0d131..8c3e968 100644 --- a/Prebuild/src/Core/Utilities/Helper.cs +++ b/Prebuild/src/Core/Utilities/Helper.cs | |||
@@ -24,7 +24,7 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
24 | #endregion | 24 | #endregion |
25 | 25 | ||
26 | using System; | 26 | using System; |
27 | using System.Collections; | 27 | using System.Collections.Generic; |
28 | using System.Diagnostics; | 28 | using System.Diagnostics; |
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Runtime.InteropServices; | 30 | using System.Runtime.InteropServices; |
@@ -42,8 +42,6 @@ namespace Prebuild.Core.Utilities | |||
42 | { | 42 | { |
43 | #region Fields | 43 | #region Fields |
44 | 44 | ||
45 | private static Stack dirStack; | ||
46 | private static Regex varRegex; | ||
47 | static bool checkForOSVariables; | 45 | static bool checkForOSVariables; |
48 | 46 | ||
49 | /// <summary> | 47 | /// <summary> |
@@ -62,60 +60,12 @@ namespace Prebuild.Core.Utilities | |||
62 | } | 60 | } |
63 | 61 | ||
64 | #endregion | 62 | #endregion |
65 | |||
66 | #region Constructors | ||
67 | |||
68 | /// <summary> | ||
69 | /// Initializes the <see cref="Helper"/> class. | ||
70 | /// </summary> | ||
71 | static Helper() | ||
72 | { | ||
73 | dirStack = new Stack(); | ||
74 | //m_VarRegex = new Regex(@"\${(?<var>[\w|_]+)}"); | ||
75 | } | ||
76 | |||
77 | #endregion | ||
78 | |||
79 | #region Properties | ||
80 | |||
81 | /// <summary> | ||
82 | /// | ||
83 | /// </summary> | ||
84 | public static Stack DirStack | ||
85 | { | ||
86 | get | ||
87 | { | ||
88 | return dirStack; | ||
89 | } | ||
90 | } | ||
91 | |||
92 | /// <summary> | ||
93 | /// | ||
94 | /// </summary> | ||
95 | public static Regex VarRegex | ||
96 | { | ||
97 | get | ||
98 | { | ||
99 | return varRegex; | ||
100 | } | ||
101 | set | ||
102 | { | ||
103 | varRegex = value; | ||
104 | } | ||
105 | } | ||
106 | |||
107 | #endregion | ||
108 | 63 | ||
109 | #region Public Methods | 64 | #region Public Methods |
110 | 65 | ||
111 | #region String Parsing | 66 | #region String Parsing |
112 | #region Inner Classes and Delegates | 67 | |
113 | /// <summary> | ||
114 | /// | ||
115 | /// </summary> | ||
116 | public delegate string StringLookup(string key); | 68 | public delegate string StringLookup(string key); |
117 | |||
118 | #endregion | ||
119 | 69 | ||
120 | /// <summary> | 70 | /// <summary> |
121 | /// Gets a collection of StringLocationPair objects that represent the matches | 71 | /// Gets a collection of StringLocationPair objects that represent the matches |
@@ -545,35 +495,6 @@ namespace Prebuild.Core.Utilities | |||
545 | return attrs[0]; | 495 | return attrs[0]; |
546 | } | 496 | } |
547 | 497 | ||
548 | /* A bit of overhead for simple group parsing, there are problems with Regex in Mono | ||
549 | public static string ParseValue(string val) | ||
550 | { | ||
551 | if(val == null || val.Length < 1 || !CheckForOSVariables) | ||
552 | return val; | ||
553 | |||
554 | string tmp = val; | ||
555 | Match m = m_VarRegex.Match(val); | ||
556 | while(m.Success) | ||
557 | { | ||
558 | if(m.Groups["var"] == null) | ||
559 | continue; | ||
560 | |||
561 | Capture c = m.Groups["var"].Captures[0]; | ||
562 | if(c == null) | ||
563 | continue; | ||
564 | |||
565 | string var = c.Value; | ||
566 | string envVal = Environment.GetEnvironmentVariable(var); | ||
567 | if(envVal == null) | ||
568 | envVal = ""; | ||
569 | |||
570 | tmp = tmp.Replace("${" + var + "}", envVal); | ||
571 | m = m.NextMatch(); | ||
572 | } | ||
573 | |||
574 | return tmp; | ||
575 | }*/ | ||
576 | |||
577 | /// <summary> | 498 | /// <summary> |
578 | /// Attributes the value. | 499 | /// Attributes the value. |
579 | /// </summary> | 500 | /// </summary> |
diff --git a/Prebuild/src/Core/Utilities/Log.cs b/Prebuild/src/Core/Utilities/Log.cs index 548e987..4df3def 100644 --- a/Prebuild/src/Core/Utilities/Log.cs +++ b/Prebuild/src/Core/Utilities/Log.cs | |||
@@ -82,7 +82,7 @@ namespace Prebuild.Core.Utilities | |||
82 | { | 82 | { |
83 | #region Fields | 83 | #region Fields |
84 | 84 | ||
85 | private StreamWriter m_Writer; | 85 | private TextWriter m_Writer; |
86 | private LogTargets m_Target = LogTargets.Null; | 86 | private LogTargets m_Target = LogTargets.Null; |
87 | bool disposed; | 87 | bool disposed; |
88 | 88 | ||
@@ -96,14 +96,20 @@ namespace Prebuild.Core.Utilities | |||
96 | /// <param name="target">The target.</param> | 96 | /// <param name="target">The target.</param> |
97 | /// <param name="fileName">Name of the file.</param> | 97 | /// <param name="fileName">Name of the file.</param> |
98 | public Log(LogTargets target, string fileName) | 98 | public Log(LogTargets target, string fileName) |
99 | { | 99 | { |
100 | m_Target = target; | 100 | m_Target = target; |
101 | 101 | ||
102 | if((m_Target & LogTargets.File) != 0) | 102 | if ((m_Target & LogTargets.File) != 0) |
103 | { | 103 | { |
104 | m_Writer = new StreamWriter(fileName, false); | 104 | m_Writer = new StreamWriter(fileName, false); |
105 | } | 105 | } |
106 | } | 106 | else if ((m_Target & LogTargets.Console) != 0) |
107 | { | ||
108 | // Prevents null reference exceptions when outputing to the log file. | ||
109 | // This seems to only happen when running on a network drive. | ||
110 | m_Writer = Console.Out; | ||
111 | } | ||
112 | } | ||
107 | 113 | ||
108 | #endregion | 114 | #endregion |
109 | 115 | ||
diff --git a/Prebuild/src/Core/WarningException.cs b/Prebuild/src/Core/WarningException.cs index df90dc8..b7c3668 100644 --- a/Prebuild/src/Core/WarningException.cs +++ b/Prebuild/src/Core/WarningException.cs | |||
@@ -31,7 +31,7 @@ namespace Prebuild.Core | |||
31 | /// <summary> | 31 | /// <summary> |
32 | /// | 32 | /// |
33 | /// </summary> | 33 | /// </summary> |
34 | [Serializable()] | 34 | [Serializable] |
35 | public class WarningException : Exception | 35 | public class WarningException : Exception |
36 | { | 36 | { |
37 | #region Constructors | 37 | #region Constructors |
diff --git a/Prebuild/src/Prebuild.cs b/Prebuild/src/Prebuild.cs index 2d12b53..081c89c 100644 --- a/Prebuild/src/Prebuild.cs +++ b/Prebuild/src/Prebuild.cs | |||
@@ -26,9 +26,9 @@ IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O | |||
26 | #region CVS Information | 26 | #region CVS Information |
27 | /* | 27 | /* |
28 | * $Source$ | 28 | * $Source$ |
29 | * $Author: jendave $ | 29 | * $Author: kunnis $ |
30 | * $Date: 2006-09-26 23:43:35 +0200 (ti, 26 sep 2006) $ | 30 | * $Date: 2009-04-15 02:33:14 +0100 (Wed, 15 Apr 2009) $ |
31 | * $Revision: 168 $ | 31 | * $Revision: 308 $ |
32 | */ | 32 | */ |
33 | #endregion | 33 | #endregion |
34 | 34 | ||
@@ -86,17 +86,17 @@ namespace Prebuild | |||
86 | { | 86 | { |
87 | kernel.Process(); | 87 | kernel.Process(); |
88 | } | 88 | } |
89 | } | 89 | } |
90 | catch(Exception ex) | 90 | #if !DEBUG |
91 | { | 91 | catch (Exception ex) |
92 | Console.WriteLine("Unhandled error: {0}", ex.Message); | 92 | { |
93 | //#if DEBUG | 93 | Console.WriteLine("Unhandled error: {0}", ex.Message); |
94 | Console.WriteLine("{0}", ex.StackTrace); | 94 | Console.WriteLine("{0}", ex.StackTrace); |
95 | //#endif | 95 | } |
96 | } | 96 | #endif |
97 | finally | 97 | finally |
98 | { | 98 | { |
99 | if(kernel.PauseAfterFinish) | 99 | if(kernel != null && kernel.PauseAfterFinish) |
100 | { | 100 | { |
101 | Console.WriteLine("\nPress enter to continue..."); | 101 | Console.WriteLine("\nPress enter to continue..."); |
102 | Console.ReadLine(); | 102 | Console.ReadLine(); |
diff --git a/Prebuild/src/Properties/AssemblyInfo.cs b/Prebuild/src/Properties/AssemblyInfo.cs index 65c8736..f3ac30f 100644 --- a/Prebuild/src/Properties/AssemblyInfo.cs +++ b/Prebuild/src/Properties/AssemblyInfo.cs | |||
@@ -61,16 +61,17 @@ using System.Resources; | |||
61 | [assembly: AssemblyConfiguration(".NET CLR")] | 61 | [assembly: AssemblyConfiguration(".NET CLR")] |
62 | [assembly: AssemblyCompany("The Prebuild Project")] | 62 | [assembly: AssemblyCompany("The Prebuild Project")] |
63 | [assembly: AssemblyProduct("")] | 63 | [assembly: AssemblyProduct("")] |
64 | [assembly: AssemblyCopyright("Copyright 2004-2008 " + | 64 | [assembly: AssemblyCopyright("Copyright 2004-2010 " + |
65 | "Matthew Holmes, " + | 65 | "Matthew Holmes, " + |
66 | "Dan Moorehead, " + | 66 | "Dan Moorehead, " + |
67 | "C.J. Adams-Collier, " + | 67 | "C.J. Adams-Collier, " + |
68 | "Rob Loach, " + | 68 | "Rob Loach, " + |
69 | "David Hudson,")] | 69 | "David Hudson," + |
70 | "John Hurliman")] | ||
70 | [assembly: AssemblyTrademark("")] | 71 | [assembly: AssemblyTrademark("")] |
71 | [assembly: AssemblyCulture("")] | 72 | [assembly: AssemblyCulture("")] |
72 | [assembly: NeutralResourcesLanguageAttribute("en-US")] | 73 | [assembly: NeutralResourcesLanguageAttribute("en-US")] |
73 | [assembly: AssemblyVersion("2.0.4.*")] | 74 | [assembly: AssemblyVersion("2.0.5.*")] |
74 | 75 | ||
75 | // | 76 | // |
76 | // Version information for an assembly consists of the following four values: | 77 | // Version information for an assembly consists of the following four values: |
diff --git a/Prebuild/src/data/prebuild-1.7.xsd b/Prebuild/src/data/prebuild-1.7.xsd index c3f8d6b..3675503 100644 --- a/Prebuild/src/data/prebuild-1.7.xsd +++ b/Prebuild/src/data/prebuild-1.7.xsd | |||
@@ -40,7 +40,7 @@ | |||
40 | <xs:complexType> | 40 | <xs:complexType> |
41 | <xs:sequence> | 41 | <xs:sequence> |
42 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | 42 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> |
43 | <xs:element ref="Solution" minOccurs="0" maxOccurs="unbounded" /> | 43 | <xs:element ref="Solution" minOccurs="1" maxOccurs="unbounded" /> |
44 | </xs:sequence> | 44 | </xs:sequence> |
45 | <xs:attribute name="version" /> | 45 | <xs:attribute name="version" /> |
46 | <xs:attribute name="checkOsVars" /> | 46 | <xs:attribute name="checkOsVars" /> |
@@ -57,6 +57,7 @@ | |||
57 | <xs:element ref="Options" minOccurs="0" /> | 57 | <xs:element ref="Options" minOccurs="0" /> |
58 | <xs:element ref="Files" minOccurs="0" /> | 58 | <xs:element ref="Files" minOccurs="0" /> |
59 | <xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" /> | 59 | <xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" /> |
60 | <xs:element ref="Cleanup" minOccurs="0" maxOccurs="1" /> | ||
60 | <xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" /> | 61 | <xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" /> |
61 | <xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" /> | 62 | <xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" /> |
62 | </xs:sequence> | 63 | </xs:sequence> |
@@ -224,6 +225,7 @@ | |||
224 | </xs:all> | 225 | </xs:all> |
225 | </xs:complexType> | 226 | </xs:complexType> |
226 | </xs:element> | 227 | </xs:element> |
228 | |||
227 | <xs:element name="Files"> | 229 | <xs:element name="Files"> |
228 | <xs:complexType> | 230 | <xs:complexType> |
229 | <xs:sequence> | 231 | <xs:sequence> |
@@ -232,6 +234,7 @@ | |||
232 | </xs:sequence> | 234 | </xs:sequence> |
233 | </xs:complexType> | 235 | </xs:complexType> |
234 | </xs:element> | 236 | </xs:element> |
237 | |||
235 | <xs:element name="File"> | 238 | <xs:element name="File"> |
236 | <xs:complexType> | 239 | <xs:complexType> |
237 | <xs:simpleContent> | 240 | <xs:simpleContent> |
@@ -275,6 +278,7 @@ | |||
275 | </xs:simpleContent> | 278 | </xs:simpleContent> |
276 | </xs:complexType> | 279 | </xs:complexType> |
277 | </xs:element> | 280 | </xs:element> |
281 | |||
278 | <xs:element name="Match"> | 282 | <xs:element name="Match"> |
279 | <xs:complexType> | 283 | <xs:complexType> |
280 | <xs:sequence> | 284 | <xs:sequence> |
@@ -322,10 +326,25 @@ | |||
322 | <xs:attribute name="linkPath" type="xs:string" /> | 326 | <xs:attribute name="linkPath" type="xs:string" /> |
323 | </xs:complexType> | 327 | </xs:complexType> |
324 | </xs:element> | 328 | </xs:element> |
329 | |||
325 | <xs:element name="Exclude"> | 330 | <xs:element name="Exclude"> |
326 | <xs:complexType> | 331 | <xs:complexType> |
327 | <xs:attribute name="name" type="xs:string" /> | 332 | <xs:attribute name="name" type="xs:string" /> |
328 | <xs:attribute name="pattern" type="xs:string" /> | 333 | <xs:attribute name="pattern" type="xs:string" /> |
329 | </xs:complexType> | 334 | </xs:complexType> |
330 | </xs:element> | 335 | </xs:element> |
336 | |||
337 | <xs:element name="Cleanup"> | ||
338 | <xs:complexType> | ||
339 | <xs:sequence> | ||
340 | <xs:element ref="CleanFiles" minOccurs="1" maxOccurs="unbounded" /> | ||
341 | </xs:sequence> | ||
342 | </xs:complexType> | ||
343 | </xs:element> | ||
344 | |||
345 | <xs:element name="CleanFiles"> | ||
346 | <xs:complexType> | ||
347 | <xs:attribute name="pattern" type="xs:string" /> | ||
348 | </xs:complexType> | ||
349 | </xs:element> | ||
331 | </xs:schema> | 350 | </xs:schema> |
diff --git a/Prebuild/src/data/prebuild-1.8.xsd b/Prebuild/src/data/prebuild-1.8.xsd new file mode 100644 index 0000000..8f5c1a4 --- /dev/null +++ b/Prebuild/src/data/prebuild-1.8.xsd | |||
@@ -0,0 +1,331 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.8.xsd" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.8.xsd"> | ||
3 | <xs:annotation> | ||
4 | <xs:documentation> | ||
5 | Copyright (c) 2004-2007 | ||
6 | Matthew Holmes (calefaction at houston . rr . com), | ||
7 | Dan Moorehead (dan05a at gmail . com), | ||
8 | David Hudson (jendave at yahoo dot com), | ||
9 | C.J. Adams-Collier (cjac at colliertech dot com) | ||
10 | |||
11 | .NET Prebuild is a cross-platform XML-driven pre-build tool which | ||
12 | allows developers to easily generate project or make files for major | ||
13 | IDE's and .NET development tools including: Visual Studio .NET 2002, | ||
14 | 2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools. | ||
15 | |||
16 | BSD License: | ||
17 | |||
18 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
19 | provided that the following conditions are met: | ||
20 | |||
21 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
22 | and the following disclaimer. | ||
23 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
24 | and the following disclaimer in the documentation and/or other materials provided with the | ||
25 | distribution. | ||
26 | * The name of the author may not be used to endorse or promote products derived from this software | ||
27 | without specific prior written permission. | ||
28 | |||
29 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
30 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
31 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
33 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
34 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
36 | </xs:documentation> | ||
37 | </xs:annotation> | ||
38 | |||
39 | <xs:element name="Prebuild"> | ||
40 | <xs:complexType> | ||
41 | <xs:sequence> | ||
42 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
43 | <xs:element ref="Solution" minOccurs="1" maxOccurs="1" /> | ||
44 | </xs:sequence> | ||
45 | <xs:attribute name="version" /> | ||
46 | <xs:attribute name="checkOsVars" /> | ||
47 | </xs:complexType> | ||
48 | </xs:element> | ||
49 | |||
50 | <xs:element name="Process" type="xs:string" /> | ||
51 | |||
52 | <xs:element name="Solution"> | ||
53 | <xs:complexType> | ||
54 | <xs:sequence> | ||
55 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
56 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
57 | <xs:element ref="Options" minOccurs="0" /> | ||
58 | <xs:element ref="Files" minOccurs="0" /> | ||
59 | <xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" /> | ||
60 | <xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" /> | ||
61 | <xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" /> | ||
62 | </xs:sequence> | ||
63 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
64 | <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> | ||
65 | <xs:attribute name="path" type="xs:string" default="" /> | ||
66 | <xs:attribute name="version" type="xs:string" default="1.0.0" /> | ||
67 | </xs:complexType> | ||
68 | </xs:element> | ||
69 | |||
70 | <xs:element name="EmbeddedSolution"> | ||
71 | <xs:complexType> | ||
72 | <xs:sequence> | ||
73 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
74 | <xs:element ref="Files" minOccurs="0" /> | ||
75 | <xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" /> | ||
76 | <xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" /> | ||
77 | <xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" /> | ||
78 | </xs:sequence> | ||
79 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
80 | <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> | ||
81 | <xs:attribute name="path" type="xs:string" default="" /> | ||
82 | <xs:attribute name="version" type="xs:string" default="1.0.0" /> | ||
83 | </xs:complexType> | ||
84 | </xs:element> | ||
85 | |||
86 | <xs:element name="DatabaseProject"> | ||
87 | <xs:complexType> | ||
88 | <xs:sequence> | ||
89 | <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
90 | <xs:element ref="DatabaseReference" minOccurs="0" maxOccurs="unbounded" /> | ||
91 | </xs:sequence> | ||
92 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
93 | <xs:attribute name="path" type="xs:string" /> | ||
94 | </xs:complexType> | ||
95 | </xs:element> | ||
96 | |||
97 | <xs:element name="DatabaseReference"> | ||
98 | <xs:complexType> | ||
99 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
100 | <xs:attribute name="providerId" type="xs:string" /> | ||
101 | <xs:attribute name="providerName" type="xs:string" /> | ||
102 | <xs:attribute name="connectionString" type="xs:string" use="required" /> | ||
103 | </xs:complexType> | ||
104 | </xs:element> | ||
105 | |||
106 | <xs:element name="Project"> | ||
107 | <xs:complexType> | ||
108 | <xs:sequence> | ||
109 | <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
110 | <xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1" /> | ||
111 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
112 | <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
113 | <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> | ||
114 | <xs:complexType> | ||
115 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
116 | <xs:attribute name="path" type="xs:string" /> | ||
117 | <xs:attribute name="localCopy" type="xs:boolean" /> | ||
118 | <xs:attribute name="version" type="xs:string" /> | ||
119 | </xs:complexType> | ||
120 | </xs:element> | ||
121 | <xs:element ref="Files" /> | ||
122 | </xs:sequence> | ||
123 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
124 | <xs:attribute name="designerFolder" type="xs:string" default="" /> | ||
125 | <xs:attribute name="filterGroups" type="xs:string" default="" /> | ||
126 | <xs:attribute name="path" type="xs:string" default="" /> | ||
127 | <xs:attribute name="icon" type="xs:string" default="" /> | ||
128 | <xs:attribute name="configFile" type="xs:string" default="" /> | ||
129 | <xs:attribute name="version" type="xs:string" default="1.0.0" /> | ||
130 | <xs:attribute name="guid" type="xs:string"/> | ||
131 | <xs:attribute name="language" default="C#"> | ||
132 | <xs:simpleType> | ||
133 | <xs:restriction base="xs:string"> | ||
134 | <xs:enumeration value="C#" /> | ||
135 | <xs:enumeration value="VB.NET" /> | ||
136 | </xs:restriction> | ||
137 | </xs:simpleType> | ||
138 | </xs:attribute> | ||
139 | <xs:attribute name="type" default="Exe"> | ||
140 | <xs:simpleType> | ||
141 | <xs:restriction base="xs:string"> | ||
142 | <xs:enumeration value="Exe" /> | ||
143 | <xs:enumeration value="WinExe" /> | ||
144 | <xs:enumeration value="Library" /> | ||
145 | <xs:enumeration value="Web" /> | ||
146 | </xs:restriction> | ||
147 | </xs:simpleType> | ||
148 | </xs:attribute> | ||
149 | <xs:attribute name="runtime" default="Microsoft"> | ||
150 | <xs:simpleType> | ||
151 | <xs:restriction base="xs:string"> | ||
152 | <xs:enumeration value="Microsoft" /> | ||
153 | <xs:enumeration value="Mono" /> | ||
154 | </xs:restriction> | ||
155 | </xs:simpleType> | ||
156 | </xs:attribute> | ||
157 | <xs:attribute name="frameworkVersion" default="v2_0"> | ||
158 | <xs:simpleType> | ||
159 | <xs:restriction base="xs:string"> | ||
160 | <xs:enumeration value="v2_0" /> | ||
161 | <xs:enumeration value="v3_0" /> | ||
162 | <xs:enumeration value="v3_5" /> | ||
163 | </xs:restriction> | ||
164 | </xs:simpleType> | ||
165 | </xs:attribute> | ||
166 | <xs:attribute name="startupObject" type="xs:string" default="" /> | ||
167 | <xs:attribute name="rootNamespace" type="xs:string" /> | ||
168 | <xs:attribute name="assemblyName" type="xs:string" /> | ||
169 | <xs:attribute name="generateAssemblyInfoFile" type="xs:boolean" default="false" /> | ||
170 | </xs:complexType> | ||
171 | </xs:element> | ||
172 | |||
173 | <xs:element name="Configuration"> | ||
174 | <xs:complexType> | ||
175 | <xs:sequence> | ||
176 | <xs:element ref="Options" minOccurs="0" /> | ||
177 | </xs:sequence> | ||
178 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
179 | <xs:attribute name="platform" type="xs:string" use="required" /> | ||
180 | </xs:complexType> | ||
181 | </xs:element> | ||
182 | <xs:element name="Options"> | ||
183 | <xs:complexType> | ||
184 | <xs:all> | ||
185 | <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> | ||
186 | <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> | ||
187 | <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> | ||
188 | <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> | ||
189 | <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" /> | ||
190 | <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" /> | ||
191 | <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess"> | ||
192 | <xs:simpleType> | ||
193 | <xs:restriction base="xs:string"> | ||
194 | <xs:enumeration value="OnBuildSuccess" /> | ||
195 | <xs:enumeration value="Always" /> | ||
196 | <xs:enumeration value="OnOutputUpdated" /> | ||
197 | </xs:restriction> | ||
198 | </xs:simpleType> | ||
199 | </xs:element> | ||
200 | <xs:element name="RunScript" type="xs:string" minOccurs="0" /> | ||
201 | <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" /> | ||
202 | <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" /> | ||
203 | <xs:element name="WarningLevel" minOccurs="0"> | ||
204 | <xs:simpleType> | ||
205 | <xs:restriction base="xs:integer"> | ||
206 | <xs:minInclusive value="0" /> | ||
207 | <xs:maxInclusive value="4" /> | ||
208 | </xs:restriction> | ||
209 | </xs:simpleType> | ||
210 | </xs:element> | ||
211 | <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> | ||
212 | <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" /> | ||
213 | <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> | ||
214 | <xs:element name="GenerateDocumentation" type="xs:boolean" minOccurs="0" /> | ||
215 | <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> | ||
216 | <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> | ||
217 | <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" /> | ||
218 | <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" /> | ||
219 | <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> | ||
220 | <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> | ||
221 | <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> | ||
222 | <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> | ||
223 | <xs:element name="KeyFile" type="xs:string" minOccurs="0" /> | ||
224 | </xs:all> | ||
225 | </xs:complexType> | ||
226 | </xs:element> | ||
227 | <xs:element name="Files"> | ||
228 | <xs:complexType> | ||
229 | <xs:sequence> | ||
230 | <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> | ||
231 | <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> | ||
232 | </xs:sequence> | ||
233 | </xs:complexType> | ||
234 | </xs:element> | ||
235 | <xs:element name="File"> | ||
236 | <xs:complexType> | ||
237 | <xs:simpleContent> | ||
238 | <xs:extension base="xs:string"> | ||
239 | <xs:attribute name="resourceName" type="xs:string" default="" /> | ||
240 | <xs:attribute name="buildAction" default="Compile"> | ||
241 | <xs:simpleType> | ||
242 | <xs:restriction base="xs:string"> | ||
243 | <xs:enumeration value="None" /> | ||
244 | <xs:enumeration value="Compile" /> | ||
245 | <xs:enumeration value="Content" /> | ||
246 | <xs:enumeration value="EmbeddedResource" /> | ||
247 | </xs:restriction> | ||
248 | </xs:simpleType> | ||
249 | </xs:attribute> | ||
250 | <xs:attribute name="subType" default="Code"> | ||
251 | <xs:simpleType> | ||
252 | <xs:restriction base="xs:string"> | ||
253 | <xs:enumeration value="Code" /> | ||
254 | <xs:enumeration value="CodeBehind" /> | ||
255 | <xs:enumeration value="Component" /> | ||
256 | <xs:enumeration value="Form" /> | ||
257 | <xs:enumeration value="Settings" /> | ||
258 | <xs:enumeration value="UserControl" /> | ||
259 | </xs:restriction> | ||
260 | </xs:simpleType> | ||
261 | </xs:attribute> | ||
262 | <xs:attribute name="link" type="xs:boolean" /> | ||
263 | <xs:attribute name="copyToOutput" default="Never"> | ||
264 | <xs:simpleType> | ||
265 | <xs:restriction base="xs:string"> | ||
266 | <xs:enumeration value="Never" /> | ||
267 | <xs:enumeration value="Always" /> | ||
268 | <xs:enumeration value="PreserveNewest" /> | ||
269 | </xs:restriction> | ||
270 | </xs:simpleType> | ||
271 | </xs:attribute> | ||
272 | <xs:attribute name="preservePath" type="xs:boolean" /> | ||
273 | <xs:attribute name="linkPath" type="xs:string" /> | ||
274 | </xs:extension> | ||
275 | </xs:simpleContent> | ||
276 | </xs:complexType> | ||
277 | </xs:element> | ||
278 | <xs:element name="Match"> | ||
279 | <xs:complexType> | ||
280 | <xs:sequence> | ||
281 | <xs:element ref="Exclude" minOccurs="0" maxOccurs="unbounded" /> | ||
282 | </xs:sequence> | ||
283 | <xs:attribute name="path" type="xs:string" /> | ||
284 | <xs:attribute name="pattern" type="xs:string" use="required" /> | ||
285 | <xs:attribute name="recurse" type="xs:boolean" default="false" /> | ||
286 | <xs:attribute name="useRegex" type="xs:boolean" default="false" /> | ||
287 | <xs:attribute name="buildAction" default="Compile"> | ||
288 | <xs:simpleType> | ||
289 | <xs:restriction base="xs:string"> | ||
290 | <xs:enumeration value="None" /> | ||
291 | <xs:enumeration value="Compile" /> | ||
292 | <xs:enumeration value="Content" /> | ||
293 | <xs:enumeration value="EmbeddedResource" /> | ||
294 | </xs:restriction> | ||
295 | </xs:simpleType> | ||
296 | </xs:attribute> | ||
297 | <xs:attribute name="resourceName" type="xs:string" default="" /> | ||
298 | <xs:attribute name="subType" default="Code"> | ||
299 | <xs:simpleType> | ||
300 | <xs:restriction base="xs:string"> | ||
301 | <xs:enumeration value="Code" /> | ||
302 | <xs:enumeration value="CodeBehind" /> | ||
303 | <xs:enumeration value="Component" /> | ||
304 | <xs:enumeration value="Designer" /> | ||
305 | <xs:enumeration value="Form" /> | ||
306 | <xs:enumeration value="Settings" /> | ||
307 | <xs:enumeration value="UserControl" /> | ||
308 | </xs:restriction> | ||
309 | </xs:simpleType> | ||
310 | </xs:attribute> | ||
311 | <xs:attribute name="link" type="xs:boolean" /> | ||
312 | <xs:attribute name="copyToOutput" default="Never"> | ||
313 | <xs:simpleType> | ||
314 | <xs:restriction base="xs:string"> | ||
315 | <xs:enumeration value="Never" /> | ||
316 | <xs:enumeration value="Always" /> | ||
317 | <xs:enumeration value="PreserveNewest" /> | ||
318 | </xs:restriction> | ||
319 | </xs:simpleType> | ||
320 | </xs:attribute> | ||
321 | <xs:attribute name="preservePath" type="xs:boolean" /> | ||
322 | <xs:attribute name="linkPath" type="xs:string" /> | ||
323 | </xs:complexType> | ||
324 | </xs:element> | ||
325 | <xs:element name="Exclude"> | ||
326 | <xs:complexType> | ||
327 | <xs:attribute name="name" type="xs:string" /> | ||
328 | <xs:attribute name="pattern" type="xs:string" /> | ||
329 | </xs:complexType> | ||
330 | </xs:element> | ||
331 | </xs:schema> | ||
diff --git a/Prebuild/src/data/prebuild-1.9.xsd b/Prebuild/src/data/prebuild-1.9.xsd new file mode 100644 index 0000000..fbca556 --- /dev/null +++ b/Prebuild/src/data/prebuild-1.9.xsd | |||
@@ -0,0 +1,336 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://dnpb.sourceforge.net/schemas/prebuild-1.9.xsd" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.9.xsd"> | ||
3 | <xs:annotation> | ||
4 | <xs:documentation> | ||
5 | Copyright (c) 2004-2007 | ||
6 | Matthew Holmes (calefaction at houston . rr . com), | ||
7 | Dan Moorehead (dan05a at gmail . com), | ||
8 | David Hudson (jendave at yahoo dot com), | ||
9 | C.J. Adams-Collier (cjac at colliertech dot com) | ||
10 | |||
11 | .NET Prebuild is a cross-platform XML-driven pre-build tool which | ||
12 | allows developers to easily generate project or make files for major | ||
13 | IDE's and .NET development tools including: Visual Studio .NET 2002, | ||
14 | 2003, and 2005, SharpDevelop, MonoDevelop, NAnt, Xcode and the GNU Autotools. | ||
15 | |||
16 | BSD License: | ||
17 | |||
18 | Redistribution and use in source and binary forms, with or without modification, are permitted | ||
19 | provided that the following conditions are met: | ||
20 | |||
21 | * Redistributions of source code must retain the above copyright notice, this list of conditions | ||
22 | and the following disclaimer. | ||
23 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions | ||
24 | and the following disclaimer in the documentation and/or other materials provided with the | ||
25 | distribution. | ||
26 | * The name of the author may not be used to endorse or promote products derived from this software | ||
27 | without specific prior written permission. | ||
28 | |||
29 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | ||
30 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
31 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
32 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
33 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
34 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
35 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
36 | </xs:documentation> | ||
37 | </xs:annotation> | ||
38 | |||
39 | <xs:element name="Prebuild"> | ||
40 | <xs:complexType> | ||
41 | <xs:sequence> | ||
42 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
43 | <xs:element ref="Solution" minOccurs="1" maxOccurs="1" /> | ||
44 | </xs:sequence> | ||
45 | <xs:attribute name="version" /> | ||
46 | <xs:attribute name="checkOsVars" /> | ||
47 | </xs:complexType> | ||
48 | </xs:element> | ||
49 | |||
50 | <xs:element name="Process" type="xs:string" /> | ||
51 | |||
52 | <xs:element name="Solution"> | ||
53 | <xs:complexType> | ||
54 | <xs:sequence> | ||
55 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
56 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
57 | <xs:element ref="Options" minOccurs="0" /> | ||
58 | <xs:element ref="Files" minOccurs="0" /> | ||
59 | <xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" /> | ||
60 | <xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" /> | ||
61 | <xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" /> | ||
62 | </xs:sequence> | ||
63 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
64 | <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> | ||
65 | <xs:attribute name="path" type="xs:string" default="" /> | ||
66 | <xs:attribute name="version" type="xs:string" default="1.0.0" /> | ||
67 | </xs:complexType> | ||
68 | </xs:element> | ||
69 | |||
70 | <xs:element name="EmbeddedSolution"> | ||
71 | <xs:complexType> | ||
72 | <xs:sequence> | ||
73 | <xs:element ref="Process" minOccurs="0" maxOccurs="unbounded" /> | ||
74 | <xs:element ref="Files" minOccurs="0" /> | ||
75 | <xs:element ref="Project" minOccurs="0" maxOccurs="unbounded" /> | ||
76 | <xs:element ref="DatabaseProject" minOccurs="0" maxOccurs="unbounded" /> | ||
77 | <xs:element ref="EmbeddedSolution" minOccurs="0" maxOccurs="unbounded" /> | ||
78 | </xs:sequence> | ||
79 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
80 | <xs:attribute name="activeConfig" type="xs:string" default="Debug" /> | ||
81 | <xs:attribute name="path" type="xs:string" default="" /> | ||
82 | <xs:attribute name="version" type="xs:string" default="1.0.0" /> | ||
83 | </xs:complexType> | ||
84 | </xs:element> | ||
85 | |||
86 | <xs:element name="DatabaseProject"> | ||
87 | <xs:complexType> | ||
88 | <xs:sequence> | ||
89 | <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
90 | <xs:element ref="DatabaseReference" minOccurs="0" maxOccurs="unbounded" /> | ||
91 | </xs:sequence> | ||
92 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
93 | <xs:attribute name="path" type="xs:string" /> | ||
94 | </xs:complexType> | ||
95 | </xs:element> | ||
96 | |||
97 | <xs:element name="DatabaseReference"> | ||
98 | <xs:complexType> | ||
99 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
100 | <xs:attribute name="providerId" type="xs:string" /> | ||
101 | <xs:attribute name="providerName" type="xs:string" /> | ||
102 | <xs:attribute name="connectionString" type="xs:string" use="required" /> | ||
103 | </xs:complexType> | ||
104 | </xs:element> | ||
105 | |||
106 | <xs:element name="Project"> | ||
107 | <xs:complexType> | ||
108 | <xs:sequence> | ||
109 | <xs:element name="Author" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
110 | <xs:element name="Description" type="xs:string" minOccurs="0" maxOccurs="1" /> | ||
111 | <xs:element ref="Configuration" minOccurs="1" maxOccurs="unbounded" /> | ||
112 | <xs:element name="ReferencePath" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> | ||
113 | <xs:element name="Reference" minOccurs="0" maxOccurs="unbounded"> | ||
114 | <xs:complexType> | ||
115 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
116 | <xs:attribute name="path" type="xs:string" /> | ||
117 | <xs:attribute name="localCopy" type="xs:boolean" /> | ||
118 | <xs:attribute name="version" type="xs:string" /> | ||
119 | </xs:complexType> | ||
120 | </xs:element> | ||
121 | <xs:element ref="Files" /> | ||
122 | </xs:sequence> | ||
123 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
124 | <xs:attribute name="designerFolder" type="xs:string" default="" /> | ||
125 | <xs:attribute name="filterGroups" type="xs:string" default="" /> | ||
126 | <xs:attribute name="path" type="xs:string" default="" /> | ||
127 | <xs:attribute name="icon" type="xs:string" default="" /> | ||
128 | <xs:attribute name="configFile" type="xs:string" default="" /> | ||
129 | <xs:attribute name="version" type="xs:string" default="1.0.0" /> | ||
130 | <xs:attribute name="guid" type="xs:string"/> | ||
131 | <xs:attribute name="language" default="C#"> | ||
132 | <xs:simpleType> | ||
133 | <xs:restriction base="xs:string"> | ||
134 | <xs:enumeration value="C#" /> | ||
135 | <xs:enumeration value="VB.NET" /> | ||
136 | </xs:restriction> | ||
137 | </xs:simpleType> | ||
138 | </xs:attribute> | ||
139 | <xs:attribute name="type" default="Exe"> | ||
140 | <xs:simpleType> | ||
141 | <xs:restriction base="xs:string"> | ||
142 | <xs:enumeration value="Exe" /> | ||
143 | <xs:enumeration value="WinExe" /> | ||
144 | <xs:enumeration value="Library" /> | ||
145 | <xs:enumeration value="Web" /> | ||
146 | </xs:restriction> | ||
147 | </xs:simpleType> | ||
148 | </xs:attribute> | ||
149 | <xs:attribute name="runtime" default="Microsoft"> | ||
150 | <xs:simpleType> | ||
151 | <xs:restriction base="xs:string"> | ||
152 | <xs:enumeration value="Microsoft" /> | ||
153 | <xs:enumeration value="Mono" /> | ||
154 | </xs:restriction> | ||
155 | </xs:simpleType> | ||
156 | </xs:attribute> | ||
157 | <xs:attribute name="frameworkVersion" default="v2_0"> | ||
158 | <xs:simpleType> | ||
159 | <xs:restriction base="xs:string"> | ||
160 | <xs:enumeration value="v2_0" /> | ||
161 | <xs:enumeration value="v3_0" /> | ||
162 | <xs:enumeration value="v3_5" /> | ||
163 | <xs:enumeration value="v4_0" /> | ||
164 | </xs:restriction> | ||
165 | </xs:simpleType> | ||
166 | </xs:attribute> | ||
167 | <xs:attribute name="startupObject" type="xs:string" default="" /> | ||
168 | <xs:attribute name="rootNamespace" type="xs:string" /> | ||
169 | <xs:attribute name="assemblyName" type="xs:string" /> | ||
170 | <xs:attribute name="generateAssemblyInfoFile" type="xs:boolean" default="false" /> | ||
171 | </xs:complexType> | ||
172 | </xs:element> | ||
173 | |||
174 | <xs:element name="Configuration"> | ||
175 | <xs:complexType> | ||
176 | <xs:sequence> | ||
177 | <xs:element ref="Options" minOccurs="0" /> | ||
178 | </xs:sequence> | ||
179 | <xs:attribute name="name" type="xs:string" use="required" /> | ||
180 | <xs:attribute name="platform" type="xs:string" use="required" /> | ||
181 | </xs:complexType> | ||
182 | </xs:element> | ||
183 | <xs:element name="Options"> | ||
184 | <xs:complexType> | ||
185 | <xs:all> | ||
186 | <xs:element name="CompilerDefines" type="xs:string" minOccurs="0" /> | ||
187 | <xs:element name="OptimizeCode" type="xs:boolean" minOccurs="0" /> | ||
188 | <xs:element name="CheckUnderflowOverflow" type="xs:boolean" minOccurs="0" /> | ||
189 | <xs:element name="AllowUnsafe" type="xs:boolean" minOccurs="0" /> | ||
190 | <xs:element name="PreBuildEvent" type="xs:string" minOccurs="0" /> | ||
191 | <xs:element name="PostBuildEvent" type="xs:string" minOccurs="0" /> | ||
192 | <xs:element name="RunPostBuildEvent" minOccurs="0" default="OnBuildSuccess"> | ||
193 | <xs:simpleType> | ||
194 | <xs:restriction base="xs:string"> | ||
195 | <xs:enumeration value="OnBuildSuccess" /> | ||
196 | <xs:enumeration value="Always" /> | ||
197 | <xs:enumeration value="OnOutputUpdated" /> | ||
198 | </xs:restriction> | ||
199 | </xs:simpleType> | ||
200 | </xs:element> | ||
201 | <xs:element name="RunScript" type="xs:string" minOccurs="0" /> | ||
202 | <xs:element name="PreBuildEventArgs" type="xs:string" minOccurs="0" /> | ||
203 | <xs:element name="PostBuildEventArgs" type="xs:string" minOccurs="0" /> | ||
204 | <xs:element name="WarningLevel" minOccurs="0"> | ||
205 | <xs:simpleType> | ||
206 | <xs:restriction base="xs:integer"> | ||
207 | <xs:minInclusive value="0" /> | ||
208 | <xs:maxInclusive value="4" /> | ||
209 | </xs:restriction> | ||
210 | </xs:simpleType> | ||
211 | </xs:element> | ||
212 | <xs:element name="WarningsAsErrors" type="xs:boolean" minOccurs="0" /> | ||
213 | <xs:element name="SuppressWarnings" type="xs:string" minOccurs="0" /> | ||
214 | <xs:element name="OutputPath" type="xs:string" minOccurs="0" /> | ||
215 | <xs:element name="GenerateDocumentation" type="xs:boolean" minOccurs="0" /> | ||
216 | <xs:element name="XmlDocFile" type="xs:string" minOccurs="0" /> | ||
217 | <xs:element name="DebugInformation" type="xs:boolean" minOccurs="0" /> | ||
218 | <xs:element name="RegisterComInterop" type="xs:boolean" minOccurs="0" /> | ||
219 | <xs:element name="RemoveIntegerChecks" type="xs:boolean" minOccurs="0" /> | ||
220 | <xs:element name="IncrementalBuild" type="xs:boolean" minOccurs="0" /> | ||
221 | <xs:element name="BaseAddress" type="xs:string" minOccurs="0" /> | ||
222 | <xs:element name="FileAlignment" type="xs:integer" minOccurs="0" /> | ||
223 | <xs:element name="NoStdLib" type="xs:boolean" minOccurs="0" /> | ||
224 | <xs:element name="KeyFile" type="xs:string" minOccurs="0" /> | ||
225 | </xs:all> | ||
226 | </xs:complexType> | ||
227 | </xs:element> | ||
228 | <xs:element name="Files"> | ||
229 | <xs:complexType> | ||
230 | <xs:sequence> | ||
231 | <xs:element ref="File" minOccurs="0" maxOccurs="unbounded" /> | ||
232 | <xs:element ref="Match" minOccurs="0" maxOccurs="unbounded" /> | ||
233 | </xs:sequence> | ||
234 | </xs:complexType> | ||
235 | </xs:element> | ||
236 | <xs:element name="File"> | ||
237 | <xs:complexType> | ||
238 | <xs:simpleContent> | ||
239 | <xs:extension base="xs:string"> | ||
240 | <xs:attribute name="resourceName" type="xs:string" default="" /> | ||
241 | <xs:attribute name="buildAction" default="Compile"> | ||
242 | <xs:simpleType> | ||
243 | <xs:restriction base="xs:string"> | ||
244 | <xs:enumeration value="None" /> | ||
245 | <xs:enumeration value="Compile" /> | ||
246 | <xs:enumeration value="Content" /> | ||
247 | <xs:enumeration value="EmbeddedResource" /> | ||
248 | <xs:enumeration value="ApplicationDefinition" /> | ||
249 | <xs:enumeration value="Page" /> | ||
250 | </xs:restriction> | ||
251 | </xs:simpleType> | ||
252 | </xs:attribute> | ||
253 | <xs:attribute name="subType" default="Code"> | ||
254 | <xs:simpleType> | ||
255 | <xs:restriction base="xs:string"> | ||
256 | <xs:enumeration value="Code" /> | ||
257 | <xs:enumeration value="CodeBehind" /> | ||
258 | <xs:enumeration value="Component" /> | ||
259 | <xs:enumeration value="Form" /> | ||
260 | <xs:enumeration value="Settings" /> | ||
261 | <xs:enumeration value="UserControl" /> | ||
262 | </xs:restriction> | ||
263 | </xs:simpleType> | ||
264 | </xs:attribute> | ||
265 | <xs:attribute name="link" type="xs:boolean" /> | ||
266 | <xs:attribute name="copyToOutput" default="Never"> | ||
267 | <xs:simpleType> | ||
268 | <xs:restriction base="xs:string"> | ||
269 | <xs:enumeration value="Never" /> | ||
270 | <xs:enumeration value="Always" /> | ||
271 | <xs:enumeration value="PreserveNewest" /> | ||
272 | </xs:restriction> | ||
273 | </xs:simpleType> | ||
274 | </xs:attribute> | ||
275 | <xs:attribute name="preservePath" type="xs:boolean" /> | ||
276 | <xs:attribute name="linkPath" type="xs:string" /> | ||
277 | </xs:extension> | ||
278 | </xs:simpleContent> | ||
279 | </xs:complexType> | ||
280 | </xs:element> | ||
281 | <xs:element name="Match"> | ||
282 | <xs:complexType> | ||
283 | <xs:sequence> | ||
284 | <xs:element ref="Exclude" minOccurs="0" maxOccurs="unbounded" /> | ||
285 | </xs:sequence> | ||
286 | <xs:attribute name="path" type="xs:string" /> | ||
287 | <xs:attribute name="pattern" type="xs:string" use="required" /> | ||
288 | <xs:attribute name="recurse" type="xs:boolean" default="false" /> | ||
289 | <xs:attribute name="useRegex" type="xs:boolean" default="false" /> | ||
290 | <xs:attribute name="buildAction" default="Compile"> | ||
291 | <xs:simpleType> | ||
292 | <xs:restriction base="xs:string"> | ||
293 | <xs:enumeration value="None" /> | ||
294 | <xs:enumeration value="Compile" /> | ||
295 | <xs:enumeration value="Content" /> | ||
296 | <xs:enumeration value="EmbeddedResource" /> | ||
297 | <xs:enumeration value="ApplicationDefinition" /> | ||
298 | <xs:enumeration value="Page" /> | ||
299 | </xs:restriction> | ||
300 | </xs:simpleType> | ||
301 | </xs:attribute> | ||
302 | <xs:attribute name="resourceName" type="xs:string" default="" /> | ||
303 | <xs:attribute name="subType" default="Code"> | ||
304 | <xs:simpleType> | ||
305 | <xs:restriction base="xs:string"> | ||
306 | <xs:enumeration value="Code" /> | ||
307 | <xs:enumeration value="CodeBehind" /> | ||
308 | <xs:enumeration value="Component" /> | ||
309 | <xs:enumeration value="Designer" /> | ||
310 | <xs:enumeration value="Form" /> | ||
311 | <xs:enumeration value="Settings" /> | ||
312 | <xs:enumeration value="UserControl" /> | ||
313 | </xs:restriction> | ||
314 | </xs:simpleType> | ||
315 | </xs:attribute> | ||
316 | <xs:attribute name="link" type="xs:boolean" /> | ||
317 | <xs:attribute name="copyToOutput" default="Never"> | ||
318 | <xs:simpleType> | ||
319 | <xs:restriction base="xs:string"> | ||
320 | <xs:enumeration value="Never" /> | ||
321 | <xs:enumeration value="Always" /> | ||
322 | <xs:enumeration value="PreserveNewest" /> | ||
323 | </xs:restriction> | ||
324 | </xs:simpleType> | ||
325 | </xs:attribute> | ||
326 | <xs:attribute name="preservePath" type="xs:boolean" /> | ||
327 | <xs:attribute name="linkPath" type="xs:string" /> | ||
328 | </xs:complexType> | ||
329 | </xs:element> | ||
330 | <xs:element name="Exclude"> | ||
331 | <xs:complexType> | ||
332 | <xs:attribute name="name" type="xs:string" /> | ||
333 | <xs:attribute name="pattern" type="xs:string" /> | ||
334 | </xs:complexType> | ||
335 | </xs:element> | ||
336 | </xs:schema> | ||
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 9fd7e46..ef8f73a 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -106,33 +106,6 @@ | |||
106 | ; ## PRIM STORAGE | 106 | ; ## PRIM STORAGE |
107 | ; ## | 107 | ; ## |
108 | 108 | ||
109 | ; *** Prim Storage - only leave one storage_plugin uncommented *** | ||
110 | ; --- Null stores nothing - effectively disabling persistence: | ||
111 | ;storage_plugin = "OpenSim.Data.Null.dll" | ||
112 | |||
113 | ; --- To use sqlite as region storage: | ||
114 | ; | ||
115 | ; PLEASE NOTE: Unfortunately, the current SQLite database plugin (necessary to use SQLite with Mono on Linux) is | ||
116 | ; not compatible with the sqlite3 library installed on Mac OSX. If you're using Mono 2.4 you can still use the old sqlite | ||
117 | ; library by uncommenting the SQLiteLegacy.dll storage plugin (and commenting out SQLite.dll). Unfortunately, the older library | ||
118 | ; will not work with Mono 2.6 on Mac OSX so you will either need to replace the OSX sqlite3 system library or use MySQL instead | ||
119 | ; | ||
120 | ; You will also need to do the same thing in config-include/StandaloneCommon.ini if you are running in standalone mode | ||
121 | storage_plugin = "OpenSim.Data.SQLite.dll" | ||
122 | ;storage_plugin = "OpenSim.Data.SQLiteLegacy.dll" | ||
123 | storage_connection_string="URI=file:OpenSim.db,version=3"; | ||
124 | |||
125 | ; --- To use MySQL storage, supply your own connection string (this is only an example): | ||
126 | ; note that the supplied account needs create privilegies if you want it to auto-create needed tables. | ||
127 | ; | ||
128 | ; -->>> There are multiple connection strings defined in several places. Check it carefully! | ||
129 | ; | ||
130 | ; storage_plugin="OpenSim.Data.MySQL.dll" | ||
131 | ; storage_connection_string="Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;Old Guids=true;"; | ||
132 | ; If you want to use a different database/server for estate data, then | ||
133 | ; uncomment and change this connect string. Defaults to the above if not set | ||
134 | ; estate_connection_string="Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;"; | ||
135 | |||
136 | ; Persistence of changed objects happens during regular sweeps. The following control that behaviour to | 109 | ; Persistence of changed objects happens during regular sweeps. The following control that behaviour to |
137 | ; prevent frequently changing objects from heavily loading the region data store. | 110 | ; prevent frequently changing objects from heavily loading the region data store. |
138 | ; If both of these values are set to zero then persistence of all changed objects will happen on every sweep. | 111 | ; If both of these values are set to zero then persistence of all changed objects will happen on every sweep. |
diff --git a/bin/Prebuild.exe b/bin/Prebuild.exe index eb4c224..d79227c 100755 --- a/bin/Prebuild.exe +++ b/bin/Prebuild.exe | |||
Binary files differ | |||
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index dae7a19..deceb86 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example | |||
@@ -21,7 +21,7 @@ | |||
21 | ; * [[<ConfigName>@]<port>/]<dll name>[:<class name>] | 21 | ; * [[<ConfigName>@]<port>/]<dll name>[:<class name>] |
22 | ; * | 22 | ; * |
23 | [Startup] | 23 | [Startup] |
24 | ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:AssetServiceConnector" | 24 | ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,8002/OpenSim.Server.Handlers.dll:AssetServiceConnector,8002/OpenSim.Server.Handlers.dll:HeloServiceInConnector" |
25 | 25 | ||
26 | ; * This is common for all services, it's the network setup for the entire | 26 | ; * This is common for all services, it's the network setup for the entire |
27 | ; * server instance, if none if specified above | 27 | ; * server instance, if none if specified above |
diff --git a/bin/config-include/Grid.ini b/bin/config-include/Grid.ini index 9a75f19..4a6a082 100644 --- a/bin/config-include/Grid.ini +++ b/bin/config-include/Grid.ini | |||
@@ -27,6 +27,11 @@ | |||
27 | SimulationServiceInConnector = true | 27 | SimulationServiceInConnector = true |
28 | LibraryModule = true | 28 | LibraryModule = true |
29 | 29 | ||
30 | [SimulationDataStore] | ||
31 | LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" | ||
32 | |||
33 | [EstateDataStore] | ||
34 | LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataService" | ||
30 | 35 | ||
31 | [GridService] | 36 | [GridService] |
32 | LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" | 37 | LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" |
diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example index a19591b..c2cd5c3 100644 --- a/bin/config-include/GridCommon.ini.example +++ b/bin/config-include/GridCommon.ini.example | |||
@@ -1,3 +1,24 @@ | |||
1 | [DatabaseService] | ||
2 | ; | ||
3 | ; ### Choose the DB | ||
4 | ; | ||
5 | |||
6 | ; SQLite | ||
7 | Include-Storage = "config-include/storage/SQLiteStandalone.ini"; | ||
8 | |||
9 | ; Unfortunately the current SQLite database plugin is not compatible with Mac OSX. You can still use the older | ||
10 | ; legacy sqlite library if you are using Mono 2.4. Please see the notes in OpenSim.ini (search for sqlite) | ||
11 | ; for more details | ||
12 | ;Include-Storage = "config-include/storage/SQLiteLegacyStandalone.ini"; | ||
13 | |||
14 | ; MySql | ||
15 | ; Uncomment these lines if you want to use mysql storage | ||
16 | ; Change the connection string to your db details | ||
17 | ;StorageProvider = "OpenSim.Data.MySQL.dll" | ||
18 | ;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;" | ||
19 | ; Uncomment this line if you are using MySQL and want to use a different database for estates | ||
20 | ;EstateConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;" | ||
21 | |||
1 | [AssetService] | 22 | [AssetService] |
2 | 23 | ||
3 | DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" | 24 | DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" |
diff --git a/bin/config-include/GridHypergrid.ini b/bin/config-include/GridHypergrid.ini index ab29018..d69a945 100644 --- a/bin/config-include/GridHypergrid.ini +++ b/bin/config-include/GridHypergrid.ini | |||
@@ -30,6 +30,12 @@ | |||
30 | SimulationServiceInConnector = true | 30 | SimulationServiceInConnector = true |
31 | LibraryModule = true | 31 | LibraryModule = true |
32 | 32 | ||
33 | [SimulationDataStore] | ||
34 | LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" | ||
35 | |||
36 | [EstateDataStore] | ||
37 | LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataService" | ||
38 | |||
33 | [AssetService] | 39 | [AssetService] |
34 | LocalGridAssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" | 40 | LocalGridAssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" |
35 | HypergridAssetService = "OpenSim.Services.Connectors.dll:HGAssetServiceConnector" | 41 | HypergridAssetService = "OpenSim.Services.Connectors.dll:HGAssetServiceConnector" |
diff --git a/bin/config-include/HyperSimianGrid.ini b/bin/config-include/HyperSimianGrid.ini index 87ffe69..29b51de 100644 --- a/bin/config-include/HyperSimianGrid.ini +++ b/bin/config-include/HyperSimianGrid.ini | |||
@@ -21,13 +21,13 @@ | |||
21 | Include-Common = "config-include/GridCommon.ini" | 21 | Include-Common = "config-include/GridCommon.ini" |
22 | 22 | ||
23 | [Modules] | 23 | [Modules] |
24 | GridServices = "OpenSim.Services.Connectors.dll:SimianGridServiceConnector" | 24 | GridServices = "SimianGridServiceConnector" |
25 | PresenceServices = "OpenSim.Services.Connectors.dll:SimianPresenceServiceConnector" | 25 | PresenceServices = "SimianPresenceServiceConnector" |
26 | UserAccountServices = "OpenSim.Services.Connectors.dll:SimianUserAccountServiceConnector" | 26 | UserAccountServices = "SimianUserAccountServiceConnector" |
27 | AuthenticationServices = "OpenSim.Services.Connectors.dll:SimianAuthenticationServiceConnector" | 27 | AuthenticationServices = "SimianAuthenticationServiceConnector" |
28 | AssetServices = "HGAssetBroker" | 28 | AssetServices = "HGAssetBroker" |
29 | InventoryServices = "HGInventoryBroker" | 29 | InventoryServices = "HGInventoryBroker" |
30 | AvatarServices = "OpenSim.Services.Connectors.dll:SimianAvatarServiceConnector" | 30 | AvatarServices = "SimianAvatarServiceConnector" |
31 | 31 | ||
32 | NeighbourServices = "RemoteNeighbourServicesConnector" | 32 | NeighbourServices = "RemoteNeighbourServicesConnector" |
33 | SimulationServices = "RemoteSimulationConnectorModule" | 33 | SimulationServices = "RemoteSimulationConnectorModule" |
@@ -41,6 +41,12 @@ | |||
41 | 41 | ||
42 | AssetCaching = "FlotsamAssetCache" | 42 | AssetCaching = "FlotsamAssetCache" |
43 | 43 | ||
44 | [SimulationDataStore] | ||
45 | LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" | ||
46 | |||
47 | [EstateDataStore] | ||
48 | LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataService" | ||
49 | |||
44 | [Friends] | 50 | [Friends] |
45 | Connector = "OpenSim.Services.Connectors.dll:SimianFriendsServiceConnector" | 51 | Connector = "OpenSim.Services.Connectors.dll:SimianFriendsServiceConnector" |
46 | 52 | ||
@@ -74,4 +80,4 @@ | |||
74 | ServicesConnectorModule = SimianGroupsServicesConnector | 80 | ServicesConnectorModule = SimianGroupsServicesConnector |
75 | 81 | ||
76 | [Profiles] | 82 | [Profiles] |
77 | Module = SimianProfiles | 83 | Module = "SimianProfiles" |
diff --git a/bin/config-include/SimianGrid.ini b/bin/config-include/SimianGrid.ini index 65d4ea6..239ce30 100644 --- a/bin/config-include/SimianGrid.ini +++ b/bin/config-include/SimianGrid.ini | |||
@@ -21,13 +21,13 @@ | |||
21 | Include-Common = "config-include/GridCommon.ini" | 21 | Include-Common = "config-include/GridCommon.ini" |
22 | 22 | ||
23 | [Modules] | 23 | [Modules] |
24 | GridServices = "OpenSim.Services.Connectors.dll:SimianGridServiceConnector" | 24 | GridServices = "SimianGridServiceConnector" |
25 | PresenceServices = "OpenSim.Services.Connectors.dll:SimianPresenceServiceConnector" | 25 | PresenceServices = "SimianPresenceServiceConnector" |
26 | UserAccountServices = "OpenSim.Services.Connectors.dll:SimianUserAccountServiceConnector" | 26 | UserAccountServices = "SimianUserAccountServiceConnector" |
27 | AuthenticationServices = "OpenSim.Services.Connectors.dll:SimianAuthenticationServiceConnector" | 27 | AuthenticationServices = "SimianAuthenticationServiceConnector" |
28 | AssetServices = "OpenSim.Services.Connectors.dll:SimianAssetServiceConnector" | 28 | AssetServices = "SimianAssetServiceConnector" |
29 | InventoryServices = "OpenSim.Services.Connectors.dll:SimianInventoryServiceConnector" | 29 | InventoryServices = "SimianInventoryServiceConnector" |
30 | AvatarServices = "OpenSim.Services.Connectors.dll:SimianAvatarServiceConnector" | 30 | AvatarServices = "SimianAvatarServiceConnector" |
31 | 31 | ||
32 | NeighbourServices = "RemoteNeighbourServicesConnector" | 32 | NeighbourServices = "RemoteNeighbourServicesConnector" |
33 | SimulationServices = "RemoteSimulationConnectorModule" | 33 | SimulationServices = "RemoteSimulationConnectorModule" |
@@ -41,6 +41,12 @@ | |||
41 | 41 | ||
42 | AssetCaching = "FlotsamAssetCache" | 42 | AssetCaching = "FlotsamAssetCache" |
43 | 43 | ||
44 | [SimulationDataStore] | ||
45 | LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" | ||
46 | |||
47 | [EstateDataStore] | ||
48 | LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataService" | ||
49 | |||
44 | [Friends] | 50 | [Friends] |
45 | Connector = "OpenSim.Services.Connectors.dll:SimianFriendsServiceConnector" | 51 | Connector = "OpenSim.Services.Connectors.dll:SimianFriendsServiceConnector" |
46 | 52 | ||
@@ -67,4 +73,4 @@ | |||
67 | ServicesConnectorModule = SimianGroupsServicesConnector | 73 | ServicesConnectorModule = SimianGroupsServicesConnector |
68 | 74 | ||
69 | [Profiles] | 75 | [Profiles] |
70 | Module = SimianProfiles | 76 | Module = "SimianProfiles" |
diff --git a/bin/config-include/Standalone.ini b/bin/config-include/Standalone.ini index eae9801..d74b50e 100644 --- a/bin/config-include/Standalone.ini +++ b/bin/config-include/Standalone.ini | |||
@@ -22,6 +22,12 @@ | |||
22 | LLLoginServiceInConnector = true | 22 | LLLoginServiceInConnector = true |
23 | GridInfoServiceInConnector = true | 23 | GridInfoServiceInConnector = true |
24 | 24 | ||
25 | [SimulationDataStore] | ||
26 | LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" | ||
27 | |||
28 | [EstateDataStore] | ||
29 | LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataService" | ||
30 | |||
25 | [AssetService] | 31 | [AssetService] |
26 | LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" | 32 | LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" |
27 | 33 | ||
diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example index f862960..96ef602 100644 --- a/bin/config-include/StandaloneCommon.ini.example +++ b/bin/config-include/StandaloneCommon.ini.example | |||
@@ -18,6 +18,8 @@ | |||
18 | ; Change the connection string to your db details | 18 | ; Change the connection string to your db details |
19 | ;StorageProvider = "OpenSim.Data.MySQL.dll" | 19 | ;StorageProvider = "OpenSim.Data.MySQL.dll" |
20 | ;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;" | 20 | ;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;" |
21 | ; Uncomment this line if you are using MySQL and want to use a different database for estates | ||
22 | ;EstateConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;" | ||
21 | 23 | ||
22 | [AssetService] | 24 | [AssetService] |
23 | DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" | 25 | DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll" |
diff --git a/prebuild.xml b/prebuild.xml index 8df4d73..6a995f7 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | 1 | <?xml version="1.0" ?> |
2 | <Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7"> | 2 | <Prebuild version="1.7" xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd"> |
3 | <Solution name="OpenSim" activeConfig="Debug" path="./" version="0.5.0-$Rev$"> | 3 | <Solution activeConfig="Debug" name="OpenSim" path="./" version="0.5.0-$Rev$"> |
4 | <Configuration name="Debug"> | 4 | <Configuration name="Debug"> |
5 | <Options> | 5 | <Options> |
6 | <CompilerDefines>TRACE;DEBUG</CompilerDefines> | 6 | <CompilerDefines>TRACE;DEBUG</CompilerDefines> |
@@ -9,7 +9,7 @@ | |||
9 | <AllowUnsafe>false</AllowUnsafe> | 9 | <AllowUnsafe>false</AllowUnsafe> |
10 | <WarningLevel>4</WarningLevel> | 10 | <WarningLevel>4</WarningLevel> |
11 | <WarningsAsErrors>false</WarningsAsErrors> | 11 | <WarningsAsErrors>false</WarningsAsErrors> |
12 | <SuppressWarnings></SuppressWarnings> | 12 | <SuppressWarnings/> |
13 | <OutputPath>bin</OutputPath> | 13 | <OutputPath>bin</OutputPath> |
14 | <DebugInformation>true</DebugInformation> | 14 | <DebugInformation>true</DebugInformation> |
15 | <IncrementalBuild>true</IncrementalBuild> | 15 | <IncrementalBuild>true</IncrementalBuild> |
@@ -24,7 +24,7 @@ | |||
24 | <AllowUnsafe>false</AllowUnsafe> | 24 | <AllowUnsafe>false</AllowUnsafe> |
25 | <WarningLevel>4</WarningLevel> | 25 | <WarningLevel>4</WarningLevel> |
26 | <WarningsAsErrors>false</WarningsAsErrors> | 26 | <WarningsAsErrors>false</WarningsAsErrors> |
27 | <SuppressWarnings></SuppressWarnings> | 27 | <SuppressWarnings/> |
28 | <OutputPath>bin</OutputPath> | 28 | <OutputPath>bin</OutputPath> |
29 | <DebugInformation>false</DebugInformation> | 29 | <DebugInformation>false</DebugInformation> |
30 | <IncrementalBuild>true</IncrementalBuild> | 30 | <IncrementalBuild>true</IncrementalBuild> |
@@ -71,23 +71,23 @@ | |||
71 | <Reference name="System"/> | 71 | <Reference name="System"/> |
72 | <Reference name="System.Xml"/> | 72 | <Reference name="System.Xml"/> |
73 | <Reference name="System.Web"/> | 73 | <Reference name="System.Web"/> |
74 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 74 | <Reference name="OpenMetaverse.StructuredData" path="../../../../bin/"/> |
75 | <Reference name="OpenMetaverseTypes.dll"/> | 75 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
76 | <Reference name="XMLRPC.dll"/> | 76 | <Reference name="XMLRPC" path="../../../../bin/"/> |
77 | <Reference name="log4net.dll"/> | 77 | <Reference name="log4net" path="../../../../bin/"/> |
78 | <Reference name="HttpServer_OpenSim.dll"/> | 78 | <Reference name="HttpServer_OpenSim" path="../../../../bin/"/> |
79 | 79 | ||
80 | <Files> | 80 | <Files> |
81 | <Match pattern="*.cs" recurse="true"> | 81 | <Match pattern="*.cs" recurse="true"> |
82 | <Exclude pattern="Tests" /> | 82 | <Exclude pattern="Tests"/> |
83 | 83 | ||
84 | <!-- on temporary suspension --> | 84 | <!-- on temporary suspension --> |
85 | <Exclude pattern="OSHttpHandler\.cs" /> | 85 | <Exclude pattern="OSHttpHandler\.cs"/> |
86 | <Exclude pattern="OSHttpHttpHandler\.cs" /> | 86 | <Exclude pattern="OSHttpHttpHandler\.cs"/> |
87 | <Exclude pattern="OSHttpRequestPump\.cs" /> | 87 | <Exclude pattern="OSHttpRequestPump\.cs"/> |
88 | <Exclude pattern="OSHttpRequestQueue\.cs" /> | 88 | <Exclude pattern="OSHttpRequestQueue\.cs"/> |
89 | <Exclude pattern="OSHttpServer.*\.cs" /> | 89 | <Exclude pattern="OSHttpServer.*\.cs"/> |
90 | <Exclude pattern="OSHttpXmlRpcHandler.*\.cs" /> | 90 | <Exclude pattern="OSHttpXmlRpcHandler.*\.cs"/> |
91 | </Match> | 91 | </Match> |
92 | </Files> | 92 | </Files> |
93 | </Project> | 93 | </Project> |
@@ -108,10 +108,10 @@ | |||
108 | <Reference name="System"/> | 108 | <Reference name="System"/> |
109 | <Reference name="System.Xml"/> | 109 | <Reference name="System.Xml"/> |
110 | <Reference name="System.Web"/> | 110 | <Reference name="System.Web"/> |
111 | <Reference name="log4net.dll"/> | 111 | <Reference name="log4net" path="../../../bin/"/> |
112 | <Reference name="Nini.dll"/> | 112 | <Reference name="Nini" path="../../../bin/"/> |
113 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 113 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
114 | <Reference name="OpenMetaverseTypes.dll"/> | 114 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
115 | <Files> | 115 | <Files> |
116 | <Match pattern="*.cs" recurse="true"/> | 116 | <Match pattern="*.cs" recurse="true"/> |
117 | </Files> | 117 | </Files> |
@@ -158,17 +158,17 @@ | |||
158 | <Reference name="System.Data"/> | 158 | <Reference name="System.Data"/> |
159 | <Reference name="System.Drawing"/> | 159 | <Reference name="System.Drawing"/> |
160 | <Reference name="System.Web"/> | 160 | <Reference name="System.Web"/> |
161 | <Reference name="BclExtras35.dll"/> | 161 | <Reference name="BclExtras35" path="../../bin/"/> |
162 | <Reference name="OpenMetaverseTypes.dll"/> | 162 | <Reference name="OpenMetaverseTypes" path="../../bin/"/> |
163 | <Reference name="OpenMetaverse.dll"/> | 163 | <Reference name="OpenMetaverse" path="../../bin/"/> |
164 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 164 | <Reference name="OpenMetaverse.StructuredData" path="../../bin/"/> |
165 | <Reference name="XMLRPC.dll"/> | 165 | <Reference name="XMLRPC" path="../../bin/"/> |
166 | <Reference name="OpenSim.Framework.Console"/> | 166 | <Reference name="OpenSim.Framework.Console"/> |
167 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 167 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
168 | <Reference name="Nini.dll" /> | 168 | <Reference name="Nini" path="../../bin/"/> |
169 | <Reference name="log4net.dll"/> | 169 | <Reference name="log4net" path="../../bin/"/> |
170 | <Reference name="Mono.Addins.dll" /> | 170 | <Reference name="Mono.Addins" path="../../bin/"/> |
171 | <Reference name="SmartThreadPool" /> | 171 | <Reference name="SmartThreadPool"/> |
172 | <Files> | 172 | <Files> |
173 | <Match pattern="*.cs" recurse="false"/> | 173 | <Match pattern="*.cs" recurse="false"/> |
174 | <Match path="Client" pattern="*.cs" recurse="true"/> | 174 | <Match path="Client" pattern="*.cs" recurse="true"/> |
@@ -190,9 +190,9 @@ | |||
190 | <ReferencePath>../../../bin/</ReferencePath> | 190 | <ReferencePath>../../../bin/</ReferencePath> |
191 | <Reference name="System"/> | 191 | <Reference name="System"/> |
192 | <Reference name="System.Xml"/> | 192 | <Reference name="System.Xml"/> |
193 | <Reference name="log4net.dll"/> | 193 | <Reference name="log4net" path="../../../bin/"/> |
194 | <Reference name="OpenMetaverse.dll" /> | 194 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
195 | <Reference name="OpenMetaverseTypes.dll"/> | 195 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
196 | <Reference name="OpenSim.Framework"/> | 196 | <Reference name="OpenSim.Framework"/> |
197 | 197 | ||
198 | <Files> | 198 | <Files> |
@@ -216,9 +216,9 @@ | |||
216 | 216 | ||
217 | <ReferencePath>../../../bin/</ReferencePath> | 217 | <ReferencePath>../../../bin/</ReferencePath> |
218 | <Reference name="System"/> | 218 | <Reference name="System"/> |
219 | <Reference name="OpenMetaverseTypes.dll"/> | 219 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
220 | <Reference name="OpenMetaverse.dll"/> | 220 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
221 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 221 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
222 | <Reference name="OpenSim.Framework"/> | 222 | <Reference name="OpenSim.Framework"/> |
223 | 223 | ||
224 | <Files> | 224 | <Files> |
@@ -242,16 +242,16 @@ | |||
242 | <Reference name="System"/> | 242 | <Reference name="System"/> |
243 | <Reference name="System.Xml"/> | 243 | <Reference name="System.Xml"/> |
244 | <Reference name="System.Data"/> | 244 | <Reference name="System.Data"/> |
245 | <Reference name="XMLRPC.dll"/> | 245 | <Reference name="XMLRPC" path="../../bin/"/> |
246 | <Reference name="OpenMetaverse.dll"/> | 246 | <Reference name="OpenMetaverse" path="../../bin/"/> |
247 | <Reference name="OpenMetaverseTypes.dll"/> | 247 | <Reference name="OpenMetaverseTypes" path="../../bin/"/> |
248 | <Reference name="OpenSim.Framework"/> | 248 | <Reference name="OpenSim.Framework"/> |
249 | <Reference name="log4net.dll"/> | 249 | <Reference name="log4net" path="../../bin/"/> |
250 | <Reference name="Mono.Addins.dll" /> | 250 | <Reference name="Mono.Addins" path="../../bin/"/> |
251 | <Files> | 251 | <Files> |
252 | <Match pattern="*.cs" recurse="false"/> | 252 | <Match pattern="*.cs" recurse="false"/> |
253 | <Match pattern="Properties/*.cs" recurse="false"/> | 253 | <Match pattern="Properties/*.cs" recurse="false"/> |
254 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 254 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
255 | </Files> | 255 | </Files> |
256 | </Project> | 256 | </Project> |
257 | 257 | ||
@@ -270,8 +270,8 @@ | |||
270 | <ReferencePath>../../../../bin/</ReferencePath> | 270 | <ReferencePath>../../../../bin/</ReferencePath> |
271 | <Reference name="System"/> | 271 | <Reference name="System"/> |
272 | <Reference name="System.Xml"/> | 272 | <Reference name="System.Xml"/> |
273 | <Reference name="OpenMetaverseTypes.dll"/> | 273 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
274 | <Reference name="XMLRPC.dll"/> | 274 | <Reference name="XMLRPC" path="../../../../bin/"/> |
275 | <Reference name="OpenSim.Framework"/> | 275 | <Reference name="OpenSim.Framework"/> |
276 | <Reference name="OpenSim.Framework.Console"/> | 276 | <Reference name="OpenSim.Framework.Console"/> |
277 | <Reference name="OpenSim.Data"/> | 277 | <Reference name="OpenSim.Data"/> |
@@ -295,13 +295,13 @@ | |||
295 | <ReferencePath>../../../../bin/</ReferencePath> | 295 | <ReferencePath>../../../../bin/</ReferencePath> |
296 | <Reference name="System"/> | 296 | <Reference name="System"/> |
297 | <Reference name="System.Xml"/> | 297 | <Reference name="System.Xml"/> |
298 | <Reference name="OpenMetaverseTypes.dll"/> | 298 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
299 | <Reference name="XMLRPC.dll"/> | 299 | <Reference name="XMLRPC" path="../../../../bin/"/> |
300 | <Reference name="OpenSim.Framework"/> | 300 | <Reference name="OpenSim.Framework"/> |
301 | <Reference name="OpenSim.Framework.Console"/> | 301 | <Reference name="OpenSim.Framework.Console"/> |
302 | <Reference name="OpenSim.Framework.Configuration.XML"/> | 302 | <Reference name="OpenSim.Framework.Configuration.XML"/> |
303 | <Reference name="OpenSim.Data"/> | 303 | <Reference name="OpenSim.Data"/> |
304 | <Reference name="log4net.dll"/> | 304 | <Reference name="log4net" path="../../../../bin/"/> |
305 | <Files> | 305 | <Files> |
306 | <Match pattern="*.cs" recurse="true"/> | 306 | <Match pattern="*.cs" recurse="true"/> |
307 | </Files> | 307 | </Files> |
@@ -324,9 +324,9 @@ | |||
324 | <Reference name="System.Xml"/> | 324 | <Reference name="System.Xml"/> |
325 | <Reference name="OpenSim.Framework.Console"/> | 325 | <Reference name="OpenSim.Framework.Console"/> |
326 | <Reference name="OpenSim.Framework"/> | 326 | <Reference name="OpenSim.Framework"/> |
327 | <Reference name="OpenMetaverseTypes.dll"/> | 327 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
328 | <Reference name="Nini.dll" /> | 328 | <Reference name="Nini" path="../../../../bin/"/> |
329 | <Reference name="log4net.dll"/> | 329 | <Reference name="log4net" path="../../../../bin/"/> |
330 | <Files> | 330 | <Files> |
331 | <Match pattern="*.cs" recurse="true"/> | 331 | <Match pattern="*.cs" recurse="true"/> |
332 | </Files> | 332 | </Files> |
@@ -347,12 +347,12 @@ | |||
347 | <ReferencePath>../../../../bin/</ReferencePath> | 347 | <ReferencePath>../../../../bin/</ReferencePath> |
348 | <Reference name="System"/> | 348 | <Reference name="System"/> |
349 | <Reference name="System.Xml"/> | 349 | <Reference name="System.Xml"/> |
350 | <Reference name="OpenMetaverseTypes.dll"/> | 350 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
351 | <Reference name="XMLRPC.dll"/> | 351 | <Reference name="XMLRPC" path="../../../../bin/"/> |
352 | <Reference name="OpenSim.Framework"/> | 352 | <Reference name="OpenSim.Framework"/> |
353 | <Reference name="OpenSim.Framework.Console"/> | 353 | <Reference name="OpenSim.Framework.Console"/> |
354 | <Reference name="Nini.dll" /> | 354 | <Reference name="Nini" path="../../../../bin/"/> |
355 | <Reference name="log4net.dll"/> | 355 | <Reference name="log4net" path="../../../../bin/"/> |
356 | <Files> | 356 | <Files> |
357 | <Match pattern="*.cs" recurse="true"/> | 357 | <Match pattern="*.cs" recurse="true"/> |
358 | </Files> | 358 | </Files> |
@@ -373,11 +373,11 @@ | |||
373 | <ReferencePath>../../../../bin/</ReferencePath> | 373 | <ReferencePath>../../../../bin/</ReferencePath> |
374 | <Reference name="System"/> | 374 | <Reference name="System"/> |
375 | <Reference name="System.Xml"/> | 375 | <Reference name="System.Xml"/> |
376 | <Reference name="OpenMetaverseTypes.dll"/> | 376 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
377 | <Reference name="XMLRPC.dll"/> | 377 | <Reference name="XMLRPC" path="../../../../bin/"/> |
378 | <Reference name="OpenSim.Framework"/> | 378 | <Reference name="OpenSim.Framework"/> |
379 | <Reference name="OpenSim.Framework.Console"/> | 379 | <Reference name="OpenSim.Framework.Console"/> |
380 | <Reference name="Nini.dll" /> | 380 | <Reference name="Nini" path="../../../../bin/"/> |
381 | <Files> | 381 | <Files> |
382 | <Match pattern="*.cs" recurse="true"/> | 382 | <Match pattern="*.cs" recurse="true"/> |
383 | </Files> | 383 | </Files> |
@@ -403,11 +403,11 @@ | |||
403 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 403 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
404 | <Reference name="OpenSim.Framework.Console"/> | 404 | <Reference name="OpenSim.Framework.Console"/> |
405 | <Reference name="OpenSim.Framework.Statistics"/> | 405 | <Reference name="OpenSim.Framework.Statistics"/> |
406 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 406 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
407 | <Reference name="OpenMetaverseTypes.dll"/> | 407 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
408 | <Reference name="XMLRPC.dll"/> | 408 | <Reference name="XMLRPC" path="../../../bin/"/> |
409 | <Reference name="log4net.dll"/> | 409 | <Reference name="log4net" path="../../../bin/"/> |
410 | <Reference name="HttpServer_OpenSim.dll"/> | 410 | <Reference name="HttpServer_OpenSim" path="../../../bin/"/> |
411 | 411 | ||
412 | <Files> | 412 | <Files> |
413 | <Match pattern="*.cs" recurse="false"> | 413 | <Match pattern="*.cs" recurse="false"> |
@@ -429,13 +429,13 @@ | |||
429 | 429 | ||
430 | <ReferencePath>../../../../bin/</ReferencePath> | 430 | <ReferencePath>../../../../bin/</ReferencePath> |
431 | <Reference name="System"/> | 431 | <Reference name="System"/> |
432 | <Reference name="System.Xml" /> | 432 | <Reference name="System.Xml"/> |
433 | <Reference name="OpenMetaverseTypes.dll"/> | 433 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
434 | <Reference name="OpenSim.Framework"/> | 434 | <Reference name="OpenSim.Framework"/> |
435 | <Reference name="OpenSim.Framework.Console"/> | 435 | <Reference name="OpenSim.Framework.Console"/> |
436 | <Reference name="nunit.framework.dll" /> | 436 | <Reference name="nunit.framework" path="../../../../bin/"/> |
437 | <Reference name="Nini.dll" /> | 437 | <Reference name="Nini" path="../../../../bin/"/> |
438 | <Reference name="log4net.dll"/> | 438 | <Reference name="log4net" path="../../../../bin/"/> |
439 | 439 | ||
440 | <Files> | 440 | <Files> |
441 | <Match pattern="*.cs" recurse="false"/> | 441 | <Match pattern="*.cs" recurse="false"/> |
@@ -457,8 +457,8 @@ | |||
457 | 457 | ||
458 | <ReferencePath>../../../../bin/</ReferencePath> | 458 | <ReferencePath>../../../../bin/</ReferencePath> |
459 | <Reference name="System"/> | 459 | <Reference name="System"/> |
460 | <Reference name="OpenMetaverseTypes.dll"/> | 460 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
461 | <Reference name="Nini.dll" /> | 461 | <Reference name="Nini" path="../../../../bin/"/> |
462 | <Reference name="OpenSim.Framework"/> | 462 | <Reference name="OpenSim.Framework"/> |
463 | <Reference name="OpenSim.Region.Physics.Manager"/> | 463 | <Reference name="OpenSim.Region.Physics.Manager"/> |
464 | <Files> | 464 | <Files> |
@@ -480,8 +480,8 @@ | |||
480 | 480 | ||
481 | <ReferencePath>../../../../bin/</ReferencePath> | 481 | <ReferencePath>../../../../bin/</ReferencePath> |
482 | <Reference name="System"/> | 482 | <Reference name="System"/> |
483 | <Reference name="OpenMetaverseTypes.dll"/> | 483 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
484 | <Reference name="Nini.dll" /> | 484 | <Reference name="Nini" path="../../../../bin/"/> |
485 | <Reference name="OpenSim.Framework"/> | 485 | <Reference name="OpenSim.Framework"/> |
486 | <Reference name="OpenSim.Region.Physics.Manager"/> | 486 | <Reference name="OpenSim.Region.Physics.Manager"/> |
487 | <Files> | 487 | <Files> |
@@ -503,12 +503,12 @@ | |||
503 | 503 | ||
504 | <ReferencePath>../../../../bin/</ReferencePath> | 504 | <ReferencePath>../../../../bin/</ReferencePath> |
505 | <Reference name="System"/> | 505 | <Reference name="System"/> |
506 | <Reference name="OpenMetaverseTypes.dll"/> | 506 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
507 | <Reference name="Nini.dll" /> | 507 | <Reference name="Nini" path="../../../../bin/"/> |
508 | <Reference name="PhysX_Wrapper_Dotnet.dll"/> | 508 | <Reference name="PhysX_Wrapper_Dotnet" path="../../../../bin/"/> |
509 | <Reference name="OpenSim.Framework"/> | 509 | <Reference name="OpenSim.Framework"/> |
510 | <Reference name="OpenSim.Region.Physics.Manager"/> | 510 | <Reference name="OpenSim.Region.Physics.Manager"/> |
511 | <Reference name="log4net.dll"/> | 511 | <Reference name="log4net" path="../../../../bin/"/> |
512 | <Files> | 512 | <Files> |
513 | <Match pattern="*.cs" recurse="true"/> | 513 | <Match pattern="*.cs" recurse="true"/> |
514 | </Files> | 514 | </Files> |
@@ -529,13 +529,13 @@ | |||
529 | <ReferencePath>../../../../bin/</ReferencePath> | 529 | <ReferencePath>../../../../bin/</ReferencePath> |
530 | <Reference name="System"/> | 530 | <Reference name="System"/> |
531 | <Reference name="System.Core"/> | 531 | <Reference name="System.Core"/> |
532 | <Reference name="OpenMetaverseTypes.dll"/> | 532 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
533 | <Reference name="Nini.dll" /> | 533 | <Reference name="Nini" path="../../../../bin/"/> |
534 | <Reference name="OpenSim.Framework"/> | 534 | <Reference name="OpenSim.Framework"/> |
535 | <Reference name="OpenSim.Framework.Console"/> | 535 | <Reference name="OpenSim.Framework.Console"/> |
536 | <Reference name="OpenSim.Region.Physics.Manager"/> | 536 | <Reference name="OpenSim.Region.Physics.Manager"/> |
537 | <Reference name="Ode.NET.dll" /> | 537 | <Reference name="Ode.NET" path="../../../../bin/"/> |
538 | <Reference name="log4net.dll"/> | 538 | <Reference name="log4net" path="../../../../bin/"/> |
539 | 539 | ||
540 | <Files> | 540 | <Files> |
541 | <Match pattern="*.cs" recurse="true"> | 541 | <Match pattern="*.cs" recurse="true"> |
@@ -588,14 +588,14 @@ | |||
588 | 588 | ||
589 | <ReferencePath>../../../../bin/</ReferencePath> | 589 | <ReferencePath>../../../../bin/</ReferencePath> |
590 | <Reference name="System"/> | 590 | <Reference name="System"/> |
591 | <Reference name="OpenMetaverseTypes.dll"/> | 591 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
592 | <Reference name="Nini.dll" /> | 592 | <Reference name="Nini" path="../../../../bin/"/> |
593 | <Reference name="OpenSim.Framework"/> | 593 | <Reference name="OpenSim.Framework"/> |
594 | <Reference name="OpenSim.Framework.Console"/> | 594 | <Reference name="OpenSim.Framework.Console"/> |
595 | <Reference name="OpenSim.Region.Physics.Manager"/> | 595 | <Reference name="OpenSim.Region.Physics.Manager"/> |
596 | <Reference name="MonoXnaCompactMaths.dll"/> | 596 | <Reference name="MonoXnaCompactMaths" path="../../../../bin/"/> |
597 | <Reference name="Modified.XnaDevRu.BulletX.dll" /> | 597 | <Reference name="Modified.XnaDevRu.BulletX" path="../../../../bin/"/> |
598 | <Reference name="log4net.dll"/> | 598 | <Reference name="log4net" path="../../../../bin/"/> |
599 | 599 | ||
600 | <Files> | 600 | <Files> |
601 | <Match pattern="*.cs" recurse="true"/> | 601 | <Match pattern="*.cs" recurse="true"/> |
@@ -617,14 +617,14 @@ | |||
617 | <ReferencePath>../../../../bin/</ReferencePath> | 617 | <ReferencePath>../../../../bin/</ReferencePath> |
618 | <Reference name="System"/> | 618 | <Reference name="System"/> |
619 | <Reference name="System.Drawing"/> | 619 | <Reference name="System.Drawing"/> |
620 | <Reference name="CSJ2K.dll"/> | 620 | <Reference name="CSJ2K" path="../../../../bin/"/> |
621 | <Reference name="OpenMetaverseTypes.dll"/> | 621 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
622 | <Reference name="OpenMetaverse.dll"/> | 622 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
623 | <Reference name="Nini.dll" /> | 623 | <Reference name="Nini" path="../../../../bin/"/> |
624 | <Reference name="OpenSim.Framework"/> | 624 | <Reference name="OpenSim.Framework"/> |
625 | <Reference name="OpenSim.Framework.Console"/> | 625 | <Reference name="OpenSim.Framework.Console"/> |
626 | <Reference name="OpenSim.Region.Physics.Manager"/> | 626 | <Reference name="OpenSim.Region.Physics.Manager"/> |
627 | <Reference name="log4net.dll"/> | 627 | <Reference name="log4net" path="../../../../bin/"/> |
628 | 628 | ||
629 | <Files> | 629 | <Files> |
630 | <Match pattern="*.cs" recurse="true"/> | 630 | <Match pattern="*.cs" recurse="true"/> |
@@ -645,14 +645,14 @@ | |||
645 | 645 | ||
646 | <ReferencePath>../../../../bin/</ReferencePath> | 646 | <ReferencePath>../../../../bin/</ReferencePath> |
647 | <Reference name="System"/> | 647 | <Reference name="System"/> |
648 | <Reference name="OpenMetaverseTypes.dll"/> | 648 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
649 | <Reference name="Nini.dll" /> | 649 | <Reference name="Nini" path="../../../../bin/"/> |
650 | <Reference name="OpenSim.Framework"/> | 650 | <Reference name="OpenSim.Framework"/> |
651 | <Reference name="OpenSim.Framework.Console"/> | 651 | <Reference name="OpenSim.Framework.Console"/> |
652 | <Reference name="OpenSim.Region.Physics.Manager"/> | 652 | <Reference name="OpenSim.Region.Physics.Manager"/> |
653 | <Reference name="BulletDotNET.dll" /> | 653 | <Reference name="BulletDotNET" path="../../../../bin/"/> |
654 | <Reference name="nunit.framework.dll" /> | 654 | <Reference name="nunit.framework" path="../../../../bin/"/> |
655 | <Reference name="log4net.dll"/> | 655 | <Reference name="log4net" path="../../../../bin/"/> |
656 | 656 | ||
657 | <Files> | 657 | <Files> |
658 | <Match pattern="*.cs" recurse="true"/> | 658 | <Match pattern="*.cs" recurse="true"/> |
@@ -673,14 +673,14 @@ | |||
673 | 673 | ||
674 | <ReferencePath>../../../bin/</ReferencePath> | 674 | <ReferencePath>../../../bin/</ReferencePath> |
675 | <Reference name="System"/> | 675 | <Reference name="System"/> |
676 | <Reference name="OpenMetaverseTypes.dll"/> | 676 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
677 | <Reference name="OpenMetaverse.dll"/> | 677 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
678 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 678 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
679 | <Reference name="OpenSim.Framework"/> | 679 | <Reference name="OpenSim.Framework"/> |
680 | <Reference name="OpenSim.Framework.Console"/> | 680 | <Reference name="OpenSim.Framework.Console"/> |
681 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 681 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
682 | <Reference name="Nini.dll" /> | 682 | <Reference name="Nini" path="../../../bin/"/> |
683 | <Reference name="log4net.dll"/> | 683 | <Reference name="log4net" path="../../../bin/"/> |
684 | 684 | ||
685 | <Files> | 685 | <Files> |
686 | <Match pattern="*.cs" recurse="true"/> | 686 | <Match pattern="*.cs" recurse="true"/> |
@@ -709,16 +709,16 @@ | |||
709 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 709 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
710 | <Reference name="OpenSim.Framework.Statistics"/> | 710 | <Reference name="OpenSim.Framework.Statistics"/> |
711 | <Reference name="OpenSim.Services.Interfaces"/> | 711 | <Reference name="OpenSim.Services.Interfaces"/> |
712 | <Reference name="OpenMetaverseTypes.dll"/> | 712 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
713 | <!-- FIXME: The OpenMetaverse.dll reference can be dropped when the TransferRequestPacket reference is removed from the code --> | 713 | <!-- FIXME: The OpenMetaverse.dll reference can be dropped when the TransferRequestPacket reference is removed from the code --> |
714 | <Reference name="Nini.dll" /> | 714 | <Reference name="Nini" path="../../../bin/"/> |
715 | <Reference name="log4net.dll"/> | 715 | <Reference name="log4net" path="../../../bin/"/> |
716 | 716 | ||
717 | <Files> | 717 | <Files> |
718 | <Match pattern="*.cs" recurse="true"> | 718 | <Match pattern="*.cs" recurse="true"> |
719 | <Exclude name="Tests" pattern="Tests"/> | 719 | <Exclude name="Tests" pattern="Tests"/> |
720 | </Match> | 720 | </Match> |
721 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 721 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
722 | </Files> | 722 | </Files> |
723 | </Project> | 723 | </Project> |
724 | 724 | ||
@@ -740,26 +740,26 @@ | |||
740 | <Reference name="System.Web"/> | 740 | <Reference name="System.Web"/> |
741 | <Reference name="OpenSim.Framework"/> | 741 | <Reference name="OpenSim.Framework"/> |
742 | <Reference name="OpenSim.Framework.AssetLoader.Filesystem"/> | 742 | <Reference name="OpenSim.Framework.AssetLoader.Filesystem"/> |
743 | <Reference name="OpenSim.Data" /> | 743 | <Reference name="OpenSim.Data"/> |
744 | <Reference name="OpenSim.Framework.Capabilities"/> | 744 | <Reference name="OpenSim.Framework.Capabilities"/> |
745 | <Reference name="OpenSim.Framework.Servers"/> | 745 | <Reference name="OpenSim.Framework.Servers"/> |
746 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 746 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
747 | <Reference name="OpenSim.Framework.Console"/> | 747 | <Reference name="OpenSim.Framework.Console"/> |
748 | <Reference name="OpenSim.Framework.Statistics"/> | 748 | <Reference name="OpenSim.Framework.Statistics"/> |
749 | <Reference name="OpenSim.Services.Interfaces"/> | 749 | <Reference name="OpenSim.Services.Interfaces"/> |
750 | <Reference name="OpenMetaverseTypes.dll"/> | 750 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
751 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 751 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
752 | <!-- FIXME: The OpenMetaverse.dll reference can be dropped when the TransferRequestPacket reference is removed from the code --> | 752 | <!-- FIXME: The OpenMetaverse.dll reference can be dropped when the TransferRequestPacket reference is removed from the code --> |
753 | <Reference name="OpenMetaverse.dll"/> | 753 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
754 | <Reference name="Nini.dll" /> | 754 | <Reference name="Nini" path="../../../bin/"/> |
755 | <Reference name="XMLRPC.dll"/> | 755 | <Reference name="XMLRPC" path="../../../bin/"/> |
756 | <Reference name="log4net.dll"/> | 756 | <Reference name="log4net" path="../../../bin/"/> |
757 | 757 | ||
758 | <Files> | 758 | <Files> |
759 | <Match pattern="*.cs" recurse="true"> | 759 | <Match pattern="*.cs" recurse="true"> |
760 | <Exclude name="Tests" pattern="Tests"/> | 760 | <Exclude name="Tests" pattern="Tests"/> |
761 | </Match> | 761 | </Match> |
762 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 762 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
763 | </Files> | 763 | </Files> |
764 | </Project> | 764 | </Project> |
765 | 765 | ||
@@ -782,14 +782,14 @@ | |||
782 | <Reference name="System.Xml"/> | 782 | <Reference name="System.Xml"/> |
783 | <Reference name="System.Drawing"/> | 783 | <Reference name="System.Drawing"/> |
784 | <Reference name="System.Web"/> | 784 | <Reference name="System.Web"/> |
785 | <Reference name="OpenMetaverseTypes.dll"/> | 785 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
786 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 786 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
787 | <Reference name="OpenMetaverse.dll"/> | 787 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
788 | <Reference name="OpenSim.Services.Interfaces"/> | 788 | <Reference name="OpenSim.Services.Interfaces"/> |
789 | <Reference name="OpenSim.Framework"/> | 789 | <Reference name="OpenSim.Framework"/> |
790 | <Reference name="OpenSim.Framework.Capabilities"/> | 790 | <Reference name="OpenSim.Framework.Capabilities"/> |
791 | <Reference name="OpenSim.Framework.Communications"/> | 791 | <Reference name="OpenSim.Framework.Communications"/> |
792 | <Reference name="OpenSim.Data" /> | 792 | <Reference name="OpenSim.Data"/> |
793 | <Reference name="OpenSim.Framework.Console"/> | 793 | <Reference name="OpenSim.Framework.Console"/> |
794 | <Reference name="OpenSim.Framework.Servers"/> | 794 | <Reference name="OpenSim.Framework.Servers"/> |
795 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 795 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -797,16 +797,16 @@ | |||
797 | <Reference name="OpenSim.Region.Physics.Manager"/> | 797 | <Reference name="OpenSim.Region.Physics.Manager"/> |
798 | 798 | ||
799 | <!-- For scripting in funny languages by default --> | 799 | <!-- For scripting in funny languages by default --> |
800 | <Reference name="XMLRPC.dll"/> | 800 | <Reference name="XMLRPC" path="../../../bin/"/> |
801 | <Reference name="OpenSim.Framework.Communications"/> | 801 | <Reference name="OpenSim.Framework.Communications"/> |
802 | <Reference name="Nini.dll" /> | 802 | <Reference name="Nini" path="../../../bin/"/> |
803 | <Reference name="log4net.dll"/> | 803 | <Reference name="log4net" path="../../../bin/"/> |
804 | <Reference name="DotNetOpenMail.dll"/> | 804 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
805 | <Reference name="Mono.Addins.dll"/> | 805 | <Reference name="Mono.Addins" path="../../../bin/"/> |
806 | 806 | ||
807 | <Files> | 807 | <Files> |
808 | <Match pattern="*.cs" recurse="true"> | 808 | <Match pattern="*.cs" recurse="true"> |
809 | <Exclude name="Tests" pattern="Tests" /> | 809 | <Exclude name="Tests" pattern="Tests"/> |
810 | </Match> | 810 | </Match> |
811 | </Files> | 811 | </Files> |
812 | </Project> | 812 | </Project> |
@@ -832,13 +832,13 @@ | |||
832 | <Reference name="System"/> | 832 | <Reference name="System"/> |
833 | <Reference name="System.Xml"/> | 833 | <Reference name="System.Xml"/> |
834 | <Reference name="System.Web"/> | 834 | <Reference name="System.Web"/> |
835 | <Reference name="OpenMetaverseTypes.dll"/> | 835 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
836 | <Reference name="OpenMetaverse.dll"/> | 836 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
837 | <Reference name="OpenSim.Framework"/> | 837 | <Reference name="OpenSim.Framework"/> |
838 | <Reference name="OpenSim.Framework.Console"/> | 838 | <Reference name="OpenSim.Framework.Console"/> |
839 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 839 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
840 | <Reference name="Nini.dll" /> | 840 | <Reference name="Nini" path="../../../bin/"/> |
841 | <Reference name="log4net.dll"/> | 841 | <Reference name="log4net" path="../../../bin/"/> |
842 | 842 | ||
843 | <Files> | 843 | <Files> |
844 | <Match pattern="*.cs" recurse="true"/> | 844 | <Match pattern="*.cs" recurse="true"/> |
@@ -859,13 +859,13 @@ | |||
859 | 859 | ||
860 | <ReferencePath>../../../bin/</ReferencePath> | 860 | <ReferencePath>../../../bin/</ReferencePath> |
861 | <Reference name="System"/> | 861 | <Reference name="System"/> |
862 | <Reference name="OpenMetaverseTypes.dll"/> | 862 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
863 | <Reference name="OpenMetaverse.dll"/> | 863 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
864 | <Reference name="OpenSim.Framework"/> | 864 | <Reference name="OpenSim.Framework"/> |
865 | <Reference name="OpenSim.Framework.Console"/> | 865 | <Reference name="OpenSim.Framework.Console"/> |
866 | <Reference name="OpenSim.Services.Interfaces"/> | 866 | <Reference name="OpenSim.Services.Interfaces"/> |
867 | <Reference name="Nini.dll" /> | 867 | <Reference name="Nini" path="../../../bin/"/> |
868 | <Reference name="log4net.dll"/> | 868 | <Reference name="log4net" path="../../../bin/"/> |
869 | 869 | ||
870 | <Files> | 870 | <Files> |
871 | <Match pattern="*.cs" recurse="true"/> | 871 | <Match pattern="*.cs" recurse="true"/> |
@@ -887,16 +887,16 @@ | |||
887 | <ReferencePath>../../../bin/</ReferencePath> | 887 | <ReferencePath>../../../bin/</ReferencePath> |
888 | <Reference name="System"/> | 888 | <Reference name="System"/> |
889 | <Reference name="System.Web"/> | 889 | <Reference name="System.Web"/> |
890 | <Reference name="OpenMetaverseTypes.dll"/> | 890 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
891 | <Reference name="OpenMetaverse.dll"/> | 891 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
892 | <Reference name="OpenSim.Framework"/> | 892 | <Reference name="OpenSim.Framework"/> |
893 | <Reference name="OpenSim.Framework.Console"/> | 893 | <Reference name="OpenSim.Framework.Console"/> |
894 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 894 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
895 | <Reference name="OpenSim.Services.Interfaces"/> | 895 | <Reference name="OpenSim.Services.Interfaces"/> |
896 | <Reference name="OpenSim.Services.Base"/> | 896 | <Reference name="OpenSim.Services.Base"/> |
897 | <Reference name="OpenSim.Data"/> | 897 | <Reference name="OpenSim.Data"/> |
898 | <Reference name="Nini.dll" /> | 898 | <Reference name="Nini" path="../../../bin/"/> |
899 | <Reference name="log4net.dll"/> | 899 | <Reference name="log4net" path="../../../bin/"/> |
900 | 900 | ||
901 | <Files> | 901 | <Files> |
902 | <Match pattern="*.cs" recurse="true"/> | 902 | <Match pattern="*.cs" recurse="true"/> |
@@ -918,16 +918,16 @@ | |||
918 | <ReferencePath>../../../bin/</ReferencePath> | 918 | <ReferencePath>../../../bin/</ReferencePath> |
919 | <Reference name="System"/> | 919 | <Reference name="System"/> |
920 | <Reference name="System.Web"/> | 920 | <Reference name="System.Web"/> |
921 | <Reference name="OpenMetaverseTypes.dll"/> | 921 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
922 | <Reference name="OpenMetaverse.dll"/> | 922 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
923 | <Reference name="OpenSim.Framework"/> | 923 | <Reference name="OpenSim.Framework"/> |
924 | <Reference name="OpenSim.Framework.Console"/> | 924 | <Reference name="OpenSim.Framework.Console"/> |
925 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 925 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
926 | <Reference name="OpenSim.Services.Interfaces"/> | 926 | <Reference name="OpenSim.Services.Interfaces"/> |
927 | <Reference name="OpenSim.Services.Base"/> | 927 | <Reference name="OpenSim.Services.Base"/> |
928 | <Reference name="OpenSim.Data"/> | 928 | <Reference name="OpenSim.Data"/> |
929 | <Reference name="Nini.dll" /> | 929 | <Reference name="Nini" path="../../../bin/"/> |
930 | <Reference name="log4net.dll"/> | 930 | <Reference name="log4net" path="../../../bin/"/> |
931 | 931 | ||
932 | <Files> | 932 | <Files> |
933 | <Match pattern="*.cs" recurse="true"/> | 933 | <Match pattern="*.cs" recurse="true"/> |
@@ -948,22 +948,25 @@ | |||
948 | 948 | ||
949 | <ReferencePath>../../../bin/</ReferencePath> | 949 | <ReferencePath>../../../bin/</ReferencePath> |
950 | <Reference name="System"/> | 950 | <Reference name="System"/> |
951 | <Reference name="System.Core"/> | ||
951 | <Reference name="System.Xml"/> | 952 | <Reference name="System.Xml"/> |
952 | <Reference name="System.Drawing"/> | 953 | <Reference name="System.Drawing"/> |
953 | <Reference name="OpenMetaverseTypes.dll"/> | 954 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
954 | <Reference name="OpenMetaverse.dll"/> | 955 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
955 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 956 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
956 | <Reference name="OpenSim.Services.Interfaces"/> | 957 | <Reference name="OpenSim.Data"/> |
957 | <Reference name="OpenSim.Framework"/> | 958 | <Reference name="OpenSim.Framework"/> |
958 | <Reference name="OpenSim.Framework.Communications"/> | 959 | <Reference name="OpenSim.Framework.Communications"/> |
959 | <Reference name="OpenSim.Framework.Console"/> | 960 | <Reference name="OpenSim.Framework.Console"/> |
960 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 961 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
961 | <Reference name="OpenSim.Region.Framework"/> | 962 | <Reference name="OpenSim.Region.Framework"/> |
962 | <Reference name="OpenSim.Server.Base"/> | 963 | <Reference name="OpenSim.Server.Base"/> |
963 | <Reference name="Mono.Addins" /> | 964 | <Reference name="OpenSim.Services.Base"/> |
964 | <Reference name="Nini.dll" /> | 965 | <Reference name="OpenSim.Services.Interfaces"/> |
965 | <Reference name="log4net.dll"/> | 966 | <Reference name="Mono.Addins" path="../../../bin/"/> |
966 | <Reference name="XMLRPC.dll" /> | 967 | <Reference name="Nini" path="../../../bin/"/> |
968 | <Reference name="log4net" path="../../../bin/"/> | ||
969 | <Reference name="XMLRPC" path="../../../bin/"/> | ||
967 | 970 | ||
968 | <Files> | 971 | <Files> |
969 | <Match pattern="*.cs" recurse="true"/> | 972 | <Match pattern="*.cs" recurse="true"/> |
@@ -984,8 +987,8 @@ | |||
984 | 987 | ||
985 | <ReferencePath>../../../bin/</ReferencePath> | 988 | <ReferencePath>../../../bin/</ReferencePath> |
986 | <Reference name="System"/> | 989 | <Reference name="System"/> |
987 | <Reference name="OpenMetaverseTypes.dll"/> | 990 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
988 | <Reference name="OpenMetaverse.dll"/> | 991 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
989 | <Reference name="OpenSim.Framework"/> | 992 | <Reference name="OpenSim.Framework"/> |
990 | <Reference name="OpenSim.Framework.Console"/> | 993 | <Reference name="OpenSim.Framework.Console"/> |
991 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 994 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -993,8 +996,8 @@ | |||
993 | <Reference name="OpenSim.Services.Base"/> | 996 | <Reference name="OpenSim.Services.Base"/> |
994 | <Reference name="OpenSim.Services.Connectors"/> | 997 | <Reference name="OpenSim.Services.Connectors"/> |
995 | <Reference name="OpenSim.Data"/> | 998 | <Reference name="OpenSim.Data"/> |
996 | <Reference name="Nini.dll" /> | 999 | <Reference name="Nini" path="../../../bin/"/> |
997 | <Reference name="log4net.dll"/> | 1000 | <Reference name="log4net" path="../../../bin/"/> |
998 | 1001 | ||
999 | <Files> | 1002 | <Files> |
1000 | <Match pattern="*.cs" recurse="true"/> | 1003 | <Match pattern="*.cs" recurse="true"/> |
@@ -1015,8 +1018,8 @@ | |||
1015 | 1018 | ||
1016 | <ReferencePath>../../../bin/</ReferencePath> | 1019 | <ReferencePath>../../../bin/</ReferencePath> |
1017 | <Reference name="System"/> | 1020 | <Reference name="System"/> |
1018 | <Reference name="OpenMetaverseTypes.dll"/> | 1021 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1019 | <Reference name="OpenMetaverse.dll"/> | 1022 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1020 | <Reference name="OpenSim.Framework"/> | 1023 | <Reference name="OpenSim.Framework"/> |
1021 | <Reference name="OpenSim.Framework.Console"/> | 1024 | <Reference name="OpenSim.Framework.Console"/> |
1022 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1025 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1024,8 +1027,8 @@ | |||
1024 | <Reference name="OpenSim.Services.Base"/> | 1027 | <Reference name="OpenSim.Services.Base"/> |
1025 | <Reference name="OpenSim.Services.Connectors"/> | 1028 | <Reference name="OpenSim.Services.Connectors"/> |
1026 | <Reference name="OpenSim.Data"/> | 1029 | <Reference name="OpenSim.Data"/> |
1027 | <Reference name="Nini.dll" /> | 1030 | <Reference name="Nini" path="../../../bin/"/> |
1028 | <Reference name="log4net.dll"/> | 1031 | <Reference name="log4net" path="../../../bin/"/> |
1029 | 1032 | ||
1030 | <Files> | 1033 | <Files> |
1031 | <Match pattern="*.cs" recurse="true"/> | 1034 | <Match pattern="*.cs" recurse="true"/> |
@@ -1046,8 +1049,8 @@ | |||
1046 | 1049 | ||
1047 | <ReferencePath>../../../bin/</ReferencePath> | 1050 | <ReferencePath>../../../bin/</ReferencePath> |
1048 | <Reference name="System"/> | 1051 | <Reference name="System"/> |
1049 | <Reference name="OpenMetaverseTypes.dll"/> | 1052 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1050 | <Reference name="OpenMetaverse.dll"/> | 1053 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1051 | <Reference name="OpenSim.Framework"/> | 1054 | <Reference name="OpenSim.Framework"/> |
1052 | <Reference name="OpenSim.Framework.Console"/> | 1055 | <Reference name="OpenSim.Framework.Console"/> |
1053 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1056 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1055,8 +1058,8 @@ | |||
1055 | <Reference name="OpenSim.Services.Base"/> | 1058 | <Reference name="OpenSim.Services.Base"/> |
1056 | <Reference name="OpenSim.Services.Connectors"/> | 1059 | <Reference name="OpenSim.Services.Connectors"/> |
1057 | <Reference name="OpenSim.Data"/> | 1060 | <Reference name="OpenSim.Data"/> |
1058 | <Reference name="Nini.dll" /> | 1061 | <Reference name="Nini" path="../../../bin/"/> |
1059 | <Reference name="log4net.dll"/> | 1062 | <Reference name="log4net" path="../../../bin/"/> |
1060 | 1063 | ||
1061 | <Files> | 1064 | <Files> |
1062 | <Match pattern="*.cs" recurse="true"/> | 1065 | <Match pattern="*.cs" recurse="true"/> |
@@ -1077,8 +1080,8 @@ | |||
1077 | 1080 | ||
1078 | <ReferencePath>../../../bin/</ReferencePath> | 1081 | <ReferencePath>../../../bin/</ReferencePath> |
1079 | <Reference name="System"/> | 1082 | <Reference name="System"/> |
1080 | <Reference name="OpenMetaverseTypes.dll"/> | 1083 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1081 | <Reference name="OpenMetaverse.dll"/> | 1084 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1082 | <Reference name="OpenSim.Framework"/> | 1085 | <Reference name="OpenSim.Framework"/> |
1083 | <Reference name="OpenSim.Framework.Console"/> | 1086 | <Reference name="OpenSim.Framework.Console"/> |
1084 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1087 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1086,8 +1089,8 @@ | |||
1086 | <Reference name="OpenSim.Services.Base"/> | 1089 | <Reference name="OpenSim.Services.Base"/> |
1087 | <Reference name="OpenSim.Services.Connectors"/> | 1090 | <Reference name="OpenSim.Services.Connectors"/> |
1088 | <Reference name="OpenSim.Data"/> | 1091 | <Reference name="OpenSim.Data"/> |
1089 | <Reference name="Nini.dll" /> | 1092 | <Reference name="Nini" path="../../../bin/"/> |
1090 | <Reference name="log4net.dll"/> | 1093 | <Reference name="log4net" path="../../../bin/"/> |
1091 | 1094 | ||
1092 | <Files> | 1095 | <Files> |
1093 | <Match pattern="*.cs" recurse="true"/> | 1096 | <Match pattern="*.cs" recurse="true"/> |
@@ -1109,8 +1112,8 @@ | |||
1109 | <ReferencePath>../../../bin/</ReferencePath> | 1112 | <ReferencePath>../../../bin/</ReferencePath> |
1110 | <Reference name="System"/> | 1113 | <Reference name="System"/> |
1111 | <Reference name="System.Xml"/> | 1114 | <Reference name="System.Xml"/> |
1112 | <Reference name="OpenMetaverseTypes.dll"/> | 1115 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1113 | <Reference name="OpenMetaverse.dll"/> | 1116 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1114 | <Reference name="OpenSim.Framework"/> | 1117 | <Reference name="OpenSim.Framework"/> |
1115 | <Reference name="OpenSim.Framework.Console"/> | 1118 | <Reference name="OpenSim.Framework.Console"/> |
1116 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1119 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1119,8 +1122,8 @@ | |||
1119 | <Reference name="OpenSim.Services.Connectors"/> | 1122 | <Reference name="OpenSim.Services.Connectors"/> |
1120 | <Reference name="OpenSim.Data"/> | 1123 | <Reference name="OpenSim.Data"/> |
1121 | <Reference name="OpenSim.Server.Base"/> | 1124 | <Reference name="OpenSim.Server.Base"/> |
1122 | <Reference name="Nini.dll" /> | 1125 | <Reference name="Nini" path="../../../bin/"/> |
1123 | <Reference name="log4net.dll"/> | 1126 | <Reference name="log4net" path="../../../bin/"/> |
1124 | 1127 | ||
1125 | <Files> | 1128 | <Files> |
1126 | <Match pattern="*.cs" recurse="true"/> | 1129 | <Match pattern="*.cs" recurse="true"/> |
@@ -1141,8 +1144,8 @@ | |||
1141 | 1144 | ||
1142 | <ReferencePath>../../../bin/</ReferencePath> | 1145 | <ReferencePath>../../../bin/</ReferencePath> |
1143 | <Reference name="System"/> | 1146 | <Reference name="System"/> |
1144 | <Reference name="OpenMetaverseTypes.dll"/> | 1147 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1145 | <Reference name="OpenMetaverse.dll"/> | 1148 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1146 | <Reference name="OpenSim.Framework"/> | 1149 | <Reference name="OpenSim.Framework"/> |
1147 | <Reference name="OpenSim.Framework.Console"/> | 1150 | <Reference name="OpenSim.Framework.Console"/> |
1148 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1151 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1150,8 +1153,8 @@ | |||
1150 | <Reference name="OpenSim.Services.Base"/> | 1153 | <Reference name="OpenSim.Services.Base"/> |
1151 | <Reference name="OpenSim.Services.Connectors"/> | 1154 | <Reference name="OpenSim.Services.Connectors"/> |
1152 | <Reference name="OpenSim.Data"/> | 1155 | <Reference name="OpenSim.Data"/> |
1153 | <Reference name="Nini.dll" /> | 1156 | <Reference name="Nini" path="../../../bin/"/> |
1154 | <Reference name="log4net.dll"/> | 1157 | <Reference name="log4net" path="../../../bin/"/> |
1155 | 1158 | ||
1156 | <Files> | 1159 | <Files> |
1157 | <Match pattern="*.cs" recurse="true"/> | 1160 | <Match pattern="*.cs" recurse="true"/> |
@@ -1172,8 +1175,8 @@ | |||
1172 | 1175 | ||
1173 | <ReferencePath>../../../bin/</ReferencePath> | 1176 | <ReferencePath>../../../bin/</ReferencePath> |
1174 | <Reference name="System"/> | 1177 | <Reference name="System"/> |
1175 | <Reference name="OpenMetaverseTypes.dll"/> | 1178 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1176 | <Reference name="OpenMetaverse.dll"/> | 1179 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1177 | <Reference name="OpenSim.Framework"/> | 1180 | <Reference name="OpenSim.Framework"/> |
1178 | <Reference name="OpenSim.Framework.Console"/> | 1181 | <Reference name="OpenSim.Framework.Console"/> |
1179 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1182 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1181,8 +1184,8 @@ | |||
1181 | <Reference name="OpenSim.Services.Base"/> | 1184 | <Reference name="OpenSim.Services.Base"/> |
1182 | <Reference name="OpenSim.Services.Connectors"/> | 1185 | <Reference name="OpenSim.Services.Connectors"/> |
1183 | <Reference name="OpenSim.Data"/> | 1186 | <Reference name="OpenSim.Data"/> |
1184 | <Reference name="Nini.dll" /> | 1187 | <Reference name="Nini" path="../../../bin/"/> |
1185 | <Reference name="log4net.dll"/> | 1188 | <Reference name="log4net" path="../../../bin/"/> |
1186 | 1189 | ||
1187 | <Files> | 1190 | <Files> |
1188 | <Match pattern="*.cs" recurse="true"/> | 1191 | <Match pattern="*.cs" recurse="true"/> |
@@ -1204,8 +1207,8 @@ | |||
1204 | <ReferencePath>../../../bin/</ReferencePath> | 1207 | <ReferencePath>../../../bin/</ReferencePath> |
1205 | <Reference name="System"/> | 1208 | <Reference name="System"/> |
1206 | <Reference name="System.Xml"/> | 1209 | <Reference name="System.Xml"/> |
1207 | <Reference name="OpenMetaverseTypes.dll"/> | 1210 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1208 | <Reference name="OpenMetaverse.dll"/> | 1211 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1209 | <Reference name="OpenSim.Framework"/> | 1212 | <Reference name="OpenSim.Framework"/> |
1210 | <Reference name="OpenSim.Framework.Capabilities"/> | 1213 | <Reference name="OpenSim.Framework.Capabilities"/> |
1211 | <Reference name="OpenSim.Framework.Console"/> | 1214 | <Reference name="OpenSim.Framework.Console"/> |
@@ -1214,8 +1217,8 @@ | |||
1214 | <Reference name="OpenSim.Services.Base"/> | 1217 | <Reference name="OpenSim.Services.Base"/> |
1215 | <Reference name="OpenSim.Services.Connectors"/> | 1218 | <Reference name="OpenSim.Services.Connectors"/> |
1216 | <Reference name="OpenSim.Data"/> | 1219 | <Reference name="OpenSim.Data"/> |
1217 | <Reference name="Nini.dll" /> | 1220 | <Reference name="Nini" path="../../../bin/"/> |
1218 | <Reference name="log4net.dll"/> | 1221 | <Reference name="log4net" path="../../../bin/"/> |
1219 | 1222 | ||
1220 | <Files> | 1223 | <Files> |
1221 | <Match pattern="*.cs" recurse="true"/> | 1224 | <Match pattern="*.cs" recurse="true"/> |
@@ -1245,11 +1248,11 @@ | |||
1245 | <Reference name="OpenSim.Services.Connectors"/> | 1248 | <Reference name="OpenSim.Services.Connectors"/> |
1246 | <Reference name="OpenSim.Services.Base"/> | 1249 | <Reference name="OpenSim.Services.Base"/> |
1247 | <Reference name="OpenSim.Server.Base"/> | 1250 | <Reference name="OpenSim.Server.Base"/> |
1248 | <Reference name="OpenMetaverseTypes.dll"/> | 1251 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1249 | <Reference name="OpenMetaverse.dll"/> | 1252 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1250 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1253 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1251 | <Reference name="Nini.dll" /> | 1254 | <Reference name="Nini" path="../../../bin/"/> |
1252 | <Reference name="log4net.dll"/> | 1255 | <Reference name="log4net" path="../../../bin/"/> |
1253 | 1256 | ||
1254 | <Files> | 1257 | <Files> |
1255 | <Match pattern="*.cs" recurse="true"/> | 1258 | <Match pattern="*.cs" recurse="true"/> |
@@ -1271,8 +1274,8 @@ | |||
1271 | <ReferencePath>../../../bin/</ReferencePath> | 1274 | <ReferencePath>../../../bin/</ReferencePath> |
1272 | <Reference name="System"/> | 1275 | <Reference name="System"/> |
1273 | <Reference name="System.Xml"/> | 1276 | <Reference name="System.Xml"/> |
1274 | <Reference name="OpenMetaverseTypes.dll"/> | 1277 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1275 | <Reference name="OpenMetaverse.dll"/> | 1278 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1276 | <Reference name="OpenSim.Framework"/> | 1279 | <Reference name="OpenSim.Framework"/> |
1277 | <Reference name="OpenSim.Framework.Console"/> | 1280 | <Reference name="OpenSim.Framework.Console"/> |
1278 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1281 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
@@ -1281,8 +1284,8 @@ | |||
1281 | <Reference name="OpenSim.Services.Connectors"/> | 1284 | <Reference name="OpenSim.Services.Connectors"/> |
1282 | <Reference name="OpenSim.Data"/> | 1285 | <Reference name="OpenSim.Data"/> |
1283 | <Reference name="OpenSim.Server.Base"/> | 1286 | <Reference name="OpenSim.Server.Base"/> |
1284 | <Reference name="Nini.dll" /> | 1287 | <Reference name="Nini" path="../../../bin/"/> |
1285 | <Reference name="log4net.dll"/> | 1288 | <Reference name="log4net" path="../../../bin/"/> |
1286 | 1289 | ||
1287 | <Files> | 1290 | <Files> |
1288 | <Match pattern="*.cs" recurse="true"/> | 1291 | <Match pattern="*.cs" recurse="true"/> |
@@ -1306,23 +1309,23 @@ | |||
1306 | <Reference name="System"/> | 1309 | <Reference name="System"/> |
1307 | <Reference name="System.Xml"/> | 1310 | <Reference name="System.Xml"/> |
1308 | <Reference name="System.Web"/> | 1311 | <Reference name="System.Web"/> |
1309 | <Reference name="OpenMetaverseTypes.dll"/> | 1312 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1310 | <Reference name="OpenMetaverse.dll"/> | 1313 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1311 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1314 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1312 | <Reference name="OpenSim.Framework"/> | 1315 | <Reference name="OpenSim.Framework"/> |
1313 | <Reference name="OpenSim.Framework.Console"/> | 1316 | <Reference name="OpenSim.Framework.Console"/> |
1314 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1317 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1315 | <Reference name="OpenSim.Server.Base"/> | 1318 | <Reference name="OpenSim.Server.Base"/> |
1316 | <Reference name="OpenSim.Services.Base" /> | 1319 | <Reference name="OpenSim.Services.Base"/> |
1317 | <Reference name="OpenSim.Services.Interfaces"/> | 1320 | <Reference name="OpenSim.Services.Interfaces"/> |
1318 | <Reference name="XMLRPC.dll" /> | 1321 | <Reference name="XMLRPC" path="../../../bin/"/> |
1319 | <Reference name="Nini.dll" /> | 1322 | <Reference name="Nini" path="../../../bin/"/> |
1320 | <Reference name="log4net.dll"/> | 1323 | <Reference name="log4net" path="../../../bin/"/> |
1321 | <Reference name="DotNetOpenId.dll"/> | 1324 | <Reference name="DotNetOpenId" path="../../../bin/"/> |
1322 | 1325 | ||
1323 | <Files> | 1326 | <Files> |
1324 | <Match pattern="*.cs" recurse="true"> | 1327 | <Match pattern="*.cs" recurse="true"> |
1325 | <Exclude pattern="Tests" /> | 1328 | <Exclude pattern="Tests"/> |
1326 | </Match> | 1329 | </Match> |
1327 | </Files> | 1330 | </Files> |
1328 | </Project> | 1331 | </Project> |
@@ -1343,20 +1346,20 @@ | |||
1343 | <ReferencePath>../../bin/</ReferencePath> | 1346 | <ReferencePath>../../bin/</ReferencePath> |
1344 | <Reference name="System"/> | 1347 | <Reference name="System"/> |
1345 | <Reference name="System.Xml"/> | 1348 | <Reference name="System.Xml"/> |
1346 | <Reference name="OpenMetaverseTypes.dll"/> | 1349 | <Reference name="OpenMetaverseTypes" path="../../bin/"/> |
1347 | <Reference name="OpenMetaverse.dll"/> | 1350 | <Reference name="OpenMetaverse" path="../../bin/"/> |
1348 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1351 | <Reference name="OpenMetaverse.StructuredData" path="../../bin/"/> |
1349 | <Reference name="OpenSim.Framework"/> | 1352 | <Reference name="OpenSim.Framework"/> |
1350 | <Reference name="OpenSim.Framework.Console"/> | 1353 | <Reference name="OpenSim.Framework.Console"/> |
1351 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1354 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1352 | <Reference name="OpenSim.Server.Base"/> | 1355 | <Reference name="OpenSim.Server.Base"/> |
1353 | <Reference name="OpenSim.Server.Handlers"/> | 1356 | <Reference name="OpenSim.Server.Handlers"/> |
1354 | <Reference name="Nini.dll" /> | 1357 | <Reference name="Nini" path="../../bin/"/> |
1355 | <Reference name="log4net.dll"/> | 1358 | <Reference name="log4net" path="../../bin/"/> |
1356 | 1359 | ||
1357 | <Files> | 1360 | <Files> |
1358 | <Match pattern="*.cs" recurse="false"> | 1361 | <Match pattern="*.cs" recurse="false"> |
1359 | <Exclude pattern="Tests" /> | 1362 | <Exclude pattern="Tests"/> |
1360 | </Match> | 1363 | </Match> |
1361 | </Files> | 1364 | </Files> |
1362 | </Project> | 1365 | </Project> |
@@ -1376,19 +1379,19 @@ | |||
1376 | <ReferencePath>../../bin/</ReferencePath> | 1379 | <ReferencePath>../../bin/</ReferencePath> |
1377 | <Reference name="System"/> | 1380 | <Reference name="System"/> |
1378 | <Reference name="System.Xml"/> | 1381 | <Reference name="System.Xml"/> |
1379 | <Reference name="OpenMetaverseTypes.dll"/> | 1382 | <Reference name="OpenMetaverseTypes" path="../../bin/"/> |
1380 | <Reference name="OpenMetaverse.dll"/> | 1383 | <Reference name="OpenMetaverse" path="../../bin/"/> |
1381 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1384 | <Reference name="OpenMetaverse.StructuredData" path="../../bin/"/> |
1382 | <Reference name="OpenSim.Framework"/> | 1385 | <Reference name="OpenSim.Framework"/> |
1383 | <Reference name="OpenSim.Framework.Console"/> | 1386 | <Reference name="OpenSim.Framework.Console"/> |
1384 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1387 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1385 | <Reference name="OpenSim.Server.Base"/> | 1388 | <Reference name="OpenSim.Server.Base"/> |
1386 | <Reference name="Nini.dll" /> | 1389 | <Reference name="Nini" path="../../bin/"/> |
1387 | <Reference name="log4net.dll"/> | 1390 | <Reference name="log4net" path="../../bin/"/> |
1388 | 1391 | ||
1389 | <Files> | 1392 | <Files> |
1390 | <Match pattern="*.cs" recurse="false"> | 1393 | <Match pattern="*.cs" recurse="false"> |
1391 | <Exclude pattern="Tests" /> | 1394 | <Exclude pattern="Tests"/> |
1392 | </Match> | 1395 | </Match> |
1393 | </Files> | 1396 | </Files> |
1394 | </Project> | 1397 | </Project> |
@@ -1411,21 +1414,21 @@ | |||
1411 | <Reference name="System.Xml"/> | 1414 | <Reference name="System.Xml"/> |
1412 | <Reference name="System.Drawing"/> | 1415 | <Reference name="System.Drawing"/> |
1413 | <Reference name="System.Web"/> | 1416 | <Reference name="System.Web"/> |
1414 | <Reference name="NDesk.Options"/> | 1417 | <Reference name="NDesk.Options" path="../../../bin/"/> |
1415 | <Reference name="OpenMetaverseTypes.dll"/> | 1418 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1416 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1419 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1417 | <Reference name="OpenMetaverse.dll"/> | 1420 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1418 | <Reference name="CSJ2K.dll"/> | 1421 | <Reference name="CSJ2K" path="../../../bin/"/> |
1419 | <Reference name="OpenSim.Framework"/> | 1422 | <Reference name="OpenSim.Framework"/> |
1420 | <Reference name="OpenSim.Framework.Capabilities"/> | 1423 | <Reference name="OpenSim.Framework.Capabilities"/> |
1421 | <Reference name="OpenSim.Framework.Communications"/> | 1424 | <Reference name="OpenSim.Framework.Communications"/> |
1422 | <Reference name="OpenSim.Data" /> | 1425 | <Reference name="OpenSim.Data"/> |
1423 | <Reference name="OpenSim.Region.Framework" /> | 1426 | <Reference name="OpenSim.Region.Framework"/> |
1424 | <Reference name="OpenSim.Server.Base" /> | 1427 | <Reference name="OpenSim.Server.Base"/> |
1425 | <Reference name="OpenSim.Server.Handlers" /> | 1428 | <Reference name="OpenSim.Server.Handlers"/> |
1426 | <Reference name="OpenSim.Services.Connectors" /> | 1429 | <Reference name="OpenSim.Services.Connectors"/> |
1427 | <Reference name="OpenSim.Services.Base" /> | 1430 | <Reference name="OpenSim.Services.Base"/> |
1428 | <Reference name="OpenSim.Services.Interfaces" /> | 1431 | <Reference name="OpenSim.Services.Interfaces"/> |
1429 | <Reference name="OpenSim.Framework.Serialization"/> | 1432 | <Reference name="OpenSim.Framework.Serialization"/> |
1430 | <Reference name="OpenSim.Framework.Console"/> | 1433 | <Reference name="OpenSim.Framework.Console"/> |
1431 | <Reference name="OpenSim.Framework.Servers"/> | 1434 | <Reference name="OpenSim.Framework.Servers"/> |
@@ -1433,24 +1436,24 @@ | |||
1433 | <Reference name="OpenSim.Framework.Statistics"/> | 1436 | <Reference name="OpenSim.Framework.Statistics"/> |
1434 | <Reference name="OpenSim.Region.Physics.Manager"/> | 1437 | <Reference name="OpenSim.Region.Physics.Manager"/> |
1435 | 1438 | ||
1436 | <Reference name="GlynnTucker.Cache.dll"/> | 1439 | <Reference name="GlynnTucker.Cache" path="../../../bin/"/> |
1437 | 1440 | ||
1438 | <!-- For scripting in funny languages by default --> | 1441 | <!-- For scripting in funny languages by default --> |
1439 | <Reference name="XMLRPC.dll"/> | 1442 | <Reference name="XMLRPC" path="../../../bin/"/> |
1440 | <Reference name="OpenSim.Framework.Communications"/> | 1443 | <Reference name="OpenSim.Framework.Communications"/> |
1441 | <Reference name="Nini.dll" /> | 1444 | <Reference name="Nini" path="../../../bin/"/> |
1442 | <Reference name="log4net.dll"/> | 1445 | <Reference name="log4net" path="../../../bin/"/> |
1443 | <Reference name="DotNetOpenMail.dll"/> | 1446 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
1444 | 1447 | ||
1445 | <!-- To allow regions to have mono addins --> | 1448 | <!-- To allow regions to have mono addins --> |
1446 | <Reference name="Mono.Addins.dll" /> | 1449 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1447 | 1450 | ||
1448 | <Files> | 1451 | <Files> |
1449 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1452 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1450 | <Match pattern="*.cs" recurse="true"> | 1453 | <Match pattern="*.cs" recurse="true"> |
1451 | <Exclude name="Tests" pattern="Tests" /> | 1454 | <Exclude name="Tests" pattern="Tests"/> |
1452 | </Match> | 1455 | </Match> |
1453 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1456 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1454 | </Files> | 1457 | </Files> |
1455 | </Project> | 1458 | </Project> |
1456 | 1459 | ||
@@ -1471,40 +1474,40 @@ | |||
1471 | <Reference name="System.Xml"/> | 1474 | <Reference name="System.Xml"/> |
1472 | <Reference name="System.Drawing"/> | 1475 | <Reference name="System.Drawing"/> |
1473 | <Reference name="System.Web"/> | 1476 | <Reference name="System.Web"/> |
1474 | <Reference name="OpenMetaverseTypes.dll"/> | 1477 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1475 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1478 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1476 | <Reference name="OpenMetaverse.dll"/> | 1479 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1477 | <Reference name="PumaCode.SvnDotNet.dll"/> | 1480 | <Reference name="PumaCode.SvnDotNet" path="../../../bin/"/> |
1478 | <Reference name="OpenSim.Framework"/> | 1481 | <Reference name="OpenSim.Framework"/> |
1479 | <Reference name="OpenSim.Framework.Communications"/> | 1482 | <Reference name="OpenSim.Framework.Communications"/> |
1480 | <Reference name="OpenSim.Data" /> | 1483 | <Reference name="OpenSim.Data"/> |
1481 | <Reference name="OpenSim.Region.Framework" /> | 1484 | <Reference name="OpenSim.Region.Framework"/> |
1482 | <Reference name="OpenSim.Region.CoreModules" /> | 1485 | <Reference name="OpenSim.Region.CoreModules"/> |
1483 | <Reference name="OpenSim.Framework.Capabilities"/> | 1486 | <Reference name="OpenSim.Framework.Capabilities"/> |
1484 | <Reference name="OpenSim.Framework.Console"/> | 1487 | <Reference name="OpenSim.Framework.Console"/> |
1485 | <Reference name="OpenSim.Framework.Servers"/> | 1488 | <Reference name="OpenSim.Framework.Servers"/> |
1486 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1489 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1487 | <Reference name="OpenSim.Framework.Statistics"/> | 1490 | <Reference name="OpenSim.Framework.Statistics"/> |
1488 | <Reference name="OpenSim.Region.Physics.Manager"/> | 1491 | <Reference name="OpenSim.Region.Physics.Manager"/> |
1489 | <Reference name="OpenSim.Server.Base" /> | 1492 | <Reference name="OpenSim.Server.Base"/> |
1490 | <Reference name="OpenSim.Server.Handlers" /> | 1493 | <Reference name="OpenSim.Server.Handlers"/> |
1491 | <Reference name="OpenSim.Services.Connectors" /> | 1494 | <Reference name="OpenSim.Services.Connectors"/> |
1492 | <Reference name="OpenSim.Services.Base" /> | 1495 | <Reference name="OpenSim.Services.Base"/> |
1493 | <Reference name="OpenSim.Services.Interfaces" /> | 1496 | <Reference name="OpenSim.Services.Interfaces"/> |
1494 | <Reference name="Mono.Addins.dll" /> | 1497 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1495 | 1498 | ||
1496 | <!-- For scripting in funny languages by default --> | 1499 | <!-- For scripting in funny languages by default --> |
1497 | <Reference name="XMLRPC.dll"/> | 1500 | <Reference name="XMLRPC" path="../../../bin/"/> |
1498 | <Reference name="OpenSim.Framework.Communications"/> | 1501 | <Reference name="OpenSim.Framework.Communications"/> |
1499 | <Reference name="Nini.dll" /> | 1502 | <Reference name="Nini" path="../../../bin/"/> |
1500 | <Reference name="log4net.dll"/> | 1503 | <Reference name="log4net" path="../../../bin/"/> |
1501 | <Reference name="DotNetOpenMail.dll"/> | 1504 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
1502 | 1505 | ||
1503 | <Files> | 1506 | <Files> |
1504 | <Match pattern="*.cs" recurse="true"> | 1507 | <Match pattern="*.cs" recurse="true"> |
1505 | <Exclude name="Tests" pattern="Tests" /> | 1508 | <Exclude name="Tests" pattern="Tests"/> |
1506 | </Match> | 1509 | </Match> |
1507 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1510 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1508 | </Files> | 1511 | </Files> |
1509 | </Project> | 1512 | </Project> |
1510 | 1513 | ||
@@ -1523,26 +1526,26 @@ | |||
1523 | <ReferencePath>../../../bin/</ReferencePath> | 1526 | <ReferencePath>../../../bin/</ReferencePath> |
1524 | <Reference name="System"/> | 1527 | <Reference name="System"/> |
1525 | <Reference name="System.Xml"/> | 1528 | <Reference name="System.Xml"/> |
1526 | <Reference name="OpenMetaverseTypes.dll"/> | 1529 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1527 | <Reference name="OpenMetaverse.dll"/> | 1530 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1528 | <Reference name="OpenSim.Framework"/> | 1531 | <Reference name="OpenSim.Framework"/> |
1529 | <Reference name="OpenSim.Framework.Communications"/> | 1532 | <Reference name="OpenSim.Framework.Communications"/> |
1530 | <Reference name="OpenSim.Region.Framework" /> | 1533 | <Reference name="OpenSim.Region.Framework"/> |
1531 | <Reference name="OpenSim.Server.Base" /> | 1534 | <Reference name="OpenSim.Server.Base"/> |
1532 | <Reference name="OpenSim.Server.Handlers" /> | 1535 | <Reference name="OpenSim.Server.Handlers"/> |
1533 | <Reference name="OpenSim.Framework.Console"/> | 1536 | <Reference name="OpenSim.Framework.Console"/> |
1534 | <Reference name="OpenSim.Region.Physics.Manager"/> | 1537 | <Reference name="OpenSim.Region.Physics.Manager"/> |
1535 | <Reference name="OpenSim.Framework.Communications"/> | 1538 | <Reference name="OpenSim.Framework.Communications"/> |
1536 | <Reference name="OpenSim.Region.CoreModules" /> | 1539 | <Reference name="OpenSim.Region.CoreModules"/> |
1537 | <Reference name="Nini.dll" /> | 1540 | <Reference name="Nini" path="../../../bin/"/> |
1538 | <Reference name="log4net.dll"/> | 1541 | <Reference name="log4net" path="../../../bin/"/> |
1539 | 1542 | ||
1540 | <!-- To allow regions to have mono addins --> | 1543 | <!-- To allow regions to have mono addins --> |
1541 | <Reference name="Mono.Addins.dll" /> | 1544 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1542 | 1545 | ||
1543 | <Files> | 1546 | <Files> |
1544 | <Match pattern="*.cs" recurse="true" /> | 1547 | <Match pattern="*.cs" recurse="true"/> |
1545 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1548 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1546 | </Files> | 1549 | </Files> |
1547 | </Project> | 1550 | </Project> |
1548 | 1551 | ||
@@ -1561,7 +1564,7 @@ | |||
1561 | <ReferencePath>../../../bin/</ReferencePath> | 1564 | <ReferencePath>../../../bin/</ReferencePath> |
1562 | <Reference name="System"/> | 1565 | <Reference name="System"/> |
1563 | <Reference name="System.Xml"/> | 1566 | <Reference name="System.Xml"/> |
1564 | <Reference name="OpenMetaverseTypes.dll"/> | 1567 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1565 | <Reference name="OpenSim.Region.Framework"/> | 1568 | <Reference name="OpenSim.Region.Framework"/> |
1566 | <Reference name="OpenSim.Framework"/> | 1569 | <Reference name="OpenSim.Framework"/> |
1567 | <Reference name="OpenSim.Data"/> | 1570 | <Reference name="OpenSim.Data"/> |
@@ -1572,9 +1575,9 @@ | |||
1572 | <Reference name="OpenSim.Framework.Statistics"/> | 1575 | <Reference name="OpenSim.Framework.Statistics"/> |
1573 | <Reference name="OpenSim.Region.Physics.Manager"/> | 1576 | <Reference name="OpenSim.Region.Physics.Manager"/> |
1574 | <Reference name="OpenSim.Region.CoreModules"/> | 1577 | <Reference name="OpenSim.Region.CoreModules"/> |
1575 | <Reference name="XMLRPC.dll"/> | 1578 | <Reference name="XMLRPC" path="../../../bin/"/> |
1576 | <Reference name="Nini.dll" /> | 1579 | <Reference name="Nini" path="../../../bin/"/> |
1577 | <Reference name="log4net.dll"/> | 1580 | <Reference name="log4net" path="../../../bin/"/> |
1578 | 1581 | ||
1579 | <Files> | 1582 | <Files> |
1580 | <Match pattern="*.cs" recurse="false"/> | 1583 | <Match pattern="*.cs" recurse="false"/> |
@@ -1598,9 +1601,9 @@ | |||
1598 | <Reference name="System"/> | 1601 | <Reference name="System"/> |
1599 | <Reference name="System.Core"/> | 1602 | <Reference name="System.Core"/> |
1600 | <Reference name="System.Xml"/> | 1603 | <Reference name="System.Xml"/> |
1601 | <Reference name="OpenMetaverseTypes.dll"/> | 1604 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
1602 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1605 | <Reference name="OpenMetaverse.StructuredData" path="../../../../bin/"/> |
1603 | <Reference name="OpenMetaverse.dll"/> | 1606 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
1604 | <Reference name="OpenSim.Region.Framework"/> | 1607 | <Reference name="OpenSim.Region.Framework"/> |
1605 | <Reference name="OpenSim.Framework"/> | 1608 | <Reference name="OpenSim.Framework"/> |
1606 | <Reference name="OpenSim.Data"/> | 1609 | <Reference name="OpenSim.Data"/> |
@@ -1611,12 +1614,12 @@ | |||
1611 | <Reference name="OpenSim.Region.ClientStack"/> | 1614 | <Reference name="OpenSim.Region.ClientStack"/> |
1612 | <Reference name="OpenSim.Region.Physics.Manager"/> | 1615 | <Reference name="OpenSim.Region.Physics.Manager"/> |
1613 | <Reference name="OpenSim.Services.Interfaces"/> | 1616 | <Reference name="OpenSim.Services.Interfaces"/> |
1614 | <Reference name="BclExtras35.dll"/> | 1617 | <Reference name="BclExtras35" path="../../../../bin/"/> |
1615 | <Reference name="XMLRPC.dll"/> | 1618 | <Reference name="XMLRPC" path="../../../../bin/"/> |
1616 | <Reference name="Nini.dll" /> | 1619 | <Reference name="Nini" path="../../../../bin/"/> |
1617 | <Reference name="log4net.dll"/> | 1620 | <Reference name="log4net" path="../../../../bin/"/> |
1618 | <Reference name="C5.dll" /> | 1621 | <Reference name="C5" path="../../../../bin/"/> |
1619 | <Reference name="Nini.dll" /> | 1622 | <Reference name="Nini" path="../../../../bin/"/> |
1620 | 1623 | ||
1621 | <Files> | 1624 | <Files> |
1622 | <Match pattern="*.cs" recurse="false"/> | 1625 | <Match pattern="*.cs" recurse="false"/> |
@@ -1640,11 +1643,11 @@ | |||
1640 | <Reference name="System"/> | 1643 | <Reference name="System"/> |
1641 | <Reference name="System.Xml"/> | 1644 | <Reference name="System.Xml"/> |
1642 | <Reference name="OpenSim.Data"/> | 1645 | <Reference name="OpenSim.Data"/> |
1643 | <Reference name="OpenMetaverseTypes.dll"/> | 1646 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1644 | <Reference name="OpenSim.Framework"/> | 1647 | <Reference name="OpenSim.Framework"/> |
1645 | <Reference name="OpenSim.Region.Framework"/> | 1648 | <Reference name="OpenSim.Region.Framework"/> |
1646 | <Reference name="OpenSim.Framework.Console"/> | 1649 | <Reference name="OpenSim.Framework.Console"/> |
1647 | <Reference name="log4net.dll"/> | 1650 | <Reference name="log4net" path="../../../bin/"/> |
1648 | 1651 | ||
1649 | <Files> | 1652 | <Files> |
1650 | <Match pattern="*.cs" recurse="true"/> | 1653 | <Match pattern="*.cs" recurse="true"/> |
@@ -1667,10 +1670,10 @@ | |||
1667 | <ReferencePath>../../../bin/</ReferencePath> | 1670 | <ReferencePath>../../../bin/</ReferencePath> |
1668 | <Reference name="System"/> | 1671 | <Reference name="System"/> |
1669 | <Reference name="System.Xml"/> | 1672 | <Reference name="System.Xml"/> |
1670 | <Reference name="Mono.Addins.dll" /> | 1673 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1671 | <Reference name="OpenMetaverseTypes.dll"/> | 1674 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1672 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1675 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1673 | <Reference name="OpenMetaverse.dll"/> | 1676 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1674 | <Reference name="OpenSim.Framework"/> | 1677 | <Reference name="OpenSim.Framework"/> |
1675 | <Reference name="OpenSim.Data"/> | 1678 | <Reference name="OpenSim.Data"/> |
1676 | <Reference name="OpenSim.Framework.Console"/> | 1679 | <Reference name="OpenSim.Framework.Console"/> |
@@ -1682,9 +1685,10 @@ | |||
1682 | <Reference name="OpenSim.Region.CoreModules"/> | 1685 | <Reference name="OpenSim.Region.CoreModules"/> |
1683 | <Reference name="OpenSim.Region.ClientStack"/> | 1686 | <Reference name="OpenSim.Region.ClientStack"/> |
1684 | <Reference name="OpenSim.Framework.Communications"/> | 1687 | <Reference name="OpenSim.Framework.Communications"/> |
1685 | <Reference name="XMLRPC.dll"/> | 1688 | <Reference name="OpenSim.Server.Base"/> |
1686 | <Reference name="Nini.dll" /> | 1689 | <Reference name="XMLRPC" path="../../../bin/"/> |
1687 | <Reference name="log4net.dll"/> | 1690 | <Reference name="Nini" path="../../../bin/"/> |
1691 | <Reference name="log4net" path="../../../bin/"/> | ||
1688 | 1692 | ||
1689 | <Files> | 1693 | <Files> |
1690 | <Match pattern="*.cs" recurse="true"/> | 1694 | <Match pattern="*.cs" recurse="true"/> |
@@ -1704,11 +1708,11 @@ | |||
1704 | </Configuration> | 1708 | </Configuration> |
1705 | 1709 | ||
1706 | <ReferencePath>../../../bin/</ReferencePath> | 1710 | <ReferencePath>../../../bin/</ReferencePath> |
1707 | <Reference name="Mono.Addins.dll" /> | 1711 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1708 | <Reference name="System"/> | 1712 | <Reference name="System"/> |
1709 | <Reference name="System.Xml"/> | 1713 | <Reference name="System.Xml"/> |
1710 | <Reference name="OpenMetaverseTypes.dll" /> | 1714 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1711 | <Reference name="Nini.dll" /> | 1715 | <Reference name="Nini" path="../../../bin/"/> |
1712 | <Reference name="OpenSim"/> | 1716 | <Reference name="OpenSim"/> |
1713 | <Reference name="OpenSim.Region.ClientStack"/> | 1717 | <Reference name="OpenSim.Region.ClientStack"/> |
1714 | <Reference name="OpenSim.Region.CoreModules"/> | 1718 | <Reference name="OpenSim.Region.CoreModules"/> |
@@ -1718,11 +1722,11 @@ | |||
1718 | <Reference name="OpenSim.Framework.RegionLoader.Filesystem"/> | 1722 | <Reference name="OpenSim.Framework.RegionLoader.Filesystem"/> |
1719 | <Reference name="OpenSim.Framework.RegionLoader.Web"/> | 1723 | <Reference name="OpenSim.Framework.RegionLoader.Web"/> |
1720 | <Reference name="OpenSim.Framework.Servers"/> | 1724 | <Reference name="OpenSim.Framework.Servers"/> |
1721 | <Reference name="log4net.dll"/> | 1725 | <Reference name="log4net" path="../../../bin/"/> |
1722 | 1726 | ||
1723 | <Files> | 1727 | <Files> |
1724 | <Match pattern="*.cs" recurse="true"/> | 1728 | <Match pattern="*.cs" recurse="true"/> |
1725 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1729 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1726 | </Files> | 1730 | </Files> |
1727 | </Project> | 1731 | </Project> |
1728 | 1732 | ||
@@ -1739,8 +1743,8 @@ | |||
1739 | </Configuration> | 1743 | </Configuration> |
1740 | 1744 | ||
1741 | <ReferencePath>../../../bin/</ReferencePath> | 1745 | <ReferencePath>../../../bin/</ReferencePath> |
1742 | <Reference name="Mono.Addins.dll" /> | 1746 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1743 | <Reference name="Nini.dll" /> | 1747 | <Reference name="Nini" path="../../../bin/"/> |
1744 | <Reference name="OpenSim"/> | 1748 | <Reference name="OpenSim"/> |
1745 | <Reference name="OpenSim.Framework"/> | 1749 | <Reference name="OpenSim.Framework"/> |
1746 | <Reference name="OpenSim.Framework.Servers"/> | 1750 | <Reference name="OpenSim.Framework.Servers"/> |
@@ -1748,11 +1752,11 @@ | |||
1748 | <Reference name="OpenSim.Region.ClientStack"/> | 1752 | <Reference name="OpenSim.Region.ClientStack"/> |
1749 | <Reference name="System"/> | 1753 | <Reference name="System"/> |
1750 | <Reference name="System.Xml"/> | 1754 | <Reference name="System.Xml"/> |
1751 | <Reference name="log4net.dll"/> | 1755 | <Reference name="log4net" path="../../../bin/"/> |
1752 | 1756 | ||
1753 | <Files> | 1757 | <Files> |
1754 | <Match pattern="*.cs" recurse="true"/> | 1758 | <Match pattern="*.cs" recurse="true"/> |
1755 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1759 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1756 | </Files> | 1760 | </Files> |
1757 | </Project> | 1761 | </Project> |
1758 | 1762 | ||
@@ -1769,14 +1773,14 @@ | |||
1769 | </Configuration> | 1773 | </Configuration> |
1770 | 1774 | ||
1771 | <ReferencePath>../../../bin/</ReferencePath> | 1775 | <ReferencePath>../../../bin/</ReferencePath> |
1772 | <Reference name="Mono.Addins.dll" /> | 1776 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1773 | <Reference name="System"/> | 1777 | <Reference name="System"/> |
1774 | <Reference name="System.Xml"/> | 1778 | <Reference name="System.Xml"/> |
1775 | <Reference name="OpenMetaverse.dll" /> | 1779 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1776 | <Reference name="OpenMetaverseTypes.dll" /> | 1780 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1777 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 1781 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
1778 | <Reference name="Nini.dll" /> | 1782 | <Reference name="Nini" path="../../../bin/"/> |
1779 | <Reference name="XMLRPC.dll" /> | 1783 | <Reference name="XMLRPC" path="../../../bin/"/> |
1780 | <Reference name="OpenSim"/> | 1784 | <Reference name="OpenSim"/> |
1781 | <Reference name="OpenSim.Region.ClientStack"/> | 1785 | <Reference name="OpenSim.Region.ClientStack"/> |
1782 | <Reference name="OpenSim.Region.Framework"/> | 1786 | <Reference name="OpenSim.Region.Framework"/> |
@@ -1787,17 +1791,16 @@ | |||
1787 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1791 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1788 | <Reference name="OpenSim.Framework.Console"/> | 1792 | <Reference name="OpenSim.Framework.Console"/> |
1789 | <Reference name="OpenSim.Services.Interfaces"/> | 1793 | <Reference name="OpenSim.Services.Interfaces"/> |
1790 | <Reference name="log4net.dll"/> | 1794 | <Reference name="log4net" path="../../../bin/"/> |
1791 | 1795 | ||
1792 | <Files> | 1796 | <Files> |
1793 | <Match pattern="*.cs" recurse="true"/> | 1797 | <Match pattern="*.cs" recurse="true"/> |
1794 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1798 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1795 | </Files> | 1799 | </Files> |
1796 | </Project> | 1800 | </Project> |
1797 | 1801 | ||
1798 | <!-- REST plugins --> | 1802 | <!-- REST plugins --> |
1799 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest" | 1803 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest" path="OpenSim/ApplicationPlugins/Rest" type="Library"> |
1800 | path="OpenSim/ApplicationPlugins/Rest" type="Library"> | ||
1801 | <Configuration name="Debug"> | 1804 | <Configuration name="Debug"> |
1802 | <Options> | 1805 | <Options> |
1803 | <OutputPath>../../../bin/</OutputPath> | 1806 | <OutputPath>../../../bin/</OutputPath> |
@@ -1810,12 +1813,12 @@ | |||
1810 | </Configuration> | 1813 | </Configuration> |
1811 | 1814 | ||
1812 | <ReferencePath>../../../bin/</ReferencePath> | 1815 | <ReferencePath>../../../bin/</ReferencePath> |
1813 | <Reference name="Mono.Addins.dll" /> | 1816 | <Reference name="Mono.Addins" path="../../../bin/"/> |
1814 | <Reference name="System"/> | 1817 | <Reference name="System"/> |
1815 | <Reference name="System.Xml"/> | 1818 | <Reference name="System.Xml"/> |
1816 | <Reference name="OpenMetaverseTypes.dll" /> | 1819 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1817 | <Reference name="Nini.dll" /> | 1820 | <Reference name="Nini" path="../../../bin/"/> |
1818 | <Reference name="XMLRPC.dll" /> | 1821 | <Reference name="XMLRPC" path="../../../bin/"/> |
1819 | <Reference name="OpenSim"/> | 1822 | <Reference name="OpenSim"/> |
1820 | <Reference name="OpenSim.Region.ClientStack"/> | 1823 | <Reference name="OpenSim.Region.ClientStack"/> |
1821 | <Reference name="OpenSim.Region.Framework"/> | 1824 | <Reference name="OpenSim.Region.Framework"/> |
@@ -1825,15 +1828,14 @@ | |||
1825 | <Reference name="OpenSim.Framework.Servers"/> | 1828 | <Reference name="OpenSim.Framework.Servers"/> |
1826 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1829 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1827 | <Reference name="OpenSim.Framework.Console"/> | 1830 | <Reference name="OpenSim.Framework.Console"/> |
1828 | <Reference name="log4net.dll"/> | 1831 | <Reference name="log4net" path="../../../bin/"/> |
1829 | 1832 | ||
1830 | <Files> | 1833 | <Files> |
1831 | <Match pattern="*.cs" recurse="false"/> | 1834 | <Match pattern="*.cs" recurse="false"/> |
1832 | </Files> | 1835 | </Files> |
1833 | </Project> | 1836 | </Project> |
1834 | 1837 | ||
1835 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest.Regions" | 1838 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest.Regions" path="OpenSim/ApplicationPlugins/Rest/Regions" type="Library"> |
1836 | path="OpenSim/ApplicationPlugins/Rest/Regions" type="Library"> | ||
1837 | <Configuration name="Debug"> | 1839 | <Configuration name="Debug"> |
1838 | <Options> | 1840 | <Options> |
1839 | <OutputPath>../../../../bin/</OutputPath> | 1841 | <OutputPath>../../../../bin/</OutputPath> |
@@ -1846,12 +1848,12 @@ | |||
1846 | </Configuration> | 1848 | </Configuration> |
1847 | 1849 | ||
1848 | <ReferencePath>../../../../bin/</ReferencePath> | 1850 | <ReferencePath>../../../../bin/</ReferencePath> |
1849 | <Reference name="Mono.Addins.dll" /> | 1851 | <Reference name="Mono.Addins" path="../../../../bin/"/> |
1850 | <Reference name="System"/> | 1852 | <Reference name="System"/> |
1851 | <Reference name="System.Xml"/> | 1853 | <Reference name="System.Xml"/> |
1852 | <Reference name="OpenMetaverseTypes.dll" /> | 1854 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
1853 | <Reference name="Nini.dll" /> | 1855 | <Reference name="Nini" path="../../../../bin/"/> |
1854 | <Reference name="XMLRPC.dll" /> | 1856 | <Reference name="XMLRPC" path="../../../../bin/"/> |
1855 | <Reference name="OpenSim"/> | 1857 | <Reference name="OpenSim"/> |
1856 | <Reference name="OpenSim.Region.Framework"/> | 1858 | <Reference name="OpenSim.Region.Framework"/> |
1857 | <Reference name="OpenSim.Region.ClientStack"/> | 1859 | <Reference name="OpenSim.Region.ClientStack"/> |
@@ -1862,16 +1864,15 @@ | |||
1862 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 1864 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
1863 | <Reference name="OpenSim.Framework.Console"/> | 1865 | <Reference name="OpenSim.Framework.Console"/> |
1864 | <Reference name="OpenSim.ApplicationPlugins.Rest"/> | 1866 | <Reference name="OpenSim.ApplicationPlugins.Rest"/> |
1865 | <Reference name="log4net.dll"/> | 1867 | <Reference name="log4net" path="../../../../bin/"/> |
1866 | 1868 | ||
1867 | <Files> | 1869 | <Files> |
1868 | <Match pattern="*.cs" recurse="true"/> | 1870 | <Match pattern="*.cs" recurse="true"/> |
1869 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1871 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1870 | </Files> | 1872 | </Files> |
1871 | </Project> | 1873 | </Project> |
1872 | 1874 | ||
1873 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest.Inventory" | 1875 | <Project frameworkVersion="v3_5" name="OpenSim.ApplicationPlugins.Rest.Inventory" path="OpenSim/ApplicationPlugins/Rest/Inventory" type="Library"> |
1874 | path="OpenSim/ApplicationPlugins/Rest/Inventory" type="Library"> | ||
1875 | <Configuration name="Debug"> | 1876 | <Configuration name="Debug"> |
1876 | <Options> | 1877 | <Options> |
1877 | <OutputPath>../../../../bin/</OutputPath> | 1878 | <OutputPath>../../../../bin/</OutputPath> |
@@ -1884,14 +1885,14 @@ | |||
1884 | </Configuration> | 1885 | </Configuration> |
1885 | 1886 | ||
1886 | <ReferencePath>../../../../bin/</ReferencePath> | 1887 | <ReferencePath>../../../../bin/</ReferencePath> |
1887 | <Reference name="Mono.Addins.dll" /> | 1888 | <Reference name="Mono.Addins" path="../../../../bin/"/> |
1888 | <Reference name="System"/> | 1889 | <Reference name="System"/> |
1889 | <Reference name="System.Xml"/> | 1890 | <Reference name="System.Xml"/> |
1890 | <Reference name="System.Drawing"/> | 1891 | <Reference name="System.Drawing"/> |
1891 | <Reference name="OpenMetaverseTypes.dll"/> | 1892 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
1892 | <Reference name="OpenMetaverse.dll"/> | 1893 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
1893 | <Reference name="Nini.dll" /> | 1894 | <Reference name="Nini" path="../../../../bin/"/> |
1894 | <Reference name="XMLRPC.dll" /> | 1895 | <Reference name="XMLRPC" path="../../../../bin/"/> |
1895 | <Reference name="OpenSim"/> | 1896 | <Reference name="OpenSim"/> |
1896 | <Reference name="OpenSim.Region.Framework"/> | 1897 | <Reference name="OpenSim.Region.Framework"/> |
1897 | <Reference name="OpenSim.Region.ClientStack"/> | 1898 | <Reference name="OpenSim.Region.ClientStack"/> |
@@ -1903,11 +1904,11 @@ | |||
1903 | <Reference name="OpenSim.Framework.Console"/> | 1904 | <Reference name="OpenSim.Framework.Console"/> |
1904 | <Reference name="OpenSim.Services.Interfaces"/> | 1905 | <Reference name="OpenSim.Services.Interfaces"/> |
1905 | <Reference name="OpenSim.ApplicationPlugins.Rest"/> | 1906 | <Reference name="OpenSim.ApplicationPlugins.Rest"/> |
1906 | <Reference name="log4net.dll"/> | 1907 | <Reference name="log4net" path="../../../../bin/"/> |
1907 | 1908 | ||
1908 | <Files> | 1909 | <Files> |
1909 | <Match pattern="*.cs" recurse="true"/> | 1910 | <Match pattern="*.cs" recurse="true"/> |
1910 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 1911 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
1911 | </Files> | 1912 | </Files> |
1912 | </Project> | 1913 | </Project> |
1913 | 1914 | ||
@@ -1940,11 +1941,11 @@ | |||
1940 | <Reference name="OpenSim.Region.Framework"/> | 1941 | <Reference name="OpenSim.Region.Framework"/> |
1941 | <Reference name="OpenSim.Region.CoreModules"/> | 1942 | <Reference name="OpenSim.Region.CoreModules"/> |
1942 | <Reference name="OpenSim.Services.Interfaces"/> | 1943 | <Reference name="OpenSim.Services.Interfaces"/> |
1943 | <Reference name="OpenMetaverseTypes.dll"/> | 1944 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1944 | <Reference name="OpenMetaverse.dll"/> | 1945 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1945 | <Reference name="Nini.dll" /> | 1946 | <Reference name="Nini" path="../../../bin/"/> |
1946 | <Reference name="Mono.Addins" /> | 1947 | <Reference name="Mono.Addins"/> |
1947 | <Reference name="log4net.dll" /> | 1948 | <Reference name="log4net" path="../../../bin/"/> |
1948 | <Files> | 1949 | <Files> |
1949 | <Match pattern="*.cs" recurse="true"/> | 1950 | <Match pattern="*.cs" recurse="true"/> |
1950 | </Files> | 1951 | </Files> |
@@ -1964,13 +1965,13 @@ | |||
1964 | 1965 | ||
1965 | <ReferencePath>../../../../bin/</ReferencePath> | 1966 | <ReferencePath>../../../../bin/</ReferencePath> |
1966 | 1967 | ||
1967 | <Reference name="OpenMetaverseTypes.dll"/> | 1968 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
1968 | <Reference name="OpenMetaverse.dll"/> | 1969 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
1969 | <Reference name="System"/> | 1970 | <Reference name="System"/> |
1970 | <Reference name="OpenSim.Framework"/> | 1971 | <Reference name="OpenSim.Framework"/> |
1971 | <Reference name="OpenSim.Region.Framework"/> | 1972 | <Reference name="OpenSim.Region.Framework"/> |
1972 | <Reference name="Nini.dll" /> | 1973 | <Reference name="Nini" path="../../../../bin/"/> |
1973 | <Reference name="log4net.dll"/> | 1974 | <Reference name="log4net" path="../../../../bin/"/> |
1974 | <Files> | 1975 | <Files> |
1975 | <Match pattern="*.cs" recurse="true"/> | 1976 | <Match pattern="*.cs" recurse="true"/> |
1976 | </Files> | 1977 | </Files> |
@@ -1992,17 +1993,17 @@ | |||
1992 | 1993 | ||
1993 | <ReferencePath>../../../bin/</ReferencePath> | 1994 | <ReferencePath>../../../bin/</ReferencePath> |
1994 | 1995 | ||
1995 | <Reference name="OpenMetaverseTypes.dll"/> | 1996 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
1996 | <Reference name="OpenMetaverse.dll"/> | 1997 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
1997 | <Reference name="System"/> | 1998 | <Reference name="System"/> |
1998 | <Reference name="OpenSim.Framework"/> | 1999 | <Reference name="OpenSim.Framework"/> |
1999 | <Reference name="OpenSim.Region.Framework"/> | 2000 | <Reference name="OpenSim.Region.Framework"/> |
2000 | <Reference name="OpenSim.Framework.Communications"/> | 2001 | <Reference name="OpenSim.Framework.Communications"/> |
2001 | <Reference name="OpenSim.Services.Interfaces"/> | 2002 | <Reference name="OpenSim.Services.Interfaces"/> |
2002 | <Reference name="Nini.dll" /> | 2003 | <Reference name="Nini" path="../../../bin/"/> |
2003 | <Reference name="log4net.dll"/> | 2004 | <Reference name="log4net" path="../../../bin/"/> |
2004 | <Reference name="protobuf-net"/> | 2005 | <Reference name="protobuf-net"/> |
2005 | <Reference name="MXP.dll"/> | 2006 | <Reference name="MXP" path="../../../bin/"/> |
2006 | <Reference name="Mono.Addins"/> | 2007 | <Reference name="Mono.Addins"/> |
2007 | <Files> | 2008 | <Files> |
2008 | <Match pattern="*.cs" recurse="true"/> | 2009 | <Match pattern="*.cs" recurse="true"/> |
@@ -2024,8 +2025,8 @@ | |||
2024 | 2025 | ||
2025 | <ReferencePath>../../../bin/</ReferencePath> | 2026 | <ReferencePath>../../../bin/</ReferencePath> |
2026 | 2027 | ||
2027 | <Reference name="OpenMetaverseTypes.dll"/> | 2028 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2028 | <Reference name="OpenMetaverse.dll"/> | 2029 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2029 | <Reference name="System"/> | 2030 | <Reference name="System"/> |
2030 | <Reference name="System.Drawing"/> | 2031 | <Reference name="System.Drawing"/> |
2031 | <Reference name="OpenSim.Framework"/> | 2032 | <Reference name="OpenSim.Framework"/> |
@@ -2034,9 +2035,9 @@ | |||
2034 | <Reference name="OpenSim.Region.Framework"/> | 2035 | <Reference name="OpenSim.Region.Framework"/> |
2035 | <Reference name="OpenSim.Framework.Communications"/> | 2036 | <Reference name="OpenSim.Framework.Communications"/> |
2036 | <Reference name="OpenSim.Services.Interfaces"/> | 2037 | <Reference name="OpenSim.Services.Interfaces"/> |
2037 | <Reference name="Nini.dll" /> | 2038 | <Reference name="Nini" path="../../../bin/"/> |
2038 | <Reference name="log4net.dll"/> | 2039 | <Reference name="log4net" path="../../../bin/"/> |
2039 | <Reference name="Google.ProtocolBuffers.dll"/> | 2040 | <Reference name="Google.ProtocolBuffers" path="../../../bin/"/> |
2040 | <Files> | 2041 | <Files> |
2041 | <Match pattern="*.cs" recurse="true"/> | 2042 | <Match pattern="*.cs" recurse="true"/> |
2042 | </Files> | 2043 | </Files> |
@@ -2056,8 +2057,8 @@ | |||
2056 | 2057 | ||
2057 | <ReferencePath>../../../bin/</ReferencePath> | 2058 | <ReferencePath>../../../bin/</ReferencePath> |
2058 | 2059 | ||
2059 | <Reference name="OpenMetaverseTypes.dll"/> | 2060 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2060 | <Reference name="OpenMetaverse.dll"/> | 2061 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2061 | <Reference name="System"/> | 2062 | <Reference name="System"/> |
2062 | <Reference name="System.Drawing"/> | 2063 | <Reference name="System.Drawing"/> |
2063 | <Reference name="OpenSim.Framework"/> | 2064 | <Reference name="OpenSim.Framework"/> |
@@ -2066,8 +2067,8 @@ | |||
2066 | <Reference name="OpenSim.Region.Framework"/> | 2067 | <Reference name="OpenSim.Region.Framework"/> |
2067 | <Reference name="OpenSim.Framework.Communications"/> | 2068 | <Reference name="OpenSim.Framework.Communications"/> |
2068 | <Reference name="OpenSim.Services.Interfaces"/> | 2069 | <Reference name="OpenSim.Services.Interfaces"/> |
2069 | <Reference name="Nini.dll" /> | 2070 | <Reference name="Nini" path="../../../bin/"/> |
2070 | <Reference name="log4net.dll"/> | 2071 | <Reference name="log4net" path="../../../bin/"/> |
2071 | <Files> | 2072 | <Files> |
2072 | <Match pattern="*.cs" recurse="true"/> | 2073 | <Match pattern="*.cs" recurse="true"/> |
2073 | </Files> | 2074 | </Files> |
@@ -2087,26 +2088,26 @@ | |||
2087 | 2088 | ||
2088 | <ReferencePath>../../../bin/</ReferencePath> | 2089 | <ReferencePath>../../../bin/</ReferencePath> |
2089 | 2090 | ||
2090 | <Reference name="OpenMetaverseTypes.dll"/> | 2091 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2091 | <Reference name="OpenMetaverse.dll"/> | 2092 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2092 | <Reference name="System"/> | 2093 | <Reference name="System"/> |
2093 | <Reference name="OpenSim.Framework"/> | 2094 | <Reference name="OpenSim.Framework"/> |
2094 | <Reference name="OpenSim.Region.Framework"/> | 2095 | <Reference name="OpenSim.Region.Framework"/> |
2095 | <Reference name="OpenSim.Framework.Communications"/> | 2096 | <Reference name="OpenSim.Framework.Communications"/> |
2096 | <Reference name="Nini.dll" /> | 2097 | <Reference name="Nini" path="../../../bin/"/> |
2097 | <Reference name="log4net.dll"/> | 2098 | <Reference name="log4net" path="../../../bin/"/> |
2098 | <Reference name="OpenSim.Framework.Capabilities"/> | 2099 | <Reference name="OpenSim.Framework.Capabilities"/> |
2099 | <Reference name="OpenSim.Framework.Servers"/> | 2100 | <Reference name="OpenSim.Framework.Servers"/> |
2100 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 2101 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
2101 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2102 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
2102 | <Reference name="OpenSim.Region.ClientStack"/> | 2103 | <Reference name="OpenSim.Region.ClientStack"/> |
2103 | <Reference name="OpenSim.Region.ClientStack.LindenUDP"/> | 2104 | <Reference name="OpenSim.Region.ClientStack.LindenUDP"/> |
2104 | <Reference name="OpenSim.Services.Interfaces"/> | 2105 | <Reference name="OpenSim.Services.Interfaces"/> |
2105 | <Reference name="XMLRPC.dll"/> | 2106 | <Reference name="XMLRPC" path="../../../bin/"/> |
2106 | <Reference name="OpenSim.Region.Framework"/> | 2107 | <Reference name="OpenSim.Region.Framework"/> |
2107 | <Files> | 2108 | <Files> |
2108 | <Match pattern="*.cs" recurse="true"/> | 2109 | <Match pattern="*.cs" recurse="true"/> |
2109 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2110 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2110 | </Files> | 2111 | </Files> |
2111 | </Project> | 2112 | </Project> |
2112 | 2113 | ||
@@ -2132,21 +2133,21 @@ | |||
2132 | <Reference name="System.Drawing"/> | 2133 | <Reference name="System.Drawing"/> |
2133 | <Reference name="OpenSim.Framework"/> | 2134 | <Reference name="OpenSim.Framework"/> |
2134 | <Reference name="OpenSim.Data"/> | 2135 | <Reference name="OpenSim.Data"/> |
2135 | <Reference name="OpenMetaverseTypes.dll"/> | 2136 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2136 | <Reference name="OpenMetaverse.dll"/> | 2137 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2137 | <Reference name="MySql.Data.dll"/> | 2138 | <Reference name="MySql.Data" path="../../../bin/"/> |
2138 | <Reference name="OpenSim.Framework.Console"/> | 2139 | <Reference name="OpenSim.Framework.Console"/> |
2139 | <Reference name="OpenSim.Region.Framework"/> | 2140 | <Reference name="OpenSim.Region.Framework"/> |
2140 | <Reference name="log4net.dll"/> | 2141 | <Reference name="log4net" path="../../../bin/"/> |
2141 | <Reference name="Mono.Addins.dll" /> | 2142 | <Reference name="Mono.Addins" path="../../../bin/"/> |
2142 | 2143 | ||
2143 | <Files> | 2144 | <Files> |
2144 | <Match pattern="*.cs" recurse="true" > | 2145 | <Match pattern="*.cs" recurse="true"> |
2145 | <Exclude name="Tests" pattern="Tests" /> | 2146 | <Exclude name="Tests" pattern="Tests"/> |
2146 | </Match> | 2147 | </Match> |
2147 | <Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/> | 2148 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.sql"/> |
2148 | <Match path="Resources" pattern="*.migrations" buildAction="EmbeddedResource"/> | 2149 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.migrations"/> |
2149 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2150 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2150 | </Files> | 2151 | </Files> |
2151 | </Project> | 2152 | </Project> |
2152 | 2153 | ||
@@ -2171,16 +2172,16 @@ | |||
2171 | <Reference name="OpenSim.Data"/> | 2172 | <Reference name="OpenSim.Data"/> |
2172 | <Reference name="OpenSim.Region.Framework"/> | 2173 | <Reference name="OpenSim.Region.Framework"/> |
2173 | <Reference name="OpenSim.Framework.Console"/> | 2174 | <Reference name="OpenSim.Framework.Console"/> |
2174 | <Reference name="OpenMetaverseTypes.dll"/> | 2175 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2175 | <Reference name="OpenMetaverse.dll"/> | 2176 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2176 | <Reference name="log4net.dll"/> | 2177 | <Reference name="log4net" path="../../../bin/"/> |
2177 | <Reference name="Mono.Addins.dll" /> | 2178 | <Reference name="Mono.Addins" path="../../../bin/"/> |
2178 | 2179 | ||
2179 | <Files> | 2180 | <Files> |
2180 | <Match pattern="*.cs" recurse="true"/> | 2181 | <Match pattern="*.cs" recurse="true"/> |
2181 | <Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/> | 2182 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.sql"/> |
2182 | <Match path="Resources" pattern="*.migrations" buildAction="EmbeddedResource"/> | 2183 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.migrations"/> |
2183 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2184 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2184 | </Files> | 2185 | </Files> |
2185 | </Project> | 2186 | </Project> |
2186 | 2187 | ||
@@ -2200,25 +2201,25 @@ | |||
2200 | <Reference name="System"/> | 2201 | <Reference name="System"/> |
2201 | <Reference name="System.Xml"/> | 2202 | <Reference name="System.Xml"/> |
2202 | <Reference name="System.Data"/> | 2203 | <Reference name="System.Data"/> |
2203 | <Reference name="System.Data.SQLite.dll"/> | 2204 | <Reference name="System.Data.SQLite" path="../../../bin/"/> |
2204 | <Reference name="OpenSim.Data"/> | 2205 | <Reference name="OpenSim.Data"/> |
2205 | <Reference name="System.Drawing"/> | 2206 | <Reference name="System.Drawing"/> |
2206 | <Reference name="OpenSim.Framework"/> | 2207 | <Reference name="OpenSim.Framework"/> |
2207 | <Reference name="OpenSim.Framework.Console"/> | 2208 | <Reference name="OpenSim.Framework.Console"/> |
2208 | <Reference name="OpenSim.Region.Framework"/> | 2209 | <Reference name="OpenSim.Region.Framework"/> |
2209 | <Reference name="OpenMetaverseTypes.dll"/> | 2210 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2210 | <Reference name="OpenMetaverse.dll"/> | 2211 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2211 | <Reference name="Mono.Data.SqliteClient"/> | 2212 | <Reference name="Mono.Data.SqliteClient"/> |
2212 | <Reference name="Mono.Addins.dll" /> | 2213 | <Reference name="Mono.Addins" path="../../../bin/"/> |
2213 | <Reference name="log4net.dll"/> | 2214 | <Reference name="log4net" path="../../../bin/"/> |
2214 | 2215 | ||
2215 | <Files> | 2216 | <Files> |
2216 | <Match pattern="*.cs" recurse="true" > | 2217 | <Match pattern="*.cs" recurse="true"> |
2217 | <Exclude name="Tests" pattern="Tests" /> | 2218 | <Exclude name="Tests" pattern="Tests"/> |
2218 | </Match> | 2219 | </Match> |
2219 | <Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/> | 2220 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.sql"/> |
2220 | <Match path="Resources" pattern="*.migrations" buildAction="EmbeddedResource"/> | 2221 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.migrations"/> |
2221 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2222 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2222 | </Files> | 2223 | </Files> |
2223 | </Project> | 2224 | </Project> |
2224 | 2225 | ||
@@ -2243,20 +2244,20 @@ | |||
2243 | <Reference name="OpenSim.Framework"/> | 2244 | <Reference name="OpenSim.Framework"/> |
2244 | <Reference name="OpenSim.Framework.Console"/> | 2245 | <Reference name="OpenSim.Framework.Console"/> |
2245 | <Reference name="OpenSim.Region.Framework"/> | 2246 | <Reference name="OpenSim.Region.Framework"/> |
2246 | <Reference name="OpenMetaverseTypes.dll"/> | 2247 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2247 | <Reference name="OpenMetaverse.dll"/> | 2248 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2248 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2249 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
2249 | <Reference name="Mono.Data.Sqlite"/> | 2250 | <Reference name="Mono.Data.Sqlite"/> |
2250 | <Reference name="Mono.Addins.dll" /> | 2251 | <Reference name="Mono.Addins" path="../../../bin/"/> |
2251 | <Reference name="log4net.dll"/> | 2252 | <Reference name="log4net" path="../../../bin/"/> |
2252 | 2253 | ||
2253 | <Files> | 2254 | <Files> |
2254 | <Match pattern="*.cs" recurse="true" > | 2255 | <Match pattern="*.cs" recurse="true"> |
2255 | <Exclude name="Tests" pattern="Tests" /> | 2256 | <Exclude name="Tests" pattern="Tests"/> |
2256 | </Match> | 2257 | </Match> |
2257 | <Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/> | 2258 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.sql"/> |
2258 | <Match path="Resources" pattern="*.migrations" buildAction="EmbeddedResource"/> | 2259 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.migrations"/> |
2259 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2260 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2260 | </Files> | 2261 | </Files> |
2261 | </Project> | 2262 | </Project> |
2262 | 2263 | ||
@@ -2279,18 +2280,18 @@ | |||
2279 | <Reference name="System.Net"/> | 2280 | <Reference name="System.Net"/> |
2280 | <Reference name="System.Web"/> | 2281 | <Reference name="System.Web"/> |
2281 | <Reference name="System.Xml"/> | 2282 | <Reference name="System.Xml"/> |
2282 | <Reference name="OpenMetaverseTypes.dll"/> | 2283 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2283 | <Reference name="OpenSim" /> | 2284 | <Reference name="OpenSim"/> |
2284 | <Reference name="OpenSim.Framework"/> | 2285 | <Reference name="OpenSim.Framework"/> |
2285 | <Reference name="OpenSim.Framework.Communications"/> | 2286 | <Reference name="OpenSim.Framework.Communications"/> |
2286 | <Reference name="OpenSim.Region.Framework" /> | 2287 | <Reference name="OpenSim.Region.Framework"/> |
2287 | <Reference name="OpenSim.Region.CoreModules" /> | 2288 | <Reference name="OpenSim.Region.CoreModules"/> |
2288 | <Reference name="OpenSim.Framework.Console"/> | 2289 | <Reference name="OpenSim.Framework.Console"/> |
2289 | <Reference name="OpenSim.Services.Interfaces"/> | 2290 | <Reference name="OpenSim.Services.Interfaces"/> |
2290 | <Reference name="Nini.dll" /> | 2291 | <Reference name="Nini" path="../../../../bin/"/> |
2291 | <Reference name="RAIL.dll"/> | 2292 | <Reference name="RAIL" path="../../../../bin/"/> |
2292 | <Reference name="Nini.dll" /> | 2293 | <Reference name="Nini" path="../../../../bin/"/> |
2293 | <Reference name="log4net.dll"/> | 2294 | <Reference name="log4net" path="../../../../bin/"/> |
2294 | <Reference name="SmartThreadPool"/> | 2295 | <Reference name="SmartThreadPool"/> |
2295 | 2296 | ||
2296 | <Files> | 2297 | <Files> |
@@ -2317,18 +2318,18 @@ | |||
2317 | <Reference name="System.Data"/> | 2318 | <Reference name="System.Data"/> |
2318 | <Reference name="System.Web"/> | 2319 | <Reference name="System.Web"/> |
2319 | <Reference name="System.Xml"/> | 2320 | <Reference name="System.Xml"/> |
2320 | <Reference name="OpenMetaverseTypes.dll"/> | 2321 | <Reference name="OpenMetaverseTypes" path="../../../../../../bin/"/> |
2321 | <Reference name="OpenSim" /> | 2322 | <Reference name="OpenSim"/> |
2322 | <Reference name="OpenSim.Framework"/> | 2323 | <Reference name="OpenSim.Framework"/> |
2323 | <Reference name="OpenSim.Framework.Communications"/> | 2324 | <Reference name="OpenSim.Framework.Communications"/> |
2324 | <Reference name="OpenSim.Region.Framework" /> | 2325 | <Reference name="OpenSim.Region.Framework"/> |
2325 | <Reference name="OpenSim.Region.CoreModules" /> | 2326 | <Reference name="OpenSim.Region.CoreModules"/> |
2326 | <Reference name="OpenSim.Framework.Console"/> | 2327 | <Reference name="OpenSim.Framework.Console"/> |
2327 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2328 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2328 | <Reference name="Nini.dll" /> | 2329 | <Reference name="Nini" path="../../../../../../bin/"/> |
2329 | <Reference name="RAIL.dll"/> | 2330 | <Reference name="RAIL" path="../../../../../../bin/"/> |
2330 | <Reference name="Nini.dll" /> | 2331 | <Reference name="Nini" path="../../../../../../bin/"/> |
2331 | <Reference name="log4net.dll"/> | 2332 | <Reference name="log4net" path="../../../../../../bin/"/> |
2332 | 2333 | ||
2333 | <Files> | 2334 | <Files> |
2334 | <Match pattern="*.cs" recurse="false"/> | 2335 | <Match pattern="*.cs" recurse="false"/> |
@@ -2352,17 +2353,17 @@ | |||
2352 | <Reference name="System.Data"/> | 2353 | <Reference name="System.Data"/> |
2353 | <Reference name="System.Web"/> | 2354 | <Reference name="System.Web"/> |
2354 | <Reference name="System.Xml"/> | 2355 | <Reference name="System.Xml"/> |
2355 | <Reference name="OpenMetaverseTypes.dll"/> | 2356 | <Reference name="OpenMetaverseTypes" path="../../../../../../../bin/"/> |
2356 | <Reference name="OpenSim" /> | 2357 | <Reference name="OpenSim"/> |
2357 | <Reference name="OpenSim.Framework"/> | 2358 | <Reference name="OpenSim.Framework"/> |
2358 | <Reference name="OpenSim.Framework.Communications"/> | 2359 | <Reference name="OpenSim.Framework.Communications"/> |
2359 | <Reference name="OpenSim.Region.CoreModules" /> | 2360 | <Reference name="OpenSim.Region.CoreModules"/> |
2360 | <Reference name="OpenSim.Framework.Console"/> | 2361 | <Reference name="OpenSim.Framework.Console"/> |
2361 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2362 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2362 | <Reference name="Nini.dll" /> | 2363 | <Reference name="Nini" path="../../../../../../../bin/"/> |
2363 | <Reference name="RAIL.dll"/> | 2364 | <Reference name="RAIL" path="../../../../../../../bin/"/> |
2364 | <Reference name="Nini.dll" /> | 2365 | <Reference name="Nini" path="../../../../../../../bin/"/> |
2365 | <Reference name="log4net.dll"/> | 2366 | <Reference name="log4net" path="../../../../../../../bin/"/> |
2366 | 2367 | ||
2367 | <Files> | 2368 | <Files> |
2368 | <Match pattern="*.cs" recurse="false"/> | 2369 | <Match pattern="*.cs" recurse="false"/> |
@@ -2387,22 +2388,22 @@ | |||
2387 | <Reference name="System.Data"/> | 2388 | <Reference name="System.Data"/> |
2388 | <Reference name="System.Web"/> | 2389 | <Reference name="System.Web"/> |
2389 | <Reference name="System.Xml"/> | 2390 | <Reference name="System.Xml"/> |
2390 | <Reference name="OpenMetaverseTypes.dll"/> | 2391 | <Reference name="OpenMetaverseTypes" path="../../../../../../bin/"/> |
2391 | <Reference name="OpenMetaverse.dll"/> | 2392 | <Reference name="OpenMetaverse" path="../../../../../../bin/"/> |
2392 | <Reference name="OpenSim" /> | 2393 | <Reference name="OpenSim"/> |
2393 | <Reference name="OpenSim.Framework"/> | 2394 | <Reference name="OpenSim.Framework"/> |
2394 | <Reference name="OpenSim.Framework.Communications"/> | 2395 | <Reference name="OpenSim.Framework.Communications"/> |
2395 | <Reference name="OpenSim.Region.Framework" /> | 2396 | <Reference name="OpenSim.Region.Framework"/> |
2396 | <Reference name="OpenSim.Region.CoreModules" /> | 2397 | <Reference name="OpenSim.Region.CoreModules"/> |
2397 | <Reference name="OpenSim.Region.Physics.Manager" /> | 2398 | <Reference name="OpenSim.Region.Physics.Manager"/> |
2398 | <Reference name="OpenSim.Framework.Console"/> | 2399 | <Reference name="OpenSim.Framework.Console"/> |
2399 | <Reference name="OpenSim.Services.Interfaces"/> | 2400 | <Reference name="OpenSim.Services.Interfaces"/> |
2400 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2401 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2401 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api.Runtime"/> | 2402 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api.Runtime"/> |
2402 | <Reference name="Nini.dll" /> | 2403 | <Reference name="Nini" path="../../../../../../bin/"/> |
2403 | <Reference name="RAIL.dll"/> | 2404 | <Reference name="RAIL" path="../../../../../../bin/"/> |
2404 | <Reference name="Nini.dll" /> | 2405 | <Reference name="Nini" path="../../../../../../bin/"/> |
2405 | <Reference name="log4net.dll"/> | 2406 | <Reference name="log4net" path="../../../../../../bin/"/> |
2406 | 2407 | ||
2407 | <Files> | 2408 | <Files> |
2408 | <Match pattern="*.cs" recurse="true"/> | 2409 | <Match pattern="*.cs" recurse="true"/> |
@@ -2423,20 +2424,20 @@ | |||
2423 | 2424 | ||
2424 | <ReferencePath>../../../../../bin/</ReferencePath> | 2425 | <ReferencePath>../../../../../bin/</ReferencePath> |
2425 | <Reference name="System"/> | 2426 | <Reference name="System"/> |
2426 | <Reference name="OpenSim.Framework" /> | 2427 | <Reference name="OpenSim.Framework"/> |
2427 | <Reference name="OpenSim.Region.Framework" /> | 2428 | <Reference name="OpenSim.Region.Framework"/> |
2428 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2429 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2429 | <Reference name="OpenSim.Region.ScriptEngine.Shared.YieldProlog"/> | 2430 | <Reference name="OpenSim.Region.ScriptEngine.Shared.YieldProlog"/> |
2430 | <Reference name="OpenSim.Region.CoreModules" /> | 2431 | <Reference name="OpenSim.Region.CoreModules"/> |
2431 | <Reference name="OpenMetaverseTypes.dll"/> | 2432 | <Reference name="OpenMetaverseTypes" path="../../../../../bin/"/> |
2432 | <Reference name="Nini.dll" /> | 2433 | <Reference name="Nini" path="../../../../../bin/"/> |
2433 | <Reference name="RAIL.dll"/> | 2434 | <Reference name="RAIL" path="../../../../../bin/"/> |
2434 | <Reference name="log4net.dll"/> | 2435 | <Reference name="log4net" path="../../../../../bin/"/> |
2435 | <Reference name="Tools.dll"/> | 2436 | <Reference name="Tools" path="../../../../../bin/"/> |
2436 | 2437 | ||
2437 | <Files> | 2438 | <Files> |
2438 | <Match pattern="*.cs" recurse="true"> | 2439 | <Match pattern="*.cs" recurse="true"> |
2439 | <Exclude name="Tests" pattern="Tests" /> | 2440 | <Exclude name="Tests" pattern="Tests"/> |
2440 | </Match> | 2441 | </Match> |
2441 | </Files> | 2442 | </Files> |
2442 | </Project> | 2443 | </Project> |
@@ -2458,22 +2459,22 @@ | |||
2458 | <Reference name="System.Data"/> | 2459 | <Reference name="System.Data"/> |
2459 | <Reference name="System.Web"/> | 2460 | <Reference name="System.Web"/> |
2460 | <Reference name="System.Xml"/> | 2461 | <Reference name="System.Xml"/> |
2461 | <Reference name="OpenMetaverseTypes.dll"/> | 2462 | <Reference name="OpenMetaverseTypes" path="../../../../../bin/"/> |
2462 | <Reference name="OpenSim" /> | 2463 | <Reference name="OpenSim"/> |
2463 | <Reference name="OpenSim.Framework"/> | 2464 | <Reference name="OpenSim.Framework"/> |
2464 | <Reference name="OpenSim.Framework.Communications"/> | 2465 | <Reference name="OpenSim.Framework.Communications"/> |
2465 | <Reference name="OpenSim.Region.Framework" /> | 2466 | <Reference name="OpenSim.Region.Framework"/> |
2466 | <Reference name="OpenSim.Region.CoreModules" /> | 2467 | <Reference name="OpenSim.Region.CoreModules"/> |
2467 | <Reference name="OpenSim.Framework.Console"/> | 2468 | <Reference name="OpenSim.Framework.Console"/> |
2468 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2469 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2469 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> | 2470 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> |
2470 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> | 2471 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> |
2471 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api.Runtime"/> | 2472 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api.Runtime"/> |
2472 | <Reference name="SmartThreadPool"/> | 2473 | <Reference name="SmartThreadPool"/> |
2473 | <Reference name="Axiom.MathLib.dll"/> | 2474 | <Reference name="Axiom.MathLib" path="../../../../../bin/"/> |
2474 | <Reference name="Nini.dll" /> | 2475 | <Reference name="Nini" path="../../../../../bin/"/> |
2475 | <Reference name="RAIL.dll"/> | 2476 | <Reference name="RAIL" path="../../../../../bin/"/> |
2476 | <Reference name="log4net.dll"/> | 2477 | <Reference name="log4net" path="../../../../../bin/"/> |
2477 | 2478 | ||
2478 | <Files> | 2479 | <Files> |
2479 | <Match pattern="*.cs" recurse="true"/> | 2480 | <Match pattern="*.cs" recurse="true"/> |
@@ -2497,27 +2498,27 @@ | |||
2497 | <Reference name="System.Data"/> | 2498 | <Reference name="System.Data"/> |
2498 | <Reference name="System.Web"/> | 2499 | <Reference name="System.Web"/> |
2499 | <Reference name="System.Xml"/> | 2500 | <Reference name="System.Xml"/> |
2500 | <Reference name="OpenMetaverseTypes.dll"/> | 2501 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2501 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2502 | <Reference name="OpenMetaverse.StructuredData" path="../../../../bin/"/> |
2502 | <Reference name="OpenSim" /> | 2503 | <Reference name="OpenSim"/> |
2503 | <Reference name="OpenSim.Framework"/> | 2504 | <Reference name="OpenSim.Framework"/> |
2504 | <Reference name="OpenSim.Framework.Communications"/> | 2505 | <Reference name="OpenSim.Framework.Communications"/> |
2505 | <Reference name="OpenSim.Region.Framework" /> | 2506 | <Reference name="OpenSim.Region.Framework"/> |
2506 | <Reference name="OpenSim.Region.CoreModules" /> | 2507 | <Reference name="OpenSim.Region.CoreModules"/> |
2507 | <Reference name="OpenSim.Framework.Console"/> | 2508 | <Reference name="OpenSim.Framework.Console"/> |
2508 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 2509 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
2509 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> | 2510 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> |
2510 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Instance"/> | 2511 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Instance"/> |
2511 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> | 2512 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> |
2512 | <Reference name="SmartThreadPool"/> | 2513 | <Reference name="SmartThreadPool"/> |
2513 | <Reference name="Nini.dll" /> | 2514 | <Reference name="Nini" path="../../../../bin/"/> |
2514 | <Reference name="RAIL.dll"/> | 2515 | <Reference name="RAIL" path="../../../../bin/"/> |
2515 | <Reference name="log4net.dll"/> | 2516 | <Reference name="log4net" path="../../../../bin/"/> |
2516 | 2517 | ||
2517 | <Files> | 2518 | <Files> |
2518 | <Match pattern="*.addin.xml" path="Resources" buildAction="EmbeddedResource" recurse="true"/> | 2519 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.addin.xml" recurse="true"/> |
2519 | <Match pattern="*.cs" recurse="true"> | 2520 | <Match pattern="*.cs" recurse="true"> |
2520 | <Exclude name="Tests" pattern="Tests" /> | 2521 | <Exclude name="Tests" pattern="Tests"/> |
2521 | </Match> | 2522 | </Match> |
2522 | </Files> | 2523 | </Files> |
2523 | </Project> | 2524 | </Project> |
@@ -2542,13 +2543,13 @@ | |||
2542 | <Reference name="System.Drawing"/> | 2543 | <Reference name="System.Drawing"/> |
2543 | <Reference name="System.Runtime.Remoting"/> | 2544 | <Reference name="System.Runtime.Remoting"/> |
2544 | <Reference name="System.Web"/> | 2545 | <Reference name="System.Web"/> |
2545 | <Reference name="OpenMetaverseTypes.dll"/> | 2546 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2546 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2547 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
2547 | <Reference name="OpenMetaverse.dll"/> | 2548 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2548 | <Reference name="OpenSim.Framework"/> | 2549 | <Reference name="OpenSim.Framework"/> |
2549 | <Reference name="OpenSim.Data" /> | 2550 | <Reference name="OpenSim.Data"/> |
2550 | <Reference name="OpenSim.Region.Framework" /> | 2551 | <Reference name="OpenSim.Region.Framework"/> |
2551 | <Reference name="OpenSim.Region.CoreModules" /> | 2552 | <Reference name="OpenSim.Region.CoreModules"/> |
2552 | <Reference name="OpenSim.Framework.Console"/> | 2553 | <Reference name="OpenSim.Framework.Console"/> |
2553 | <Reference name="OpenSim.Framework.Servers"/> | 2554 | <Reference name="OpenSim.Framework.Servers"/> |
2554 | <Reference name="OpenSim.Framework.Capabilities"/> | 2555 | <Reference name="OpenSim.Framework.Capabilities"/> |
@@ -2559,15 +2560,15 @@ | |||
2559 | <Reference name="Mono.Addins"/> | 2560 | <Reference name="Mono.Addins"/> |
2560 | 2561 | ||
2561 | <!-- For scripting in funny languages by default --> | 2562 | <!-- For scripting in funny languages by default --> |
2562 | <Reference name="XMLRPC.dll"/> | 2563 | <Reference name="XMLRPC" path="../../../bin/"/> |
2563 | <Reference name="OpenSim.Framework.Communications"/> | 2564 | <Reference name="OpenSim.Framework.Communications"/> |
2564 | <Reference name="Nini.dll" /> | 2565 | <Reference name="Nini" path="../../../bin/"/> |
2565 | <Reference name="log4net.dll"/> | 2566 | <Reference name="log4net" path="../../../bin/"/> |
2566 | <Reference name="DotNetOpenMail.dll"/> | 2567 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
2567 | 2568 | ||
2568 | <Files> | 2569 | <Files> |
2569 | <Match pattern="*.cs" recurse="true"> | 2570 | <Match pattern="*.cs" recurse="true"> |
2570 | <Exclude name="Tests" pattern="Tests" /> | 2571 | <Exclude name="Tests" pattern="Tests"/> |
2571 | </Match> | 2572 | </Match> |
2572 | </Files> | 2573 | </Files> |
2573 | </Project> | 2574 | </Project> |
@@ -2588,12 +2589,12 @@ | |||
2588 | 2589 | ||
2589 | <ReferencePath>../../../bin/</ReferencePath> | 2590 | <ReferencePath>../../../bin/</ReferencePath> |
2590 | <Reference name="System"/> | 2591 | <Reference name="System"/> |
2591 | <Reference name="OpenMetaverseTypes.dll"/> | 2592 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2592 | <Reference name="OpenMetaverse.dll"/> | 2593 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2593 | <Reference name="OpenSim.Framework"/> | 2594 | <Reference name="OpenSim.Framework"/> |
2594 | <Reference name="OpenSim.Framework.Console"/> | 2595 | <Reference name="OpenSim.Framework.Console"/> |
2595 | <Reference name="Nini.dll" /> | 2596 | <Reference name="Nini" path="../../../bin/"/> |
2596 | <Reference name="log4net.dll"/> | 2597 | <Reference name="log4net" path="../../../bin/"/> |
2597 | 2598 | ||
2598 | <Files> | 2599 | <Files> |
2599 | <Match pattern="*.cs" recurse="true"/> | 2600 | <Match pattern="*.cs" recurse="true"/> |
@@ -2614,13 +2615,13 @@ | |||
2614 | 2615 | ||
2615 | <ReferencePath>../../../bin/</ReferencePath> | 2616 | <ReferencePath>../../../bin/</ReferencePath> |
2616 | <Reference name="System"/> | 2617 | <Reference name="System"/> |
2617 | <Reference name="OpenMetaverseTypes.dll"/> | 2618 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2618 | <Reference name="OpenMetaverse.dll"/> | 2619 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2619 | <Reference name="OpenSim.Framework"/> | 2620 | <Reference name="OpenSim.Framework"/> |
2620 | <Reference name="OpenSim.Framework.Console"/> | 2621 | <Reference name="OpenSim.Framework.Console"/> |
2621 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> | 2622 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> |
2622 | <Reference name="Nini.dll" /> | 2623 | <Reference name="Nini" path="../../../bin/"/> |
2623 | <Reference name="log4net.dll"/> | 2624 | <Reference name="log4net" path="../../../bin/"/> |
2624 | 2625 | ||
2625 | <Files> | 2626 | <Files> |
2626 | <Match pattern="*.cs" recurse="true"/> | 2627 | <Match pattern="*.cs" recurse="true"/> |
@@ -2642,8 +2643,8 @@ | |||
2642 | <ReferencePath>../../../bin/</ReferencePath> | 2643 | <ReferencePath>../../../bin/</ReferencePath> |
2643 | <Reference name="System"/> | 2644 | <Reference name="System"/> |
2644 | <Reference name="System.Xml"/> | 2645 | <Reference name="System.Xml"/> |
2645 | <Reference name="Nini.dll"/> | 2646 | <Reference name="Nini" path="../../../bin/"/> |
2646 | <Reference name="log4net.dll"/> | 2647 | <Reference name="log4net" path="../../../bin/"/> |
2647 | 2648 | ||
2648 | <Files> | 2649 | <Files> |
2649 | <Match pattern="*.cs" recurse="true"/> | 2650 | <Match pattern="*.cs" recurse="true"/> |
@@ -2665,13 +2666,13 @@ | |||
2665 | 2666 | ||
2666 | <ReferencePath>../../bin/</ReferencePath> | 2667 | <ReferencePath>../../bin/</ReferencePath> |
2667 | <Reference name="System"/> | 2668 | <Reference name="System"/> |
2668 | <Reference name="OpenMetaverseTypes.dll"/> | 2669 | <Reference name="OpenMetaverseTypes" path="../../bin/"/> |
2669 | <Reference name="OpenMetaverse.dll"/> | 2670 | <Reference name="OpenMetaverse" path="../../bin/"/> |
2670 | <Reference name="OpenSim.Framework"/> | 2671 | <Reference name="OpenSim.Framework"/> |
2671 | <Reference name="OpenSim.Framework.Console"/> | 2672 | <Reference name="OpenSim.Framework.Console"/> |
2672 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 2673 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
2673 | <Reference name="Nini.dll" /> | 2674 | <Reference name="Nini" path="../../bin/"/> |
2674 | <Reference name="log4net.dll"/> | 2675 | <Reference name="log4net" path="../../bin/"/> |
2675 | 2676 | ||
2676 | <Files> | 2677 | <Files> |
2677 | <Match pattern="*.cs" recurse="true"/> | 2678 | <Match pattern="*.cs" recurse="true"/> |
@@ -2693,13 +2694,13 @@ | |||
2693 | 2694 | ||
2694 | <ReferencePath>../../../../bin/</ReferencePath> | 2695 | <ReferencePath>../../../../bin/</ReferencePath> |
2695 | <Reference name="System"/> | 2696 | <Reference name="System"/> |
2696 | <Reference name="OpenMetaverseTypes.dll"/> | 2697 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2697 | <Reference name="OpenMetaverse.dll"/> | 2698 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
2698 | <Reference name="OpenSim.Framework"/> | 2699 | <Reference name="OpenSim.Framework"/> |
2699 | <Reference name="OpenSim.Services.Interfaces" /> | 2700 | <Reference name="OpenSim.Services.Interfaces"/> |
2700 | <Reference name="OpenSim.Services.Connectors" /> | 2701 | <Reference name="OpenSim.Services.Connectors"/> |
2701 | <Reference name="Nini.dll" /> | 2702 | <Reference name="Nini" path="../../../../bin/"/> |
2702 | <Reference name="log4net.dll"/> | 2703 | <Reference name="log4net" path="../../../../bin/"/> |
2703 | 2704 | ||
2704 | <Files> | 2705 | <Files> |
2705 | <Match pattern="*.cs" recurse="true"/> | 2706 | <Match pattern="*.cs" recurse="true"/> |
@@ -2720,13 +2721,13 @@ | |||
2720 | 2721 | ||
2721 | <ReferencePath>../../../../bin/</ReferencePath> | 2722 | <ReferencePath>../../../../bin/</ReferencePath> |
2722 | <Reference name="System"/> | 2723 | <Reference name="System"/> |
2723 | <Reference name="OpenMetaverseTypes.dll"/> | 2724 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2724 | <Reference name="OpenMetaverse.dll"/> | 2725 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
2725 | <Reference name="OpenSim.Framework"/> | 2726 | <Reference name="OpenSim.Framework"/> |
2726 | <Reference name="OpenSim.Services.Interfaces" /> | 2727 | <Reference name="OpenSim.Services.Interfaces"/> |
2727 | <Reference name="OpenSim.Services.Connectors" /> | 2728 | <Reference name="OpenSim.Services.Connectors"/> |
2728 | <Reference name="Nini.dll" /> | 2729 | <Reference name="Nini" path="../../../../bin/"/> |
2729 | <Reference name="log4net.dll"/> | 2730 | <Reference name="log4net" path="../../../../bin/"/> |
2730 | 2731 | ||
2731 | <Files> | 2732 | <Files> |
2732 | <Match pattern="*.cs" recurse="true"/> | 2733 | <Match pattern="*.cs" recurse="true"/> |
@@ -2747,13 +2748,13 @@ | |||
2747 | 2748 | ||
2748 | <ReferencePath>../../../../bin/</ReferencePath> | 2749 | <ReferencePath>../../../../bin/</ReferencePath> |
2749 | <Reference name="System"/> | 2750 | <Reference name="System"/> |
2750 | <Reference name="OpenMetaverseTypes.dll"/> | 2751 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2751 | <Reference name="OpenMetaverse.dll"/> | 2752 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
2752 | <Reference name="OpenSim.Framework"/> | 2753 | <Reference name="OpenSim.Framework"/> |
2753 | <Reference name="OpenSim.Services.Interfaces" /> | 2754 | <Reference name="OpenSim.Services.Interfaces"/> |
2754 | <Reference name="OpenSim.Services.Connectors" /> | 2755 | <Reference name="OpenSim.Services.Connectors"/> |
2755 | <Reference name="Nini.dll" /> | 2756 | <Reference name="Nini" path="../../../../bin/"/> |
2756 | <Reference name="log4net.dll"/> | 2757 | <Reference name="log4net" path="../../../../bin/"/> |
2757 | 2758 | ||
2758 | <Files> | 2759 | <Files> |
2759 | <Match pattern="*.cs" recurse="true"/> | 2760 | <Match pattern="*.cs" recurse="true"/> |
@@ -2779,11 +2780,11 @@ | |||
2779 | <Reference name="System.Drawing"/> | 2780 | <Reference name="System.Drawing"/> |
2780 | <Reference name="System.Xml"/> | 2781 | <Reference name="System.Xml"/> |
2781 | <Reference name="System.Data"/> | 2782 | <Reference name="System.Data"/> |
2782 | <Reference name="log4net.dll"/> | 2783 | <Reference name="log4net" path="../../../bin/"/> |
2783 | <Reference name="Nini.dll" /> | 2784 | <Reference name="Nini" path="../../../bin/"/> |
2784 | <Reference name="nunit.framework.dll" /> | 2785 | <Reference name="nunit.framework" path="../../../bin/"/> |
2785 | <Reference name="OpenMetaverse.dll"/> | 2786 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2786 | <Reference name="OpenMetaverseTypes.dll"/> | 2787 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2787 | <Reference name="OpenSim.Framework"/> | 2788 | <Reference name="OpenSim.Framework"/> |
2788 | <Reference name="OpenSim.Framework.Communications"/> | 2789 | <Reference name="OpenSim.Framework.Communications"/> |
2789 | <Reference name="OpenSim.Framework.Console"/> | 2790 | <Reference name="OpenSim.Framework.Console"/> |
@@ -2815,9 +2816,9 @@ | |||
2815 | 2816 | ||
2816 | <ReferencePath>../../bin/</ReferencePath> | 2817 | <ReferencePath>../../bin/</ReferencePath> |
2817 | <Reference name="OpenSim.Framework"/> | 2818 | <Reference name="OpenSim.Framework"/> |
2818 | <Reference name="Nini.dll" /> | 2819 | <Reference name="Nini" path="../../bin/"/> |
2819 | <Reference name="nunit.framework.dll" /> | 2820 | <Reference name="nunit.framework" path="../../bin/"/> |
2820 | <Reference name="OpenSim" /> | 2821 | <Reference name="OpenSim"/> |
2821 | <Files> | 2822 | <Files> |
2822 | <Match pattern="*.cs" recurse="false"/> | 2823 | <Match pattern="*.cs" recurse="false"/> |
2823 | </Files> | 2824 | </Files> |
@@ -2841,27 +2842,27 @@ | |||
2841 | <Reference name="System.Core"/> | 2842 | <Reference name="System.Core"/> |
2842 | <Reference name="System.Drawing"/> | 2843 | <Reference name="System.Drawing"/> |
2843 | <Reference name="System.Data"/> | 2844 | <Reference name="System.Data"/> |
2844 | <Reference name="OpenMetaverse.dll"/> | 2845 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2845 | <Reference name="OpenMetaverseTypes.dll"/> | 2846 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2846 | <Reference name="OpenSim.Framework"/> | 2847 | <Reference name="OpenSim.Framework"/> |
2847 | <Reference name="OpenSim.Data"/> | 2848 | <Reference name="OpenSim.Data"/> |
2848 | <Reference name="OpenSim.Region.Framework"/> | 2849 | <Reference name="OpenSim.Region.Framework"/> |
2849 | <Reference name="OpenSim.Region.CoreModules"/> | 2850 | <Reference name="OpenSim.Region.CoreModules"/> |
2850 | <Reference name="OpenSim.Tests.Common"/> | 2851 | <Reference name="OpenSim.Tests.Common"/> |
2851 | <Reference name="log4net.dll"/> | 2852 | <Reference name="log4net" path="../../../bin/"/> |
2852 | <Reference name="Mono.Addins.dll" /> | 2853 | <Reference name="Mono.Addins" path="../../../bin/"/> |
2853 | <Reference name="nunit.framework.dll" /> | 2854 | <Reference name="nunit.framework" path="../../../bin/"/> |
2854 | <Reference name="Nini.dll" /> | 2855 | <Reference name="Nini" path="../../../bin/"/> |
2855 | 2856 | ||
2856 | <Reference name="OpenSim.Data.MySQL"/> | 2857 | <Reference name="OpenSim.Data.MySQL"/> |
2857 | <Reference name="OpenSim.Data.MSSQL"/> | 2858 | <Reference name="OpenSim.Data.MSSQL"/> |
2858 | <Reference name="OpenSim.Data.SQLite"/> | 2859 | <Reference name="OpenSim.Data.SQLite"/> |
2859 | 2860 | ||
2860 | <Reference name="MySql.Data.dll"/> | 2861 | <Reference name="MySql.Data" path="../../../bin/"/> |
2861 | <Reference name="Mono.Data.Sqlite.dll"/> | 2862 | <Reference name="Mono.Data.Sqlite" path="../../../bin/"/> |
2862 | <Files> | 2863 | <Files> |
2863 | <Match pattern="*.cs" recurse="true"/> | 2864 | <Match pattern="*.cs" recurse="true"/> |
2864 | <Match path="Resources" pattern="*.ini" buildAction="EmbeddedResource"/> | 2865 | <Match buildAction="EmbeddedResource" path="Resources" pattern="*.ini"/> |
2865 | </Files> | 2866 | </Files> |
2866 | </Project> | 2867 | </Project> |
2867 | 2868 | ||
@@ -2882,16 +2883,16 @@ | |||
2882 | <Reference name="System"/> | 2883 | <Reference name="System"/> |
2883 | <Reference name="System.Xml"/> | 2884 | <Reference name="System.Xml"/> |
2884 | <Reference name="System.Data"/> | 2885 | <Reference name="System.Data"/> |
2885 | <Reference name="OpenMetaverse.dll"/> | 2886 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2886 | <Reference name="OpenMetaverseTypes.dll"/> | 2887 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2887 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2888 | <Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/> |
2888 | <Reference name="XMLRPC.dll"/> | 2889 | <Reference name="XMLRPC" path="../../../bin/"/> |
2889 | <Reference name="OpenSim.Framework.Console"/> | 2890 | <Reference name="OpenSim.Framework.Console"/> |
2890 | <Reference name="OpenSim.Framework"/> | 2891 | <Reference name="OpenSim.Framework"/> |
2891 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 2892 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
2892 | <Reference name="OpenSim.Tests.Common"/> | 2893 | <Reference name="OpenSim.Tests.Common"/> |
2893 | <Reference name="Nini.dll" /> | 2894 | <Reference name="Nini" path="../../../bin/"/> |
2894 | <Reference name="nunit.framework.dll" /> | 2895 | <Reference name="nunit.framework" path="../../../bin/"/> |
2895 | <Files> | 2896 | <Files> |
2896 | <Match pattern="*.cs" recurse="false"/> | 2897 | <Match pattern="*.cs" recurse="false"/> |
2897 | </Files> | 2898 | </Files> |
@@ -2911,16 +2912,16 @@ | |||
2911 | 2912 | ||
2912 | <ReferencePath>../../../../bin/</ReferencePath> | 2913 | <ReferencePath>../../../../bin/</ReferencePath> |
2913 | <Reference name="System"/> | 2914 | <Reference name="System"/> |
2914 | <Reference name="OpenMetaverse.dll"/> | 2915 | <Reference name="OpenMetaverse" path="../../../../bin/"/> |
2915 | <Reference name="OpenMetaverseTypes.dll"/> | 2916 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
2916 | <Reference name="OpenMetaverse.StructuredData.dll"/> | 2917 | <Reference name="OpenMetaverse.StructuredData" path="../../../../bin/"/> |
2917 | <Reference name="OpenSim.Data"/> | 2918 | <Reference name="OpenSim.Data"/> |
2918 | <Reference name="OpenSim.Services.Interfaces"/> | 2919 | <Reference name="OpenSim.Services.Interfaces"/> |
2919 | <Reference name="OpenSim.Tests.Common"/> | 2920 | <Reference name="OpenSim.Tests.Common"/> |
2920 | <Reference name="OpenSim.Framework"/> | 2921 | <Reference name="OpenSim.Framework"/> |
2921 | <Reference name="OpenSim.Framework.Serialization"/> | 2922 | <Reference name="OpenSim.Framework.Serialization"/> |
2922 | <Reference name="log4net.dll"/> | 2923 | <Reference name="log4net" path="../../../../bin/"/> |
2923 | <Reference name="nunit.framework.dll" /> | 2924 | <Reference name="nunit.framework" path="../../../../bin/"/> |
2924 | 2925 | ||
2925 | <Files> | 2926 | <Files> |
2926 | <Match pattern="*.cs" recurse="true"> | 2927 | <Match pattern="*.cs" recurse="true"> |
@@ -2948,9 +2949,9 @@ | |||
2948 | <Reference name="OpenSim.Framework"/> | 2949 | <Reference name="OpenSim.Framework"/> |
2949 | <Reference name="OpenSim.Framework.Servers"/> | 2950 | <Reference name="OpenSim.Framework.Servers"/> |
2950 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> | 2951 | <Reference name="OpenSim.Framework.Servers.HttpServer"/> |
2951 | <Reference name="log4net.dll"/> | 2952 | <Reference name="log4net" path="../../../../bin/"/> |
2952 | <Reference name="HttpServer_OpenSim.dll"/> | 2953 | <Reference name="HttpServer_OpenSim" path="../../../../bin/"/> |
2953 | <Reference name="nunit.framework.dll" /> | 2954 | <Reference name="nunit.framework" path="../../../../bin/"/> |
2954 | 2955 | ||
2955 | <Files> | 2956 | <Files> |
2956 | <Match pattern="*.cs" recurse="true"> | 2957 | <Match pattern="*.cs" recurse="true"> |
@@ -2975,8 +2976,8 @@ | |||
2975 | <Reference name="System.Core"/> | 2976 | <Reference name="System.Core"/> |
2976 | <Reference name="System.Xml"/> | 2977 | <Reference name="System.Xml"/> |
2977 | <Reference name="System.Drawing"/> | 2978 | <Reference name="System.Drawing"/> |
2978 | <Reference name="OpenMetaverseTypes.dll"/> | 2979 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
2979 | <Reference name="OpenMetaverse.dll"/> | 2980 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
2980 | <Reference name="OpenSim.Data"/> | 2981 | <Reference name="OpenSim.Data"/> |
2981 | <Reference name="OpenSim.Framework"/> | 2982 | <Reference name="OpenSim.Framework"/> |
2982 | <Reference name="OpenSim.Framework.Serialization"/> | 2983 | <Reference name="OpenSim.Framework.Serialization"/> |
@@ -2992,15 +2993,15 @@ | |||
2992 | 2993 | ||
2993 | <!-- Unit tests --> | 2994 | <!-- Unit tests --> |
2994 | <Reference name="OpenSim.Tests.Common"/> | 2995 | <Reference name="OpenSim.Tests.Common"/> |
2995 | <Reference name="Nini.dll"/> | 2996 | <Reference name="Nini" path="../../../bin/"/> |
2996 | <Reference name="nunit.framework.dll"/> | 2997 | <Reference name="nunit.framework" path="../../../bin/"/> |
2997 | 2998 | ||
2998 | <!-- For scripting in funny languages by default --> | 2999 | <!-- For scripting in funny languages by default --> |
2999 | <Reference name="XMLRPC.dll"/> | 3000 | <Reference name="XMLRPC" path="../../../bin/"/> |
3000 | <Reference name="OpenSim.Framework.Communications"/> | 3001 | <Reference name="OpenSim.Framework.Communications"/> |
3001 | <Reference name="Nini.dll" /> | 3002 | <Reference name="Nini" path="../../../bin/"/> |
3002 | <Reference name="log4net.dll"/> | 3003 | <Reference name="log4net" path="../../../bin/"/> |
3003 | <Reference name="DotNetOpenMail.dll"/> | 3004 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
3004 | 3005 | ||
3005 | <!-- | 3006 | <!-- |
3006 | TODO: this is kind of lame, we basically build a duplicate | 3007 | TODO: this is kind of lame, we basically build a duplicate |
@@ -3010,14 +3011,14 @@ | |||
3010 | --> | 3011 | --> |
3011 | <Files> | 3012 | <Files> |
3012 | <!-- SADLY the way this works means you need to keep adding these paths --> | 3013 | <!-- SADLY the way this works means you need to keep adding these paths --> |
3013 | <Match path="Agent/TextureSender/Tests" pattern="*.cs" recurse="true" /> | 3014 | <Match path="Agent/TextureSender/Tests" pattern="*.cs" recurse="true"/> |
3014 | <Match path="Avatar/Inventory/Archiver/Tests" pattern="*.cs" recurse="true" /> | 3015 | <Match path="Avatar/Inventory/Archiver/Tests" pattern="*.cs" recurse="true"/> |
3015 | <Match path="World/Archiver/Tests" pattern="*.cs" recurse="true" /> | 3016 | <Match path="World/Archiver/Tests" pattern="*.cs" recurse="true"/> |
3016 | <Match path="World/Archiver/Tests/Resources" pattern="*" buildAction="EmbeddedResource"/> | 3017 | <Match buildAction="EmbeddedResource" path="World/Archiver/Tests/Resources" pattern="*"/> |
3017 | <Match path="World/Serialiser/Tests" pattern="*.cs" recurse="true" /> | 3018 | <Match path="World/Serialiser/Tests" pattern="*.cs" recurse="true"/> |
3018 | <Match path="World/Terrain/Tests" pattern="*.cs" recurse="true" /> | 3019 | <Match path="World/Terrain/Tests" pattern="*.cs" recurse="true"/> |
3019 | <Match path="ServiceConnectorsOut/Grid/Tests" pattern="*.cs" recurse="true" /> | 3020 | <Match path="ServiceConnectorsOut/Grid/Tests" pattern="*.cs" recurse="true"/> |
3020 | <Match path="ServiceConnectorsOut/Presence/Tests" pattern="*.cs" recurse="true" /> | 3021 | <Match path="ServiceConnectorsOut/Presence/Tests" pattern="*.cs" recurse="true"/> |
3021 | </Files> | 3022 | </Files> |
3022 | </Project> | 3023 | </Project> |
3023 | 3024 | ||
@@ -3038,8 +3039,8 @@ | |||
3038 | <Reference name="System.Xml"/> | 3039 | <Reference name="System.Xml"/> |
3039 | <Reference name="System.Drawing"/> | 3040 | <Reference name="System.Drawing"/> |
3040 | <Reference name="System.Runtime.Remoting"/> | 3041 | <Reference name="System.Runtime.Remoting"/> |
3041 | <Reference name="OpenMetaverseTypes.dll"/> | 3042 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
3042 | <Reference name="OpenMetaverse.dll"/> | 3043 | <Reference name="OpenMetaverse" path="../../../bin/"/> |
3043 | <Reference name="OpenSim.Data"/> | 3044 | <Reference name="OpenSim.Data"/> |
3044 | <Reference name="OpenSim.Framework"/> | 3045 | <Reference name="OpenSim.Framework"/> |
3045 | <Reference name="OpenSim.Framework.Communications"/> | 3046 | <Reference name="OpenSim.Framework.Communications"/> |
@@ -3055,15 +3056,15 @@ | |||
3055 | <!-- Unit tests --> | 3056 | <!-- Unit tests --> |
3056 | <!-- <Reference name="OpenSim.Tests.Common"/> --> | 3057 | <!-- <Reference name="OpenSim.Tests.Common"/> --> |
3057 | <Reference name="OpenSim.Tests.Common"/> | 3058 | <Reference name="OpenSim.Tests.Common"/> |
3058 | <Reference name="Nini.dll"/> | 3059 | <Reference name="Nini" path="../../../bin/"/> |
3059 | <Reference name="nunit.framework.dll"/> | 3060 | <Reference name="nunit.framework" path="../../../bin/"/> |
3060 | 3061 | ||
3061 | <!-- For scripting in funny languages by default --> | 3062 | <!-- For scripting in funny languages by default --> |
3062 | <Reference name="XMLRPC.dll"/> | 3063 | <Reference name="XMLRPC" path="../../../bin/"/> |
3063 | <Reference name="OpenSim.Framework.Communications"/> | 3064 | <Reference name="OpenSim.Framework.Communications"/> |
3064 | <Reference name="Nini.dll" /> | 3065 | <Reference name="Nini" path="../../../bin/"/> |
3065 | <Reference name="log4net.dll"/> | 3066 | <Reference name="log4net" path="../../../bin/"/> |
3066 | <Reference name="DotNetOpenMail.dll"/> | 3067 | <Reference name="DotNetOpenMail" path="../../../bin/"/> |
3067 | 3068 | ||
3068 | <!-- | 3069 | <!-- |
3069 | TODO: this is kind of lame, we basically build a duplicate | 3070 | TODO: this is kind of lame, we basically build a duplicate |
@@ -3073,7 +3074,7 @@ | |||
3073 | --> | 3074 | --> |
3074 | <Files> | 3075 | <Files> |
3075 | <!-- SADLY the way this works means you need to keep adding these paths --> | 3076 | <!-- SADLY the way this works means you need to keep adding these paths --> |
3076 | <Match path="Scenes/Tests" pattern="*.cs" recurse="false" /> | 3077 | <Match path="Scenes/Tests" pattern="*.cs" recurse="false"/> |
3077 | </Files> | 3078 | </Files> |
3078 | </Project> | 3079 | </Project> |
3079 | 3080 | ||
@@ -3093,11 +3094,11 @@ | |||
3093 | <ReferencePath>../../../../../bin/</ReferencePath> | 3094 | <ReferencePath>../../../../../bin/</ReferencePath> |
3094 | <Reference name="System"/> | 3095 | <Reference name="System"/> |
3095 | <Reference name="System.Xml"/> | 3096 | <Reference name="System.Xml"/> |
3096 | <Reference name="log4net.dll"/> | 3097 | <Reference name="log4net"/> |
3097 | <Reference name="Nini.dll" /> | 3098 | <Reference name="Nini" /> |
3098 | <Reference name="nunit.framework.dll" /> | 3099 | <Reference name="nunit.framework" /> |
3099 | <Reference name="OpenMetaverse.dll"/> | 3100 | <Reference name="OpenMetaverse"/> |
3100 | <Reference name="OpenMetaverseTypes.dll"/> | 3101 | <Reference name="OpenMetaverseTypes"/> |
3101 | <Reference name="OpenSim.Framework"/> | 3102 | <Reference name="OpenSim.Framework"/> |
3102 | <Reference name="OpenSim.Framework.Communications"/> | 3103 | <Reference name="OpenSim.Framework.Communications"/> |
3103 | <Reference name="OpenSim.Framework.Statistics"/> | 3104 | <Reference name="OpenSim.Framework.Statistics"/> |
@@ -3134,12 +3135,12 @@ | |||
3134 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> | 3135 | <Reference name="OpenSim.Region.ScriptEngine.Shared.Api"/> |
3135 | <Reference name="OpenSim.Region.ScriptEngine.XEngine"/> | 3136 | <Reference name="OpenSim.Region.ScriptEngine.XEngine"/> |
3136 | <Reference name="OpenSim.Tests.Common"/> | 3137 | <Reference name="OpenSim.Tests.Common"/> |
3137 | <Reference name="nunit.framework.dll" /> | 3138 | <Reference name="nunit.framework" path="../../../bin/"/> |
3138 | <Reference name="Nini.dll" /> | 3139 | <Reference name="Nini" path="../../../bin/"/> |
3139 | <Reference name="OpenMetaverseTypes.dll"/> | 3140 | <Reference name="OpenMetaverseTypes" path="../../../bin/"/> |
3140 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> | 3141 | <Reference name="OpenSim.Region.ScriptEngine.Shared.CodeTools"/> |
3141 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> | 3142 | <Reference name="OpenSim.Region.ScriptEngine.Shared"/> |
3142 | <Reference name="Tools.dll" /> | 3143 | <Reference name="Tools" path="../../../bin/"/> |
3143 | 3144 | ||
3144 | <!-- | 3145 | <!-- |
3145 | TODO: this is kind of lame, we basically build a duplicate | 3146 | TODO: this is kind of lame, we basically build a duplicate |
@@ -3149,9 +3150,9 @@ | |||
3149 | --> | 3150 | --> |
3150 | <Files> | 3151 | <Files> |
3151 | <!-- SADLY the way this works means you need to keep adding these paths --> | 3152 | <!-- SADLY the way this works means you need to keep adding these paths --> |
3152 | <Match path="Shared/Tests" pattern="*.cs" recurse="true" /> | 3153 | <Match path="Shared/Tests" pattern="*.cs" recurse="true"/> |
3153 | <Match path="Shared/CodeTools/Tests" pattern="*.cs" recurse="true" /> | 3154 | <Match path="Shared/CodeTools/Tests" pattern="*.cs" recurse="true"/> |
3154 | <Match path="XEngine/Tests" pattern="*.cs" recurse="true" /> | 3155 | <Match path="XEngine/Tests" pattern="*.cs" recurse="true"/> |
3155 | </Files> | 3156 | </Files> |
3156 | </Project> | 3157 | </Project> |
3157 | 3158 | ||
@@ -3174,14 +3175,14 @@ | |||
3174 | <ReferencePath>../../../../bin/</ReferencePath> | 3175 | <ReferencePath>../../../../bin/</ReferencePath> |
3175 | <Reference name="System"/> | 3176 | <Reference name="System"/> |
3176 | <Reference name="System.Core"/> | 3177 | <Reference name="System.Core"/> |
3177 | <Reference name="OpenMetaverseTypes.dll"/> | 3178 | <Reference name="OpenMetaverseTypes" path="../../../../bin/"/> |
3178 | <Reference name="Nini.dll" /> | 3179 | <Reference name="Nini" path="../../../../bin/"/> |
3179 | <Reference name="OpenSim.Framework"/> | 3180 | <Reference name="OpenSim.Framework"/> |
3180 | <Reference name="OpenSim.Framework.Console"/> | 3181 | <Reference name="OpenSim.Framework.Console"/> |
3181 | <Reference name="OpenSim.Region.Physics.Manager"/> | 3182 | <Reference name="OpenSim.Region.Physics.Manager"/> |
3182 | <Reference name="Ode.NET.dll" /> | 3183 | <Reference name="Ode.NET" path="../../../../bin/"/> |
3183 | <Reference name="nunit.framework.dll" /> | 3184 | <Reference name="nunit.framework" path="../../../../bin/"/> |
3184 | <Reference name="log4net.dll"/> | 3185 | <Reference name="log4net" path="../../../../bin/"/> |
3185 | 3186 | ||
3186 | <Files> | 3187 | <Files> |
3187 | <Match pattern="*.cs" recurse="true"/> | 3188 | <Match pattern="*.cs" recurse="true"/> |
@@ -3192,58 +3193,4 @@ | |||
3192 | 3193 | ||
3193 | </Solution> | 3194 | </Solution> |
3194 | 3195 | ||
3195 | <!-- Prebuild tool --> | ||
3196 | <Solution name="Prebuild" path="Prebuild/" > | ||
3197 | <Configuration name="Debug"> | ||
3198 | <Options> | ||
3199 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
3200 | <OptimizeCode>false</OptimizeCode> | ||
3201 | <OutputPath>bin/Debug</OutputPath> | ||
3202 | <DebugInformation>true</DebugInformation> | ||
3203 | <SuppressWarnings>1595</SuppressWarnings> | ||
3204 | </Options> | ||
3205 | </Configuration> | ||
3206 | <Configuration name="Release"> | ||
3207 | <Options> | ||
3208 | <CompilerDefines>TRACE</CompilerDefines> | ||
3209 | <OutputPath>bin/Release</OutputPath> | ||
3210 | <OptimizeCode>true</OptimizeCode> | ||
3211 | <DebugInformation>false</DebugInformation> | ||
3212 | <SuppressWarnings>1595</SuppressWarnings> | ||
3213 | </Options> | ||
3214 | </Configuration> | ||
3215 | |||
3216 | <Project frameworkVersion="v3_5" name="Prebuild" path="src/" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild"> | ||
3217 | <Configuration name="Debug"> | ||
3218 | <Options> | ||
3219 | <CompilerDefines>DEBUG;TRACE</CompilerDefines> | ||
3220 | <OptimizeCode>false</OptimizeCode> | ||
3221 | <OutputPath>..\..\bin\</OutputPath> | ||
3222 | <DebugInformation>true</DebugInformation> | ||
3223 | <KeyFile>Prebuild.snk</KeyFile> | ||
3224 | <SuppressWarnings>1595</SuppressWarnings> | ||
3225 | </Options> | ||
3226 | </Configuration> | ||
3227 | <Configuration name="Release"> | ||
3228 | <Options> | ||
3229 | <CompilerDefines>TRACE</CompilerDefines> | ||
3230 | <OutputPath>..\..\bin\</OutputPath> | ||
3231 | <OptimizeCode>true</OptimizeCode> | ||
3232 | <DebugInformation>false</DebugInformation> | ||
3233 | <KeyFile>Prebuild.snk</KeyFile> | ||
3234 | <SuppressWarnings>1595</SuppressWarnings> | ||
3235 | </Options> | ||
3236 | </Configuration> | ||
3237 | <ReferencePath>../../bin/</ReferencePath> | ||
3238 | <Reference name="System.EnterpriseServices" /> | ||
3239 | <Reference name="System.Xml" /> | ||
3240 | <Reference name="System" /> | ||
3241 | <Files> | ||
3242 | <Match pattern="App.ico" buildAction="EmbeddedResource"/> | ||
3243 | <Match path="data" pattern="prebuild-1.7.xsd" buildAction="EmbeddedResource"/> | ||
3244 | <Match pattern="*.cs" recurse="true"/> | ||
3245 | </Files> | ||
3246 | </Project> | ||
3247 | |||
3248 | </Solution> | ||
3249 | </Prebuild> | 3196 | </Prebuild> |
diff --git a/runprebuild.sh b/runprebuild.sh index 3e1417a..b3b5c9d 100755 --- a/runprebuild.sh +++ b/runprebuild.sh | |||
@@ -1,7 +1,4 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | mono bin/Prebuild.exe /target nant | 3 | mono bin/Prebuild.exe /target nant |
4 | # needed until we break up OpenSim.exe | ||
5 | perl -pi -e 's{OpenSim.dll}{OpenSim.exe}' OpenSim/ApplicationPlugins/LoadRegions/OpenSim.ApplicationPlugins.LoadRegions.dll.build | ||
6 | mono bin/Prebuild.exe /target monodev | ||
7 | mono bin/Prebuild.exe /target vs2008 | 4 | mono bin/Prebuild.exe /target vs2008 |