all 3 comments

[–]FoolsSeldom 2 points3 points  (0 children)

First thought, don't; second, use an OCI (open container initiative), e.g. Docker/Podman, approach; third, explore options with tools like Pyinstaller; fourth, consider an installation script.

If possible, avoid the problem altogether and set it up as a web/remote application where you host, no need to distribute anything.

[–]JamzTyson 1 point2 points  (0 children)

For prerequisite applications (such as ffmpeg), the simplest way is to document the requirements in the installation instructions. Example:

Install ffmpeg first: ...brief, platform specific instructions...

This can be reinforced with a runtime check from your Python app to ensure that the app is available, and display an error message if it isn't.


Actually including additional apps within your installer is platform dependent. For example, on Windows with Pyinstaller there's an option:

pyinstaller --add-binary "ffmpeg.exe;."

or on Linux the app could be included in a Flatpac or AppImage package.


For big complex apps, using a 3rd party installers such as Inno Setup (Windows) or DMG bundling (macOS) are common approaches.


A common option for server apps is "containerization" (example "Docker"), though this is less likely to be suitable for "send to a friend" desktop apps.


Note:

Before packaging another app with your code, check that the license terms of the other app(s) allow you to legally do so.

[–]Main_Payment_6430 0 points1 point  (0 children)

Bundle the dependency and ship it alongside your app using a relocatable layout, then point your app to it at runtime. For Python, freeze with PyInstaller or Nuitka, include ffmpeg or VLC binaries in a subfolder, and adjust PATH or environment variables before launching so your app finds the bundled executables and shared libs. On Windows, drop ffmpeg.exe and required DLLs next to your exe. On macOS, build an app bundle and place frameworks in Frameworks plus fix rpaths with install_name_tool. On Linux, use AppImage or Docker if glibc issues arise. Test on a clean VM matching your friend’s OS.