2020-12-10 11:28:15 +08:00
|
|
|
|
2020-12-10 12:44:35 +08:00
|
|
|
Import("projenv")
|
2020-12-10 11:28:15 +08:00
|
|
|
|
2020-12-10 12:44:35 +08:00
|
|
|
import configparser
|
2020-12-10 13:17:43 +08:00
|
|
|
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties"
|
2020-12-10 14:04:19 +08:00
|
|
|
config = configparser.RawConfigParser()
|
|
|
|
|
config.read(prefsLoc)
|
|
|
|
|
version = dict(config.items('VERSION'))
|
|
|
|
|
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"])
|
2020-12-10 11:28:15 +08:00
|
|
|
|
2020-12-25 10:16:49 +08:00
|
|
|
print("Using meshtastic platform-custom.py, firmare version " + verStr)
|
2020-12-10 11:28:15 +08:00
|
|
|
|
|
|
|
|
# General options that are passed to the C and C++ compilers
|
|
|
|
|
projenv.Append(CCFLAGS=[
|
2020-12-27 12:53:23 +08:00
|
|
|
"-DAPP_VERSION=" + verStr
|
2020-12-10 13:17:43 +08:00
|
|
|
])
|