BugID:19675668: Fix Windows path for AOS_SDK_PATH
@@ -103,7 +103,7 @@ def copy_template_file(tempfile, templatedir, destdir, projectname, board):
line = line.replace("@boardname@", board)
if "@aos_sdk_path@" in line:
- line = line.replace("@aos_sdk_path@", os.environ.get("AOS_SDK_PATH"))
+ line = line.replace("@aos_sdk_path@", os.environ.get("AOS_SDK_PATH").replace("\\", "/"))
contents += [line]
@@ -135,7 +135,7 @@ config AOS_BUILD_APP
config AOS_SDK_PATH
string
default "%s"
-""" % (board, projectname, os.environ.get("AOS_SDK_PATH"))
+""" % (board, projectname, os.environ.get("AOS_SDK_PATH").replace("\\", "/"))
with open(config_file, "a") as f:
f.write(contents)
@@ -297,7 +297,7 @@ def cli(projectname, board, projectdir, templateapp):
(md5sum, include_list) = compute_header_md5sum(destdir)
depends = get_depends_from_source(comp_info, include_list)
config_data = {
- "AOS_SDK_PATH": os.environ.get("AOS_SDK_PATH"),
+ "AOS_SDK_PATH": os.environ.get("AOS_SDK_PATH").replace("\\", "/"),
"DEPENDENCIES": " ".join(depends),
"MD5SUM_HEADER": md5sum,
}
