Skip to content

Commit

Permalink
Gui: Compile CONTRIBUTORS into Qt resources
Browse files Browse the repository at this point in the history
  • Loading branch information
chennes committed Apr 27, 2022
1 parent f8f3ba7 commit 4f9eb9e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/Doc/CMakeLists.txt
Expand Up @@ -3,13 +3,12 @@ configure_file(ThirdPartyLibraries.html
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/ThirdPartyLibraries.html COPYONLY)
configure_file(LICENSE.html
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/LICENSE.html COPYONLY)
configure_file(CONTRIBUTORS
${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DOCDIR}/CONTRIBUTORS COPYONLY)

# The CONTRIBUTORS file is now compiled into the FreeCAD GUI Qt resource file

INSTALL(FILES
ThirdPartyLibraries.html
LICENSE.html
CONTRIBUTORS
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)

Expand Down
3 changes: 3 additions & 0 deletions src/Gui/Icons/resource.qrc
Expand Up @@ -259,4 +259,7 @@
<qresource prefix="/icons/FreeCAD-default/scalable">
<file>Std_ViewScreenShot.svg</file>
</qresource>
<qresource prefix="/doc">
<file alias="CONTRIBUTORS">../../Doc/CONTRIBUTORS</file>
</qresource>
</RCC>
3 changes: 1 addition & 2 deletions src/Gui/Splashscreen.cpp
Expand Up @@ -383,8 +383,7 @@ class AboutDialog::LibraryInfo {

void AboutDialog::showCredits()
{
QString creditsFileURL = QString::fromLatin1("%1/CONTRIBUTORS")
.arg(QString::fromUtf8(App::Application::getHelpDir().c_str()));
auto creditsFileURL = QLatin1String(":/doc/CONTRIBUTORS");
QFile creditsFile(creditsFileURL);

if (!creditsFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
Expand Down

0 comments on commit 4f9eb9e

Please sign in to comment.