Closed octimot closed 7 months ago
I just realized that I might be wrong with my assumption that the ffmpeg binary should be in the MacOS folder in the first place considering that the working directory is Contents/Resources.
I'd just copy the file as a data file, and not worry about placing it in the MacOS folder.
I don't have a standard solution for your second question, that's something you should implement in your own code. But note that using environment variables like this is generally not something that fits into py2app's primary use case: creating macOS application bundles that are started by double clicking in the Finder.
Thank you for the reply!
I'd just copy the file as a data file, and not worry about placing it in the MacOS folder.
Understood!
I don't have a standard solution for your second question, that's something you should implement in your own code. But note that using environment variables like this is generally not something that fits into py2app's primary use case: creating macOS application bundles that are started by double clicking in the Finder.
The issue is that my app makes use of other packages / modules that need to be able to access ffmpeg and declaring the environment variable within my code is the only solution that I could find. I am calling py2app with ----emulate-shell-environment
though, so it seems to work fine (so far). Is there something that could go terribly wrong in your opinion? Or would you recommend looking for a different approach?
Hello,
I'm trying to bundle ffmpeg using py2app for our tool (https://github.com/octimot/StoryToolkitAI) but can't seem to find the proper way to do it.
Technically, this would involve 2 things:
I've tried to include ffmpeg into the data_files variable:
By doing this, the .app file will contain the ffmpeg binary in the MacOS folder, but the bundled python still prefers my local homebrew binary.
For no. 2 I could also define a
os.environ['FFMPEG_BINARY']
manually in the app script, but I was wondering if there's a standard way to do it with py2app.Obviously, I'm really new at this. So the question is, how should I tell py2app to fulfil these two things?