Separate writing the version into the Info.plist on macOS into a
separate action from the online updates Sparkle framework into a
separate POST_BUILD action because we are not using Sparkle for macOS
builds right now due to codesigning issues.
Also sort tags by reverse tag name in the cmake git version extractor
because a tag was rewritten.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Add `tools/osx/builder`, a POSIX sh script to build all dependant
libraries as static, targetted to OS X 10.7, and build the project with
them (also targetted to OS X 10.7.)
ffmpeg currently does not link, as recording functionality is currently
non-functional anyway, this will be fixed later.
MISC:
- set WORKING_DIRECTORY and ERROR_QUIET for all git commands, for the
cases when the build directory is not under the git checkout
- #include <cerrno> in ConfigManager.cpp as it uses errno
- change `build*` in `.gitignore` to `build/*` so that files starting
with "build" are not affected
Run just one `git tag` command instead of two (with tags and refs) and
break it into the form [tag0, ref0, tag1, ref1, ...]. Iterate over the
list with two counters for tag and ref.
Fix `cmake/GitTagVersion.cmake` to not throw errors when in a shallow
git clone, or any git clone that has no tags.
And when either git or git tag version info is not available, set the
version variables to the defaults, which are:
```
VERSION = '2.0.0'
REVISION = 'unknown'
VERSION_RELEASE = 0
```
To get the version, find the last tag in git tag of the form "v2.0.0" or
"2.0.0". If this is the last tag and the current commit matches the ref
of this tag, the revision will be empty.
In the case that the current commit is not tagged with a version, to get
the revision, use the short sha unless the current commit is tagged with
something that is not a version string, e.g. "feature-foo", in which
case the revision will be "feature-foo".
If the current commit is tagged as e.g. "v2.0.1-foo" or "2.0.1-foo" then
the version will be "2.0.1" and the revision will be "foo". Tags of this
form are also checked when finding the current version.
This is all done in cmake. If there is no git detected, the version will
be "2.0.0" and the revision will be "unknown".