From e4037d25415e66cf9a549263cc3b6738e3c9fc80 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Mon, 13 Apr 2020 01:54:37 -0700 Subject: [PATCH] Fixes readmes and adds some convenience scripts (#107) --- FAQ.md | 15 +++++ Projects/Server/Network/TcpServer.cs | 2 - README.md | 65 ++++++++++------------ clean.cmd | 36 ++++++++++++ clean.sh | 36 ++++++++++++ publish-linux.cmd | 1 + Publish-Linux.sh => publish-linux.sh | 0 publish-osx.cmd | 1 + Publish-OSX.sh => publish-osx.sh | 0 Publish-Windows.cmd => publish-windows.cmd | 0 publish-windows.sh | 1 + 11 files changed, 120 insertions(+), 37 deletions(-) create mode 100644 FAQ.md create mode 100755 clean.cmd create mode 100755 clean.sh create mode 100755 publish-linux.cmd rename Publish-Linux.sh => publish-linux.sh (100%) create mode 100755 publish-osx.cmd rename Publish-OSX.sh => publish-osx.sh (100%) rename Publish-Windows.cmd => publish-windows.cmd (100%) mode change 100644 => 100755 create mode 100755 publish-windows.sh diff --git a/FAQ.md b/FAQ.md new file mode 100644 index 000000000..2af8fc496 --- /dev/null +++ b/FAQ.md @@ -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. diff --git a/Projects/Server/Network/TcpServer.cs b/Projects/Server/Network/TcpServer.cs index ab14fc2c7..7353a589b 100644 --- a/Projects/Server/Network/TcpServer.cs +++ b/Projects/Server/Network/TcpServer.cs @@ -51,8 +51,6 @@ namespace Server.Network DisplayListener(ipep); } - options.ListenLocalhost(2593, builder => { builder.UseConnectionHandler(); }); - // Webservices here }) .UseLibuv() diff --git a/README.md b/README.md index 6616881f0..0bb1fa8e2 100644 --- a/README.md +++ b/README.md @@ -3,55 +3,50 @@ ModernUO Ultima Online Server Emulator for the modern era! -### Join and Follow! -[Discord Channel](https://discord.gg/VdyCpjQ) -[Twitter](https://www.twitter.com/modernuo) -[Reddit](https://www.reddit.com/r/modernuo) +## Join and Follow! +- [Discord Channel](https://discord.gg/VdyCpjQ) +- [Twitter](https://www.twitter.com/modernuo) +- [Reddit](https://www.reddit.com/r/modernuo) -### Goals +## Goals - 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) -### Requirements to Run +#### Cleaning +- Linux or OSX: `./clean.sh` +- Windows: `clean.cmd` -#### Linux -- `apt get zlib libuv` or equiv for that distribution -- Optional: compile and install [Intel DRNG](https://github.com/modernuo/libdrng) -#### OSX -- `brew install zlib libuv` -- Optional: compile and install [Intel DRNG](https://github.com/modernuo/libdrng) +#### Publishing +- Linux: `./publish-linux.sh` or `publish-linux.cmd` +- OSX: `./publish-osx.sh` or `publish-osx.cmd` +- Windows `./publish-windows.sh` or `publish-windows.cmd` -### Building with .NET Core SDK -`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 +## Deploying / Running Server - 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` -##### OSX or Linux +#### OSX and Linux - Run `./ModernUO` or `dotnet ./ModernUO.dll` -### Thanks +## Thanks - RunUO Team & Community - ServUO Team & Community - [Jaedan](https://github.com/jaedan) and the ClassicUO Community -### Troubleshooting / FAQ - -##### 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. +## Troubleshooting / FAQ +- See [FAQ](./FAQ.md) diff --git a/clean.cmd b/clean.cmd new file mode 100755 index 000000000..6210bca34 --- /dev/null +++ b/clean.cmd @@ -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 diff --git a/clean.sh b/clean.sh new file mode 100755 index 000000000..858b55304 --- /dev/null +++ b/clean.sh @@ -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 diff --git a/publish-linux.cmd b/publish-linux.cmd new file mode 100755 index 000000000..0d33bdd85 --- /dev/null +++ b/publish-linux.cmd @@ -0,0 +1 @@ +dotnet publish /p:PublishProfile=Linux diff --git a/Publish-Linux.sh b/publish-linux.sh similarity index 100% rename from Publish-Linux.sh rename to publish-linux.sh diff --git a/publish-osx.cmd b/publish-osx.cmd new file mode 100755 index 000000000..c36d25c29 --- /dev/null +++ b/publish-osx.cmd @@ -0,0 +1 @@ +dotnet publish /p:PublishProfile=OSX diff --git a/Publish-OSX.sh b/publish-osx.sh similarity index 100% rename from Publish-OSX.sh rename to publish-osx.sh diff --git a/Publish-Windows.cmd b/publish-windows.cmd old mode 100644 new mode 100755 similarity index 100% rename from Publish-Windows.cmd rename to publish-windows.cmd diff --git a/publish-windows.sh b/publish-windows.sh new file mode 100755 index 000000000..1292e613f --- /dev/null +++ b/publish-windows.sh @@ -0,0 +1 @@ +dotnet publish /p:PublishProfile=Windows