Skip to content

Conversation

@ccrawford
Copy link

Description of changes

Added deploy_community.py in the root directory.

Automates deployment of MobiFlight Community Device's Community folder files to the local MF install directory for testing during development.

  • Auto-discovers the custom device folder name by parsing *_platformio.ini files for custom_source_folder
  • Copies all files from {project_folder}/Community/ to the user's MobiFlight Connector Community folder
  • Uses Path.home() to automatically resolve the current user's directory
  • Validates that both source and MobiFlight directories exist before copying
  • Handles and alerts on errors/missing directories.
  • Can be run by opening a shell windows and running 'python.exe deploy_community.py'

Fixes #21 by adding deploy_community.py script.

…tall directory. Helpful during custom device development.
@elral
Copy link
Collaborator

elral commented Dec 1, 2025

@ccrawford so MobiFlight must be installed under AppData/Local?
The files from device/Community folder gets copied, means all device.json, board.json and reset.hex/uf2 files. What is about the FW files?

@ccrawford
Copy link
Author

I searched the documentation to see if MF gets installed in other places...it's been so long since I've done an install and that's where it is on my system. Is there a better way of determining where the install directory is? I guess it could be a parameter to the script, but that's starting to get less useful.

Few thoughts on the FW files:

  1. This is for developers, not end users, and I assume you'll be uploading the firmware as part of the IDE build process.
  2. The project I was working on when I made the script was for the ESP32, and MF doesn't support ESP32 firmware flashing.
  3. I can add it if you think it would be valuable.

Changed the destination directory name under the MF install directory to properly match the .zip file.

Improved error handling and directory path discovery to support running from different locations.

Added more descriptions and error handlings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copying Community folders manually during testing is a multi-step, potentially hazardous task

2 participants