[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/pics/crystalsvg
From: Ralf Habacker <Ralf.Habacker () freenet ! de>
Date: 2005-11-10 8:28:30
Message-ID: 1131611310.275219.3310.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 479374 by habacker:
initial (not working) implementation for creating png's
M +33 -22 SConscript
--- trunk/KDE/kdelibs/pics/crystalsvg/SConscript #479373:479374
@@ -2,9 +2,6 @@
#generated from Makefile.am by am2bksys.py
Import('env')
-print "Converting SVG files to PNG files, starting..."
-print "Sizes: 16x16; 22x22; 32x32; 48x48; 64x64; 128x128"
-
import os,shutil
def getFilesByExt( dir, ext ):
list = []
@@ -16,27 +13,41 @@
import SCons.Defaults
root=SCons.Node.FS.default_fs.Dir('#').abspath
+
+# TODO: add dependency file to avoid multiple creating
+# TODO: add dependeny to ksvgtopng
+if 0: # disabled for now
+ print "Converting SVG files to PNG files, starting..."
+ print "Sizes: 16x16; 22x22; 32x32; 48x48; 64x64; 128x128"
+ files = getFilesByExt(os.path.join(root,'pics','crystalsvg') ,'svgz')
+ ksvgtopng = os.path.join(root,env['_BUILDDIR_'],'pics','ksvgtopng')
+
+ destreldir = os.path.join(root,'pics','crystalsvg')
+ desttopdir = os.path.join(root,env['_BUILDDIR_'],'pics','crystalsvg')
+ destdir = os.path.join(desttopdir,'generated')
+
+ if os.path.exists(destdir):
+ shutil.rmtree(destdir)
+ os.makedirs(destdir)
+
+ filelist=[]
+ for file in files:
+ destfile = file.replace('svgz','png').replace(destreldir+os.sep,'')
+ for size in ['16','22','32','48','64','128']:
+ afile = destfile.replace('crsc','cr'+size)
+ print ksvgtopng + ' '+size + ' ' + size + ' ' + file + ' ' + os.path.join(destdir,afile)
+
+ # TODO: requires library pathes for kdecore,dcop win in path variable -> wrapper required
+ # os.system(ksvgtopng + '.bat '+size + ' ' + size + ' ' + file + ' ' + os.path.join(destdir,afile)
+ filelist += [os.path.join('generated',afile)]
+ env.bksys_insttype('KDEICONS', 'crystalsvg', filelist)
-files = getFilesByExt(os.path.join(root,'pics','crystalsvg') ,'svgz')
-ksvgtopng = os.path.join(root,env['_BUILDDIR_'],'pics','ksvgtopng')
-desttopdir = os.path.join(root,env['_BUILDDIR_'],'pics','crystalsvg')
-destdir = os.path.join(desttopdir,'generated')
-
-if os.path.exists(destdir):
- shutil.rmtree(destdir)
-os.makedirs(destdir)
-
-for file in files:
- destfile = os.path.join(destdir,file.replace('svgz','png'))
- for size in ['16','22','32','48','64','128']:
-
- print ksvgtopng + ' '+size + ' ' + size + ' ' + file + ' ' + destfile.replace('crsc','cr'+size)
- # TODO: requires library pathes for kdecore,dcop win in path variable -> wrapper required
- # os.system(ksvgtopng + ' '+size + ' ' + size + ' ' + file + ' ' + destfile.replace('crsc','cr'+size))
-
-# TODO don't know how to install the generated icons
-
+else:
+ filelist = getFilesByExt(os.path.join(root,'pics','crystalsvg') ,'png')
+ # TODO: how to create the propper icon directory structure
+ # env.bksys_insttype('KDEICONS', 'crystalsvg', filelist)
+
env.bksys_insttype('KDEICONS', 'crystalsvg', 'index.theme')
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic