I have made my own application with electron, and I encounter an issue with production builds, when it comes to launching an external python script.
When I run the code in the dev environment, I have something like:
const out = spawnSync(PYTHON_LOCATION, ['-d', '-j', '-p', path, tempfile]);
and it works well because PYTHON_LOCATION
is public/python.py
.
However, when I use electron-builder to make an AppImage, this does not work because the script can't obviously be found. An AppImage application is a single file and it's obvious that the public directory is not exported with it.
Is there a solution to this issue?
Thanks!