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

cmake flag to prevent installation of game assets #2392

Closed
arunisaac opened this issue Jan 21, 2018 · 20 comments
Closed

cmake flag to prevent installation of game assets #2392

arunisaac opened this issue Jan 21, 2018 · 20 comments
Labels
Enhancement Issues that are requests for new features or changes to existing ones. Good first issue Issues deemed adequate for contributors without prior experience to work on.

Comments

@arunisaac
Copy link

I am building only the wesnoth daemon for installation on a headless server. I am using the cmake-flag "-DENABLE_GAME=OFF" to achieve this. However, during installation with `make install', various game assets such as images, fonts, music, etc. get installed into share/wesnoth. If I understand correctly, the wesnoth daemon does not need these assets. It would be nice to have a cmake flag that can prevent those assets from being installed.

I am using wesnoth 1.12.6 on GNU Guix SD.

@GregoryLundberg GregoryLundberg added Enhancement Issues that are requests for new features or changes to existing ones. Good first issue Issues deemed adequate for contributors without prior experience to work on. labels Jan 21, 2018
@GregoryLundberg
Copy link
Contributor

I can't assign @Pentarctagon but he's probably best for this having spent so much time on this recently.

Don't forget to check SCons while working on the CMake side.

@Pentarctagon
Copy link
Member

I can take a look, though I've only made changes to the build flags and variables. I've never done the install command with either scons or cmake.

@Pentarctagon
Copy link
Member

Speaking of which, what all shouldn't be done for server-only installations? Just from a quick read through, it looks like lines 542 and maybe 580 would need to be changed, but I don't actually know what requirements the MP server/add-ons server have.

@GregoryLundberg
Copy link
Contributor

Some config files, maybe some folders. They're both basically standalone.

@shikadilord will know more.

The campaignd side of things needs some art assets for the web but I don't think it even verifies them on upload.

Basically, to start, just install the executable and, if there is one, the man page. We can find out if any directories need to be pre-created during testing.

@Pentarctagon
Copy link
Member

I'll wait for him to reply then. Changing the cmake script looks like it'd just be a matter of only copying over any needed sub-directories rather than everything, but I've never done any of this before and I don't want to just start poking at it blindly.

@irydacea
Copy link
Member

irydacea commented Jan 21, 2018

Neither campaignd and wesnothd require game assets for anything (data/lan_server.cfg doesn't count since it's only used for wesnothd instances launched through the game client, and IIRC it's copied to the preferences dir anyway).

The addons.wesnoth.org web index has nothing to do with campaignd.

@irydacea
Copy link
Member

Actually, correction, campaignd does require one asset to operate correctly, and it's data/COPYING.txt. But honestly, people should have no business installing campaignd in the first place.

@GregoryLundberg
Copy link
Contributor

@arunisaac Can you pull the PR and confirm it works as you expect?

@Pentarctagon
Copy link
Member

He's using 1.12.6, so it would have to backported to 1.12 if there are no issues with the PR. That doesn't look like it'd be too difficult though.

@GregoryLundberg
Copy link
Contributor

He's building from source. I was hoping he would fast-forward to your PR. He'd just have to be sure the match client and server versions for any testing.

I was thinking I'd put up a VM to check it but that's a lot of work for such a small change.

@arunisaac
Copy link
Author

No need to backport. I will directly clone Pentarctagon/wesnoth and build the relevant branch. Give me a while. I'll get back to you when I'm done.

@arunisaac
Copy link
Author

I have verified the pull request. A large number of translations have been installed to share/wesnoth/translations. I'm assuming wesnothd requires them. If so, then everything works as I expected.

@GregoryLundberg
Copy link
Contributor

Nope. That's an escape. Only the game client (wesnoth) needs translations.

@arunisaac
Copy link
Author

In that case, please remove the translations as well.

@GregoryLundberg
Copy link
Contributor

Patience. I'm sure he'll jump on it once he wakes and has some coffee :P

@Pentarctagon
Copy link
Member

You can already use ENABLE_NLS to enable/disable translations.

@GregoryLundberg
Copy link
Contributor

damn I need to take my finger off the mouse when I fall asleep at the keyboard.

@arunisaac
Copy link
Author

Yes, ENABLE_NLS=OFF does the job. But, is it somehow possible to make ENABLE_GAME=OFF imply ENABLE_NLS=OFF? Is that a good idea? What do you think?

@Pentarctagon
Copy link
Member

I changed that in the last push yesterday as well.

@arunisaac
Copy link
Author

Thanks! Everything is working exactly as I expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Issues that are requests for new features or changes to existing ones. Good first issue Issues deemed adequate for contributors without prior experience to work on.
Projects
None yet
Development

No branches or pull requests

4 participants