[setup] tweak included system libs on Linux

based on https://github.com/Ultimaker/cura-build/blob/master/packaging/setup_linux.py.in
+ add root "lib" folder to the LD_LIBRARY_PATH
This commit is contained in:
Yann Lanthony 2018-08-06 15:34:40 +02:00
parent 4d19b388fd
commit a05030f7fc
2 changed files with 68 additions and 7 deletions

View file

@ -73,10 +73,12 @@ def setupEnvironment():
qtPluginsDir = os.path.join(rootDir, "qtPlugins")
sensorDBPath = os.path.join(aliceVisionShareDir, "cameraSensors.db")
voctreePath = os.path.join(aliceVisionShareDir, "vlfeat_K80L3.tree")
# Linux: "lib" contains shared libraries that needs to be in LD_LIBRARY_PATH
libPath = os.path.join(rootDir, "lib")
env = {
'PATH': aliceVisionBinDir,
'LD_LIBRARY_PATH': aliceVisionBinDir,
'LD_LIBRARY_PATH': [aliceVisionBinDir, libPath],
'QT_PLUGIN_PATH': [qtPluginsDir],
'QML2_IMPORT_PATH': [os.path.join(qtPluginsDir, "qml")]
}

View file

@ -5,12 +5,6 @@ import setuptools # for bdist
from cx_Freeze import setup, Executable
import meshroom
build_exe_options = {
# include dynamically loaded plugins
"packages": ["meshroom.nodes", "meshroom.submitters"],
"include_files": ['COPYING.md']
}
class PlatformExecutable(Executable):
"""
@ -41,6 +35,71 @@ class PlatformExecutable(Executable):
shortcutDir, copyright, trademarks)
build_exe_options = {
# include dynamically loaded plugins
"packages": ["meshroom.nodes", "meshroom.submitters"],
"include_files": ['COPYING.md']
}
if platform.system() == PlatformExecutable.Linux:
# include required system libs
# from https://github.com/Ultimaker/cura-build/blob/master/packaging/setup_linux.py.in
build_exe_options.update({
"bin_path_includes": [
"/lib",
"/lib64",
"/usr/lib",
"/usr/lib64",
],
"bin_includes": [
"libssl3",
"libssl",
"libcrypto",
],
"bin_excludes": [
"linux-vdso.so",
"libpthread.so",
"libdl.so",
"librt.so",
"libstdc++.so",
"libm.so",
"libgcc_s.so",
"libc.so",
"ld-linux-x86-64.so",
"libz.so",
"libgcc_s.so",
"libglib-2",
"librt.so",
"libcap.so",
"libGL.so",
"libglapi.so",
"libXext.so",
"libXdamage.so",
"libXfixes.so",
"libX11-xcb.so",
"libX11.so",
"libxcb-glx.so",
"libxcb-dri2.so",
"libxcb.so",
"libXxf86vm.so",
"libdrm.so",
"libexpat.so",
"libXau.so",
"libglib-2.0.so",
"libgssapi_krb5.so",
"libgthread-2.0.so",
"libk5crypto.so",
"libkeyutils.so",
"libkrb5.so",
"libkrb5support.so",
"libresolv.so",
"libutil.so",
"libXrender.so",
"libcom_err.so",
"libgssapi_krb5.so",
]
})
meshroomExe = PlatformExecutable(
"meshroom/ui/__main__.py",
targetName="Meshroom",