diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index 48f69cfb9..e83bc0c9f 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -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/\") diff --git a/ui/about_window.cpp b/ui/about_window.cpp index d4483cfa3..41498ef05 100644 --- a/ui/about_window.cpp +++ b/ui/about_window.cpp @@ -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;