Welcome to mirror list, hosted at ThFree Co, Russian Federation.

prvicons_update.py « datafiles « release - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bc170b9854532202d53c4c24ac630f44917a3bf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python3

# This script updates icons from the SVG file
import os
import subprocess
import sys

BASEDIR = os.path.abspath(os.path.dirname(__file__))

inkscape_path = 'inkscape'

if sys.platform == 'darwin':
    inkscape_app_path = '/Applications/Inkscape.app/Contents/Resources/script'
    if os.path.exists(inkscape_app_path):
        inkscape_path = inkscape_app_path

cmd = (
    inkscape_path,
    os.path.join(BASEDIR, "prvicons.svg"),
    "--without-gui",
    "--export-png=" + os.path.join(BASEDIR, "prvicons.png"),
)
subprocess.check_call(cmd)