Support symbolic links for the "shaderpacks" directory on Windows
ruifengx opened this issue ยท 8 comments
Is your feature request related to a problem? Please describe.
I use symbolic links on Windows to share the shaderpacks
directory among different minecraft versions to save disk space. OptiFine correctly handles this scenario, but Iris is currently just ignoring the whole directory.
FYI, I create symbolic links with the following PowerShell command:
New-Item -Type SymbolicLink -Target "/path/to/real/shaderpacks" -Path "shaderpacks"
Describe the solution you'd like
If directory shaderpacks
is a symbolic link, follow the link to detect shader packs.
I created symlinks using Link Shell Extension and it works fine with Iris.
Did "Link Shell Extension" really created a SymbolicLink
or a Junction
? Because unless otherwise configured, as noted by the Microsoft documentation (section "Parameters", "-ItemType
"),
Creating a
SymbolicLink
type on Windows requires elevation as administrator.
So I suspect you have a Junction
instead.
I can reproduce the inability of Iris to read a symlink "shaderpacks" directory on my PC, but it might also be some system configurations messed up symlink resolution... I'll try later whether a Junction
fixes this problem, but even if it does, I recommend at least documenting this behaviour.
From what I can tell this is not related to iris. Your shaderpack folder can be linked to with a symbolic link in the power shell or command prompt and isn't something iris has control over. Bearing in mind iris uses the default shaderpack folder, there should be no issues
Okay, I understand.
Your shaderpack folder can be linked to with a symbolic link in the power shell or command prompt and isn't something iris has control over.
Yes, exactly how one choose to create symbolic links should not matter, and the PowerShell command I provided was solely for reproducing the problem.
But Iris does fail to detect shader packs in that symlinked directory, and I can reproduce this behaviour. In game, the "Open Shader Pack Folder..." button opens the correct folder (in which I see my shader packs), but no shader pack is detected. Replace the symlink with a normal directory does solve the problem.
I understand this problem cannot be confirmed and solved if you cannot reproduce it. Anyway, I'll try to investigate this problem for a bit longer, and whenever I found evidence for this being related to Minecraft/Fabric/Iris, I'll come back and give an update.
You may need to link to the correct shaderpack directory rather than create a new
For "the correct shaderpack directory" part: I can correctly open it in Explorer, and cd
into it in command prompt. In game, the "Open Shader Pack Folder..." button opens the correct folder. Just no shaderpacks detected in game. Currently, I have no clue why this might be happening... I'll try to go through the source code to get some insights.