diff --git a/CadQuery/InitGui.py b/CadQuery/InitGui.py index 90c1561..75649a5 100644 --- a/CadQuery/InitGui.py +++ b/CadQuery/InitGui.py @@ -39,8 +39,8 @@ class CadQueryWorkbench (Workbench): #Set up so that we can import from our embedded packages module_base_path = module_locator.module_path() - libs_path = os.path.join(module_base_path, 'Libs') - libs_path = os.path.join(libs_path, 'libs.zip') + libs_dir_path = os.path.join(module_base_path, 'Libs') + libs_path = os.path.join(libs_dir_path, 'libs.zip') sys.path.insert(0, libs_path) import cadquery @@ -100,11 +100,15 @@ class CadQueryWorkbench (Workbench): #Windows needs some exra help with paths if sys.platform.startswith('win'): + #The lib directory under the FreeCAD installation fc_lib_path = os.path.dirname(os.path.dirname(module_base_path)) fc_lib_path = os.path.join(fc_lib_path, 'lib') - codePane = PyCodeEdit(server_script=server_path, interpreter=interpreter, args=['-s', libs_path, fc_lib_path]) + + codePane = PyCodeEdit(server_script=server_path, interpreter=interpreter + , args=['-s', libs_path, fc_lib_path, os.path.join(libs_dir_path, 'cadquery')]) else: - codePane = PyCodeEdit(server_script=server_path, interpreter=interpreter, args=['-s', libs_path]) + codePane = PyCodeEdit(server_script=server_path, interpreter=interpreter + , args=['-s', libs_path, os.path.join(libs_dir_path, 'cadquery')]) codePane.setObjectName("cqCodePane") diff --git a/CadQuery/Libs/cadquery b/CadQuery/Libs/cadquery new file mode 160000 index 0000000..40efd25 --- /dev/null +++ b/CadQuery/Libs/cadquery @@ -0,0 +1 @@ +Subproject commit 40efd2599a867d633037fe3d47fe8299325f7b50