mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-22 05:23:34 +00:00
fix: Create resServer and logs if it doesnt exist and update readme (#1686)
* create resServer if not exist * Update README.md * Update README.md
This commit is contained in:
parent
15dc5feeb5
commit
fced6d753a
11
README.md
11
README.md
@ -24,13 +24,14 @@ Darkflame Universe is a server emulator and does not distribute any LEGO® Unive
|
|||||||
Warning: WSL version 1 does NOT support using sqlite as a database due to how it handles filesystem synchronization.
|
Warning: WSL version 1 does NOT support using sqlite as a database due to how it handles filesystem synchronization.
|
||||||
You must use Version 2 if you must run the server under WSL. Not doing so will result in save data loss.
|
You must use Version 2 if you must run the server under WSL. Not doing so will result in save data loss.
|
||||||
* Single player installs now no longer require building the server from source or installing development tools.
|
* Single player installs now no longer require building the server from source or installing development tools.
|
||||||
* Download the [latest release](https://github.com/DarkflameUniverse/DarkflameServer/releases) and extract the files into a folder inside your client.
|
* Download the [latest windows release](https://github.com/DarkflameUniverse/DarkflameServer/releases) (or whichever release you need) and extract the files into a folder inside your client. Note that this setup is expecting that when double clicking the folder that you put in the same folder as `legouniverse.exe`, the file `MasterServer.exe` is in there.
|
||||||
* You should be able to see the folder with the server executables in the same folder as `legouniverse.exe`.
|
* You should be able to see the folder with the server files in the same folder as `legouniverse.exe`.
|
||||||
* Open `sharedconfig.ini` and find the line that says `client_location` and put `..` after it so the line reads `client_location=..`.
|
* Go into the server files folder and open `sharedconfig.ini`. Find the line that says `client_location` and put `..` after it so the line reads `client_location=..`.
|
||||||
* To run the server, double-click `MasterServer.exe`.
|
* To run the server, double-click `MasterServer.exe`.
|
||||||
* You will be asked to create an account the first time you run the server.
|
* You will be asked to create an account the first time you run the server. After you have created the account, the server will shutdown and need to be restarted.
|
||||||
|
* To connect to the server, either delete the file `boot.cfg` which is found in your LEGO Universe client, rename the file `boot.cfg` to something else or follow the steps [here](#allowing-a-user-to-connect-to-your-server) if you wish to keep the file.
|
||||||
* When shutting down the server, it is highly recommended to click the `MasterServer.exe` window and hold `ctrl` while pressing `c` to stop the server.
|
* When shutting down the server, it is highly recommended to click the `MasterServer.exe` window and hold `ctrl` while pressing `c` to stop the server.
|
||||||
* We are working on a way to make it so when you close the game, the server saves automatically alongside when you open the game, the server starts automatically.
|
* We are working on a way to make it so when you close the game, the server stops automatically alongside when you open the game, the server starts automatically.
|
||||||
|
|
||||||
<font size="32">**If you are not planning on hosting a server for others, working in the codebase or wanting to use MariaDB for a database, you can stop reading here.**</font>
|
<font size="32">**If you are not planning on hosting a server for others, working in the codebase or wanting to use MariaDB for a database, you can stop reading here.**</font>
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
MigrationRunner::RunMigrations();
|
MigrationRunner::RunMigrations();
|
||||||
const auto resServerPath = BinaryPathFinder::GetBinaryDir() / "resServer";
|
const auto resServerPath = BinaryPathFinder::GetBinaryDir() / "resServer";
|
||||||
|
std::filesystem::create_directories(resServerPath);
|
||||||
const bool cdServerExists = std::filesystem::exists(resServerPath / "CDServer.sqlite");
|
const bool cdServerExists = std::filesystem::exists(resServerPath / "CDServer.sqlite");
|
||||||
const bool oldCDServerExists = std::filesystem::exists(Game::assetManager->GetResPath() / "CDServer.sqlite");
|
const bool oldCDServerExists = std::filesystem::exists(Game::assetManager->GetResPath() / "CDServer.sqlite");
|
||||||
const bool fdbExists = std::filesystem::exists(Game::assetManager->GetResPath() / "cdclient.fdb");
|
const bool fdbExists = std::filesystem::exists(Game::assetManager->GetResPath() / "cdclient.fdb");
|
||||||
|
@ -13,7 +13,7 @@ void Server::SetupLogger(const std::string_view serviceName) {
|
|||||||
|
|
||||||
const auto logsDir = BinaryPathFinder::GetBinaryDir() / "logs";
|
const auto logsDir = BinaryPathFinder::GetBinaryDir() / "logs";
|
||||||
|
|
||||||
if (!std::filesystem::exists(logsDir)) std::filesystem::create_directory(logsDir);
|
if (!std::filesystem::exists(logsDir)) std::filesystem::create_directories(logsDir);
|
||||||
|
|
||||||
std::string logPath = (logsDir / serviceName).string() + "_" + std::to_string(time(nullptr)) + ".log";
|
std::string logPath = (logsDir / serviceName).string() + "_" + std::to_string(time(nullptr)) + ".log";
|
||||||
bool logToConsole = false;
|
bool logToConsole = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user