[Xfce4-commits] <midori:master> Use icon with multiple sizes on Windows

Christian Dywan noreply at xfce.org
Sat Jun 26 16:10:01 CEST 2010


Updating branch refs/heads/master
         to 63fce626645ea707726ffc9f2102098829ec201d (commit)
       from facd02f1f22e5cfed9a5f24c10be5092c7cb4418 (commit)

commit 63fce626645ea707726ffc9f2102098829ec201d
Author: Peter de Ridder <peter at xfce.org>
Date:   Sat Jun 26 15:31:44 2010 +0200

    Use icon with multiple sizes on Windows
    
    The icon is prepared already so 'convert' isn't needed anymore.

 data/midori.ico |  Bin 0 -> 36660 bytes
 data/midori.rc  |    2 +-
 wscript         |   30 ------------------------------
 3 files changed, 1 insertions(+), 31 deletions(-)

diff --git a/data/midori.ico b/data/midori.ico
new file mode 100644
index 0000000..d0d482b
Binary files /dev/null and b/data/midori.ico differ
diff --git a/data/midori.rc b/data/midori.rc
index b1f1556..63a5dc0 100644
--- a/data/midori.rc
+++ b/data/midori.rc
@@ -1,2 +1,2 @@
 
-IDR_MAINFRAME           ICON    DISCARDABLE     "../_build_/default/data/midori.ico"
+IDR_MAINFRAME           ICON    DISCARDABLE     "midori.ico"
diff --git a/wscript b/wscript
index fbbb6e8..59595b4 100644
--- a/wscript
+++ b/wscript
@@ -124,8 +124,6 @@ def configure (conf):
         icons = 'no '
 
     if is_mingw (conf.env) or Options.platform == 'win32':
-        if not conf.find_program ('convert', var='CONVERT'):
-            Utils.pprint ('YELLOW', 'midori.ico won\'t be created')
         conf.find_program ('windres', var='WINRC')
         conf.env['platform'] = 'win32'
 
@@ -147,9 +145,6 @@ def configure (conf):
 
         Utils.pprint ('BLUE', 'Mingw recognized, assuming cross compile.')
 
-    if conf.env['CONVERT'] and not conf.env['WINRC']:
-        Utils.pprint ('YELLOW', 'midori.ico won\'t be created')
-
     dirname_default ('LIBDIR', os.path.join (conf.env['PREFIX'], 'lib'))
     if conf.env['PREFIX'] == '/usr':
         dirname_default ('SYSCONFDIR', '/etc')
@@ -415,31 +410,6 @@ def write_linguas_file (self):
 write_linguas_file = feature ('intltool_po')(write_linguas_file)
 
 def build (bld):
-    def image_to_win32ico (task):
-        'Converts an image to a Win32 ico'
-
-        if not os.path.exists (bld.env['CONVERT']):
-            return 1
-
-        infile = task.inputs[0].abspath (task.env)
-        outfile = task.outputs[0].abspath (task.env)
-        command = bld.env['CONVERT'] + ' -background transparent \
-            -geometry 16x16 -extent 16x16 ' + \
-            infile + ' ' + outfile
-        if Utils.exec_command (command):
-            return 1
-
-        if task.chmod:
-            os.chmod (outfile, task.chmod)
-        return 0
-
-    if bld.env['WINRC']:
-        obj = bld.new_task_gen ('copy',
-            fun = image_to_win32ico,
-            source = 'icons/16x16/midori.png',
-            target = 'data/midori.ico',
-            before = 'cc')
-
     bld.add_group ()
 
     bld.add_subdirs ('midori icons')



More information about the Xfce4-commits mailing list