Skip to content
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

Change: Always build baseset metadata, instead of including it in the repo. #7077

Merged
merged 1 commit into from Jan 25, 2019

Conversation

PeterN
Copy link
Member

@PeterN PeterN commented Jan 21, 2019

Baseset metadata files are usually out of date as they are not updated when translations are changed.

This also adds a script and project files to generate these files within MSVC.

@PeterN PeterN force-pushed the always-build-baseset-metadata branch 2 times, most recently from 0b70c54 to 8dca002 Compare January 21, 2019 17:42
glx22
glx22 previously requested changes Jan 21, 2019
Copy link
Contributor

@glx22 glx22 left a comment

Choose a reason for hiding this comment

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

Where is openttd_vs140.sln ?

projects/openttd_vs140.vcxproj Outdated Show resolved Hide resolved
projects/openttd_vs140.vcxproj.in Outdated Show resolved Hide resolved
media/baseset/translations.vbs Outdated Show resolved Hide resolved
@PeterN PeterN force-pushed the always-build-baseset-metadata branch from 8dca002 to 6f5e5a6 Compare January 21, 2019 18:53
@PeterN
Copy link
Member Author

PeterN commented Jan 21, 2019

Missed that. Have added it now, but haven't got a version that'll open it.

@PeterN
Copy link
Member Author

PeterN commented Jan 21, 2019

Hmm, thinking about it, it probably needs to depend on all the language files, not just english.txt. Can't see how to do that, replacing english.txt with *.txt doesn't work at least!

@glx22
Copy link
Contributor

glx22 commented Jan 21, 2019

Tried VS2015, works

@nielsmh
Copy link
Contributor

nielsmh commented Jan 22, 2019

Hmm, thinking about it, it probably needs to depend on all the language files, not just english.txt. Can't see how to do that, replacing english.txt with *.txt doesn't work at least!

I think you'd need, at least for MSBuild, a dummy-output generated from all the language inputs, and then you can depend other things on that dummy-output.
If it was within the same MSBuild project there would be better solutions, but cross-project having a dummy-file generated is probably the simplest.

… repo.

This adds a script and project files to generate these files within MSVC.
@PeterN PeterN force-pushed the always-build-baseset-metadata branch from 6f5e5a6 to 635020c Compare January 23, 2019 09:23
@PeterN
Copy link
Member Author

PeterN commented Jan 23, 2019

Latest push adds code to build a list of language files and include it in the dependences. Seems to work for me with MSVC 2017.

@glx22
Copy link
Contributor

glx22 commented Jan 23, 2019

Seems to work with MSVC 2015 and MSYS2

@PeterN
Copy link
Member Author

PeterN commented Jan 23, 2019

I guess the final question now is... is this change a good thing to do? Seeing as eints likely doesn't have the build environment to update these files, this seems the best way to me.

@nielsmh
Copy link
Contributor

nielsmh commented Jan 23, 2019

Yeah, IMO this is good. It's less prebuilt files to host in the repository. If it can reasonably be generated during build it should.

@PeterN PeterN merged commit 1334cfb into OpenTTD:master Jan 25, 2019
@PeterN PeterN deleted the always-build-baseset-metadata branch February 2, 2019 22:26
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.

None yet

3 participants