-
-
Notifications
You must be signed in to change notification settings - Fork 484
Refactor mtaserver.conf.template #3857
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
Refactor mtaserver.conf.template #3857
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Hmm, check out what I did. |
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.
It looks good, although I recommend inserting a comment at the beginning of the template file to let the user know that they shouldn't change it
Please resolve conflicts, @Fernando-A-Rocha |
@Dutchman101 Merge conflict resolved. I will apply Nico's suggestion now. |
@Nico8340 All good now? |
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.
LGTM
Ready |
@ project maintainers merge conflict fixed again. this is ready. any opinions? |
Ready |
Feedback? |
Thanks, you followed through with everything and were concise about what and why. |
I'm sorry but this PR will have to be temporarily reverted.. it broke build because of a buildserver-local NSIS script issue that i tried to resolve there but was unable to. It will be re-introduced later by @botder if/when he gets to it, he knows his way around the buildscript better than me and i left him notes. Reverted in 5c3b988 |
Context
The
mtaserver.conf.template
file is a copy of mtaserver.conf without the<module>
and<resource>
nodes, that devs have been maintaining manually. Default config already comes in mtaserver.conf.Without this PR, the script looks for mtaserver.conf.template, and if it finds it, it will scan for missing config nodes in the existing mtaserver.conf config, and then after it's done with the changes, it deletes the .template file. So it's only ever used once.
The problem is that real MTA servers never get their hands on the .template file, so it is never used.
<!-- This file is compiled into the server binary.
This file is never compiled in the server binary, it even gets deleted after use by the script.So, mtaserver.conf.template has had zero practical use over the last years.
What I changed
install_data.lua
to automatically duplicatemtaserver.conf
=>mtaserver.conf.template
compose_files.lua
to do thismtaserver.conf.template
to be included by the Installer (nightly.nsi)mtaserver.conf.template
after runningWhy?
mtaserver.conf.template
.