mirror of
https://github.com/OpenSim-NGC/OpenSim-Sasquatch.git
synced 2024-11-21 14:29:10 -07:00
change prebuild files as needed to compile and run under dotnet 6.0
This commit is contained in:
parent
5ea28ff530
commit
173ac39d71
11 changed files with 406 additions and 1100 deletions
18
BUILDING.md
18
BUILDING.md
|
@ -1,16 +1,16 @@
|
|||
# Building on Windows
|
||||
|
||||
## Requirements
|
||||
For building under Windows, the following is required:
|
||||
To building under Windows, the following is required:
|
||||
|
||||
* [Visual Studio .NET](https://visualstudio.microsoft.com/vs/features/net-development/), version 2015 or later
|
||||
* [Visual Studio .NET](https://visualstudio.microsoft.com/vs/features/net-development/), version 2019 or later
|
||||
|
||||
### Building
|
||||
To create the project files, run
|
||||
|
||||
```runprebuild.bat```
|
||||
|
||||
Load the generated OpenSim.sln into Visual Studio .NET and build the solution.
|
||||
Load the generated OpenSim.sln into Visual Studio and build the solution.
|
||||
|
||||
Configure, see below
|
||||
|
||||
|
@ -20,27 +20,19 @@ Now just run `OpenSim.exe` from the `bin` folder, and set up the region.
|
|||
|
||||
## Requirements
|
||||
|
||||
* [Mono > 5.0](https://www.mono-project.com/download/stable/#download-lin)
|
||||
* On some Linux distributions you may need to install additional packages.
|
||||
* msbuild or xbuild(deprecated) if still supported by the mono version
|
||||
* See [the wiki](http://opensimulator.org/wiki/Dependencies) for more information.
|
||||
* [dotnet 6.0 ADK and DeskTop runtime](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
|
||||
|
||||
### Building
|
||||
To create the project files, run:
|
||||
|
||||
```./runprebuild.sh```
|
||||
|
||||
then run ```msbuild``` or ```xbuild``` if xbuild was installed.
|
||||
then run dotnet build --configuration Release OpenSim.sln
|
||||
|
||||
Configure. See below
|
||||
|
||||
run `./opensim.sh` from the `bin` folder, and set up the region
|
||||
|
||||
For rebuilding and debugging use the msbuild option switches
|
||||
* clean: `msbuild /target:clean`
|
||||
* debug: (default) `msbuild /property:Configuration=Debug`
|
||||
* release: `msbuild /property:Configuration=Release`
|
||||
|
||||
|
||||
# Configure #
|
||||
## Standalone mode ##
|
||||
|
|
Binary file not shown.
|
@ -1,76 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
|
||||
</startup>
|
||||
<runtime>
|
||||
<loadFromRemoteSources enabled="true" />
|
||||
</runtime>
|
||||
<appSettings>
|
||||
</appSettings>
|
||||
<log4net>
|
||||
<appender name="Console" type="OpenSim.Framework.Console.OpenSimAppender, OpenSim.Framework.Console">
|
||||
<filter type="log4net.Filter.LoggerMatchFilter">
|
||||
<loggerToMatch value="special"/>
|
||||
<acceptOnMatch value="false"/>
|
||||
</filter>
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date{HH:mm:ss} - %message" />
|
||||
<!-- console log with milliseconds. Useful for debugging -->
|
||||
<!-- <conversionPattern value="%date{HH:mm:ss.fff} - %message" /> -->
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- If you want automatic log-rolling then use RollingFileAppender instead of FileAppender:
|
||||
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="log/OpenSim.log" />
|
||||
<rollingStyle value="Date" />
|
||||
<datePattern value="'.'yyyy-MM-dd"/>
|
||||
...
|
||||
-->
|
||||
|
||||
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
|
||||
<file value="OpenSim.log" />
|
||||
<appendToFile value="true" />
|
||||
<filter type="log4net.Filter.LoggerMatchFilter">
|
||||
<loggerToMatch value="special"/>
|
||||
<acceptOnMatch value="false"/>
|
||||
</filter>
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date %-5level - %logger %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<appender name="StatsLogFileAppender" type="log4net.Appender.FileAppender">
|
||||
<file value="OpenSimStats.log"/>
|
||||
<appendToFile value="true" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root>
|
||||
<level value="DEBUG" />
|
||||
<appender-ref ref="Console" />
|
||||
<appender-ref ref="LogFileAppender" />
|
||||
</root>
|
||||
|
||||
<!-- Independently control logging level for XEngine -->
|
||||
<logger name="OpenSim.Region.ScriptEngine.XEngine">
|
||||
<level value="INFO"/>
|
||||
</logger>
|
||||
|
||||
<!-- Independently control logging level for per region module loading -->
|
||||
<logger name="OpenSim.ApplicationPlugins.RegionModulesController.RegionModulesControllerPlugin">
|
||||
<level value="INFO"/>
|
||||
</logger>
|
||||
|
||||
<!-- used for stats recording -->
|
||||
<logger name="special.StatsLogger">
|
||||
<appender-ref ref="StatsLogFileAppender"/>
|
||||
</logger>
|
||||
</log4net>
|
||||
</configuration>
|
|
@ -1,5 +1,3 @@
|
|||
#!/bin/sh
|
||||
ulimit -s 1048576
|
||||
# next option may improve SGen gc (for opensim only) you may also need to increase nursery size on large regions
|
||||
#export MONO_GC_PARAMS="minor=split,promotion-age=14"
|
||||
mono --desktop -O=all OpenSim.exe
|
||||
dotnet OpenSim.dll
|
||||
|
|
17
cleanaot.sh
17
cleanaot.sh
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
cd bin
|
||||
rm Nini.dll.so
|
||||
rm DotNetOpen*.dll.so
|
||||
rm Ionic.Zip.dll.so
|
||||
rm Newtonsoft.Json.dll.so
|
||||
rm C5.dll.so
|
||||
rm CSJ2K.dll.so
|
||||
rm Npgsql.dll.so
|
||||
rm RestSharp.dll.so
|
||||
rm Mono*.dll.so
|
||||
rm MySql*.dll.so
|
||||
rm OpenMetaverse*.dll.so
|
||||
rm OpenSim*.dll.so
|
||||
rm OpenSim*.exe.so
|
||||
rm Robust*.exe.so
|
||||
cd ..
|
17
makeaot.sh
17
makeaot.sh
|
@ -1,17 +0,0 @@
|
|||
#!/bin/sh
|
||||
cd bin
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all Nini.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all DotNetOpen*.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all Ionic.Zip.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all Newtonsoft.Json.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all C5.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all CSJ2K.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all Npgsql.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all RestSharp.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all Mono*.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all MySql*.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all OpenMetaverse*.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all OpenSim*.dll
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all OpenSim*.exe
|
||||
mono --aot=mcpu=native,bind-to-runtime-version -O=all Robust*.exe
|
||||
cd ..
|
1233
prebuild.xml
1233
prebuild.xml
File diff suppressed because it is too large
Load diff
|
@ -1,61 +1,10 @@
|
|||
@echo OFF
|
||||
|
||||
bin\Prebuild.exe /target vs2015 /excludedir = "obj | bin"
|
||||
bin\Prebuild.exe /target vs2022 /targetframework net6_0 /excludedir = "obj | bin" /file prebuild.xml
|
||||
|
||||
setlocal ENABLEEXTENSIONS
|
||||
set VALUE_NAME=MSBuildToolsPath
|
||||
|
||||
if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles%
|
||||
if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)%
|
||||
|
||||
rem Try to find VS2019
|
||||
for %%e in (Enterprise Professional Community) do (
|
||||
if exist "%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild.exe" (
|
||||
|
||||
set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild"
|
||||
goto :found
|
||||
)
|
||||
)
|
||||
|
||||
rem try find vs2017
|
||||
for %%e in (Enterprise Professional Community) do (
|
||||
if exist "%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild.exe" (
|
||||
|
||||
set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild"
|
||||
goto :found
|
||||
)
|
||||
)
|
||||
|
||||
rem We have to use grep or find to locate the correct line, because reg query spits
|
||||
rem out 4 lines before Windows 7 but 2 lines after Windows 7.
|
||||
rem We use grep if it's on the path; otherwise we use the built-in find command
|
||||
rem from Windows. (We must use grep on Cygwin because it overrides the "find" command.)
|
||||
|
||||
for %%X in (grep.exe) do (set FOUNDGREP=%%~$PATH:X)
|
||||
if defined FOUNDGREP (
|
||||
set FINDCMD=grep
|
||||
) else (
|
||||
set FINDCMD=find
|
||||
)
|
||||
|
||||
rem try vs2015
|
||||
FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v %VALUE_NAME% 2^>nul ^| %FINDCMD% "%VALUE_NAME%"`) DO (
|
||||
set ValueValue=%%C\msbuild
|
||||
goto :found
|
||||
)
|
||||
|
||||
@echo msbuild for at least VS2015 not found, please install a (Community) edition of VS2017 or VS2015
|
||||
@echo Not creating compile.bat
|
||||
if exist "compile.bat" (
|
||||
del compile.bat
|
||||
)
|
||||
goto :done
|
||||
|
||||
:found
|
||||
@echo Found msbuild at %ValueValue%
|
||||
@echo Creating compile.bat
|
||||
rem To compile in debug mode
|
||||
@echo %ValueValue% opensim.sln > compile.bat
|
||||
@echo dotnet build --configuration Release OpenSim.sln > compile.bat
|
||||
rem To compile in release mode comment line (add rem to start) above and uncomment next (remove rem)
|
||||
rem @echo %ValueValue% /p:Configuration=Release opensim.sln > compile.bat
|
||||
:done
|
||||
|
|
|
@ -2,26 +2,24 @@
|
|||
|
||||
case "$1" in
|
||||
|
||||
'clean')
|
||||
'clean')
|
||||
mono bin/Prebuild.exe /file prebuild.xml /clean
|
||||
|
||||
mono bin/Prebuild.exe /clean
|
||||
;;
|
||||
|
||||
|
||||
'autoclean')
|
||||
|
||||
echo y|mono bin/Prebuild.exe /clean
|
||||
echo y|mono bin/Prebuild.exe /file prebuild.xml /clean
|
||||
|
||||
;;
|
||||
|
||||
|
||||
|
||||
*)
|
||||
|
||||
mono bin/Prebuild.exe /target nant
|
||||
mono bin/Prebuild.exe /target vs2015 /excludedir = "obj | bin"
|
||||
mono bin/Prebuild.exe /target vs2022 /targetframework net6_0 /excludedir = "obj | bin" /file prebuild.xml
|
||||
|
||||
;;
|
||||
|
||||
esac
|
||||
rm -fr bin/addin-db-002
|
||||
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
@echo OFF
|
||||
|
||||
bin\Prebuild.exe /target vs2019 /targetframework v4_8 /excludedir = "obj | bin"
|
||||
|
||||
setlocal ENABLEEXTENSIONS
|
||||
set VALUE_NAME=MSBuildToolsPath
|
||||
|
||||
if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles%
|
||||
if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)%
|
||||
|
||||
set PROGRAMS64 = %PROGRAMS%
|
||||
if defined ProgramFiles set PROGRAMS64=%ProgramFiles%
|
||||
|
||||
|
||||
rem Try to find VS2019/22
|
||||
for %%e in (Community Enterprise Professional) do (
|
||||
if exist "%PROGRAMS64%\Microsoft Visual Studio\2022\%%e\MSBuild\Current\Bin\MSBuild.exe" (
|
||||
|
||||
set ValueValue="%PROGRAMS64%\Microsoft Visual Studio\2022\%%e\MSBuild\Current\Bin\MSBuild"
|
||||
goto :found
|
||||
)
|
||||
if exist "%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild.exe" (
|
||||
|
||||
set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild"
|
||||
goto :found
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@echo msbuild for at least VS2019 not found, please install a (Community) edition of VS2019
|
||||
@echo Not creating compile.bat
|
||||
if exist "compile.bat" (
|
||||
del compile.bat
|
||||
)
|
||||
goto :done
|
||||
|
||||
:found
|
||||
@echo Found msbuild at %ValueValue%
|
||||
@echo Creating compile.bat
|
||||
rem To compile in debug mode
|
||||
@echo %ValueValue% opensim.sln > compile.bat
|
||||
rem To compile in release mode comment line (add rem to start) above and uncomment next (remove rem)
|
||||
rem @echo %ValueValue% /p:Configuration=Release opensim.sln > compile.bat
|
||||
:done
|
||||
if exist "bin\addin-db-002" (
|
||||
del /F/Q/S bin\addin-db-002 > NUL
|
||||
rmdir /Q/S bin\addin-db-002
|
||||
)
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
|
||||
'clean')
|
||||
|
||||
mono bin/Prebuild.exe /clean
|
||||
|
||||
;;
|
||||
|
||||
|
||||
'autoclean')
|
||||
|
||||
echo y|mono bin/Prebuild.exe /clean
|
||||
|
||||
;;
|
||||
|
||||
|
||||
|
||||
*)
|
||||
|
||||
mono bin/Prebuild.exe /target vs2019 /targetframework v4_8 /excludedir = "obj | bin"
|
||||
|
||||
;;
|
||||
|
||||
esac
|
Loading…
Reference in a new issue