Add package-based licenses to about floater
This commit is contained in:
@@ -1377,6 +1377,7 @@ set(viewer_APPSETTINGS_FILES
|
|||||||
app_settings/viewerart.xml
|
app_settings/viewerart.xml
|
||||||
${CMAKE_SOURCE_DIR}/../etc/message.xml
|
${CMAKE_SOURCE_DIR}/../etc/message.xml
|
||||||
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
|
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
|
||||||
|
packages-info.txt
|
||||||
)
|
)
|
||||||
|
|
||||||
source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES})
|
source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES})
|
||||||
|
|||||||
@@ -112,6 +112,9 @@ LLFloaterAbout::LLFloaterAbout()
|
|||||||
LLViewerTextEditor *credits_widget =
|
LLViewerTextEditor *credits_widget =
|
||||||
getChild<LLViewerTextEditor>("credits_editor", true);
|
getChild<LLViewerTextEditor>("credits_editor", true);
|
||||||
|
|
||||||
|
LLViewerTextEditor *licenses_widget =
|
||||||
|
getChild<LLViewerTextEditor>("licenses_editor", true);
|
||||||
|
|
||||||
childSetAction("copy_btn", onAboutClickCopyToClipboard, this);
|
childSetAction("copy_btn", onAboutClickCopyToClipboard, this);
|
||||||
|
|
||||||
if (!support_widget || !credits_widget)
|
if (!support_widget || !credits_widget)
|
||||||
@@ -328,6 +331,30 @@ LLFloaterAbout::LLFloaterAbout()
|
|||||||
credits_widget->setTakesFocus(TRUE);
|
credits_widget->setTakesFocus(TRUE);
|
||||||
credits_widget->setHandleEditKeysDirectly(TRUE);
|
credits_widget->setHandleEditKeysDirectly(TRUE);
|
||||||
|
|
||||||
|
// Get the Versions and Copyrights, created at build time
|
||||||
|
std::string licenses_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "packages-info.txt");
|
||||||
|
llifstream licenses_file;
|
||||||
|
licenses_file.open(licenses_path); /* Flawfinder: ignore */
|
||||||
|
if (licenses_file.is_open())
|
||||||
|
{
|
||||||
|
std::string license_line;
|
||||||
|
licenses_widget->clear();
|
||||||
|
while (std::getline(licenses_file, license_line))
|
||||||
|
{
|
||||||
|
licenses_widget->appendColoredText(license_line + "\n", FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor"));
|
||||||
|
}
|
||||||
|
licenses_file.close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// this case will use the (out of date) hard coded value from the XUI
|
||||||
|
LL_INFOS("AboutInit") << "Could not read licenses file at " << licenses_path << LL_ENDL;
|
||||||
|
}
|
||||||
|
licenses_widget->setCursorPos(0);
|
||||||
|
licenses_widget->setEnabled(FALSE);
|
||||||
|
licenses_widget->setTakesFocus(TRUE);
|
||||||
|
licenses_widget->setHandleEditKeysDirectly(TRUE);
|
||||||
|
|
||||||
center();
|
center();
|
||||||
|
|
||||||
sInstance = this;
|
sInstance = this;
|
||||||
|
|||||||
@@ -81,6 +81,10 @@ class ViewerManifest(LLManifest):
|
|||||||
# ... and the hunspell dictionaries
|
# ... and the hunspell dictionaries
|
||||||
self.path("dictionaries")
|
self.path("dictionaries")
|
||||||
|
|
||||||
|
# include the extracted packages information (see BuildPackagesInfo.cmake)
|
||||||
|
self.path(src=os.path.join(self.args['build'],"packages-info.txt"), dst="packages-info.txt")
|
||||||
|
|
||||||
|
|
||||||
self.end_prefix("app_settings")
|
self.end_prefix("app_settings")
|
||||||
|
|
||||||
if self.prefix(src="character"):
|
if self.prefix(src="character"):
|
||||||
|
|||||||
Reference in New Issue
Block a user