Commit Graph

50 Commits

Author SHA1 Message Date
jadebenn
d78b50874c
chore: upgrade MacOS build settings for better C++20 compatibility (#1435)
* upgrade MacOS build settings for better C++20 compatibility

* add fixes I forgot

* 3rd try

* Update UserManager.cpp

* Update CMakeLists.txt

* End with newline

* Update CMakeLists.txt

* update to reflect feedback

* Update CMakeLists.txt to disable deprecation warnings on SHA512

* attempt to disable sqlite warnings

* revert last attempt (didn't work)

* disable sqlite deprecation warnings on MacOS
2024-01-29 21:45:50 -06:00
David Markowitz
ea5360cb99
fix: turn warnings into errors (#1425)
* Update PlayerContainer.cpp

fix: turn warnings into errors

for the few warnings we get, at least make sure we listen to them now on unix platforms.  Windows has too many right now to enable /WX

resolve warning

actually fix it

Update CMakeLists.txt

* detour pls

* Update CMakeLists.txt

* I HAVE 20 DOLLARS AND I NEED A WII GAME FOR MY KID

* I HAVE 0 DOLLARS NOW

* don't look don't look

* Revert "don't look don't look"

This reverts commit 5603eb5980.

* Revert "Revert "don't look don't look""

This reverts commit a334832a4d.

* could it be

* we found one (but its already reported)

not resolved yet though.

* Revert "don't look don't look"

This reverts commit 5603eb5980.

* ignore warning for file

* another one

* Update .gitmodules

* comments
2024-01-19 10:18:36 -06:00
jadebenn
4a50c60559
chore: Assorted pet improvements (#1402)
* Assorted pet improvements

* remove unecessary include

* updates to address some feedback

* fixed database code for testing

* Removed reference member (for now)

* Removed cmake flag
2024-01-08 15:32:09 -08:00
David Markowitz
0c104e819d
chore: Consolidate logger setup and add better handling of packets (#1389)
* Logger to Server class

Dont handle master packets from our clients

* move to namespace

Revert "remove extra headers"

This reverts commit ac7b901ece22165cdb0f38fca4be7d8fdf004de8.

remove extra headers

no changes otherwise.

* Merge branch 'main' into server_consolidation_of_work

* Update WorldServer.cpp

* fix submodule version

---------

Co-authored-by: Aaron Kimbre <aronwk.aaron@gmail.com>
2024-01-05 23:32:09 -06:00
David Markowitz
2804dc3ec2
fix: make include paths consistent (#1390)
* fix: bad header includes

tests pass

* fix-up more include paths
2024-01-05 06:33:52 -06:00
Daniel Seiler
d283bbd1c4
fix: split apart big Cmake libraries (#1381)
* fix: split apart big Cmake libraries

* fix: formatting

* fix: newline

* fix: add quotes
2024-01-03 18:41:46 -06:00
Aaron Kimbrell
9116317834
fix: improve our docker config (#1373)
* greatly simplify docker

* back to gcc since I can't the libs to load properly

* fix typo
add set -e to entrypoint
better copy of entrypoint.sh and use proper entrypoint

* use debian instead of gcc for runtime
comment and organize it a bit
drop gcc to 12 since we are using debian 12 as well

* explicitly include mariadb libs

* Make the server not crash in the case we are using only env-vars
make the dockerfile have configs in the expected location incase of bypassing entrypoint.sh

* remove unneede var from example, since it's in the container now

* coments to dockerfile

* Revert master server changes

* Resolve conflicting port options between chat, master, and world
move chat_server_port to shared since it's used by world and chat

* Don't error if file does not exists when updating a config option
move update before and use bin dir var
2024-01-03 02:36:17 -06:00
David Markowitz
b1134b340f
Add config update function (#1379)
Update CMakeLists.txt

FINALLY

dont ignore cmake module directory

move to separate file

very cool feature
tested that this still works

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
2024-01-02 18:25:57 -06:00
David Markowitz
1941679d27
feat: Bump standard to 20 (#1376)
* Bump to 20

* fix warnings and errors

* thanks RakNet
2024-01-02 07:53:00 +00:00
David Markowitz
e54faa3820
chore: organize build flags (#1371)
* chore: organize build flags

* Remove ambiguous include path

Don't be default incluyde bcrypt so you need to specify the folder.  Allows pre-processor to find the correct file.

* Revert settings

* working

f
2023-12-31 00:26:49 -06:00
jadebenn
fcf4d6c6fa
feat: Improve console output to show packet enum names (magic_enum) (#1344)
* add enum stringification functionality from third party source

* squashed commit

* Macros: Add test and improve speed

Space macros out
utilize cache locality
ensure no lost functionality

* moved stringify code to dCommon

* Rename #defines in stringify enum tests

* Revert "moved stringify code to dCommon"

This reverts commit 33fa5f8d2f.

* improve macro functionality

change function handle

formatting and function definition tweaks

* typo fixes

* moved code to dCommon/dEnums and tests to dCommonTests/dEnumsTests

* initial magic_enums alternate implementation of enum stringification

* deleted unused tests

* reverted compile flag oopsy and fixed output types

* fixed testing suite

* test formatting improvement

* formatting again :(

* added gm string to "aborting gm!" message

* Push my suggestion for CI tests.

* updated magic enum test

* fix test variable type

* added gm test

* making sure magic_enum is on a release branch

* tidying up console outputs

* re-implemented enum array access for performance

* now it is bugged :(

* nvm, working

* helping out the snowflake compilers

* changed return type too

* optimization too

* formatting too I guess because why not

* being even more painfully specific

* Update WorldServer.cpp to match emo's feedback

* Update MagicEnumTests.cpp to use srand(time(NULL))

* Update eGameMessageType.h - formatting

* Trying to fix the crash but can't actually compile the code to check on my own rn

* Update WorldServer.cpp - third try at this

* Update MagicEnumTests.cpp - use better macro definitions

* Update MagicEnumTests.cpp - c string comparison fix

* addressing all but the cmake feedback

* fixed cmake to the best of my very limited ability

* added tests to verify magic enum arrays are pre-sorted

* updated

---------

Co-authored-by: David Markowitz <EmosewaMC@gmail.com>
Co-authored-by: Jettford <mrjettbradford@gmail.com>
2023-12-23 10:51:59 -06:00
David Markowitz
c1e8546d48
fix: add Nexus Tower missing scripts (#1349)
add final missing scripts for nt

also fix the turnin for the breadcrumb missions not showing the completion window.

Fix another missing script

Add another script

fix include guards

Fix dirt clouds not appearing on mission accept
2023-12-22 23:53:21 -08:00
David Markowitz
7f623d358c
refactor: Database abstraction and organization of files (#1274)
* Database: Convert to proper namespace

* Database: Use base class and getter

* Database: Move files around

* Database: Add property Management query

Database: Move over user queries

Tested at gm 0 that pre-approved names are pre-approved, unapproved need moderator approval
deleting characters deletes the selcted one
refreshing the character page shows the last character you logged in as
tested all my characters show up when i login
tested that you can delete all 4 characters and the correct character is selected each time
tested renaming, approving names as gm0

Database: Add ugc model getter

Hey it works, look I got around the mariadb issue.

Database: Add queries

Database: consolidate name query

Database: Add friends list query

Update name of approved names query

Documentation

Database: Add name check

Database: Add BFF Query

Database: Move BFF Setter

Database: Move new friend query

Database: Add remove friend queries

Database: Add activity log

Database: Add ugc & prop content removal

Database: Add model update

Database: Add migration queries

Database: Add character and xml queries

Database: Add user queries

Untested, but compiling code

Need to test that new character names are properly assigned in the following scenarios
gm 0 and pre-approved name
gm 0 and unapproved name
gm 9 and pre-approved name
gm 9 and unapproved name

Database: constify function arguments

Database: Add pet queries

* Database: Move property model queries

Untested.  Need to test
placing a new model
moving existing one
removing ugc model
placing ugc model
moving ugc model(?)
changing privacy option variously
change description and name
approve property
can properly travel to property

* Property: Move stale reference deletion

* Database: Move performance update query

* Database: Add bug report query

* Database: Add cheat detection query

* Database: Add mail send query

* Untested code

need to test mailing from slash command, from all users of SendMail, getting bbb of a property and sending messages to bffs

* Update CDComponentsRegistryTable.h

Database: Rename and add further comments

Datavbase: Add comments

Add some comments

Build: Fix PCH directories

Database: Fix time

thanks apple

Database: Fix compiler warnings

Overload destructor
Define specialty for time_t
Use string instead of string_view for temp empty string

Update CDTable.h

Property: Update queries to use mapId

Database: Reorganize

Reorganize into CDClient folder and GameDatabase folder for clearer meanings and file structure

Folders: Rename to GameDatabase

MySQL: Remove MySQL Specifier from table

Database: Move Tables to Interfaces

Database: Reorder functions in header

Database: Simplify property queries

Database: Remove unused queries

Remove extra query definitions as well

Database: Consolidate User getters

Database: Comment logs

Update MySQLDatabase.cpp

Database: Use generic code

Playkey: Fix bad optional access

Database: Move stuff around

WorldServer: Update queries

Ugc reduced by many scopes
use new queries
very fast
tested that ugc still loads

Database: Add auth queries

I tested that only the correct password can sign into an account.
Tested that disabled playkeys do not allow the user to play the game

Database: Add donation query

Database: add objectId queries

Database: Add master queries

Database: Fix mis-named function

Database: Add slash command queries

Mail: Fix itemId type

CharFilter: Use new query

ObjectID: Remove duplicate code

SlashCommand: Update query with function

Database: Add mail queries

Ugc: Fix issues with saving models

Resolve large scope blocks as well

* Database: Add debug try catch rethrow macro

* General fixes

* fix play key not working

* Further fixes

---------

Co-authored-by: Aaron Kimbre <aronwk.aaron@gmail.com>
2023-11-17 18:47:18 -06:00
David Markowitz
01efa72aad
fix: Update navmeshes (#1229)
* re-add x and z checking for height

Now that we have better navmeshes, this will result in much better results and as such we can re-enable this check.

* Always run navmesh extraction

waste of time most of the time, but no other way to force update to the meshes easily.

* Navmeshes Version 2

- Add all missing zones
- Drastically improve several zones and their navmeshes, cleaning them up, making them more accurate and generally using more features of detour/recast.

* Update CMakeLists.txt

* update meshes

* Navmesh: Add pet cove navmesh

* Navmesh: Fix navmesh for fv
2023-10-27 23:19:43 -05:00
David Markowitz
c791d1a237
feature: Auto update of ini files (#1154)
* Add auto update of ini files

Tested that config options that currently exist are not modified.

Tested that if the exact variable name is not located in the destination ini, the config option is added along with all of its corresponding comments.

Comments in the build files are ignored to prevent any possible name collision with comments.

* Fix typos and empty file issue
2023-07-23 12:09:07 -07:00
David Markowitz
72c93c8913
Further implement Property Behavior parsing (#936)
Further implements the ControlBehavior processing and adds preparations for cheat detection
2023-02-13 18:55:44 -08:00
David Markowitz
fd9757d121
Implement a server res directory for server required client files (#891) 2022-12-21 22:34:11 -08:00
David Markowitz
bd7f532a28
Implement the Imaginite Backpack and Shard armor scripts (#886)
* Imaginite Pack now works

* Remove unused params

* Address issues

* Add TeslaPack script

Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
2022-12-21 14:33:41 -08:00
David Markowitz
56da3f8543
Remove Locale (#808)
* Remove Locale (finally)
2022-11-27 16:56:55 -08:00
David Markowitz
e2616c5f11
Move enums to a single directory
A technical change to move all emum files to a single directory
2022-11-26 14:22:00 -08:00
David Markowitz
1464762bcd
Implement GTest and change windows output path
Implement GTest as a testing infrastructure.
Make windows output binaries to the build folder instead of the release type folder (potentially issue further down the line)
Add a simple unit test for DestroyableComponent
2022-11-07 00:12:35 -08:00
David Markowitz
8d37d9b681
Organize dScripts (#814)
* Organize dScripts

whitespace

Remove parent scope

Remove parent scope from initial setter

Remove debug

Remove helper programs

* Fix NtImagimeterVisibility script

Co-authored-by: aronwk-aaron <aronwk.aaron@gmail.com>
2022-11-03 12:57:54 -05:00
David Markowitz
8edade5f98
Fix client paths (#811) 2022-11-02 20:30:35 -07:00
Aaron Kimbrell
353c328485
compile fixes and default client_location (#809)
* support for gcc9 on ubuntu 18.04
This is needed to make filesystem work

* fix default for client location
2022-11-02 22:05:52 -05:00
Jett
4a6f3e44ee
Add support for packed clients (#802)
* First iteration of pack reader and interface

* Fix memory leak and remove logs

* Complete packed asset interface and begin on file loading replacement

* Implement proper BinaryIO error

* Improve AssetMemoryBuffer for reading and implement more reading

* Repair more file loading code and improve how navmeshes are loaded

* Missing checks implementation

* Revert addition of Manifest class and migration changes

* Resolved all feedback.
2022-11-01 13:21:26 -05:00
David Markowitz
62213cd701
Implement basic functionality (#794)
Implements the basic functionality and parsing of property behaviors.

Unhandled messages and logged and discarded for the time being.  The only implemented message is a basic one that sends the needed info the the client side User Interface to pop up.

Tested that the User Interface properly shows up with zero behaviors on it.  No other functionality is changed.
2022-10-31 17:32:07 -05:00
David Markowitz
906887bda9
Add automatic cdclient migration runner support and setup (#789)
* Add automatic migrations for CDServer

Add support to automatically migrate and update CDServers with new migrations.  Also adds support to simplify the setup process by simply putting the fdb in the res folder and letting the server convert it to sqlite.

This reduces the amount of back and forth when setting up a server.

* Remove transaction language

* Add DML execution
`poggers`
Add a way to execute DML commands through the sqlite connection on the server.

* Make DML Commands more robust

On the off chance the server is shutdown before the whole migration is run, lets just not add it to our "finished list" until the whole file is done.

* Update README
2022-10-30 00:38:43 -07:00
Jett
a745cdb727
Implement a shared config between servers (#795)
* Implement a shared config between servers

* Auto move config file on CMake run
2022-10-29 16:17:35 -07:00
David Markowitz
63af2c8da7
Add ZLIB for Windows (#768)
Added ZLIB for Windows.  Packets for character creation are now compressed on windows before sending and ZCompression can now be used on Windows.
2022-09-05 20:28:47 -07:00
David Markowitz
c05562a227
Modularize CMakeLists for submodules (#736)
* Use RecastNavigation CMakeLists

* Use tinyxml2 CMakeLists

* Use bcrypt CMakeLists

* Move variable init to CMakeLists

This has to be done here to prevent missing dependency errors.

* General improvements

Only link dynamic if on gnu
use more thirdparty cmakes

* Disable tinyxml2 testing
2022-08-18 19:23:42 -07:00
Jett
e6c7f744b5
Implement terrain file reading to generate navmeshes in the future (#703)
* Implement terrain file reading to generate navmeshes in the future

* Make Emo's suggested changes.
2022-08-04 01:59:47 +01:00
Jett
9ee219ea42
Move Navmesh code away from dPhysics (#701) 2022-08-02 06:30:19 +01:00
Daniel Seiler
74bca38253
MSVC: set source / target encoding (#659) 2022-07-20 01:23:53 -07:00
Jett
69a0d5a50b Efficiency and naming changes. 2022-07-18 10:01:43 +01:00
Jett
fab8a1e982 Implement new chat features 2022-07-17 07:54:36 +01:00
Jett
df0f11c95b
Update CMake configuration for easier maintenance (#642)
* Update CMake configuration for easier maintenance

* Incorrect casing fix

* Move package requirement

* Update CTest linking

* Add logs to the CMake

* Add linking for common libraries

Added linking for common libraries in tests subdirectory.

* Move test subdirectory higher up for some reason

* Whitespace a log removal

Missed new line

* Add dCommon to dChatFilter

* Update library output dir

* Correct libBcrypt

* Further refactor CMake behaviour

* Repair bad comments and update library defines

* Revert to old include directory method

* Implement platform defines

* Add missing include

Mac needs a specific include for defining platform.  Does not compile without this.

Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-17 00:24:16 +01:00
Jett
d642de9462 Implement a migration runner 2022-07-12 02:16:08 +01:00
David Markowitz
8a54e7ccd2
Implement Precompiled Headers (#591)
When applied, this will speed up compile times dramatically.
2022-07-04 15:24:45 -07:00
Daniel Seiler
6e2936504c
Improve CI (#345)
* Don't upload artifacts unless on main

* Fix if/endif mismatch warning

* Add thirdparty CMakeLists

* Keep more warnings around

* Remove more RakNet warnings

* Fix indentation and divided the cmake into libraries and bins

- Each library and binary got their own CMakeLists.txt
- Indentation was fixed everywhere
- Weird if statement flows replaced

* Revert "Fix indentation and divided the cmake into libraries and bins"

This reverts commit 005a12424e.

* Add async value assignments

Resolves a warning where on some compilers this thread would _not_ be run async and would instead be run synchronous with the main thread, halting execution.

* Revert "Add async value assignments"

This commit was meant to be done on a seaparate branch but was accidentally pushed upstream to this branch.

* Fix Merge Conflict

* Resolve errors

Resolve errors with using continue() outside a foreach loop.

* breakout mariadb to thirdparty cmake

Move the mariadb cmake to its own directory to make each cmake file more focussed.

Co-authored-by: Jett <55758076+Jettford@users.noreply.github.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-04 01:30:11 -07:00
jumpy-badger
eaa962f265
Add Aarch64 support (#231)
* added mariadb-connector-cpp submodule

* raknet aarch64 support

* fix compile errors

* mariadb connector swap (in progress)

* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors

* update types with missing aarch64 check

* corrected adding extra flag to properly compile mariadbconn in CMakeLists

* updated readme with arm builds section

* fix build failure if test folder does not exist

* Remove mysql connector from all builds, add mariadbconnector to windows build

* readd Linux check for backtrace lib to CMakeLists.txt

* Separate system specific mariadbconncpp extra compile flags

* Copy dlls to exes directory once built

* fetch prebuilt binaries on windows so that ClangCL can be used

* Delay load dll so that plugin directory is set correctly

* Fixed typo in glibcxx compile flag

* whitespacing, spaces -> tabs

* Updated README.md, included instructions to update

* Updated README.md

added libssl-dev requirement and removed mysql connector references from macOS builds section

* apple compile fixes for zlib and shared library name

* add windows arm64 checks to raknet

* remove extra . in shared library location

* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple

* Fix copy paths for single config generators and non windows

* change plugin folder location, another single config generator fix

* GENERATOR_IS_MULTI_CONFIG is a property not a variable

* Fixed a few errors after merge

* Fix plugin directory path, force windows to look at the right folder

* fixed directory name for make_directory command

* Update README.md

Updated MacOS, Windows build instructions.

* set INSTALL_PLUGINDIR so that the right directory is used

* Support for relative rpath for docker build

* added mariadb-connector-cpp submodule

* raknet aarch64 support

* fix compile errors

* mariadb connector swap (in progress)

* update CMakeLists, add preprocessor definition to switch between mysql and mariadb connectors

* update types with missing aarch64 check

* corrected adding extra flag to properly compile mariadbconn in CMakeLists

* updated readme with arm builds section

* fix build failure if test folder does not exist

* Remove mysql connector from all builds, add mariadbconnector to windows build

* readd Linux check for backtrace lib to CMakeLists.txt

* Separate system specific mariadbconncpp extra compile flags

* Copy dlls to exes directory once built

* fetch prebuilt binaries on windows so that ClangCL can be used

* Delay load dll so that plugin directory is set correctly

* Fixed typo in glibcxx compile flag

* whitespacing, spaces -> tabs

* Updated README.md, included instructions to update

* Updated README.md

added libssl-dev requirement and removed mysql connector references from macOS builds section

* apple compile fixes for zlib and shared library name

* add windows arm64 checks to raknet

* Setup plugins directory for the connector to search in, pass openssl_root_dir on for apple

* Fix copy paths for single config generators and non windows

* change plugin folder location, another single config generator fix

* GENERATOR_IS_MULTI_CONFIG is a property not a variable

* Fixed a few errors after merge

* Fix plugin directory path, force windows to look at the right folder

* fixed directory name for make_directory command

* Update README.md

Updated MacOS, Windows build instructions.

* set INSTALL_PLUGINDIR so that the right directory is used

* Support for relative rpath for docker build

* Rebase on main

* Remove extra git submodule

* Update CMakeLists.txt

* Remove CMakeLists.txt file from mariadb

Remove the CMakeLists.txt file from the mariaDBConnector so we dont build the tests.  Also add a config option to the CMakeVariables.txt so you can build the connector with multiple jobs

* Compile on windows

Specify the mariadbcpp.dll file location with a defined absolute path so windows knows it actually exists.

* default to 1 job

Default mariadb jobs running in parallel to 1 instead of 4

* Move mariadbcpp.dll file to the expected directory on windows

* Changed plugin

Updated the plugin location from the project binary directory to the expected location, the mariadb binary directory.

* Addressed windows dll issues by moving files to the expected directory instead of a directory that wouldnt get created

* Update README

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
Co-authored-by: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com>
2022-07-03 21:33:05 -07:00
Marcono1234
4ef5508347 Fetch zlib library over HTTPS 2022-02-16 23:38:40 +01:00
Nico Mexis
7dd7fdaf71
Update CMake minimum requirement (#380) 2022-01-17 12:46:33 +01:00
Xiphoseer
adab6cf96f Add windows CI 2022-01-05 14:12:28 +01:00
Xiphoseer
227b82c446 Add newline at EOF [skip ci] 2022-01-04 09:26:43 +01:00
Xiphoseer
a591dbfe9c Basic tests infrastructure 2022-01-03 16:00:21 +01:00
Jett
83107d413d
More windows fixes (#329)
- Added World, Chat and Auth servers as deps to Master
- Added "windows-default" CMake preset so that CMake didn't error out on Windows
- Added NOMINMAX define above cpplinq include
2022-01-01 01:38:45 -08:00
wincent
259c236b72 Fixes dlogger PR
When applied this commit fixes the unix build of the previous dLogger PR.
This commit also fixes backwards compatability with config files.
2021-12-13 16:57:43 +01:00
Avery
f68f683e22
Revert "separate AgSpaceStuff and AgShipShake" 2021-12-07 18:14:15 -08:00
red031000
002f3b6c0e
separate AgSpaceStuff and AgShipShake 2021-12-07 20:50:09 +00:00
Unknown
0545adfac3 Public release of the DLU server code!
Have fun!
2021-12-05 18:54:36 +01:00