arduino / lab-micropython-editor

Arduino Lab for MicroPython is an Integrated Development Environment (IDE) for MicroPython.
GNU Affero General Public License v3.0
224 stars 28 forks source link

Extra resource #121

Closed murilopolese closed 7 months ago

murilopolese commented 7 months ago

Problem

VirtualBox_WinDev2311Eval_24_04_2024_18_13_10

On Windows and Linux, when packaged, the app lives inside an asar file. This causes issues getting the full path for the helpers.py file to be executed.

Solution

There are several ways to go around this issue. I used electron builder's extraResources to include the helper.py file inside the resources folder on the packaged app. This way the correct absolute path is resolved when the package is built.

Testing

The operations that use the helper are remove folder (from the board) and upload folder.

Probably needs some more extensive testing on MacOS. It looks like it's working for Linux and Windows.