Allow setting user preferences via env on build #8715
+47
−25
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.
Hi,
Juggling with
OLED_{LANG_NAME}in files seemed to me a little tedious especially for newcomers, so I've decided to propose you to add support for passing preferences via an environment variable.With it one can do something like the following to have russian glyphs on devices:
For now it's
PREFS, but we can change it if required.Tip
This is not limited to
OLED_{LANG_NAME}, one can also pass arbitrary prefs e.g:$ PREFS="ONE=1 ANOTHER=no" ./bin/build-firmware.sh xxx yyy.Builds were tested for
t114both with default flags (fromuserPrefs.jsoncondevelopbranch) and with additionalOLED_RUpassed (as above).Summary:
platformio-custom.py- support for prefs via envbuild-firmware.sh- executable bit is set, usage example is addedbuild-nrf52.sh- usage example is added🤝 Attestations