Skip to content

Commit 43becd1

Browse files
committed
Fix registerLibrary method
1 parent 6aa68f1 commit 43becd1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

DesktopEditor/doctrenderer/docbuilder.python/src/docbuilder.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import platform
44
import atexit
5+
import subprocess
56

67
OBJECT_HANDLE = ctypes.c_void_p
78
STRING_HANDLE = ctypes.c_void_p
@@ -608,14 +609,14 @@ class Graphics:
608609
PNG = _IMAGE_MASK + 0x0005
609610
BMP = _IMAGE_MASK + 0x0008
610611

611-
builder_path = os.path.dirname(os.path.realpath(__file__))
612+
builder_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lib')
612613
_loadLibrary(builder_path)
613614
CDocBuilder.Initialize(builder_path)
614615

615616
def registerLibrary(license_path):
616-
docbuilder_bin = os.path.dirname(os.path.realpath(__file__)) + os.pathsep + "docbuilder"
617+
docbuilder_bin = os.path.dirname(os.path.realpath(__file__)) + "/lib/docbuilder"
617618
if ("windows" == platform.system().lower()):
618619
docbuilder_bin += ".exe"
619-
return subprocess.call([docbuilder_bin, license_path], stderr=subprocess.STDOUT, shell=True)
620+
return subprocess.call([docbuilder_bin, "-register", license_path], stderr=subprocess.STDOUT, shell=True)
620621

621622
atexit.register(CDocBuilder.Dispose)

0 commit comments

Comments
 (0)