2617 Commits

Author SHA1 Message Date
Kawe Mazidjatari
048f8a6467 Create the runtime directory
Create the runtime (binary) directory while running the project generator.
2023-05-14 14:54:34 +02:00
Kawe Mazidjatari
2174cc977c Automatically detect Visual Studio version
Automatically detect when using the batch file to create solution files. The system will search from Visual Studio 2017 up to Visual Studio 2022.
2023-05-14 14:16:12 +02:00
Kawe Mazidjatari
7078a8b10a Fix syntax error
Fix small syntax error in post build event code.
2023-05-14 12:07:25 +02:00
Kawe Mazidjatari
d8ac2852ba Regenerate 'build.txt' after DLL project builds
This post build event function regenerates the 'build.txt' file after compiling the engine projects. It takes the branch name, commit hash (short), current time and time designator.
2023-05-14 12:03:16 +02:00
Kawe Mazidjatari
b3fc2c5adb Enable profiling for Profile builds
Enable linker option for profiling.
2023-05-14 02:28:53 +02:00
Kawe Mazidjatari
ae108ef1cc Light CMakeLists cleanup
Use global var for PCH name instead.
2023-05-14 02:27:54 +02:00
Kawe Mazidjatari
7248c8aab7 Fix compiler warning
Use size_t instead to avoid the type truncation warning.
2023-05-14 02:11:29 +02:00
Kawe Mazidjatari
d809a9f633 Use PCH generated from VPC globally
This reduced output code size with 40KiB, improved compile times and appeared to improve runtime performance as well.
2023-05-14 02:10:17 +02:00
Kawe Mazidjatari
b57eb0c0c3 Set runtime directories for projects
Adjust the runtime directories, so they are identical to pre-cmake port.
2023-05-14 01:27:51 +02:00
Kawe Mazidjatari
ede19e0472 Improve CMake macro's
Allow setting custom runtime output directories using the 'end_sources' macro. If parameter is empty, it will use "game/" (default).
2023-05-14 01:26:17 +02:00
Kawe Mazidjatari
59d8f970da Cleanup PCH files
Decoupled them to improve compile times.
2023-05-14 01:24:33 +02:00
Kawe Mazidjatari
5577d4fe87 Use dedicated PCH for sdklauncher
SDKLauncher now uses its own PCH.
2023-05-14 01:23:31 +02:00
Kawe Mazidjatari
0a0552d75c Fix verbose compiler warning
This is getting set from CMake now.
2023-05-14 01:21:35 +02:00
Kawe Mazidjatari
904976e4f5 Move shared files from server 2023-05-13 22:54:15 +02:00
Kawe Mazidjatari
44e08be6d9 Add missing library to PluginSDK
PluginSDK also uses SpdLog for the logger callback sink.
2023-05-13 20:04:11 +02:00
Kawe Mazidjatari
67fb566dfb Compile launcher as separate library again 2023-05-13 20:03:42 +02:00
Kawe Mazidjatari
2fd62b7091 Enable LTCG for executables and shared libraries
Enable Link Time Code Generation as some libraries are compiled using /GL (Whole Program Optimization) which requires the code generation to be delayed to link time. Not doing this will result in longer build times, as the linker has to terminate its progress if it links a library compiled with /GL, and restart this operation using /LTCG.
2023-05-13 19:44:41 +02:00
Kawe Mazidjatari
0c25246f91 Check if dedicated using global
Global instead of directive as the ebisusdk lib is used for both the server and client. Removed useless directives.
2023-05-13 19:41:57 +02:00
Kawe Mazidjatari
e468fa1065 Fix build errors caused by 'CreateTextureResource'
Moved declarations to source file; this is currently only used by the engine.
2023-05-13 19:40:41 +02:00
Kawe Mazidjatari
81182f078b Fix missing deref in launcher.cpp
Pointer should be dereferenced.
2023-05-13 19:39:53 +02:00
Kawe Mazidjatari
934819574b Fix missing lib in GameSDK and ClientDLL
Lib was commented, but should be part of the client only libs; moved.
2023-05-13 19:39:17 +02:00
Kawe Mazidjatari
c96ca324c9 Set plugin stack reserve size
Set it to that of the game exe.
2023-05-13 19:38:32 +02:00
Kawe Mazidjatari
04ed774c46 Swap preprocessor directive with global
Since launcher does not get compiled with the engine, the dedicated check has to be performed using the global instead.
2023-05-13 18:07:05 +02:00
Kawe Mazidjatari
ab3abce664 Remove preprocessor directives
These preprocessor directives are invalid, as 'vscript' gets compiled as a standalone library. Compile everything (this doesn't cause an issue if its on the server or client).
2023-05-13 18:06:00 +02:00
Kawe Mazidjatari
3a4ce7cf02 Comment unused function pointer (NULL on dedi)
Not getting used anywhere, and was NULL on dedi.
2023-05-13 18:04:30 +02:00
Kawe Mazidjatari
8d38de1ce0 Move client only code from rtech libraries
Moved, and renamed to 'CreateTextureResource'. Reason for move was that the rtech libraries is used by server and client, and using this on dedicated requires linking directx libraries, as it has to be hooked (even when not used). Moved to client only code to avoid having to hook it. Material system is no longer linked to the dedicated server module, as nothing from it was getting used.
2023-05-13 18:03:48 +02:00
Kawe Mazidjatari
d9cc37914a Add server and client DLL to CMake projects 2023-05-13 17:48:19 +02:00
Kawe Mazidjatari
b94a9dcd7c Add dedicated server engine library
Added to CMake projects.
2023-05-13 17:48:00 +02:00
Kawe Mazidjatari
de02febdc0 Fix assert failure in netconsole caused by AddDetour
Remove extraneous register call for detour callbacks.
2023-05-13 14:05:08 +02:00
Kawe Mazidjatari
08384346bf Setup log callback sink for netconsole 2023-05-13 14:04:13 +02:00
Kawe Mazidjatari
8b60300dce Guard mathlib debug globals
Only compile when 'DEBUG_MATHLIB' is set.
2023-05-13 14:03:42 +02:00
Kawe Mazidjatari
84c43cffa8 Properly setup netconsole CMakeLists 2023-05-13 14:02:47 +02:00
Kawe Mazidjatari
7ef50395eb Remove unused header file 2023-05-13 14:02:16 +02:00
Kawe Mazidjatari
f22504f095 Enable whole program optimization for naveditor
Libs use them under the same PCH.
2023-05-13 12:11:02 +02:00
Kawe Mazidjatari
fdfc0a748b Remove extraneous project 2023-05-13 12:10:32 +02:00
Kawe Mazidjatari
e5a455e7c7 Apply whole program optimization for certain targets
Only applied to certain targets to prevent bombing compile times; other projects don't really benefit of this.
2023-05-13 11:57:57 +02:00
Kawe Mazidjatari
5ba0beab40 Set stack reserve size for GameSDK project
Should match that of the game executable.
2023-05-13 10:46:54 +02:00
Kawe Mazidjatari
1ef573a9b2 Fix compile errors on Visual Studio 2017
Error: ''std::isdigit': no matching overloaded function found'.
2023-05-13 10:35:05 +02:00
Kawe Mazidjatari
d7ef449e15 Split RTech libraries 2023-05-13 10:34:23 +02:00
Kawe Mazidjatari
dcb22a5a13 Fix code crash caused by missing resource file
Crashes when the developer console gets invoked due to missing textures.
2023-05-13 01:49:31 +02:00
Kawe Mazidjatari
7419170b63 Add batch file for creating solutions 2023-05-13 00:15:53 +02:00
Kawe Mazidjatari
8dbc2024c6 CMake code improvements
Use the 'add_module' macro to add modules without creating duplicate code. This macro also takes a reuse PCH as parameter, so modules that need a precompiled header, could reuse those from different targets that compile them. This commit also restructures the group order of the generated solution files for easier code navigation.
2023-05-13 00:14:53 +02:00
Kawe Mazidjatari
7a745a404a Add CMake macro for adding modules
Add macro for adding modules and setting all the properties at ones.
2023-05-11 23:50:57 +02:00
Kawe Mazidjatari
ce0ce28040 Cleanup main CMakeLists
Move init to 'Configure.cmake', and enable the use of folders within project files.
2023-05-11 23:50:06 +02:00
Kawe Mazidjatari
ee636477ce Uncomment
Header file exists, but is stubbed; uncomment.
2023-05-11 21:35:54 +02:00
Kawe Mazidjatari
af21798a12 Fix crash caused by NULL Cbuf function pointers
Register was missing (code was moved elsewhere).
2023-05-11 21:05:09 +02:00
Kawe Mazidjatari
d1157fb54b Fix PDB path not getting written properly for shared libraries 2023-05-11 21:04:21 +02:00
Kawe Mazidjatari
f120354e96 Initial port to CMake
* All libraries have been isolated from each other, and build into separate artifacts.
* Project has been restructured to support isolating libraries.
* CCrashHandler now calls a callback on crash (setup from core/dllmain.cpp, this can be setup in any way for any project. This callback is getting called when the apllication crashes. Useful for flushing buffers before closing handles to logging files for example).
* Tier0 'CoreMsgV' function now calls a callback sink, which could be set by the user (currently setup to the SDK's internal logger in core/dllmain.cpp).

TODO:
* Add a batch file to autogenerate all projects.
* Add support for dedicated server.
* Add support for client dll.

Bugs:
* Game crashes on the title screen after the UI script compiler has finished (root cause unknown).
* Curl error messages are getting logged twice for the dedicated server due to the removal of all "DEDICATED" preprocessor directives to support isolating projects. This has to be fixed properly!
2023-05-10 00:05:38 +02:00
Kawe Mazidjatari
807d660883 Add CMake macro's
Macro's performing project wide, and common operations. Crafted for r5sdk, but it is still partially incomplete.
2023-05-09 23:55:46 +02:00
rexx
f310497464 fetch correct sdk module from pluginsdk 2023-05-08 19:28:16 +01:00