Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ if(APPLE)
execute_process(COMMAND \"macdeployqt\" \"${CMAKE_INSTALL_PREFIX}/dive.app\")
message(STATUS \"Creating install directory in app bundle\")
execute_process(COMMAND \"${CMAKE_COMMAND}\" -E make_directory \"${CMAKE_INSTALL_PREFIX}/dive.app/Contents/Resources/\")
message(STATUS \"Copying NOTICE to app bundle\")
execute_process(COMMAND \"${CMAKE_COMMAND}\" -E copy \"${CMAKE_CURRENT_BINARY_DIR}/NOTICE\" \"${CMAKE_INSTALL_PREFIX}/dive.app/Contents/Resources/\")
message(STATUS \"Copying Android files to app bundle\")
execute_process(COMMAND \"${CMAKE_COMMAND}\" -E copy \"${CMAKE_INSTALL_PREFIX}/gfxr-replay.apk\" \"${CMAKE_INSTALL_PREFIX}/dive.app/Contents/Resources/\")
execute_process(COMMAND \"${CMAKE_COMMAND}\" -E copy \"${CMAKE_INSTALL_PREFIX}/gfxrecon.py\" \"${CMAKE_INSTALL_PREFIX}/dive.app/Contents/Resources/\")
Expand Down
19 changes: 17 additions & 2 deletions ui/about_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,28 @@ QVBoxLayout* AboutDialog::CreateVersionLayout()
QVBoxLayout* AboutDialog::CreateLicenseLayout()
{
auto third_party_licenses = new QLabel("Third Party Licenses:");
auto license_notice = new QPlainTextEdit();

auto license_notice = new QPlainTextEdit();
QFile licenseFile{ QDir{ QCoreApplication::applicationDirPath() }.filePath("NOTICE") };
QString executionPath = QCoreApplication::applicationDirPath();
QString fileName = "NOTICE";
QString fullPath;

#ifdef Q_OS_MAC
fullPath = executionPath + "/../Resources/" + fileName;
#else
fullPath = QDir(executionPath).filePath(fileName);
#endif

QFile licenseFile(fullPath);
if (licenseFile.open(QIODevice::ReadOnly))
{
license_notice->setPlainText(licenseFile.readAll());
}
else
{
license_notice->setPlainText("License file not found at: " + fullPath);
}

license_notice->setReadOnly(true);

QVBoxLayout* license_layout = new QVBoxLayout;
Expand Down
Loading