From 0f16612400ed959146362810fb21d32656c9b844 Mon Sep 17 00:00:00 2001 From: justincc Date: Wed, 13 Nov 2013 00:00:55 +0000 Subject: [PATCH 1/4] 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 0fd7bbff4d..5f75982e79 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 From 4563e7e04ae1497178c62b0229aa538bcf6b772d Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 13 Nov 2013 00:25:41 +0000 Subject: [PATCH 2/4] 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 d276edbee4..8c18db6867 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 - From 869a23e2234ce9b565249c5850324ca2de2f06ba Mon Sep 17 00:00:00 2001 From: justincc Date: Wed, 13 Nov 2013 01:07:14 +0000 Subject: [PATCH 3/4] Update OpenSim.32BitLaunch.exe and Robust.32BitLaunch.exe to .NET 4 versions. Also fixes some issues in associated solution files --- .../OpenSim.32BitLaunch.csproj | 141 +++++++++++------ .../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 d829e693e8..4625c330e0 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 481b3f8486..9618c08500 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 c7c97b1d93..a48a2d34fc 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 cc73c8bc981264031193f9d8f48d083ff8801d0d..62c14af416b823e435f976ca503ed51974f3c899 100755 GIT binary patch delta 1303 zcmZ9MUu@G=6vw~!_Rm|qQSK8ko zjfq`mLKI1)Tw^qm5u!0+@-S?C&}gy{cruX}jrgF(7ekDRlLr%h0KdN8f}D2Z}Tmx*s#u-VHUmp-yk8c2SSr z2=E7)qT6d^fb8~}{m=WDd9ogD*IH;^n`M2Zk0I~ZLyC{g>Mz;0sf`QWD!W^i+tO0$ z3xz|GaHRKnE*~~z$w3JOUI(tT@8-4walM$yr%Oh}cQ)WI7Zf-a$MpulO+Lj8_BMEiaD zt8}5k@{pExVNpk{dc}tcoWK)El0IZio;Fz~x8f~wJF29c>$)v><0^iTdvFc^$N}8I zIPa?wUdte9#DvgN-^3qs6L2xbizB8;afiah_?uuqgg>14s!l~TG7=PX4?^EA9wzYQ% zJU*lAh5nu%t&qx>GP${IQrC(ht(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F-ZV5FSAf9!G(`S-N;i&?3ml1`wv`KJU% z6{##Xq-fh`_J(Po<@@X+juAwILEgwUm?o>kbN+1&}G?}0Wfj^jvgfo4qU_3mZ zOkFEPw1cehtZa)J?dOBqN%Jf3`sttT+m1U0v8uDPOX9Vzkxh!Px_blt3`bozicU%dZOu>STH+8#~778)?&r#5h;D^m@>`^YlVG|)Jt>gr2!uG_4uax zmV3W#uMaOC_wC)iVvZ@_(S0ru%0}j+iNMulJRArG)8XuNAT}KeBxk~jbTob{63sj? zbes37(V@u7+*|XuYSvVkGaO+BS$-igy?AG8(YE0%JV4>MNzb{pqhPY^vbzs>f?rki#l;>RM_S~e#-QUqzEETqJ>YOp}DQ3F%i)SEz8c9A6I z*SS&BN|3<1NxrVC3q=Tmh%SN(qM&ZND69)Bkbd4Te+C_R{~n(6{+#pXgZbdZ<)X>K zy=~ff1>Fp2caJ+`0pJAqv;bcfO)a%|0(Oq)b^#SqrJziTYMQgki(hWh>Pe{OBT?JBt41=lRLxCKI0kW=_ej0_-uDchZR z*UXtax7g-B55pT(Hg9^EGPy;`uEX*hl^2(Bqm|_MN|(vo9<#2gX>t zpy3*YF@;%bz$})j3G+C{zqbuvNII1x>POVzJU-(vit=2VbDHohYIs0`8zVWYsN2sP zE&g|&GNwONo(uhvWuMSji(d&>n=Mqm5MOPb|5I{fX6V!h`PS+a&DU)Kk(9e_SLAP7 z!%1VKj8sO-QI0lXd%mAa9WxN From 7da10850b063d4b31ad48cf3448b9a76bc5bd835 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 13 Nov 2013 23:25:54 +0000 Subject: [PATCH 4/4] 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 +- .../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 0a5bfd2a5e..1aecce56f4 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 0000000000..16670029c0 --- /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