Closed apnadkarni closed 7 years ago
Ok, I think I know what the problem is - it's Windows specific. The build/bin/fopub.bat uses APP_HOME to initialize DEFAULT_JVM_OPTS before APP_HOME is set. Thus xml.catalog.files is incorrectly set. Moving the lines
@rem Add default JVM options here. You can also use JAVA_OPTS and FOPUB_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Dxml.catalog.files=%APP_HOME%/catalog.xml"
to be after the line
set APP_HOME=%DIRNAME%..
seems to fix the problem.
I'm unclear where to fix this in the sources.
I think this is as simple as changing the replacement of APP_DIR to %APP_DIR%
instead of %APP_HOME%
. The %APP_HOME%
is calculated later and is thus a different variable. See if #79 fixes your issue. I'm hoping that doesn't break the intention of #34.
That does not fix it for me. At that point the APP_DIR env variable is undefined as well and resolves to an empty string resulting in the same (broken) behaviour as before.
That's actually a different problem. The APP_DIR is supposed to be set by the main fopub script (in this case fopub.bat). We need to do for the Windows batch file what we do for the *nix script.
See https://github.com/asciidoctor/asciidoctor-fopub/blob/master/fopub#L77-L80
See if it works now.
Yes, that seems to work. Thanks.
OT, I'd submitted a pull request to align Windows fopub with Unix. Any idea when that might get looked at ? I know you are hugely busy, just being selfish not wanting to maintain my own fork for that :-)
Merged!
If you are interested, I'd be glad to invite you to be a committer on the project.
Thanks for the merge.
Regarding commit rights, I don't mind if it results in less work for you to adopt these small patches. But not sure I have the skills to contribute, completely lacking Ruby, Java, Javascript and having only a rudimentary knowledge of XML. Perhaps if I do come up with something substantial, I'll ping you.
asciidoctor-fopub works fine for me as long as I have network connectivity. Offline however, it fails with error messages:
I thought the presence of the catalog.xml file(s) would permit offline operation? And moreover does the failure mean it fetches those stylesheets on every run?