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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-08-04 04:31:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-04 04:35:05 +0300
commit7389fd9a35a3c8911f2d502ea2c745d574a2de21 (patch)
treeacd0fb795b2c9a1e6efd8ed91c28659cbf3bf1c1 /release/datafiles/blender_icons_update.py
parent8a1c1279b3d9c5478d7e94c4875c141db750fbcb (diff)
Icons: resolve various issues for generating icons
- INKSCAPE_BIN environment variable was ignored by alert_icons_update & prvicons_update. - `make icons` wasn't regenerating alert icons. - Updating SVG icons failed using blender built with ASAN.
Diffstat (limited to 'release/datafiles/blender_icons_update.py')
-rwxr-xr-xrelease/datafiles/blender_icons_update.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/release/datafiles/blender_icons_update.py b/release/datafiles/blender_icons_update.py
index 8167b8b25e6..ead74aac759 100755
--- a/release/datafiles/blender_icons_update.py
+++ b/release/datafiles/blender_icons_update.py
@@ -6,13 +6,17 @@ import subprocess
import sys
-def run(cmd):
+def run(cmd, *, env=None):
print(" ", " ".join(cmd))
- subprocess.check_call(cmd)
+ subprocess.check_call(cmd, env=env)
BASEDIR = os.path.abspath(os.path.dirname(__file__))
+env = {}
+# Developers may have ASAN enabled, avoid non-zero exit codes.
+env["ASAN_OPTIONS"] = "exitcode=0:" + os.environ.get("ASAN_OPTIONS", "")
+
inkscape_bin = os.environ.get("INKSCAPE_BIN", "inkscape")
blender_bin = os.environ.get("BLENDER_BIN", "blender")
@@ -32,7 +36,7 @@ cmd = (
"--export-type=png",
"--export-filename=" + os.path.join(BASEDIR, "blender_icons16.png"),
)
-run(cmd)
+run(cmd, env=env)
cmd = (
inkscape_bin,
@@ -42,7 +46,7 @@ cmd = (
"--export-type=png",
"--export-filename=" + os.path.join(BASEDIR, "blender_icons32.png"),
)
-run(cmd)
+run(cmd, env=env)
# For testing it can be good to clear all old
@@ -64,7 +68,7 @@ cmd = (
"--minx_icon", "2", "--maxx_icon", "2", "--miny_icon", "2", "--maxy_icon", "2",
"--spacex_icon", "1", "--spacey_icon", "1",
)
-run(cmd)
+run(cmd, env=env)
cmd = (
blender_bin, "--background", "--factory-startup", "-noaudio",
@@ -78,7 +82,7 @@ cmd = (
"--minx_icon", "4", "--maxx_icon", "4", "--miny_icon", "4", "--maxy_icon", "4",
"--spacex_icon", "2", "--spacey_icon", "2",
)
-run(cmd)
+run(cmd, env=env)
os.remove(os.path.join(BASEDIR, "blender_icons16.png"))
os.remove(os.path.join(BASEDIR, "blender_icons32.png"))