Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _generate_icons():
dest_root = path('target/installer/usr/share/icons/hicolor')
makedirs(dest_root)
icons_fname = '%s.png' % SETTINGS['app_name']
for size, _, icon_path in get_icons():
icon_dest = join(dest_root, '%dx%d' % (size, size), 'apps', icons_fname)
makedirs(dirname(icon_dest))
copy(icon_path, icon_dest)
def _generate_iconset():
makedirs(path('target/Icon.iconset'), exist_ok=True)
for size, scale, icon_path in get_icons():
dest_name = 'icon_%dx%d' % (size, size)
if scale != 1:
dest_name += '@%dx' % scale
dest_name += '.png'
copy(icon_path, path('target/Icon.iconset/' + dest_name))