Merge branch 'blender2.7'
[blender.git] / release / datafiles / prvicons_update.py
1 #!/usr/bin/env python3
2
3 # This script updates icons from the SVG file
4 import os
5 import subprocess
6 import sys
7
8 BASEDIR = os.path.abspath(os.path.dirname(__file__))
9
10 inkscape_path = 'inkscape'
11
12 if sys.platform == 'darwin':
13     inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script'
14     if os.path.exists(inkscape_app_path):
15         inkscape_path = inkscape_app_path
16
17 cmd = (
18     inkscape_path,
19     os.path.join(BASEDIR, "prvicons.svg"),
20     "--without-gui",
21     "--export-png=" + os.path.join(BASEDIR, "prvicons.png"),
22 )
23 subprocess.check_call(cmd)