Skip to content

Commit 7f2d148

Browse files
committed
GitHub CI Win: Version.txt is not present in NDI
Windows distribution of NDI usually doesn't contain Version.txt so do not use it. Moreover the previous way of creating the version file (in .bashrc) was not perfect. Write at least NDI major version if NDI_VERSION is not present.
1 parent 609eccc commit 7f2d148

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/scripts/Windows/prepare_msys.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/bin/sh -eux
1+
#!/bin/bash
2+
3+
set -ex
24

35
mkdir -p /usr/local/lib /usr/local/bin /usr/local/include
46
cat >> ~/.bash_profile <<'EOF'
@@ -17,7 +19,6 @@ if test -d /c/Program\ Files/NDI; then
1719
NDI_D=$(ls -d /c/Program\ Files/NDI/*SDK)
1820
export CPATH=$CPATH:$NDI_D/Include
1921
export LIBRARY_PATH=$LIBRARY_PATH:$NDI_D/Lib/x64
20-
cat $NDI_D/Version.txt | sed 's/\(.*\)/\#define NDI_VERSION \"\1\"/' | tee /usr/local/include/ndi_version.h
2122
fi
2223
2324
JACK_D=/c/Program\ Files/JACK2

src/video_capture/ndi.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ static void show_help(struct vidcap_state_ndi *s) {
167167
s->NDIlib->find_destroy(pNDI_find);
168168
#ifdef NDI_VERSION
169169
cout << NDI_VERSION "\n";
170+
#elif defined USE_NDI_VERSION
171+
cout << "NDI version " << USE_NDI_VERSION << "\n";
170172
#endif
171173
}
172174

0 commit comments

Comments
 (0)