Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

molten-vk: install ICD to non-overridable path #204611

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Formula/m/molten-vk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ def install
"MoltenVKShaderConverter"]

inreplace "MoltenVK/icd/MoltenVK_icd.json",
"./libMoltenVK.dylib",
(lib/"libMoltenVK.dylib").relative_path_from(share/"vulkan/icd.d")
(share/"vulkan").install "MoltenVK/icd" => "icd.d"
"\"./libMoltenVK.dylib\"",
"\"#{lib}/libMoltenVK.dylib\""
Comment on lines +182 to +183
Copy link
Member Author

@cho-m cho-m Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could keep a relative path if preferred. Absolute path is simpler for inreplace. Relative path does avoid relocation in JSON file (though wouldn't expect performance impact unlike relocation in binary file).

Suggested change
"\"./libMoltenVK.dylib\"",
"\"#{lib}/libMoltenVK.dylib\""
"./libMoltenVK.dylib",
(lib/"libMoltenVK.dylib").relative_path_from(prefix/"etc/vulkan/icd.d")

(prefix/"etc/vulkan").install "MoltenVK/icd" => "icd.d"
end

test do
Expand Down
Loading