mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 04:15:26 +03:00
Build handling
This commit is contained in:
parent
7e2d3fad35
commit
0acb935e85
3 changed files with 10 additions and 3 deletions
|
@ -54,6 +54,7 @@ option(MODULE_PROTOCOL_FLEX "Add support for non certified FLEX modules" OFF)
|
|||
option(MODULE_PROTOCOL_D8 "Add support for D8 modules" ON)
|
||||
option(FRSKY_RELEASE "Used to build FrSky released firmware" OFF)
|
||||
option(TBS_RELEASE "Used to build TBS released firmware" OFF)
|
||||
option(IMRC_RELEASE "Used to build IMRC released firmware" OFF)
|
||||
option(ALLOW_TRAINER_MULTI "Allow multi trainer" OFF)
|
||||
|
||||
# since we reset all default CMAKE compiler flags for firmware builds, provide an alternate way for user to specify additional flags.
|
||||
|
@ -344,6 +345,10 @@ if(TBS_RELEASE)
|
|||
add_definitions(-DTBS_RELEASE)
|
||||
endif()
|
||||
|
||||
if(IMRC_RELEASE)
|
||||
add_definitions(-DIMRC_RELEASE)
|
||||
endif()
|
||||
|
||||
if(FRSKY_RELEASE)
|
||||
add_definitions(-DFRSKY_RELEASE)
|
||||
set(POPUP_LEVEL 3)
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
#define DISPLAY_VERSION "JumperRC"
|
||||
#elif defined(TBS_RELEASE)
|
||||
#define DISPLAY_VERSION "TBS"
|
||||
#elif defined(IMRC_RELEASE)
|
||||
#define DISPLAY_VERSION "IMRC"
|
||||
#else
|
||||
#define DISPLAY_VERSION VERSION
|
||||
#endif
|
||||
|
|
|
@ -88,7 +88,7 @@ def build(board, translation, srcdir):
|
|||
os.mkdir("output")
|
||||
path = tempfile.mkdtemp()
|
||||
os.chdir(path)
|
||||
command = "cmake %s -DTRANSLATIONS=%s -DTBS_RELEASE=YES -DTEST_BUILD_WARNING=YES %s" % (cmake_options, translation, srcdir)
|
||||
command = "cmake %s -DTRANSLATIONS=%s -DIMRC_RELEASE=YES -DTEST_BUILD_WARNING=YES %s" % (cmake_options, translation, srcdir)
|
||||
print(command)
|
||||
os.system(command)
|
||||
os.system("make firmware -j16")
|
||||
|
@ -96,7 +96,7 @@ def build(board, translation, srcdir):
|
|||
index = 0
|
||||
while 1:
|
||||
suffix = "" if index == 0 else "_%d" % index
|
||||
filename = "output/tbs_firm_%s_%s_%s%s.bin" % (board.lower(), translation.lower(), timestamp(), suffix)
|
||||
filename = "output/ghost_firm_%s_%s_%s%s.bin" % (board.lower(), translation.lower(), timestamp(), suffix)
|
||||
if not os.path.exists(filename):
|
||||
shutil.copy("%s/firmware.bin" % path, filename)
|
||||
break
|
||||
|
@ -112,7 +112,7 @@ def dir_path(string):
|
|||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Build TBS firmware")
|
||||
parser = argparse.ArgumentParser(description="Build Ghost firmware")
|
||||
parser.add_argument("-b", "--boards", action="append", help="Destination boards", required=True)
|
||||
parser.add_argument("-t", "--translations", action="append", help="Translations", required=True)
|
||||
parser.add_argument("srcdir", type=dir_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue