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

Libraries information cant be seen at snap dev version (due to ThirdPartyLibraries.html not installing correctly) #135

Closed
2 tasks done
projectcad opened this issue Nov 20, 2024 · 9 comments
Assignees
Labels
bug Something isn't working confirmed documentation Improvements or additions to documentation

Comments

@projectcad
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

Libraries information cant be seen at snap dev version

freecad_snap_about

Full version info

OS: Ubuntu Core 22 (X-Cinnamon/cinnamon/xcb)
Architecture: x86_64
Version: 1.1.0dev.39241 (Git) Snap 1198
Build type: Release
Branch: main
Hash: cdb92768fe4f33d900664415c613f9eced5b8927
Python 3.10.12, Qt 5.15.10, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.1
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: unset/unset/Qt default

Subproject(s) affected?

None

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@maxwxyz
Copy link

maxwxyz commented Nov 20, 2024

@adrianinsaval FYI

@maxwxyz maxwxyz added the documentation Improvements or additions to documentation label Nov 20, 2024
@luzpaz luzpaz transferred this issue from FreeCAD/FreeCAD Nov 20, 2024
@furgo16
Copy link
Contributor

furgo16 commented Dec 11, 2024

I can confirm

@furgo16
Copy link
Contributor

furgo16 commented Dec 30, 2024

See #141 (comment). Perhaps a missing file not being included in the snap package?

@luzpaz
Copy link
Collaborator

luzpaz commented Dec 30, 2024

QTextBrowser: No document for file:////snap/freecad/1234/usr/share/doc/FreeCAD//ThirdPartyLibraries.html

In FreeCAD main there is a cmake file that directs the installation of this file:
https://github.com/FreeCAD/FreeCAD/blob/main/src/Doc/ThirdPartyLibraries.html.cmake

Need to check if this is missing.

Edit:

https://github.com/FreeCAD/FreeCAD/blob/e977eb49e37ef836f695809263fa1f56a17cc657/src/Gui/DlgAbout.cpp#L472-L473

void AboutDialog::showLibraryInformation()
{
    auto tab_library = new QWidget();
    tab_library->setObjectName(QString::fromLatin1("tab_library"));
    ui->tabWidget->addTab(tab_library, tr("Libraries"));
    auto hlayout = new QVBoxLayout(tab_library);
    auto textField = new QTextBrowser(tab_library);
    textField->setOpenExternalLinks(false);
    textField->setOpenLinks(false);
    hlayout->addWidget(textField);

    QString baseurl = QString::fromLatin1("file:///%1/ThirdPartyLibraries.html")
                          .arg(QString::fromStdString(App::Application::getHelpDir()));

    textField->setSource(QUrl(baseurl));
}

Edit2:

Looks like the directory it's installed into via cmake on Fedora gets removed

# Belongs in %%license not %%doc
rm -f %{buildroot}%{_docdir}/freecad/ThirdPartyLibraries.html

ref: https://github.com/FreeCAD/FreeCAD/blob/e977eb49e37ef836f695809263fa1f56a17cc657/package/fedora/freecad.spec#L278

@luzpaz
Copy link
Collaborator

luzpaz commented Dec 30, 2024

file:////snap/freecad/1234/usr/share/doc/FreeCAD//ThirdPartyLibraries.html

I just searched my /snap/freecad/1234/usr/share/doc and there is no FreeCAD subdirectory in there. So we know that /snap/freecad/1234/usr/share/doc is legit and the place the snap is pointing to.

@luzpaz
Copy link
Collaborator

luzpaz commented Dec 30, 2024

Where does the flatpak install ThirdPartyLibraries.html to ?
Any idea @adrianinsaval

@luzpaz luzpaz added confirmed bug Something isn't working labels Dec 30, 2024
@luzpaz luzpaz changed the title Libraries information cant be seen at snap dev version Libraries information cant be seen at snap dev version (due to ThirdPartyLibraries.html not installing correctly) Dec 30, 2024
@adrianinsaval
Copy link
Member

adrianinsaval commented Dec 30, 2024

Where does the flatpak install ThirdPartyLibraries.html to ? Any idea @adrianinsaval

/app/share/doc/FreeCAD/ThirdPartyLibraries.html

Looks like the directory it's installed into via cmake on Fedora gets removed

it probably shouldn't be, this was also a problem some time ago in the windows weekly and I had to make sure the files are shipped: FreeCAD/FreeCAD-Bundle@7ce4083

I don't know if the fedora spec stuff is well maintained anymore

@adrianinsaval
Copy link
Member

this line should be adjusted or removed to make sure the file is being shipped. I don't understand why we ever wanted to remove license files anyways sounds top me like that is on the edge of being a license violation

find $CRAFT_PRIME/usr/share/doc/ -type f -not -name 'copyright' -delete

@luzpaz
Copy link
Collaborator

luzpaz commented Dec 31, 2024

Fixed in 392dca0

@luzpaz luzpaz closed this as completed Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants