From 0f16612400ed959146362810fb21d32656c9b844 Mon Sep 17 00:00:00 2001 From: justincc Date: Wed, 13 Nov 2013 00:00:55 +0000 Subject: Fix runprebuild.bat on Windows 7 systems and later MS changed Windows 7 "reg query" command to spit out fewer lines in its preamble Annoyingly there is no option to print raw values and not this preamble. So now using the Windows find command. But this has the side effect of stopping this working with Cygwin as it uses its own GNU find command. Might fix in the future but not simple since Windows find itself is in different locations --- runprebuild.bat | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/runprebuild.bat b/runprebuild.bat index 0fd7bbf..5f75982 100755 --- a/runprebuild.bat +++ b/runprebuild.bat @@ -7,18 +7,24 @@ setlocal ENABLEEXTENSIONS set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" set VALUE_NAME=MSBuildToolsPath -FOR /F "usebackq skip=4 tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO ( +rem We have to use find here as req query spits out 4 lines before Windows 7 +rem But 2 lines after Windows 7. Unfortunately, this screws up cygwin +rem as it uses its own find command. This could be fixed but it could be +rem complex to find the location of find on all windows systems +FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| FIND "%VALUE_NAME%"`) DO ( set ValueName=%%A set ValueType=%%B set ValueValue=%%C ) if defined ValueName ( + @echo Found msbuild path registry entry @echo Value Name = %ValueName% @echo Value Type = %ValueType% @echo Value Value = %ValueValue% + @echo Creating compile.bat + @echo %ValueValue%\msbuild opensim.sln > compile.bat ) else ( @echo %KEY_NAME%\%VALUE_NAME% not found. + @echo Not creating compile.bat ) - -@echo %ValueValue%\msbuild opensim.sln > compile.bat -- cgit v1.1 From 4563e7e04ae1497178c62b0229aa538bcf6b772d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 13 Nov 2013 00:25:41 +0000 Subject: Get runprebuild.sh to generate a vs2010 for xbuild to work with .NET 4 rather than vs2008 At least since 2009, Monodevelop has been able to load vs2010 files as well --- runprebuild.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/runprebuild.sh b/runprebuild.sh index d276edb..8c18db6 100755 --- a/runprebuild.sh +++ b/runprebuild.sh @@ -22,21 +22,11 @@ case "$1" in ;; - - 'vs2008') - - mono bin/Prebuild.exe /target vs2008 - - ;; - - *) mono bin/Prebuild.exe /target nant - mono bin/Prebuild.exe /target vs2008 + mono bin/Prebuild.exe /target vs2010 ;; - esac - -- cgit v1.1 From 869a23e2234ce9b565249c5850324ca2de2f06ba Mon Sep 17 00:00:00 2001 From: justincc Date: Wed, 13 Nov 2013 01:07:14 +0000 Subject: Update OpenSim.32BitLaunch.exe and Robust.32BitLaunch.exe to .NET 4 versions. Also fixes some issues in associated solution files --- .../OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj | 141 +++++++++++++------- .../Robust.32BitLaunch/Robust.32BitLaunch.csproj | 147 +++++++++++++-------- .../Robust.32BitLaunch/Robust.32BitLaunch.sln | 40 +++--- bin/OpenSim.32BitLaunch.exe | Bin 5632 -> 5632 bytes bin/Robust.32BitLaunch.exe | Bin 5632 -> 5632 bytes 5 files changed, 202 insertions(+), 126 deletions(-) mode change 100644 => 100755 bin/Robust.32BitLaunch.exe diff --git a/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj b/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj index d829e69..4625c33 100644 --- a/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj +++ b/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj @@ -1,58 +1,97 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {595D67F3-B413-4A43-8568-5B5930E3B31D} - Exe - Properties - OpenSim._32BitLaunch - OpenSim.32BitLaunch - v2.0 - 512 - - - true - full - false - ..\..\..\bin\ - DEBUG;TRACE - prompt - 4 - x86 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - {438A9556-0000-0000-0000-000000000000} - OpenSim - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {595D67F3-B413-4A43-8568-5B5930E3B31D} + Exe + Properties + OpenSim._32BitLaunch + OpenSim.32BitLaunch + v4.0 + 512 + + + + + 3.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + ..\..\..\bin\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + False + .exe + ..\..\..\bin\OpenSim.exe + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + --> \ No newline at end of file diff --git a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj index 481b3f8..9618c08 100644 --- a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj +++ b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.csproj @@ -1,62 +1,99 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {595D67F3-B413-4A43-8568-5B5930E3B31D} - Exe - Properties - Robust._32BitLaunch - Robust.32BitLaunch - v3.5 - 512 - - - true - full - false - ..\..\..\bin\ - DEBUG;TRACE - prompt - 4 - x86 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\bin\log4net.dll - - - False - ..\..\..\bin\Robust.exe - - - - 3.5 - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {595D67F3-B413-4A43-8568-5B5930E3B31D} + Exe + Properties + Robust._32BitLaunch + Robust.32BitLaunch + v4.0 + 512 + + + + + 3.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + ..\..\..\bin\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\bin\log4net.dll + + + False + ..\..\..\bin\Robust.exe + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + --> \ No newline at end of file diff --git a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.sln b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.sln index c7c97b1..a48a2d3 100644 --- a/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.sln +++ b/OpenSim/Tools/Robust.32BitLaunch/Robust.32BitLaunch.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C# Express 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.32BitLaunch", "Robust.32BitLaunch.csproj", "{595D67F3-B413-4A43-8568-5B5930E3B31D}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {595D67F3-B413-4A43-8568-5B5930E3B31D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {595D67F3-B413-4A43-8568-5B5930E3B31D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {595D67F3-B413-4A43-8568-5B5930E3B31D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {595D67F3-B413-4A43-8568-5B5930E3B31D}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C# Express 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Robust.32BitLaunch", "Robust.32BitLaunch.csproj", "{595D67F3-B413-4A43-8568-5B5930E3B31D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {595D67F3-B413-4A43-8568-5B5930E3B31D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {595D67F3-B413-4A43-8568-5B5930E3B31D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {595D67F3-B413-4A43-8568-5B5930E3B31D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {595D67F3-B413-4A43-8568-5B5930E3B31D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/bin/OpenSim.32BitLaunch.exe b/bin/OpenSim.32BitLaunch.exe index cc73c8b..62c14af 100755 Binary files a/bin/OpenSim.32BitLaunch.exe and b/bin/OpenSim.32BitLaunch.exe differ diff --git a/bin/Robust.32BitLaunch.exe b/bin/Robust.32BitLaunch.exe old mode 100644 new mode 100755 index 4d2698b..affedb4 Binary files a/bin/Robust.32BitLaunch.exe and b/bin/Robust.32BitLaunch.exe differ -- cgit v1.1 From 7da10850b063d4b31ad48cf3448b9a76bc5bd835 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 13 Nov 2013 23:25:54 +0000 Subject: Fix bug where removing a physical linkset would only decrement the Active Objects statistic by 1 instead of by the number of prims removed. Unlike LL, OpenSimulator currently uses this stat to record the number of prims in the physics simulation, even when they are at rest. Added regression test for this case. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 +- .../Framework/Scenes/Tests/SceneStatisticsTests.cs | 71 ++++++++++++++++++++++ 2 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 0a5bfd2..1aecce5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -519,12 +519,12 @@ namespace OpenSim.Region.Framework.Scenes protected internal void AddPhysicalPrim(int number) { - m_physicalPrim++; + m_physicalPrim += number; } protected internal void RemovePhysicalPrim(int number) { - m_physicalPrim--; + m_physicalPrim -= number; } protected internal void AddToScriptLPS(int number) diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs new file mode 100644 index 0000000..1667002 --- /dev/null +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneStatisticsTests.cs @@ -0,0 +1,71 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Reflection; +using NUnit.Framework; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Communications; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Tests.Common; +using OpenSim.Tests.Common.Mock; + +namespace OpenSim.Region.Framework.Scenes.Tests +{ + [TestFixture] + public class SceneStatisticsTests : OpenSimTestCase + { + private TestScene m_scene; + + [SetUp] + public void Init() + { + m_scene = new SceneHelpers().SetupScene(); + } + + [Test] + public void TestAddRemovePhysicalLinkset() + { + Assert.That(m_scene.SceneGraph.GetActiveObjectsCount(), Is.EqualTo(0)); + + UUID ownerId = TestHelpers.ParseTail(0x1); + SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(3, ownerId, "so1", 0x10); + so1.ScriptSetPhysicsStatus(true); + m_scene.AddSceneObject(so1); + + Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(3)); + Assert.That(m_scene.SceneGraph.GetActiveObjectsCount(), Is.EqualTo(3)); + + m_scene.DeleteSceneObject(so1, false); + + Assert.That(m_scene.SceneGraph.GetTotalObjectsCount(), Is.EqualTo(0)); + Assert.That(m_scene.SceneGraph.GetActiveObjectsCount(), Is.EqualTo(0)); + } + } +} \ No newline at end of file -- cgit v1.1