Changeset View
Changeset View
Standalone View
Standalone View
release/datafiles/prvicons_update.py
| Property | Old Value | New Value |
|---|---|---|
| File Mode | 100755 | 100644 |
| #!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
| # This script updates icons from the SVG file | # This script updates icons from the SVG file | ||||
| import os | import os | ||||
| import subprocess | import subprocess | ||||
| import sys | import sys | ||||
| BASEDIR = os.path.abspath(os.path.dirname(__file__)) | BASEDIR = os.path.abspath(os.path.dirname(__file__)) | ||||
| inkscape_path = 'inkscape' | inkscape_path = 'inkscape' | ||||
| if sys.platform == 'darwin': | if sys.platform == 'darwin': | ||||
| inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script' | inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script' | ||||
| if os.path.exists(inkscape_app_path): | if os.path.exists(inkscape_app_path): | ||||
| inkscape_path = inkscape_app_path | inkscape_path = inkscape_app_path | ||||
| cmd = ( | cmd = ( | ||||
| inkscape_path, | inkscape_path, | ||||
| os.path.join(BASEDIR, "prvicons.svg"), | os.path.join(BASEDIR, "prvicons.svg"), | ||||
| "--without-gui", | "--export-width=1536", | ||||
| "--export-png=" + os.path.join(BASEDIR, "prvicons.png"), | "--export-height=256", | ||||
| ) | "--without-gui", | ||||
| subprocess.check_call(cmd) | "--export-png=" + os.path.join(BASEDIR, "prvicons.png"), | ||||
| ) | |||||
| subprocess.check_call(cmd) | |||||