Skip to content

Commit

Permalink
GitHub CI Win: Version.txt is not present in NDI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MartinPulec committed May 23, 2022
1 parent 609eccc commit 7f2d148
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/Windows/prepare_msys.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh -eux
#!/bin/bash

set -ex

mkdir -p /usr/local/lib /usr/local/bin /usr/local/include
cat >> ~/.bash_profile <<'EOF'
Expand All @@ -17,7 +19,6 @@ if test -d /c/Program\ Files/NDI; then
NDI_D=$(ls -d /c/Program\ Files/NDI/*SDK)
export CPATH=$CPATH:$NDI_D/Include
export LIBRARY_PATH=$LIBRARY_PATH:$NDI_D/Lib/x64
cat $NDI_D/Version.txt | sed 's/\(.*\)/\#define NDI_VERSION \"\1\"/' | tee /usr/local/include/ndi_version.h
fi
JACK_D=/c/Program\ Files/JACK2
Expand Down
2 changes: 2 additions & 0 deletions src/video_capture/ndi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ static void show_help(struct vidcap_state_ndi *s) {
s->NDIlib->find_destroy(pNDI_find);
#ifdef NDI_VERSION
cout << NDI_VERSION "\n";
#elif defined USE_NDI_VERSION
cout << "NDI version " << USE_NDI_VERSION << "\n";
#endif
}

Expand Down

0 comments on commit 7f2d148

Please sign in to comment.