2019-09-05 04:28:30 +02:00
|
|
|
#!/usr/bin/env python3
|
2023-08-15 16:20:26 +02:00
|
|
|
# SPDX-FileCopyrightText: 2014-2022 Blender Authors
|
2023-06-15 05:09:04 +02:00
|
|
|
#
|
2022-02-10 23:07:11 +01:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2021-08-04 03:43:56 +02:00
|
|
|
|
2019-09-05 04:28:30 +02:00
|
|
|
# This script updates icons from the SVG file
|
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
|
|
|
|
BASEDIR = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
2024-01-24 23:56:06 +01:00
|
|
|
if not (inkscape_bin := os.environ.get("INKSCAPE_BIN")):
|
|
|
|
if sys.platform == 'darwin':
|
|
|
|
inkscape_bin = '/Applications/Inkscape.app/Contents/MacOS/inkscape'
|
|
|
|
else:
|
|
|
|
inkscape_bin = "inkscape"
|
|
|
|
|
2019-09-05 04:28:30 +02:00
|
|
|
|
|
|
|
cmd = (
|
2021-08-04 03:31:28 +02:00
|
|
|
inkscape_bin,
|
2019-09-05 04:28:30 +02:00
|
|
|
os.path.join(BASEDIR, "prvicons.svg"),
|
2019-10-29 18:54:58 +01:00
|
|
|
"--export-width=1792",
|
2019-09-05 04:28:30 +02:00
|
|
|
"--export-height=256",
|
2021-01-08 14:58:29 +01:00
|
|
|
"--export-type=png",
|
|
|
|
"--export-filename=" + os.path.join(BASEDIR, "prvicons.png"),
|
2019-09-05 04:28:30 +02:00
|
|
|
)
|
|
|
|
subprocess.check_call(cmd)
|