macOS: fixed Vulkan shader bundling/loading

This commit is contained in:
Martin Pulec
2023-01-17 12:25:52 +01:00
parent 41273b39da
commit fc0c6adae0
2 changed files with 3 additions and 2 deletions

View File

@@ -654,6 +654,7 @@ $(GUI_BUNDLE)/Contents/libs: $(BUNDLE)/Contents/libs $(GUI_BUNDLE)
echo quit | $(DYLIBBUNDLER) $(DYLIBBUNDLER_FLAGS) -of -p @executable_path/../libs/ -cd -b -x $(GUI_BUNDLE)/Contents/MacOS/uv-qt -d $(GUI_BUNDLE)/Contents/libs/; \
cp $(BUNDLE)/Contents/MacOS/* $(GUI_BUNDLE)/Contents/MacOS/
[ -d $(BUNDLE)/Contents/libs ] && cp $(BUNDLE)/Contents/libs/* $(GUI_BUNDLE)/Contents/libs
[ -d $(BUNDLE)/Contents/share ] && { mkdir -p $(GUI_BUNDLE)/Contents/share; cp -r $(BUNDLE)/Contents/share/* $(GUI_BUNDLE)/Contents/share; }
cp -R $(BUNDLE)/Contents/Frameworks/* $(GUI_BUNDLE)/Contents/Frameworks
# add Qt frameworks
command -v macdeployqt && macdeployqt $(GUI_BUNDLE) -verbose=2 -executable=$(GUI_BUNDLE)/Contents/MacOS/uv -executable=$(GUI_BUNDLE)/Contents/MacOS/hd-rum-transcode

View File

@@ -125,8 +125,8 @@ const char *get_install_root(void) {
if (!last_path_delim) {
return exec_path;
}
if (strcmp(last_path_delim + 1, "bin") == 0) {
*last_path_delim = '\0'; // remove "bin" suffix if there is (not in Windows builds)
if (strcmp(last_path_delim + 1, "bin") == 0 || strcmp(last_path_delim + 1, "MacOS") == 0) {
*last_path_delim = '\0'; // remove "bin" suffix if there is one (not in Windows builds) or MacOS in a bundle
}
return exec_path;
}