-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update project to msvc143 (aka Visual Studio 2022) #30
Conversation
161aa09
to
6ab99c3
Compare
Pattern: (typedef\s+)(.*>::) Tokens: $1typename $2
814ce0a
to
f5acbea
Compare
6f1ce9d
to
3f182b3
Compare
There are few limitations with the way the engine is designed and tightly coupled with other projects. In an ideal situation all engine sources would have been built as a separate library that will be consumed by other projects. However some sources in the engine are not included part of the workspace project of N3Base because they include files from game and such. This design is terrible, because it should be decoupled from the rest of the projects. Therefore StdAfxBase.h precompiled header was removed from the project in favor of StdAfx.h assuming every project that includes sources from engine will compile with a precompiled header called StdAfx.h. In the future we'll decouple things better, where it will be a completely separate project with its own precompiled header which will be more efficient in the long run. Also remove diagnostics MFC code from engine as first step for decoupling this project. Pattern: #ifdef\s+_DEBUG\s*[\n\r]#undef THIS_FILE[\n\r].*[\r\n].*[\r\n]#endif[\r\n]\s Tokens: empty
+ Optimize precompile header to make it build in less than a minute. + Delete old project files. + Create an external solution file.
+ Remove old project files. + Rename properly to AIServer including resources. + Update precompiled header. + Few fixes to adapt to latests msvc143. + Update gitignore.
Note that on Unix systems it will cause an error.
Note that there are much better ways of doing this with modern compilers. This also causes annoyance during development where game depends on MFC stuff, when in fact it doesn't.
We don't need these in 2022 and there are better ways of doing this.
+ Fix silly warnings / mistakes.
Generally to improve debugging experience in debug mode and also to make sure we explictly not rely on important properties' defaults.
Don't ask why...compiler explodes on CMagicProcess::MagicPacket where it excutes all types of magic. I think it gets confused by the amount of branches this function produces when compiling and when removing the group of switch cases there, it compiles. So temporarily we disable optimizations, even though in Release mode and it will be fixed once we do refactoring to this implementation.
It looks like an experimental version of Ebenezer. No need it here.
Looks like an older version of N3FXE. No need it here.
Pattern: [r\n]#ifdef _AFXDLL[\r\n].*Enable3dControls.*[\r\n].*[\r\n].*Enable3dControlsStatic.*[\r\n].*[r\n][r\n] Tokens: empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 would we still be required to use the build.cmd as I see it’s still there?
The build.cmd is for convenient. Before it was useful since we had to set the old compiler explictly, now it's just for CI/CD. |
Alright. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks clean, will have to get used to it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks clean, will have to get used to it
With the following changes: ko4life-net/ko#30 we no longer depend on it anymore.
Decription
The following PR apart from doing some house keeping, it mainly upgrades the old compiler version to latest MSVC143(aka Visual Studio 2022).
Solution files for Game, Server and Tool were created as separated pieces.
Additionally some build optimizations were enabled to make the project build much faster than before thanks to precompiled headers.