Skip to content

Fix matchmaking_ds bin not being found for gamedata (#1006).#1028

Merged
psychonic merged 1 commit intomasterfrom
fix-1006
Jun 1, 2019
Merged

Fix matchmaking_ds bin not being found for gamedata (#1006).#1028
psychonic merged 1 commit intomasterfrom
fix-1006

Conversation

@psychonic
Copy link
Member

As reported in #1006, the matchmaking_ds binary is not found since our path to it is incorrect.

This changes our lookup to just use the binary name instead of including the path - similar to how we find tier0 and/or vstdlib to find symbols in those. Only tested on Windows, but that confirms that the binary is loaded by the time our lookup runs, so it should also be fine for dlopen.

Copy link
Member

@asherkin asherkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One inline, happy either way though.

#define SOURCE_BIN_EXT ".so"
#endif

#define FORMAT_SOURCE_BIN_NAME(basename) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think I'd prefer things without this macro, they're evil.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it. I prefer the macro over duplicated logic, and wasn't sure how to otherwise consolidate the concatenation logic at compile-time without it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a constexpr function :p

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Headline I still couldn't find a way to do that, other than including a separate header's worth of copy/pasted constexpr abuse to allow for compile-time string concatenation. (Or doing it at runtime).

I'm going to merge as-is, but feel free to improve upon it!

@psychonic psychonic merged commit 14227c0 into master Jun 1, 2019
@asherkin asherkin deleted the fix-1006 branch July 24, 2019 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants