Include shared libraries in lib folder for darwin build

cx_Freeze 6.15.10 store included files in Resources folder and make a symlink
in MacOS folder for lib and share.
So we must include shared libraries in the lib folder to be available.
(grafted from cf5adeee978b9ff2de9fc2229c9cd82c63b98302)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier
2023-11-04 19:48:03 +01:00
parent 44d3135067
commit 72aa4af832
+6 -2
View File
@@ -70,7 +70,7 @@ def replace_path(match):
libs = [os.path.basename(p) for p in match.group(1).split(',')]
required_libs.update(libs)
if sys.platform == 'darwin':
libs = [os.path.join('@executable_path', l) for l in libs]
libs = [os.path.join('@executable_path', 'lib', l) for l in libs]
return 'shared-library="%s"' % ','.join(libs)
@@ -95,6 +95,10 @@ for ns in required_gi_namespaces:
include_files.append((typefile_tmp, typefile_file))
if sys.platform == 'darwin':
lib_dest = 'lib'
else:
lib_dest = '.'
if sys.platform == 'win32':
required_libs.update([
'libepoxy-0.dll',
@@ -109,7 +113,7 @@ for lib in required_libs:
break
else:
raise Exception('%s not found' % lib)
include_files.append((path, lib))
include_files.append((path, os.path.join(lib_dest, lib)))
ssl_paths = ssl.get_default_verify_paths()
include_files.append(