mirror of https://github.com/mpv-player/mpv
build: move copyright statement to a shared location
Now macosx_menubar.m and mpv.rc (win32) use the same copyright string. (This is a bit roundabout, because mpv.rc can't use C constants. Also the C code wants to avoid rebuilding real source files if only version.h changed, so only version.c includes version.h.)
This commit is contained in:
parent
a90abe0546
commit
49e704cb19
|
@ -68,6 +68,7 @@ enum {
|
|||
|
||||
extern const char mpv_version[];
|
||||
extern const char mpv_builddate[];
|
||||
extern const char mpv_copyright[];
|
||||
|
||||
char *mp_format_time(double time, bool fractions);
|
||||
char *mp_format_time_fmt(const char *fmt, double time);
|
||||
|
|
|
@ -24,3 +24,4 @@
|
|||
|
||||
const char mpv_version[] = "mpv " VERSION;
|
||||
const char mpv_builddate[] = BUILDDATE;
|
||||
const char mpv_copyright[] = MPVCOPYRIGHT;
|
||||
|
|
|
@ -612,7 +612,7 @@
|
|||
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"mpv", @"ApplicationName",
|
||||
[self getMPVIcon], @"ApplicationIcon",
|
||||
@"Copyright © 2000-2017 mpv/MPlayer/mplayer2 projects", @"Copyright",
|
||||
[NSString stringWithUTF8String:mpv_copyright], @"Copyright",
|
||||
[NSString stringWithUTF8String:mpv_version], @"ApplicationVersion",
|
||||
nil];
|
||||
[NSApp orderFrontStandardAboutPanelWithOptions:options];
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include <winver.h>
|
||||
#include "version.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2, 0, 0, 0
|
||||
|
@ -32,7 +33,7 @@ VS_VERSION_INFO VERSIONINFO
|
|||
VALUE "CompanyName", "mpv"
|
||||
VALUE "FileDescription", "mpv"
|
||||
VALUE "FileVersion", "2.0.0.0"
|
||||
VALUE "LegalCopyright", "(C) 2000-2018 mpv/mplayer2/MPlayer"
|
||||
VALUE "LegalCopyright", MPVCOPYRIGHT
|
||||
VALUE "OriginalFilename", "mpv.exe"
|
||||
VALUE "ProductName", "mpv"
|
||||
VALUE "ProductVersion", "2.0.0.0"
|
||||
|
|
|
@ -140,9 +140,8 @@ void mp_update_logging(struct MPContext *mpctx, bool preinit)
|
|||
void mp_print_version(struct mp_log *log, int always)
|
||||
{
|
||||
int v = always ? MSGL_INFO : MSGL_V;
|
||||
mp_msg(log, v,
|
||||
"%s (C) 2000-2018 mpv/MPlayer/mplayer2 projects\n built on %s\n",
|
||||
mpv_version, mpv_builddate);
|
||||
mp_msg(log, v, "%s %s\n built on %s\n",
|
||||
mpv_version, mpv_copyright, mpv_builddate);
|
||||
print_libav_versions(log, v);
|
||||
mp_msg(log, v, "\n");
|
||||
// Only in verbose mode.
|
||||
|
|
|
@ -54,11 +54,13 @@ fi
|
|||
NEW_REVISION="#define VERSION \"${VERSION}\""
|
||||
OLD_REVISION=$(head -n 1 "$version_h" 2> /dev/null)
|
||||
BUILDDATE="#define BUILDDATE \"$(date)\""
|
||||
MPVCOPYRIGHT="#define MPVCOPYRIGHT \"Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects\""
|
||||
|
||||
# Update version.h only on revision changes to avoid spurious rebuilds
|
||||
if test "$NEW_REVISION" != "$OLD_REVISION"; then
|
||||
cat <<EOF > "$version_h"
|
||||
$NEW_REVISION
|
||||
$BUILDDATE
|
||||
$MPVCOPYRIGHT
|
||||
EOF
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue