diff options
author | James Ross-Gowan <rossymiles@gmail.com> | 2015-03-29 22:36:46 +1100 |
---|---|---|
committer | James Ross-Gowan <rossymiles@gmail.com> | 2015-04-11 14:27:25 +1000 |
commit | ac7ecbe30cdec598955471d2ed012f36296b78de (patch) | |
tree | cd62299e8df947fa73787a857e5019277ed5d952 /wscript_build.py | |
parent | 6f46bafbd06e6a107e55f35860744ed66c1b8426 (diff) | |
download | mpv-ac7ecbe30cdec598955471d2ed012f36296b78de.tar.bz2 mpv-ac7ecbe30cdec598955471d2ed012f36296b78de.tar.xz |
win32: use a platform-specific unicode entry-point
Add a platform-specific entry-point for Windows. This will allow some
platform-specific initialization to be added without the need for ugly
ifdeffery in main.c.
As an immediate advantage, mpv can now use a unicode entry-point and
convert the command line arguments to UTF-8 before passing them to
mpv_main, so osdep_preinit can be simplified a little bit.
Diffstat (limited to 'wscript_build.py')
-rw-r--r-- | wscript_build.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wscript_build.py b/wscript_build.py index 20a2633d99..4478725596 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -71,6 +71,10 @@ def build(ctx): source = "demux/ebml.c", target = "ebml_defs.c") + main_fn_c = { + 'win32': 'player/main-fn-win.c', + }.get(ctx.env.DEST_OS, "player/main-fn-unix.c") + getch2_c = { 'win32': 'osdep/terminal-win.c', }.get(ctx.env.DEST_OS, "osdep/terminal-unix.c") @@ -418,7 +422,7 @@ def build(ctx): if ctx.dependency_satisfied('cplayer'): ctx( target = "mpv", - source = "player/main_fn.c", + source = main_fn_c, use = ctx.dependencies_use() + ['objects'], includes = _all_includes(ctx), features = "c cprogram", |