-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report versions of gm, ffmpeg, etc. #1851
Conversation
Finally figured out how to deal with programs who decided it is a good idea not to have a --version option so we instead can grep and awk and cut etc to get the obvious answer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we don't have bash on Windows?
OK, shall I put it inside |
In the top CMakLists, we have the Line 74 in da90090
I believe we can check if |
The Windows CI has bash, and returns:
|
So no gm and ffmpeg installed? The test checks if they exist before we try to get versions. And seems to work for the GDAL tools. |
gm and ffmpeg are only installed when we run the whole tests. |
OK, so it works on Windows if bash is installed. is it likely that there will be people running cmake on Windows and not have bash? 99.9% of Windows users will install from the binary installer, no? Is it worth adding an if-test? Perhaps cmake will stop if one of these fails due to lack of bash, so safest to add that protection? |
Co-Authored-By: Dongdong Tian <[email protected]>
Can we do better than the awkward |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for me. Hopefully it also works for @joa-quim.
Let's wait to accept this PR until @joa-quim has tried it. |
One less pipe and adds GDAL in front.
I believe I found a better way. Will try if it works. |
I guess it is a question of ${AWK} is more likely to be available in Windows than tr and head. We could do gm help | awk '{if (NR == 1) print $2}' for instance. |
Closed as #1853 is better. |
Finally figured out how to deal with programs such as gm and ffmpeg who decided it is a good idea not to have a --version option, so we instead are forced to grep and awk and cut etc to get the obvious answers.