summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-01-14 08:18:05 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-01-14 20:42:12 +0100
commit9dc9254da25b784fe32ec6bedfc258efe2254ba5 (patch)
treebbb17886a1ab1cbecd8c6ab6c1078f1a20bb9ebe /wscript_build.py
parente32adef9c4775f9bfb696080b17193bbb58db507 (diff)
downloadmpv-9dc9254da25b784fe32ec6bedfc258efe2254ba5.tar.bz2
mpv-9dc9254da25b784fe32ec6bedfc258efe2254ba5.tar.xz
cocoa: add application icon to the Dock when run from CLI
Application icon was added to the Dock only when run inside of a bundle. That was handled automatically by OS X using the Info.plist definition. To add the Application icon when run as a CLI program, I used the samme approach in the X11 code and loaded the icon as a static binary blob inside of mpv's binary. This is the simplest approach as it avoid headackes when relocating the binary and such.
Diffstat (limited to 'wscript_build.py')
-rw-r--r--wscript_build.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/wscript_build.py b/wscript_build.py
index 5cdbd5a4f7..5b46c4fa60 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -35,6 +35,10 @@ def build(ctx):
ctx.load('generators.sources')
ctx.file2string(
+ source = "TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns",
+ target = "osdep/macosx_icon.inc")
+
+ ctx.file2string(
source = "video/out/x11_icon.bin",
target = "video/out/x11_icon.inc")