From 8ac5491f5aea583e06d72c4f0e70579cdf362fe3 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Wed, 29 May 2019 18:49:01 +0200 Subject: [PATCH] modified build script for lmic_config.h path --- build.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.py b/build.py index f5ab56b8..2087d64b 100644 --- a/build.py +++ b/build.py @@ -10,28 +10,30 @@ from platformio import util Import("env") +import os.path + # get platformio environment variables project_config = util.load_project_config() # get platformio source path -srcdir = str(env.get("PROJECTSRC_DIR")).replace("\\", "/") + "/" +srcdir = env.get("PROJECTSRC_DIR").lower() # check if lmic config file is present in source directory -lmicconfigfile = srcdir.lower() + project_config.get("common", "lmicconfigfile") +lmicconfigfile = os.path.join (srcdir, project_config.get("common", "lmicconfigfile")) if os.path.isfile(lmicconfigfile) and os.access(lmicconfigfile, os.R_OK): print "Parsing LMIC configuration from " + lmicconfigfile else: sys.exit("Missing file " + lmicconfigfile + ", please create it! Aborting.") # check if lora key file is present in source directory -lorakeyfile = srcdir + project_config.get("common", "lorakeyfile") +lorakeyfile = os.path.join (srcdir, project_config.get("common", "lorakeyfile")) if os.path.isfile(lorakeyfile) and os.access(lorakeyfile, os.R_OK): print "Parsing LORAWAN keys from " + lorakeyfile else: sys.exit("Missing file " + lorakeyfile + ", please create it! Aborting.") # check if ota key file is present in source directory -otakeyfile = srcdir + project_config.get("common", "otakeyfile") +otakeyfile = os.path.join (srcdir, project_config.get("common", "otakeyfile")) if os.path.isfile(otakeyfile) and os.access(otakeyfile, os.R_OK): print "Parsing OTA keys from " + otakeyfile else: