[WIP] Build dependencies from sources #3283
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For Windows releases, scrcpy use prebuilt dependencies downloaded from "official" sources.
However, the vendors don't always provide builds for all the architectures, and we can't apply patches when necessary (to fix a bug until the next release for example). Also see #1753.
For Linux, we use the dependencies from the package manager.
But it might be interesting to build the dependencies to provide a "portable" version (either a static build or an archive with all .so included and RPATH set).
This MR aims to provide scripts (one for each dependency: ffmpeg, sdl, libusb, adb(?)), intended to be called from the release script (from Linux to build for Linux and Windows (macOS is more complicated from Linux)).
For now, only the script to build ffmpeg for linux is provided:
This downloads the FFmpeg sources, then build locally for the target platform, and install them into
app/deps/target-x86_64-linux-gnu
. The structure looks like this (only the relevant parts of the tree are shown here):The correct target directory should then be used by meson to build (not done yet).
The scripts (for now ffmpeg only) must be adapted to cross-compile with mingw when the host system is Windows (not done yet).