-
Notifications
You must be signed in to change notification settings - Fork 9
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
template_processor: Allow to skip files or directories #27
base: master
Are you sure you want to change the base?
Conversation
|
While refactoring the code, I noticed that this should be already possible: A file is not generated if its content is empty. I'll update this change accordingly. |
Don't override the MSVC build in the project's repository.
@Rechi Is it still the case that 2048 should be compiled without mingw on windows? Then I'll merge this as well. |
There's a bit more todo: (see https://github.com/kodi-game/game.libretro.2048/pull/6/files)
|
Although it would be nice to get rid of mingw, there is no use if it is only done for one. |
Templated file names can now contain expressions to control if the file or directory should be generated or skipped. If the expression evaluates to a non-empty string, that string is used as file or directory name. If the expression evaluates to an empty string the generation of that file or directory is skipped.
This can be used to provide custom files in the source repo that are not overridden by a template.
For example the directory:
addon/depends/windows/{{ "mingw" if not config.nomingw }}
is not generated if'nomingw': True
is added to the config.@garbear is this what you meant with your comment in kodi-game/game.libretro.2048#6?
I fear in its current form the template engine cannot skip a directory based on the existence of a file in the source repo. With this change, we would just need to add
depends/windows/2048/CMakeLists.txt
and removedepends/windows/mingw/*
. The other changes from https://github.com/kodi-game/game.libretro.2048/pull/6/files (appveyor, common/2048/CMakeLists.txt) would remain as they are, but that shouldn't be an issue.Maybe also interesting for @Rechi.