-official addons can not embed compiled binary it may make anti viruses angry
-some people want to use a different version of binary than the one in the system for example the QT patched one
-walking path can be costly etc.
So in 6.1 we decided to put it as a server ir_config_parameter. If this data is available it is used else it will look in the path.
Hello,
Well this point is all a story.
Summary of the long debate in short:
-official addons can not embed compiled binary it may make anti viruses angry
-some people want to use a different version of binary than the one in the system for example the QT patched one
-walking path can be costly etc.
So in 6.1 we decided to put it as a server ir_config_ parameter. If this data is available it is used else it will look in the path.
""" get('ir. config_ parameter' ) param(cursor, uid, 'webkit_path')
def get_lib(self, cursor, uid):
"""Return the lib wkhtml path"""
proxy = self.pool.
webkit_path = proxy.get_
if not webkit_path:
defpath = os.environ. get('PATH' , os.defpath) .split( os.pathsep)
defpath. append( os.getcwd( ))
if tools.config[ 'root_path' ]:
defpath. append( os.path. dirname( tools.config[ 'root_path' ]))
webkit_ path = tools.which( 'wkhtmltopdf' , path=os. pathsep. join(defpath) )
webkit_ path = None
try:
if hasattr(sys, 'frozen'):
except IOError:
if webkit_path:
return webkit_path
"""
Your patch is follows the flow that has been taken in 6.1. But I'm not sure it fits 6.0 commit policy.
To offer an alternate way we have coded the webkit_lib addons that embed binary and use the good one depending on OS and architecture (32, 64).
Regards
Nicolas