mirror of
https://github.com/mpv-player/mpv
synced 2025-03-21 10:51:51 +00:00
build: change filenames of generated files
Force them into a more consistent naming schema.
This commit is contained in:
parent
c67f36dd18
commit
07b0c18bad
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include "version.h"
|
||||
#include "generated/version.h"
|
||||
#ifdef NO_BUILD_TIMESTAMPS
|
||||
#undef BUILDDATE
|
||||
#define BUILDDATE "UNKNOWN"
|
||||
|
@ -224,7 +224,7 @@ int ebml_resync_cluster(struct mp_log *log, stream_t *s)
|
||||
#define E_S(str, count) EVALARGS(E_SN, str, count, N)
|
||||
#define FN(id, name, multiple, N) { id, multiple, offsetof(struct ebml_ ## N, name), offsetof(struct ebml_ ## N, n_ ## name), &ebml_##name##_desc},
|
||||
#define F(id, name, multiple) EVALARGS(FN, id, name, multiple, N)
|
||||
#include "ebml_defs.c"
|
||||
#include "generated/ebml_defs.c"
|
||||
#undef EVALARGS
|
||||
#undef SN
|
||||
#undef S
|
||||
|
@ -63,7 +63,7 @@ struct ebml_parse_ctx {
|
||||
bool no_error_messages;
|
||||
};
|
||||
|
||||
#include "ebml_types.h"
|
||||
#include "generated/ebml_types.h"
|
||||
|
||||
#define EBML_ID_INVALID 0xffffffff
|
||||
|
||||
|
@ -224,7 +224,7 @@ const struct m_sub_options input_config = {
|
||||
};
|
||||
|
||||
static const char builtin_input_conf[] =
|
||||
#include "input/input_conf.h"
|
||||
#include "generated/etc/input.conf.inc"
|
||||
;
|
||||
|
||||
static bool test_rect(struct mp_rect *rc, int x, int y)
|
||||
|
@ -143,7 +143,7 @@ static void terminate_cocoa_application(void)
|
||||
}
|
||||
|
||||
static const char macosx_icon[] =
|
||||
#include "osdep/macosx_icon.inc"
|
||||
#include "generated/TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns.inc"
|
||||
;
|
||||
|
||||
- (NSImage *)getMPVIcon
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#include <winver.h>
|
||||
#include "version.h"
|
||||
#include "generated/version.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2, 0, 0, 0
|
||||
|
@ -51,7 +51,7 @@
|
||||
// All these are generated from player/javascript/*.js
|
||||
static const char *const builtin_files[][3] = {
|
||||
{"@/defaults.js",
|
||||
# include "player/javascript/defaults.js.inc"
|
||||
# include "generated/player/javascript/defaults.js.inc"
|
||||
},
|
||||
{0}
|
||||
};
|
||||
|
12
player/lua.c
12
player/lua.c
@ -57,22 +57,22 @@
|
||||
// All these are generated from player/lua/*.lua
|
||||
static const char * const builtin_lua_scripts[][2] = {
|
||||
{"mp.defaults",
|
||||
# include "player/lua/defaults.inc"
|
||||
# include "generated/player/lua/defaults.lua.inc"
|
||||
},
|
||||
{"mp.assdraw",
|
||||
# include "player/lua/assdraw.inc"
|
||||
# include "generated/player/lua/assdraw.lua.inc"
|
||||
},
|
||||
{"mp.options",
|
||||
# include "player/lua/options.inc"
|
||||
# include "generated/player/lua/options.lua.inc"
|
||||
},
|
||||
{"@osc.lua",
|
||||
# include "player/lua/osc.inc"
|
||||
# include "generated/player/lua/osc.lua.inc"
|
||||
},
|
||||
{"@ytdl_hook.lua",
|
||||
# include "player/lua/ytdl_hook.inc"
|
||||
# include "generated/player/lua/ytdl_hook.lua.inc"
|
||||
},
|
||||
{"@stats.lua",
|
||||
# include "player/lua/stats.inc"
|
||||
# include "generated/player/lua/stats.lua.inc"
|
||||
},
|
||||
{"@console.lua",
|
||||
# include "player/lua/console.inc"
|
||||
|
@ -66,7 +66,7 @@
|
||||
#include "screenshot.h"
|
||||
|
||||
static const char def_config[] =
|
||||
#include "player/builtin_conf.inc"
|
||||
#include "generated/etc/builtin.conf.inc"
|
||||
;
|
||||
|
||||
#if HAVE_COCOA
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "osd_state.h"
|
||||
|
||||
static const char osd_font_pfb[] =
|
||||
#include "sub/osd_font.h"
|
||||
#include "generated/sub/osd_font.otf.inc"
|
||||
;
|
||||
|
||||
#include "sub/ass_mp.h"
|
||||
|
@ -163,7 +163,7 @@ static void disable_power_management(struct vo_cocoa_state *s)
|
||||
}
|
||||
|
||||
static const char macosx_icon[] =
|
||||
#include "osdep/macosx_icon.inc"
|
||||
#include "generated/TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns.inc"
|
||||
;
|
||||
|
||||
static void set_application_icon(NSApplication *app)
|
||||
|
@ -31,16 +31,16 @@
|
||||
#include "wayland_common.h"
|
||||
|
||||
// Generated from xdg-shell.xml
|
||||
#include "video/out/wayland/xdg-shell.h"
|
||||
#include "generated/wayland/xdg-shell.h"
|
||||
|
||||
// Generated from idle-inhibit-unstable-v1.xml
|
||||
#include "video/out/wayland/idle-inhibit-v1.h"
|
||||
#include "generated/wayland/idle-inhibit-v1.h"
|
||||
|
||||
// Generated from xdg-decoration-unstable-v1.xml
|
||||
#include "video/out/wayland/xdg-decoration-v1.h"
|
||||
#include "generated/wayland/xdg-decoration-v1.h"
|
||||
|
||||
// Generated from presentation-time.xml
|
||||
#include "video/out/wayland/presentation-time.h"
|
||||
#include "generated/wayland/presentation-time.h"
|
||||
|
||||
#define OPT_BASE_STRUCT struct wayland_opts
|
||||
const struct m_sub_options wayland_conf = {
|
||||
|
@ -107,19 +107,19 @@ typedef struct
|
||||
} MotifWmHints;
|
||||
|
||||
static const char x11_icon_16[] =
|
||||
#include "video/out/x11_icon_16.inc"
|
||||
#include "generated/etc/mpv-icon-8bit-16x16.png.inc"
|
||||
;
|
||||
|
||||
static const char x11_icon_32[] =
|
||||
#include "video/out/x11_icon_32.inc"
|
||||
#include "generated/etc/mpv-icon-8bit-32x32.png.inc"
|
||||
;
|
||||
|
||||
static const char x11_icon_64[] =
|
||||
#include "video/out/x11_icon_64.inc"
|
||||
#include "generated/etc/mpv-icon-8bit-64x64.png.inc"
|
||||
;
|
||||
|
||||
static const char x11_icon_128[] =
|
||||
#include "video/out/x11_icon_128.inc"
|
||||
#include "generated/etc/mpv-icon-8bit-128x128.png.inc"
|
||||
;
|
||||
|
||||
#define ICON_ENTRY(var) { (char *)var, sizeof(var) }
|
||||
|
2
wscript
2
wscript
@ -988,7 +988,7 @@ def __write_version__(ctx):
|
||||
|
||||
ctx(
|
||||
source = 'version.sh',
|
||||
target = 'version.h',
|
||||
target = 'generated/version.h',
|
||||
rule = 'sh ${SRC} ${CWD_ST:VERSIONSH_CWD} ${VERSIONH_ST:TGT}',
|
||||
always = True,
|
||||
update_outputs = True)
|
||||
|
@ -54,49 +54,34 @@ def build(ctx):
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = "TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns",
|
||||
target = "osdep/macosx_icon.inc",
|
||||
target = "generated/TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns.inc",
|
||||
)
|
||||
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = "etc/mpv-icon-8bit-16x16.png",
|
||||
target = "video/out/x11_icon_16.inc",
|
||||
)
|
||||
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = "etc/mpv-icon-8bit-32x32.png",
|
||||
target = "video/out/x11_icon_32.inc",
|
||||
)
|
||||
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = "etc/mpv-icon-8bit-64x64.png",
|
||||
target = "video/out/x11_icon_64.inc",
|
||||
)
|
||||
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = "etc/mpv-icon-8bit-128x128.png",
|
||||
target = "video/out/x11_icon_128.inc",
|
||||
)
|
||||
icons = [16, 32, 64, 128]
|
||||
for size in icons:
|
||||
name = "etc/mpv-icon-8bit-%dx%d.png" % (size, size)
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = name,
|
||||
target = "generated/%s.inc" % name,
|
||||
)
|
||||
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = "etc/input.conf",
|
||||
target = "input/input_conf.h",
|
||||
target = "generated/etc/input.conf.inc",
|
||||
)
|
||||
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = "etc/builtin.conf",
|
||||
target = "player/builtin_conf.inc",
|
||||
target = "generated/etc/builtin.conf.inc",
|
||||
)
|
||||
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = "sub/osd_font.otf",
|
||||
target = "sub/osd_font.h",
|
||||
target = "generated/sub/osd_font.otf.inc",
|
||||
)
|
||||
|
||||
lua_files = ["defaults.lua", "assdraw.lua", "options.lua", "osc.lua",
|
||||
@ -107,43 +92,43 @@ def build(ctx):
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = fn,
|
||||
target = os.path.splitext(fn)[0] + ".inc",
|
||||
target = "generated/%s.inc" % fn,
|
||||
)
|
||||
|
||||
ctx(
|
||||
features = "file2string",
|
||||
source = "player/javascript/defaults.js",
|
||||
target = "player/javascript/defaults.js.inc",
|
||||
target = "generated/player/javascript/defaults.js.inc",
|
||||
)
|
||||
|
||||
if ctx.dependency_satisfied('wayland'):
|
||||
ctx.wayland_protocol_code(proto_dir = ctx.env.WL_PROTO_DIR,
|
||||
protocol = "stable/xdg-shell/xdg-shell",
|
||||
target = "video/out/wayland/xdg-shell.c")
|
||||
target = "generated/wayland/xdg-shell.c")
|
||||
ctx.wayland_protocol_header(proto_dir = ctx.env.WL_PROTO_DIR,
|
||||
protocol = "stable/xdg-shell/xdg-shell",
|
||||
target = "video/out/wayland/xdg-shell.h")
|
||||
target = "generated/wayland/xdg-shell.h")
|
||||
ctx.wayland_protocol_code(proto_dir = ctx.env.WL_PROTO_DIR,
|
||||
protocol = "unstable/idle-inhibit/idle-inhibit-unstable-v1",
|
||||
target = "video/out/wayland/idle-inhibit-v1.c")
|
||||
target = "generated/wayland/idle-inhibit-unstable-v1.c")
|
||||
ctx.wayland_protocol_header(proto_dir = ctx.env.WL_PROTO_DIR,
|
||||
protocol = "unstable/idle-inhibit/idle-inhibit-unstable-v1",
|
||||
target = "video/out/wayland/idle-inhibit-v1.h")
|
||||
target = "generated/wayland/idle-inhibit-unstable-v1.h")
|
||||
ctx.wayland_protocol_code(proto_dir = ctx.env.WL_PROTO_DIR,
|
||||
protocol = "stable/presentation-time/presentation-time",
|
||||
target = "video/out/wayland/presentation-time.c")
|
||||
target = "generated/wayland/presentation-time.c")
|
||||
ctx.wayland_protocol_header(proto_dir = ctx.env.WL_PROTO_DIR,
|
||||
protocol = "stable/presentation-time/presentation-time",
|
||||
target = "video/out/wayland/presentation-time.h")
|
||||
target = "generated/wayland/presentation-time.h")
|
||||
ctx.wayland_protocol_code(proto_dir = ctx.env.WL_PROTO_DIR,
|
||||
protocol = "unstable/xdg-decoration/xdg-decoration-unstable-v1",
|
||||
target = "video/out/wayland/xdg-decoration-v1.c")
|
||||
target = "generated/wayland/xdg-decoration-unstable-v1.c")
|
||||
ctx.wayland_protocol_header(proto_dir = ctx.env.WL_PROTO_DIR,
|
||||
protocol = "unstable/xdg-decoration/xdg-decoration-unstable-v1",
|
||||
target = "video/out/wayland/xdg-decoration-v1.h")
|
||||
target = "generated/wayland/xdg-decoration-unstable-v1.h")
|
||||
|
||||
ctx(features = "ebml_header", target = "ebml_types.h")
|
||||
ctx(features = "ebml_definitions", target = "ebml_defs.c")
|
||||
ctx(features = "ebml_header", target = "generated/ebml_types.h")
|
||||
ctx(features = "ebml_definitions", target = "generated/ebml_defs.c")
|
||||
|
||||
def swift(task):
|
||||
src = [x.abspath() for x in task.inputs]
|
||||
@ -521,10 +506,10 @@ def build(ctx):
|
||||
( "video/out/vulkan/context_xlib.c", "vulkan && x11" ),
|
||||
( "video/out/vulkan/utils.c", "vulkan" ),
|
||||
( "video/out/w32_common.c", "win32-desktop" ),
|
||||
( "video/out/wayland/idle-inhibit-v1.c", "wayland" ),
|
||||
( "video/out/wayland/presentation-time.c", "wayland" ),
|
||||
( "video/out/wayland/xdg-decoration-v1.c", "wayland" ),
|
||||
( "video/out/wayland/xdg-shell.c", "wayland" ),
|
||||
( "generated/wayland/idle-inhibit-unstable-v1.c", "wayland" ),
|
||||
( "generated/wayland/presentation-time.c", "wayland" ),
|
||||
( "generated/wayland/xdg-decoration-unstable-v1.c", "wayland" ),
|
||||
( "generated/wayland/xdg-shell.c", "wayland" ),
|
||||
( "video/out/wayland_common.c", "wayland" ),
|
||||
( "video/out/win32/displayconfig.c", "win32-desktop" ),
|
||||
( "video/out/win32/droptarget.c", "win32-desktop" ),
|
||||
@ -590,7 +575,7 @@ def build(ctx):
|
||||
ctx.path.find_node('osdep/mpv.rc'),
|
||||
ctx.path.find_node(node))
|
||||
|
||||
version = ctx.bldnode.find_node('version.h')
|
||||
version = ctx.bldnode.find_node('generated/version.h')
|
||||
if version:
|
||||
ctx.add_manual_dependency(
|
||||
ctx.path.find_node('osdep/mpv.rc'),
|
||||
|
Loading…
Reference in New Issue
Block a user