Skip to content

Commit

Permalink
own define for folder name within zip file
Browse files Browse the repository at this point in the history
  • Loading branch information
elral committed Apr 20, 2024
1 parent 86de6bd commit 2aaa0a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Template/MyCustomDevice_platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ build_src_filter =
lib_deps = ; You can add additional libraries if required
custom_core_firmware_version = 2.5.1 ; define the version from the core firmware files your build should base on
custom_device_folder = Template ; path to your Custom Device Sources, replace "Template" by your folder name
custom_community_project = Your_Project ; Should match "Project" from section "Community" within the board.json file, it's the name of the ZIP file

custom_community_project = Your_Project ; name of the ZIP file, revision will be added during build process
custom_community_folder = Your_Folder_Name ; Folder name inside zip fileShould match "Project" from section "Community" within the board.json file

; Build settings for the Arduino Mega with Custom Firmware Template
[env:mobiflight_template_mega]
Expand Down
5 changes: 4 additions & 1 deletion copy_fw_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# Get the custom folder from the build environment.
custom_device_folder = env.GetProjectOption('custom_device_folder', "")

# Get the foldername inside the zip file from the build environment.
community_folder = env.GetProjectOption('custom_community_folder', "")


def copy_fw_files (source, target, env):
fw_file_name=str(target[0])
Expand All @@ -33,7 +36,7 @@ def copy_fw_files (source, target, env):
def createCommunityZipFile(source, target, env):
original_folder_path = "./_build/" + custom_device_folder + "/Community"
zip_file_path = './_dist/' + community_project + '_' + firmware_version + '.zip'
new_folder_in_zip = community_project
new_folder_in_zip = community_folder
createZIP(original_folder_path, zip_file_path, new_folder_in_zip)

def createZIP(original_folder_path, zip_file_path, new_folder_name):
Expand Down

0 comments on commit 2aaa0a3

Please sign in to comment.