osxbundle: fix vulkan loader search path check

the old check stopped at the first occurrence of a vulkan loader path.
though it's possible different vulkan loaders are installed in different
paths, leading to not found vulkan loaders.

to prevent this, also check if the needed vulkan loader is actually
installed to that path.

specific case is when installing MoltenVK and KosmicKrisp at the same
time. the former is installed in the homebrew prefix under etc/ the
latter under share/. the latter wasn't found previous, since the former
was found first.
This commit is contained in:
der richter authored and Kacper Michajłow committed 2026-07-06 18:25:28 +02:00
1 parent ed9c05d06e
commit 28a7932599
1 file changed
+9 -7
+9 -7
View File
@@ -224,24 +224,26 @@ def process_vulkan_loader(binary, loader_name, loader_relative_folder, library_n
]
loader_system_folder = ""
loader_system_path = ""
for loader_system_search_folder in loader_system_search_folders:
if os.path.exists(loader_system_search_folder):
loader_system_folder = loader_system_search_folder
break
if os.path.exists(os.path.join(loader_system_folder, loader_name)):
loader_system_path = os.path.join(loader_system_folder, loader_name)
break
if not loader_system_folder:
print(">>> could not find loader folder " + loader_relative_folder)
return
loader_bundle_folder = os.path.join(resources_path(binary), loader_relative_folder)
loader_system_path = os.path.join(loader_system_folder, loader_name)
loader_bundle_path = os.path.join(loader_bundle_folder, loader_name)
library_relative_folder = "../../../Frameworks/"
if not os.path.exists(loader_system_path):
if not loader_system_path:
print(">>> could not find loader " + loader_name)
return
loader_bundle_folder = os.path.join(resources_path(binary), loader_relative_folder)
loader_bundle_path = os.path.join(loader_bundle_folder, loader_name)
library_relative_folder = "../../../Frameworks/"
if not os.path.exists(loader_bundle_folder):
os.makedirs(loader_bundle_folder)