mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-11-04 15:39:42 +08:00
- Added proper Automated naming scheme for firmware files. Looks awesome now :) - changed "easynetwork" to "openiris" in project_config.cpp
24 lines
667 B
Python
24 lines
667 B
Python
# Description: Custom name for firmware
|
|
|
|
Import("env")
|
|
|
|
my_flags = env.ParseFlags(env['BUILD_FLAGS'])
|
|
defines = dict()
|
|
for x in my_flags.get("CPPDEFINES"):
|
|
if type(x) is tuple:
|
|
(k,v) = x
|
|
defines[k] = v
|
|
elif type(x) is list:
|
|
k = x[0]
|
|
v = x[1]
|
|
defines[k] = v
|
|
else:
|
|
defines[x] = "" # empty value
|
|
# defines.get("PIO_SRC_TAG") - tag name
|
|
# strip quotes needed for shell escaping
|
|
s = lambda x: x.replace('"', "")
|
|
env.Replace(
|
|
PROGNAME="%s-%s-%s-%s-%s" %
|
|
(s(defines.get("PIO_SRC_NAM")), s(defines.get("VERSION")), str(env["BOARD"]),
|
|
s(defines.get("PIO_SRC_REV")), s(defines.get("PIO_SRC_BRH"))))
|