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

yelp-tool yelp-build script don't work #23107

Open
2 of 6 tasks
lillolollo opened this issue Jan 14, 2025 · 9 comments
Open
2 of 6 tasks

yelp-tool yelp-build script don't work #23107

lillolollo opened this issue Jan 14, 2025 · 9 comments
Labels

Comments

@lillolollo
Copy link
Contributor

Description / Steps to reproduce the issue

I'm trying to generate docs for gimp with building it -Dg-ir-doc=true but it don't work

I'm trying to debug it and use these command to generate an html page on a clang environment (not tested on other environments)

yelp-build cache *.page
yelp-build html -o html .

the first problem is the python shebang on bin/yelp-build must be #!/usr/bin/env python or the file it is not found

the second problem seem to be the path

XSL_MAL2HTML = '/clang64/share/yelp-xsl/xslt/mallard/html/mal2html.xsl'

the third the file to be converted is not found but it is on the same folder

I don't know if @JPeterMugaas is still around to take a look

Expected behavior

the file is converted

Actual behavior

the file it is not converted

Verification

Windows Version

MINGW64_NT-10.0-22631

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANGARM64

Are you willing to submit a PR?

No response

@lillolollo lillolollo added the bug label Jan 14, 2025
@Biswa96
Copy link
Member

Biswa96 commented Jan 15, 2025

Thank you for reporting the issue. I can reproduce it in my system with current gimp 3 rc version. I have tried to replace the /ucrt64/share strings in yelp-build using .replace('/ucrt64/share', sysconfig.get_config_var('datarootdir')) but it causes the following error.

xsl:import : invalid URI reference file://C:/msys64/ucrt64/share/yelp-xsl/xslt/mallard/html/mal2html.xsl

@lillolollo
Copy link
Contributor Author

@Biswa96 yes seem the path passed to xsl it's not well formatted the same with the .page file path

@lillolollo
Copy link
Contributor Author

lillolollo commented Jan 18, 2025

@Biswa96 I have made progress replacing this on yelp-buid file line 402

page += ' cache:href="file://' + urllib.parse.quote(os.path.realpath(infile.absfile)) + '"'

with

page += ' cache:href="file:///' + urllib.parse.quote(os.path.realpath(infile.absfile)) + '"'

Now I have this error

file:///C%3A/msys64/home/lillolollo/gimp_master/share/docs/Gimp.Procedure.add_menu_path.page:61: parser error : Opening and ending tag mismatch: p line 39 and page

^
compilation error: file C:/msys64/tmp/tmpw7ynrk7c/mal2html.xsl line 11 element import
xsl:import : invalid URI reference file://C:/msys64/clang64/share/yelp-xsl/xslt/mallard/html/mal2html.xsl

@revelator
Copy link
Contributor

looks a bit like the same error that plagued docbook for some time in mingw the xslt processor cannot handle the format on windows. passing an absolute path without file:: seems to do the trick for docbook but if it can be used here i dont know.

the mingw docbook format looks like this for rewriteprefix -> rewritePrefix="../../share/xml/docbook/xml-dtd-4.4"
and this for msys2 -> rewritePrefix="file:///usr/share/xml/docbook/xml-dtd-4.4"

maybe able to spur some ideas on what is needed ?.

@lillolollo
Copy link
Contributor Author

So i made it work changing yelp-build file

changing the shebang like this

#!/usr/bin/env python3

changing the path here from

XSL_DB2HTML = '/clang64/share/yelp-xsl/xslt/docbook/html/db2html.xsl' XSL_DB2XHTML = '/clang64/share/yelp-xsl/xslt/docbook/html/db2xhtml.xsl' XSL_MALCACHE = '/clang64/share/yelp-xsl/xslt/mallard/cache/mal-cache.xsl' XSL_MAL2HTML = '/clang64/share/yelp-xsl/xslt/mallard/html/mal2html.xsl' XSL_MAL2XHTML = '/clang64/share/yelp-xsl/xslt/mallard/html/mal2xhtml.xsl' XSL_MAL_OPF='/clang64/share/yelp-tools/xslt/mal-opf.xsl' XSL_MAL_NCX='/clang64/share/yelp-tools/xslt/mal-ncx.xsl' YELP_JS_DIR = '/clang64/share/yelp-xsl/js'

to

XSL_DB2HTML = 'C:/msys64/clang64/share/yelp-xsl/xslt/docbook/html/db2html.xsl' XSL_DB2XHTML = 'C:/msys64/clang64/share/yelp-xsl/xslt/docbook/html/db2xhtml.xsl' XSL_MALCACHE = 'C:/msys64/clang64/share/yelp-xsl/xslt/mallard/cache/mal-cache.xsl' XSL_MAL2HTML = 'C:/msys64/clang64/share/yelp-xsl/xslt/mallard/html/mal2html.xsl' XSL_MAL2XHTML = 'C:/msys64/clang64/share/yelp-xsl/xslt/mallard/html/mal2xhtml.xsl' XSL_MAL_OPF='C:/msys64/clang64/share/yelp-tools/xslt/mal-opf.xsl' XSL_MAL_NCX='C:/msys64/clang64/share/yelp-tools/xslt/mal-ncx.xsl' YELP_JS_DIR = 'C:/msys64/clang64/share/yelp-xsl/js'

replacing all the href="file:// with href="file:///

@Biswa96
Copy link
Member

Biswa96 commented Jan 19, 2025

Do the created documentation files contain full path of msys2 installation directory? If true that would cause issue when msys2 install directory changes.

@revelator
Copy link
Contributor

revelator commented Jan 19, 2025

yeah that would suck... maybe change it to this format would help ?

XSL_DB2HTML = '../share/yelp-xsl/xslt/docbook/html/db2html.xsl'

@revelator
Copy link
Contributor

just tested changing all the /mingw*/ paths to ../ so that it points to the local data and it works here.
what im not sure about is changing it in the yelp tools source code ?.'

@lillolollo
Copy link
Contributor Author

So gimp removed the g-ir-doc build so yelp-tool is no needed anymore , but the issue on yelp-tool is still here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants