-
-
Notifications
You must be signed in to change notification settings - Fork 459
Add support for other engine binaries in game configs (#1414). #1626
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
Conversation
peace-maker
left a comment
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.
This is cool, it's easier to hook stuff in e.g. tier0 now. I'm unsure about the CRC refactoring though.
core/logic/GameConfigs.cpp
Outdated
| char name[64]; | ||
| bridge->FormatSourceBinaryName(pszName, name, sizeof(name)); | ||
|
|
||
| // This pattern doesn't work for every game. Instead, we need to use the GAMEBIN search path properly |
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.
Is this a TODO? Or does this magically open the $BASE/bin/engine.so as well as the $BASE/csgo/bin/server.so?
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.
Yes and no... and good catch.
The TODO was in regard to games that don't use standard paths (/bin, //bin). However, you're absolutely right that it's not accounting for the far more common case of all of the files normally just in /bin. I'll have to revisit that. The easiest solution to both problems may be to just open/read the files via IFIleSystemBridge.
|
Some other issues with this current method of using Valve's filesystem layer is that if MM:S is loaded via the gameinfo method, it's loader will be picked up instead of the game's server.dll. |
|
I updated with a different approach. The aforementioned issues appear to be solved now on Windows. It's currently completely broken on Linux, but it shouldn't be too bad to fix. |
|
What's missing for linux support here? We could have used this for the optional game update #1766 |
I don't remember. I vaguely recall there being an issue around the |
7ecd41e to
41d3634
Compare
Before this, there was a bad assumption that, like on Windows, POSIX module handle pointers were within the module's address space (and thus usable with dladdr). That's not true! Instead, to get a usable address on all platforms, we'll do a lookup of the CreateInterface function that exists in all modules. This also has the (arguable) benefit of further locking this implementation to modules owned by the game. To get a valid address inside the module now on both p
peace-maker
left a comment
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.
Could use the same link cast as in #576, but limiting the allowed binaries to engine ones seems reasonable given those are the libraries targeted.
Cool. That's good info. I had a small back-and-forth about this in my head. I'm not a fan of just casting the handle since that does not seem to be an API guarantee. However, it looks like |
|
Is this supposed to automatically recognize the _srv filename suffix in some linux binaries? Edit: turns out it will, but only if you use lowercase! |
|
Yes. To clarify, any platform-specific prefixes and/or suffixes are handled automatically. File system case sensitivity can still apply. |
No description provided.