def convertSVGtoPNG(size=128):
    inkscape = getInkscapeExe()
    if (not inkscape):
        logging.root.warning('Inkscape not found :(')
        return
    dir = resourcePath('icons')
    for f in os.listdir(dir):
        if (not f.endswith('.svg')):
            continue
        infilename = ('%s/%s' % (dir, f))
        outfilename = ('%s/%s.png' % (dir, os.path.splitext(f)[0]))
        if (os.path.exists(outfilename) and (os.path.getmtime(infilename) < os.path.getmtime(outfilename))):
            print(('File was up to date: %s' % outfilename))
            continue
        print(('Writing: %s' % outfilename))
        cmd = [inkscape, '-z', '-e', outfilename, '-w', size, '-h', size, infilename]
        cmd = [str(c) for c in cmd]
        subprocess.Popen(cmd).communicate()
def convertSVGtoPNG(size=128):
    inkscape = getInkscapeExe()
    if (not inkscape):
        logging.root.warning('Inkscape not found :(')
        return
    dir = resourcePath('icons')
    for f in os.listdir(dir):
        if (not f.endswith('.svg')):
            continue
        infilename = ('%s/%s' % (dir, f))
        outfilename = ('%s/%s.png' % (dir, os.path.splitext(f)[0]))
        if (os.path.exists(outfilename) and (os.path.getmtime(infilename) < os.path.getmtime(outfilename))):
            print(('File was up to date: %s' % outfilename))
            continue
        print(('Writing: %s' % outfilename))
        cmd = [inkscape, '-z', '-e', outfilename, '-w', size, '-h', size, infilename]
        cmd = [str(c) for c in cmd]
        subprocess.Popen(cmd).communicate()