I was having a problem in my 2.22.2 version on Windows 11. Just in
case it was a Lily bug, I installed 2.26.0. Now things are worse
than ever. The new Lily couldn't find my .ily files. I run Lily
from a Windows .cmd file associated with file type ".ly".
Please prepare a complete, minimal example that did work, and which no
longer works.
I've added a -I option in the script. This wasn't needed for my
2.22.2 version. Now it finds my .ily files, but still can't find
other things including ice-9 modules and probably other things as
well. If I compile a simple test file that doesn't rely on other
include files, it works, so I know it is able to run the lilypond
binary.
How did you set up the cmd->ly association?
I've installed 2.26 in %HOME%\lilypond-2.26.0\.
So you just call `lilypond` on the command line, regardless in which
directory you are, right?
My .ily files are in
%HOME%\AppData\Local\VirtualStore\lilypond-2.26.0\share\lilypond\2.26.0\ly\.
Are there any environment variables or the like that tell LilyPond
where to look for things? Or perhaps I have other installation
problems.
I'm a bit confused here. In modern LilyPond versions, "installing"
simply means unpacking a ZIP archive, so if you unpacked the ZIP archive
in %HOME%\lilypond-2.26.0\, then LilyPond will look for its own internal
.ly files in
%HOME%\lilypond-2.26.0\share\lilypond/2.26.0\ly\
so you cannot expect it to look anywhere below %HOME%\AppData\ by
default. As Werner already has pointed out, it's generally not a good
idea to place your own include files within the installation directory.
However, if you place them in some folder such as
%HOME%\AppData\mylilyfiles\ or wherever, and then point to that folder
using -I, then LilyPond should find them.
By the way, do you happen to have any spaces in the file path
corresponding to %HOME%? That might possibly cause problems. If so, test
to place them in a folder that doesn't have any spaces in the path.
/Mats