Fixes readmes and adds some convenience scripts (#107)

This commit is contained in:
Kamron Batman 2020-04-13 01:54:37 -07:00 committed by GitHub
parent ec829316c9
commit e4037d2541
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 120 additions and 37 deletions

15
FAQ.md Normal file
View file

@ -0,0 +1,15 @@
# Frequently Asked Questions
- [Where do I go to run ModernUO?](#where-do-i-go-to-run-modernuo)
- [I don't see my scripts compiling, what happened?](#i-dont-see-my-scripts-compiling-what-happened)
- [Why can't I run ModernUO on a 32-bit operating system?](#why-cant-i-run-modernuo-on-a-32-bit-operating-system)
## Where do I go to run ModernUO?
Everything is run from the `Distribution` directory.
This folder is portable, so it can be moved to the production server for deployments.
## I don't see my scripts compiling, what happened?
NET Core does not support dynamic compiling. Scripts are now compiled separately and moved to the `Distribution/Assemblies` directory.
This also allows content to be divided into `modules` that can be included by dropping in the DLL.
## Why can't I run ModernUO on a 32-bit operating system?
ModernUO is optimized for performance and modern hardware.

View file

@ -51,8 +51,6 @@ namespace Server.Network
DisplayListener(ipep); DisplayListener(ipep);
} }
options.ListenLocalhost(2593, builder => { builder.UseConnectionHandler<ServerConnectionHandler>(); });
// Webservices here // Webservices here
}) })
.UseLibuv() .UseLibuv()

View file

