def createBertosProject(project_info):
directory = project_info.info("PROJECT_PATH")
sources_dir = project_info.info("SOURCES_PATH")
- if not os.path.isdir(directory):
- os.mkdir(directory)
+ if os.path.isdir(directory):
+ shutil.rmtree(directory, True)
+ os.makedirs(directory)
f = open(directory + "/project.bertos", "w")
f.write(pickle.dumps(project_info))
f.close()
cppasrc = " \\\n\t".join(cppasrc) + " \\"
cxxsrc = " \\\n\t".join(cxxsrc) + " \\"
asrc = " \\\n\t".join(asrc) + " \\"
- constants = "\n".join([os.path.basename(project_info.info("PROJECT_PATH")) + "_" + key + " = " + str(value) for key, value in constants.items()])
+ constants = "\n".join([os.path.basename(project_info.info("PROJECT_PATH")) + "_" + key + " = " + unicode(value) for key, value in constants.items()])
return csrc, pcsrc, cppasrc, cxxsrc, asrc, constants
def findModuleFiles(module, project_info):