diff --git a/backend/synthesis/synthesis.py b/backend/synthesis/synthesis.py index 0af239a1..d5f0e53f 100644 --- a/backend/synthesis/synthesis.py +++ b/backend/synthesis/synthesis.py @@ -14,6 +14,7 @@ 'ObjectDetector': 'utils/models/yolov3/*' } +PROJECT_FILE_EXTENSION = '.vc3' def get_number_or_default(num, default): try: @@ -146,6 +147,11 @@ def synthesize(data: dict) -> Tuple[str, BytesIO]: zipfile = syntesize_extras(zipfile) # Project name (zipfile name) - project_name = f"{data['package']['name']}.zip" if data['package']['name'] != '' else 'Project.zip' + project_name = f"{data['package']['name']}" if data['package']['name'] != '' else 'Project' + + # Add the .vc3 file to the built application, this will let us easily load the project in Visual Circuit + zipfile.append(project_name + PROJECT_FILE_EXTENSION, json.dumps(data)) + # .zip is required for the name of the full package + project_name += '.zip' return project_name, zipfile.get_zip() \ No newline at end of file