update patch script

This commit is contained in:
Alex Janka 2023-10-05 18:27:52 +11:00
parent 55f4333415
commit a2e795296d

View file

@ -38,17 +38,21 @@ if not os.path.exists(frameworks_dir):
os.makedirs(frameworks_dir) os.makedirs(frameworks_dir)
SHADERC_DYLIB_NAME = "libshaderc_shared.1.dylib" SHADERC_DYLIB_NAME = "libshaderc_shared.1.dylib"
SHADERC_OUT = join(frameworks_dir, SHADERC_DYLIB_NAME)
VULKAN_DYLIB_NAME = "libvulkan.1.dylib" VULKAN_DYLIB_NAME = "libvulkan.1.dylib"
VULKAN_OUT = join(frameworks_dir, VULKAN_DYLIB_NAME)
DYLIB_PATH = join(os.environ["VULKAN_SDK"], "lib") DYLIB_PATH = join(os.environ["VULKAN_SDK"], "lib")
print("Patching " + executable)
shutil.copyfile( shutil.copyfile(
join(DYLIB_PATH, SHADERC_DYLIB_NAME), join(DYLIB_PATH, SHADERC_DYLIB_NAME),
join(frameworks_dir, SHADERC_DYLIB_NAME), SHADERC_OUT,
follow_symlinks=True, follow_symlinks=True,
) )
shutil.copyfile( shutil.copyfile(
join(DYLIB_PATH, VULKAN_DYLIB_NAME), join(DYLIB_PATH, VULKAN_DYLIB_NAME),
join(frameworks_dir, VULKAN_DYLIB_NAME), VULKAN_OUT,
follow_symlinks=True, follow_symlinks=True,
) )
@ -60,6 +64,7 @@ os.system(
+ '" ' + '" '
+ executable + executable
) )
os.system( os.system(
'install_name_tool -change "@rpath/' 'install_name_tool -change "@rpath/'
+ VULKAN_DYLIB_NAME + VULKAN_DYLIB_NAME
@ -70,3 +75,4 @@ os.system(
) )
os.system("codesign -f -s - " + bundle_path) os.system("codesign -f -s - " + bundle_path)
os.system("codesign -f -s - " + executable)