[Bf-blender-cvs] [885f862] master: Fix preview icons update script to work in OSX
Dalai Felinto
noreply at git.blender.org
Sun Aug 31 01:17:55 CEST 2014
Commit: 885f862ce81139e7d31c7b0e20affc12d845c85d
Author: Dalai Felinto
Date: Sun Aug 31 01:17:26 2014 +0200
Branches: master
https://developer.blender.org/rB885f862ce81139e7d31c7b0e20affc12d845c85d
Fix preview icons update script to work in OSX
===================================================================
M release/datafiles/prvicons_update.py
===================================================================
diff --git a/release/datafiles/prvicons_update.py b/release/datafiles/prvicons_update.py
index ecc466a..448a43d 100755
--- a/release/datafiles/prvicons_update.py
+++ b/release/datafiles/prvicons_update.py
@@ -2,9 +2,16 @@
# This script updates icons from the SVG file
import os
+import sys
BASEDIR = os.path.abspath(os.path.dirname(__file__)) + os.sep
-cmd = 'inkscape "%sprvicons.svg" --without-gui --export-png="%sprvicons.png"' % (BASEDIR, BASEDIR)
-os.system(cmd)
+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 + ' "%sprvicons.svg" --without-gui --export-png="%sprvicons.png"' % (BASEDIR, BASEDIR)
+os.system(cmd)
More information about the Bf-blender-cvs
mailing list