mirror of https://github.com/vitalif/openscad
find imagemagick using windows registry
parent
1ecf715476
commit
4ff4744d8d
|
@ -32,4 +32,5 @@ tests-build directory.
|
||||||
|
|
||||||
-'Diff' text-tests may not run properly on Windows(TM).
|
-'Diff' text-tests may not run properly on Windows(TM).
|
||||||
|
|
||||||
|
-Detection of ctest, python, and imagemagick doesnt always work properly
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
# Mingw_x_testfile - convert paths in CTestTestfile.cmake so they work
|
# Mingw_x_testfile - convert paths in CTestTestfile.cmake so they work
|
||||||
# under Windows(TM).
|
# under Windows(TM).
|
||||||
#
|
#
|
||||||
# public domain, by Don Bright <hugh.m.bright@gmail.com>
|
|
||||||
|
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
#
|
#
|
||||||
|
@ -37,8 +38,8 @@
|
||||||
# of the regression test package. it contains info regarding paths in
|
# of the regression test package. it contains info regarding paths in
|
||||||
# CTestTestfiles.cmake that we need to modify
|
# CTestTestfiles.cmake that we need to modify
|
||||||
import mingw_cross_info
|
import mingw_cross_info
|
||||||
|
|
||||||
import sys,os,string
|
import sys,os,string
|
||||||
|
from _winreg import *
|
||||||
_debug=False
|
_debug=False
|
||||||
_undo=False
|
_undo=False
|
||||||
def debug(*args):
|
def debug(*args):
|
||||||
|
@ -60,6 +61,7 @@ lintct=linbase+'/tests/test_cmdline_tool.py'
|
||||||
wintct=winbase+'/tests/test_cmdline_tool.py'
|
wintct=winbase+'/tests/test_cmdline_tool.py'
|
||||||
|
|
||||||
linpy=mingw_cross_info.linux_python #'/usr/bin/python'
|
linpy=mingw_cross_info.linux_python #'/usr/bin/python'
|
||||||
|
# FIXME - find python
|
||||||
winpy='c:/python27/python.exe'
|
winpy='c:/python27/python.exe'
|
||||||
|
|
||||||
linosng=linbuild+'/openscad_nogui.exe'
|
linosng=linbuild+'/openscad_nogui.exe'
|
||||||
|
@ -71,6 +73,16 @@ list64=[]
|
||||||
list32=[]
|
list32=[]
|
||||||
imbase=''
|
imbase=''
|
||||||
winconv=''
|
winconv=''
|
||||||
|
try:
|
||||||
|
registry = ConnectRegistry(None,HKEY_LOCAL_MACHINE)
|
||||||
|
regkey = OpenKey(registry, r"SOFTWARE\ImageMagick\Current")
|
||||||
|
imbinpath = QueryValueEx(regkey, 'BinPath')[0]
|
||||||
|
except Exception as e:
|
||||||
|
print "Can't find imagemagick using registry...",
|
||||||
|
print str(type(e))+str(e)
|
||||||
|
pass
|
||||||
|
|
||||||
|
print 'Searching for ImageMagick in Program folders'
|
||||||
for basedir in 'C:/Program Files','C:/Program Files (x86)':
|
for basedir in 'C:/Program Files','C:/Program Files (x86)':
|
||||||
if os.path.isdir(basedir):
|
if os.path.isdir(basedir):
|
||||||
pflist=os.listdir(basedir)
|
pflist=os.listdir(basedir)
|
||||||
|
|
Loading…
Reference in New Issue