| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Creates a GYP include file for building FFmpeg from source. | 7 """Creates a GYP include file for building FFmpeg from source. |
| 8 | 8 |
| 9 The way this works is a bit silly but it's easier than reverse engineering | 9 The way this works is a bit silly but it's easier than reverse engineering |
| 10 FFmpeg's configure scripts and Makefiles. It scans through build directories for | 10 FFmpeg's configure scripts and Makefiles. It scans through build directories for |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 cd deps | 26 cd deps |
| 27 git clone http://git.chromium.org/chromium/third_party/ffmpeg.git | 27 git clone http://git.chromium.org/chromium/third_party/ffmpeg.git |
| 28 | 28 |
| 29 Step 3: Build for ia32/x64 platforms outside chroot (will need yasm in path) | 29 Step 3: Build for ia32/x64 platforms outside chroot (will need yasm in path) |
| 30 cd path/to/chromeos/deps/ffmpeg | 30 cd path/to/chromeos/deps/ffmpeg |
| 31 ./chromium/scripts/build_ffmpeg.sh linux ia32 path/to/chromeos/deps | 31 ./chromium/scripts/build_ffmpeg.sh linux ia32 path/to/chromeos/deps |
| 32 ./chromium/scripts/build_ffmpeg.sh linux x64 path/to/chromeos/deps | 32 ./chromium/scripts/build_ffmpeg.sh linux x64 path/to/chromeos/deps |
| 33 | 33 |
| 34 Step 4: Build and enter Chromium OS chroot: | 34 Step 4: Build and enter Chromium OS chroot: |
| 35 cd path/to/chromeos/src/scripts | 35 cd path/to/chromeos/src/scripts |
| 36 ./make_chroot | 36 cros_sdk --enter |
| 37 ./enter_chroot.sh | |
| 38 | 37 |
| 39 Step 5: Setup build environment for ARM: | 38 Step 5: Setup build environment for ARM: |
| 40 ./setup_board --board arm-generic | 39 ./setup_board --board arm-generic |
| 41 | 40 |
| 42 Step 6: Build for arm/arm-neon platforms inside chroot | 41 Step 6: Build for arm/arm-neon platforms inside chroot |
| 43 ./build_ffmpeg.sh linux arm path/to/chromeos/deps | 42 ./chromium/scripts/build_ffmpeg.sh linux arm path/to/chromeos/deps |
| 44 ./build_ffmpeg.sh linux arm-neon path/to/chromeos/deps | 43 ./chromium/scripts/build_ffmpeg.sh linux arm-neon path/to/chromeos/deps |
| 45 | 44 |
| 46 Step 7: Exit chroot and generate gyp file | 45 Step 7: Exit chroot and generate gyp file |
| 47 exit | 46 exit |
| 48 cd path/to/chromeos/deps/ffmpeg | 47 cd path/to/chromeos/deps/ffmpeg |
| 49 ./chromium/scripts/generate_gyp.py | 48 ./chromium/scripts/generate_gyp.py |
| 50 | 49 |
| 51 Phew! | 50 Phew! |
| 52 | 51 |
| 53 While this seems insane, reverse engineering and maintaining a gyp file by hand | 52 While this seems insane, reverse engineering and maintaining a gyp file by hand |
| 54 is significantly more painful. | 53 is significantly more painful. |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 | 430 |
| 432 # Generate conditional stanza for each disjoint source set. | 431 # Generate conditional stanza for each disjoint source set. |
| 433 for s in CreatePairwiseDisjointSets(sets): | 432 for s in CreatePairwiseDisjointSets(sets): |
| 434 fd.write(s.GenerateGypStanza()) | 433 fd.write(s.GenerateGypStanza()) |
| 435 | 434 |
| 436 fd.write(GYP_FOOTER) | 435 fd.write(GYP_FOOTER) |
| 437 fd.close() | 436 fd.close() |
| 438 | 437 |
| 439 if __name__ == '__main__': | 438 if __name__ == '__main__': |
| 440 main() | 439 main() |
| OLD | NEW |