macOS/ blender_icons_update.py: prioritise environment variables

Also fix binary name for mac

Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D14161
This commit is contained in:
Ankit Meel 2022-02-21 15:19:19 +05:30
parent 9189191c5b
commit 5be74160c0
1 changed files with 7 additions and 2 deletions

View File

@ -26,8 +26,8 @@ if sys.platform[:3] == "win":
env["SystemDrive"] = os.environ.get("SystemDrive", "")
env["SystemRoot"] = os.environ.get("SystemRoot", "")
inkscape_bin = os.environ.get("INKSCAPE_BIN", "inkscape")
blender_bin = os.environ.get("BLENDER_BIN", "blender")
inkscape_bin = "inkscape"
blender_bin = "blender"
if sys.platform == 'darwin':
inkscape_app_path = '/Applications/Inkscape.app/Contents/MacOS/inkscape'
@ -36,6 +36,11 @@ if sys.platform == 'darwin':
blender_app_path = '/Applications/Blender.app/Contents/MacOS/Blender'
if os.path.exists(blender_app_path):
blender_bin = blender_app_path
else:
blender_bin = "Blender"
inkscape_bin = os.environ.get("INKSCAPE_BIN", inkscape_bin)
blender_bin = os.environ.get("BLENDER_BIN", blender_bin)
cmd = (
inkscape_bin,