summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorMartin Herkt <lachs0r@srsfckn.biz>2014-01-02 05:26:22 +0100
committerMartin Herkt <lachs0r@srsfckn.biz>2014-01-02 05:30:49 +0100
commit1437d9b8bc49228c626c751ff39f595b40ec718d (patch)
treeeeb7846de867daf44e33dabab599023a06b27687 /wscript_build.py
parente9f577eb9a81cea09209bbf4eb910f89caa63b02 (diff)
downloadmpv-1437d9b8bc49228c626c751ff39f595b40ec718d.tar.bz2
mpv-1437d9b8bc49228c626c751ff39f595b40ec718d.tar.xz
Add Windows console wrapper program (mpv.com)
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/wscript_build.py b/wscript_build.py
index cf3ccbfe45..4f216e41fb 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -447,6 +447,19 @@ def build(ctx):
**cprog_kwargs
)
+ if ctx.env.DEST_OS == 'win32':
+ wrapctx = ctx(
+ target = "mpv",
+ source = ['osdep/win32-console-wrapper.c'],
+ features = "c cprogram",
+ install_path = ctx.env.BINDIR
+ )
+
+ wrapctx.env.cprogram_PATTERN = "%s.com"
+ wrapflags = ['-municode', '-mconsole']
+ wrapctx.env.CFLAGS = wrapflags
+ wrapctx.env.LAST_LINKFLAGS = wrapflags
+
if ctx.dependency_satisfied('macosx-bundle'):
from waflib import Utils
ctx.install_files(ctx.env.BINDIR, 'mpv', chmod=Utils.O755)