This problem appeared when I included scribble (html) documentation in my math-quiz program. When I run the program from the main.rkt file, everything works OK, but when I compile it (for distribution to other machines), the program itself works, but the ./scribblings/math-quiz.html is not included.
So basically, my question is, how do I make sure that compilation includes ./scribbling directory in the tarball/zip.
And while we're at it, another thing.
When I finished fumbling around with scribble to create math-quiz.html file, it was nicely working from #lang scribble/manual.
But then I spent a lot of time trying to find out how to actually trigger it from math-quiz standalone program. Finally I ended up with this:
(define menu-item-html (new menu-item%
[label "HTML Documentation"]
[parent help-menu]
[callback
(lambda (mi e)
(send-url scribble-path-string))]))
Where menu-item-html is a sub-menu on program menu bar. This works, but maybe there's a better way (send-url???). Any suggestions are welcome.
This worked right away on Linux, because i simply used "./scribblings/math-quiz.html" as scribble-path-string.
However it did not work when i transferred this to my daughter's W11 computer. Then I had to come up with this:
(define scribble-path-string
(normalize-path
(string-append
(path->string (current-directory)) "scribblings/math-quiz.html")))
The strange thing here is this normalize-path function, that I had to write because (current-directory) is returning path with backslashes, as in:
c:\dir\dir\dir...\...
First I thought this was OK (as far as I remember paths on windows), but W11 will not accept this! Therefore I had to write normalize-path function to convert above to c:/dir/dir/dir../... , and this works on W11.
Anyway, this would have to be looked at. IMHO (current-directory) should return a correct path for W11.