-
Notifications
You must be signed in to change notification settings - Fork 42
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
Port from tolua to sol2 #516
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sol2 will be used for high level Lua operations. This commit imports the code from https://github.com/ThePhD/sol2/releases/tag/v3.2.2 See longturn#504.
This gets rid of a few lines of tolua-based code. See longturn#504.
lmoureaux
force-pushed
the
feature/sol2-port
branch
from
December 30, 2021 01:27
222f00e
to
7c39396
Compare
The port to FCDB used sol2's baseline userdata for connection* and player*, which did not expose the tolua-based API. Define hooks to make sol2 use tolua, which results in the objects being usable as if sol2 hadn't been used.
This removes most of the need for intermediate functions and also doesn't require running an external tool. See longturn#504.
It only contained two thin wrappers around auth.cpp functions. Use the auth.cpp functions directly instead.
The tolua package tolua_common_z.pkg was only used to lock down the API and did not depend on any special tolua constructs. Move the code to a .lua file linked into the executable as a Qt resource. This replaces one tolua call with sol2. See longturn#504.
It's documented as an option for the paranoid, which we definitely want to be for ruleset code.
This moves more code to use sol2 instead of tolua. See longturn#504.
This is included in a phantom 3.2.3 release of sol2 that doesn't have any artifacts. See this commit in the sol2 repo: ThePhD/sol2@e5e6466 This is needed on Windows/MinGW.
lmoureaux
force-pushed
the
feature/sol2-port
branch
from
December 30, 2021 03:37
7c39396
to
325e79e
Compare
zekoz
approved these changes
Dec 30, 2021
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tolua
has been unmaintained for a decade and it is tied to a specific Lua version. It makes it more difficult to use the system Lua. It also doesn't play well with C++.This PR aims at porting the
tolua
code tosol2
. It also makes use of Qt resources to embed the Lua code in the executable (tolua
embeds Lua bytecode).This will help with #387 (removing
tolua
altogether) and #504.Test plan:
There shouldn't be any user-visible change...