Skip to content

Commit ebe8427

Browse files
Updated run?examples to support Windows executables.
1 parent 70d90ee commit ebe8427

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

README.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,27 +61,17 @@ This script configures, builds and installs the library.
6161
python scripts/cmake.py <Debug|Release|DebWithRelInfo> <COMPILER_NAME> <COMPILER_VERSION>
6262
```
6363

64+
## Install FFmpeg for Examples and Unit Tests
6465

65-
## Examples
66+
Examples and Unit Tests execution requires video data generation. In order to generate such data it is required to install FFmpeg using your OS package manager such as:
6667

6768
```bash
68-
# Build all the examples
69-
python scripts/cmake.py <Debug|Release|RelWithDebInfo> <COMPILER_NAME> <COMPILER_VERSION> --examples --warnings
70-
71-
# Run all the examples
72-
python3 scripts/tools/run_examples.py install/examples
73-
```
74-
Examples are installed in $PWD/install/examples.
75-
76-
77-
## Unit Tests and Code Coverage
78-
79-
Unit tests execution requires video data generation. In order to generate such data it is required to install FFmpeg using your OS package manager such as:
80-
81-
```bash
82-
# Windows
69+
# Windows, using chocolatey
8370
choco install ffmpeg -y
8471

72+
# Windows, using winget
73+
winget install ffmpeg
74+
8575
# Linux
8676
sudo apt-get install -y ffmpeg
8777

@@ -92,9 +82,24 @@ brew install ffmpeg
9282
Once FFmpeg is installed and available on the path run the following python script:
9383

9484
```bash
95-
python3 scripts/tests/generate_test_data.py
85+
python scripts/tests/generate_test_data.py
9686
```
9787

88+
89+
## Examples
90+
91+
```bash
92+
# Build all the examples
93+
python scripts/cmake.py <Debug|Release|RelWithDebInfo> <COMPILER_NAME> <COMPILER_VERSION> --examples --warnings
94+
95+
# Run all the examples
96+
python scripts/tools/run_examples.py install/examples
97+
```
98+
Examples are installed in $PWD/install/examples.
99+
100+
101+
## Unit Tests and Code Coverage
102+
98103
```bash
99104
# Build Unit Tests with Code Coverage enabled (if supported)
100105
python scripts/cmake.py <Debug|Release|RelWithDebInfo> <COMPILER_NAME> <COMPILER_VERSION> --coverage --warnings

scripts/tools/run_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def examples(args):
4343

4444
examples_found = False
4545
for example in examples_path.iterdir():
46-
if example.is_file() and is_executable(example) and example.name in ["video_reader_simple_decode", "video_writer_simple_encode"]:
46+
if example.is_file() and is_executable(example) and example.name.startswith(("video_reader_simple_decode", "video_writer_simple_encode")):
4747
examples_found = True
4848
print_example_name(example.name)
4949
run(example)

0 commit comments

Comments
 (0)