@ -3,55 +3,50 @@ ModernUO
Ultima Online Server Emulator for the modern era! Ultima Online Server Emulator for the modern era!
### Join and Follow! ## Join and Follow!
[Discord Channel](https://discord.gg/VdyCpjQ) - [Discord Channel](https://discord.gg/VdyCpjQ)
[Twitter](https://www.twitter.com/modernuo) - [Twitter](https://www.twitter.com/modernuo)
[Reddit](https://www.reddit.com/r/modernuo) - [Reddit](https://www.reddit.com/r/modernuo)
### Goals ## Goals
- See [Goals](./GOALS.md) - See [Goals](./GOALS.md)
# Requirements to Compile
## Publishing a build
#### Requirements
- [.NET Core 3.1 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.1) - [.NET Core 3.1 SDK](https://dotnet.microsoft.com/download/dotnet-core/3.1)
### Requirements to Run #### Cleaning
- Linux or OSX: `./clean.sh`
- Windows: `clean.cmd`
#### Linux #### Publishing
- `apt get zlib libuv` or equiv for that distribution - Linux: `./publish-linux.sh` or `publish-linux.cmd`
- Optional: compile and install [Intel DRNG](https://github.com/modernuo/libdrng) - OSX: `./publish-osx.sh` or `publish-osx.cmd`
#### OSX - Windows `./publish-windows.sh` or `publish-windows.cmd`
- `brew install zlib libuv`
- Optional: compile and install [Intel DRNG](https://github.com/modernuo/libdrng)
### Building with .NET Core SDK ## Deploying / Running Server
`dotnet publish /p:PublishProfile=[platform][-SelfContained]`
- `platform` can be `Windows`, `Linux`, or `OSX` (capitalization matters)
- Appending `-SelfContained` will export all .NET Core files required to run portably.
### Running
- Follow the build instructions - Follow the build instructions
- Go to `Distribution` directory - Copy `Distribution` directory to production server
##### Windows #### Requirements
- [.NET Core 3.1 Runtime](https://dotnet.microsoft.com/download/dotnet-core/3.1)
- Zlib
- Linux: `apt get zlib` or equiv for that distribution
- OSX: `brew install zlib`
- Windows is included during publishing
- Optional: compile and install [Intel DRNG](https://github.com/modernuo/libdrng)
#### Windows
- Run `ModernUO.exe` or `dotnet ModernUO.dll` - Run `ModernUO.exe` or `dotnet ModernUO.dll`
##### OSX or Linux #### OSX and Linux
- Run `./ModernUO` or `dotnet ./ModernUO.dll` - Run `./ModernUO` or `dotnet ./ModernUO.dll`
### Thanks ## Thanks
- RunUO Team & Community - RunUO Team & Community
- ServUO Team & Community - ServUO Team & Community
- [Jaedan](https://github.com/jaedan) and the ClassicUO Community - [Jaedan](https://github.com/jaedan) and the ClassicUO Community
### Troubleshooting / FAQ ## Troubleshooting / FAQ
- See [FAQ](./FAQ.md)
##### Where do I go to run ModernUO?
Everything is run from the `Distribution` directory.
This folder is portable, so it can be moved to the production server for deployments.
##### My scripts folder is not compiling during runtime, what happened?
NET Core does not support dynamic compiling. Scripts are now compiled separately and moved to the `Distribution/Assemblies` directory.
This also allows us to divide content into packages that can be included by dropping in the DLL.
##### Why can't I run ModernUO on a 32-bit operating system?
ModernUO is optimized for performance and modern hardware.

36
clean.cmd Executable file
View file

@ -0,0 +1,36 @@
del /f .\Distribution\Assemblies\BouncyCastle.Crypto.dll
del /f .\Distribution\Assemblies\MailKit.dll
del /f .\Distribution\Assemblies\Microsoft.AspNetCore.Connections.Abstractions.dll
del /f .\Distribution\Assemblies\Microsoft.AspNetCore.Http.Features.dll
del /f .\Distribution\Assemblies\Microsoft.Extensions.Configuration.Abstractions.dll
del /f .\Distribution\Assemblies\Microsoft.Extensions.DependencyInjection.Abstractions.dll
del /f .\Distribution\Assemblies\Microsoft.Extensions.FileProviders.Abstractions.dll
del /f .\Distribution\Assemblies\Microsoft.Extensions.Hosting.Abstractions.dll
del /f .\Distribution\Assemblies\Microsoft.Extensions.Logging.Abstractions.dll
del /f .\Distribution\Assemblies\Microsoft.Extensions.Primitives.dll
del /f .\Distribution\Assemblies\MimeKit.dll
del /f .\Distribution\Assemblies\System.IO.Pipelines.dll
del /f .\Distribution\libdrng.dll
del /f .\Distribution\libuv.dll
del /f .\Distribution\libuv.so
del /f .\Distribution\Microsoft.AspNetCore.Connections.Abstractions.dll
del /f .\Distribution\Microsoft.AspNetCore.Http.Features.dll
del /f .\Distribution\Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.dll
del /f .\Distribution\Microsoft.Extensions.Configuration.Abstractions.dll
del /f .\Distribution\Microsoft.Extensions.DependencyInjection.Abstractions.dll
del /f .\Distribution\Microsoft.Extensions.FileProviders.Abstractions.dll
del /f .\Distribution\Microsoft.Extensions.Hosting.Abstractions.dll
del /f .\Distribution\Microsoft.Extensions.Logging.Abstractions.dll
del /f .\Distribution\Microsoft.Extensions.Options.dll
del /f .\Distribution\Microsoft.Extensions.Primitives.dll
del /f .\Distribution\ModernUO
del /f .\Distribution\ModernUO.deps.json
del /f .\Distribution\ModernUO.dll
del /f .\Distribution\ModernUO.dll.config
del /f .\Distribution\ModernUO.exe
del /f .\Distribution\ModernUO.pdb
del /f .\Distribution\ModernUO.runtimeconfig.dev.json
del /f .\Distribution\ModernUO.runtimeconfig.json
del /f .\Distribution\System.IO.Pipelines.dll
del /f .\Distribution\zlib.dll

36
clean.sh Executable file
View file

@ -0,0 +1,36 @@
rm -f Distribution/Assemblies/BouncyCastle.Crypto.dll
rm -f Distribution/Assemblies/MailKit.dll
rm -f Distribution/Assemblies/Microsoft.AspNetCore.Connections.Abstractions.dll
rm -f Distribution/Assemblies/Microsoft.AspNetCore.Http.Features.dll
rm -f Distribution/Assemblies/Microsoft.Extensions.Configuration.Abstractions.dll
rm -f Distribution/Assemblies/Microsoft.Extensions.DependencyInjection.Abstractions.dll
rm -f Distribution/Assemblies/Microsoft.Extensions.FileProviders.Abstractions.dll
rm -f Distribution/Assemblies/Microsoft.Extensions.Hosting.Abstractions.dll
rm -f Distribution/Assemblies/Microsoft.Extensions.Logging.Abstractions.dll
rm -f Distribution/Assemblies/Microsoft.Extensions.Primitives.dll
rm -f Distribution/Assemblies/MimeKit.dll
rm -f Distribution/Assemblies/System.IO.Pipelines.dll
rm -f Distribution/libdrng.dll
rm -f Distribution/libuv.dll
rm -f Distribution/libuv.so
rm -f Distribution/Microsoft.AspNetCore.Connections.Abstractions.dll
rm -f Distribution/Microsoft.AspNetCore.Http.Features.dll
rm -f Distribution/Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.dll
rm -f Distribution/Microsoft.Extensions.Configuration.Abstractions.dll
rm -f Distribution/Microsoft.Extensions.DependencyInjection.Abstractions.dll
rm -f Distribution/Microsoft.Extensions.FileProviders.Abstractions.dll
rm -f Distribution/Microsoft.Extensions.Hosting.Abstractions.dll
rm -f Distribution/Microsoft.Extensions.Logging.Abstractions.dll
rm -f Distribution/Microsoft.Extensions.Options.dll
rm -f Distribution/Microsoft.Extensions.Primitives.dll
rm -f Distribution/ModernUO
rm -f Distribution/ModernUO.deps.json
rm -f Distribution/ModernUO.dll
rm -f Distribution/ModernUO.dll.config
rm -f Distribution/ModernUO.exe
rm -f Distribution/ModernUO.pdb
rm -f Distribution/ModernUO.runtimeconfig.dev.json
rm -f Distribution/ModernUO.runtimeconfig.json
rm -f Distribution/System.IO.Pipelines.dll
rm -f Distribution/zlib.dll

1
publish-linux.cmd Executable file
View file

@ -0,0 +1 @@
dotnet publish /p:PublishProfile=Linux

1
publish-osx.cmd Executable file
View file

@ -0,0 +1 @@
dotnet publish /p:PublishProfile=OSX

0
Publish-Windows.cmd → publish-windows.cmd Normal file → Executable file
View file

1
publish-windows.sh Executable file
View file

@ -0,0 +1 @@
dotnet publish /p:PublishProfile=Windows